summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-10-23 13:02:11 +0000
committerjlam <jlam@pkgsrc.org>2001-10-23 13:02:11 +0000
commit936b41aaa1ea35b5419d2d89a11c464a758ad424 (patch)
treea379541c30919f4c6c32cc6c4f4bc9f3fbe9749a /x11
parentc93d2988cf686f9eef936f639e8b8bb3a17c2248 (diff)
downloadpkgsrc-936b41aaa1ea35b5419d2d89a11c464a758ad424.tar.gz
Create private variables _TCLCONFIG_SED and _TKCONFIG_SED that hold the
sed expression used to convert tclConfig.sh and tkConfig.sh into forms usable by buildlink.
Diffstat (limited to 'x11')
-rw-r--r--x11/tk/buildlink.mk17
1 files changed, 12 insertions, 5 deletions
diff --git a/x11/tk/buildlink.mk b/x11/tk/buildlink.mk
index e314e78f7bf..2fb822da952 100644
--- a/x11/tk/buildlink.mk
+++ b/x11/tk/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.6 2001/07/27 13:33:39 jlam Exp $
+# $NetBSD: buildlink.mk,v 1.7 2001/10/23 13:02:11 jlam Exp $
#
# This Makefile fragment is included by packages that use tk.
#
@@ -39,16 +39,23 @@ BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.tk}
pre-configure: ${BUILDLINK_TARGETS.tk}
tk-buildlink: _BUILDLINK_USE
+_TKCONFIG_SED= -e "/^TK_PREFIX/s|${BUILDLINK_PREFIX.tcl}|${BUILDLINK_DIR}|g"
+_TKCONFIG_SED+= -e "s|-L${BUILDLINK_PREFIX.tk}/lib|-L${BUILDLINK_DIR}/lib|g"
+_TKCONFIG_SED+= -e "s|${BUILDLINK_PREFIX.tk}/lib/libtkstub|-L${BUILDLINK_DIR}/lib/libtkstub|g"
+.if defined(X11_BUILDLINK_MK)
+_TKCONFIG_SED+= -e "s|-I${X11BASE}/|-I${BUILDLINK_X11_DIR}/|g"
+_TKCONFIG_SED+= -e "s|-L${X11BASE}/|-L${BUILDLINK_X11_DIR}/|g"
+.endif
+
tkConfig-buildlink:
${_PKG_SILENT}${_PKG_DEBUG} \
cookie=${BUILDLINK_DIR}/.tkConfig_buildlink_done; \
if [ ! -f $${cookie} ]; then \
file=lib/tkConfig.sh; \
${ECHO_MSG} "Creating script ${BUILDLINK_DIR}/$${file}."; \
- ${SED} -e "/^TK_PREFIX/s|${BUILDLINK_PREFIX.tcl}|${BUILDLINK_DIR}|g" \
- -e "s|-L${BUILDLINK_PREFIX.tk}/lib|-L${BUILDLINK_DIR}/lib|g" \
- -e "s|${BUILDLINK_PREFIX.tk}/lib/libtkstub|-L${BUILDLINK_DIR}/lib/libtkstub|g" \
- ${BUILDLINK_PREFIX.tk}/$${file} > ${BUILDLINK_DIR}/$${file}; \
+ ${SED} ${_TKCONFIG_SED} \
+ ${BUILDLINK_PREFIX.tk}/$${file} \
+ > ${BUILDLINK_DIR}/$${file}; \
${CHMOD} +x ${BUILDLINK_DIR}/$${file}; \
${ECHO} ${BUILDLINK_PREFIX.tk}/$${file} >> $${cookie}; \
${TOUCH} ${TOUCH_FLAGS} $${cookie}; \