summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-02-14 17:18:49 +0000
committerjlam <jlam@pkgsrc.org>2004-02-14 17:18:49 +0000
commitc24ff672f765555f803b104e5a5c6950d71bbf6e (patch)
treef49bc337b1c31791843a07b6ab29a51fabaa6000 /mk
parent36fc34e730f1a92a749afe895084386c2383859d (diff)
downloadpkgsrc-c24ff672f765555f803b104e5a5c6950d71bbf6e.tar.gz
Make LIBTOOL_OVERRIDE more powerful by taking a list of shell globs
relative to ${WRKSRC}. Also automaticslly set LIBTOOL_OVERRIDE if USE_LIBTOOL is defined, as the vast majority of packages need both if they need USE_LIBTOOL. The default LIBTOOL_OVERRIDE overrides libtool scripts up to a directory depth of 2 within ${WRKSRC}. Note that SHLIBTOOL_OVERRIDE must still be set manually in package Makefiles that need it; however, it's also been changed to be a list of shell globs relative to ${WRKSRC}.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk43
1 files changed, 22 insertions, 21 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index cb1acec16cd..ed87b852961 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1403 2004/02/14 15:22:42 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1404 2004/02/14 17:18:49 jlam Exp $
#
# This file is in the public domain.
#
@@ -405,6 +405,7 @@ SHLIBTOOL?= ${PKG_SHLIBTOOL}
BUILD_DEPENDS+= libtool-base>=${LIBTOOL_REQD}:../../devel/libtool-base
CONFIGURE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
MAKE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
+LIBTOOL_OVERRIDE?= libtool */libtool */*/libtool
.endif
.if defined(BUILD_USES_MSGFMT) && \
@@ -2429,31 +2430,31 @@ _CONFIGURE_POSTREQ+= do-libtool-override
.PHONY: do-libtool-override
do-libtool-override:
. if defined(LIBTOOL_OVERRIDE)
-. for libtool in ${LIBTOOL_OVERRIDE}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- if [ -f ${libtool} ]; then \
- (${ECHO} '#!${CONFIG_SHELL}'; \
- ${ECHO} 'exec ${_LIBTOOL} "$$@"'; \
- ) > ${libtool}.override; \
- if [ -x ${libtool} ]; then \
- ${CHMOD} +x ${libtool}.override; \
+. for _pattern_ in ${LIBTOOL_OVERRIDE}
+ ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \
+ for file in ${_pattern_}; do \
+ if [ -f "$$file" ]; then \
+ ${RM} -f $$file; \
+ (${ECHO} '#!${CONFIG_SHELL}'; \
+ ${ECHO} 'exec ${_LIBTOOL} "$$@"'; \
+ ) > $$file; \
+ ${CHMOD} +x $$file; \
fi; \
- ${MV} -f ${libtool}.override ${libtool}; \
- fi
+ done
. endfor
. endif
. if defined(SHLIBTOOL_OVERRIDE)
-. for libtool in ${SHLIBTOOL_OVERRIDE}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- if [ -f ${libtool} ]; then \
- (${ECHO} '#!${CONFIG_SHELL}'; \
- ${ECHO} 'exec ${_SHLIBTOOL} "$$@"'; \
- ) > ${libtool}.override; \
- if [ -x ${libtool} ]; then \
- ${CHMOD} +x ${libtool}.override; \
+. for _pattern_ in ${SHLIBTOOL_OVERRIDE}
+ ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \
+ for file in ${_pattern_}; do \
+ if [ -f "$$file" ]; then \
+ ${RM} -f $$file; \
+ (${ECHO} '#!${CONFIG_SHELL}'; \
+ ${ECHO} 'exec ${_SHLIBTOOL} "$$@"'; \
+ ) > $$file; \
+ ${CHMOD} +x $$file; \
fi; \
- ${MV} -f ${libtool}.override ${libtool}; \
- fi
+ done
. endfor
. endif
.endif