summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2016-02-23 15:19:23 +0000
committerjoerg <joerg@pkgsrc.org>2016-02-23 15:19:23 +0000
commite280ebfa474e0937534ff710ffd6d5568c95ef35 (patch)
tree6b452e026e7a9c1ba106f223fcfe290cbf134674 /mk
parent6dc1177a73179d7e35e2ab88a63ac791f859a7b7 (diff)
downloadpkgsrc-e280ebfa474e0937534ff710ffd6d5568c95ef35.tar.gz
Add a new override mechanism for depcomp, similar to the existing
overrides for libtool. This allows us to easily get the fixed version from our libtool in place without having to hunt down for the specific bugs in random places. Disable the override explicitly in clisp, which installs a copy without explicitly depending on libtool at run time.
Diffstat (limited to 'mk')
-rw-r--r--mk/configure/libtool-override.mk38
1 files changed, 33 insertions, 5 deletions
diff --git a/mk/configure/libtool-override.mk b/mk/configure/libtool-override.mk
index 259fdd8e30a..46bf4a484de 100644
--- a/mk/configure/libtool-override.mk
+++ b/mk/configure/libtool-override.mk
@@ -1,23 +1,26 @@
-# $NetBSD: libtool-override.mk,v 1.11 2015/05/04 19:23:19 joerg Exp $
+# $NetBSD: libtool-override.mk,v 1.12 2016/02/23 15:19:23 joerg Exp $
######################################################################
-### {libtool,shlibtool}-override (PRIVATE)
+### {libtool,shlibtool,depcomp}-override (PRIVATE)
######################################################################
-### {libtool,shlibtool}-override replace any existing libtool under
+### {libtool,shlibtool,depcomp}-override replace any existing libtool under
### ${WRKSRC} with the version installed by pkgsrc.
+### depcomp-override replaces the depcomp tool with the canonical version.
###
-do-configure-post-hook: libtool-override
+do-configure-post-hook: libtool-override depcomp-override
.if defined(SHLIBTOOL_OVERRIDE)
do-configure-post-hook: shlibtool-override
.endif
OVERRIDE_DIRDEPTH.libtool?= ${OVERRIDE_DIRDEPTH}
OVERRIDE_DIRDEPTH.shlibtool?= ${OVERRIDE_DIRDEPTH}
+OVERRIDE_DIRDEPTH.depcomp?= ${OVERRIDE_DIRDEPTH}
_OVERRIDE_PATH.libtool= ${LIBTOOL}
_OVERRIDE_PATH.shlibtool= ${SHLIBTOOL}
+_OVERRIDE_PATH.depcomp= ${LOCALBASE}/share/libtool/config/depcomp
-.for _script_ in libtool shlibtool
+.for _script_ in libtool shlibtool depcomp
_SCRIPT.${_script_}-override= \
${RM} -f $$file; \
${ECHO} "\#!"${TOOLS_SH:Q} > $$file; \
@@ -74,3 +77,28 @@ shlibtool-override:
depth=`${EXPR} $$depth + 1`; pattern="*/$$pattern"; \
done
.endif
+
+.PHONY: depcomp-override
+depcomp-override:
+ @${STEP_MSG} "Modifying libtool scripts to use pkgsrc depcomp"
+.if !empty(DEPCOMP_OVERRIDE:U)
+ ${RUN} \
+ cd ${WRKSRC}; \
+ set -- dummy ${DEPCOMP_OVERRIDE}; shift; \
+ while [ $$# -gt 0 ]; do \
+ file="$$1"; shift; \
+ [ -f "$$file" ] || [ -h "$$file" ] || continue; \
+ ${_SCRIPT.${.TARGET}}; \
+ done
+.else
+ ${RUN} \
+ cd ${WRKSRC}; \
+ depth=0; pattern=depcomp; \
+ while [ $$depth -le ${OVERRIDE_DIRDEPTH.depcomp} ]; do \
+ for file in $$pattern; do \
+ [ -f "$$file" ] || [ -h "$$file" ] || continue; \
+ ${_SCRIPT.${.TARGET}}; \
+ done; \
+ depth=`${EXPR} $$depth + 1`; pattern="*/$$pattern"; \
+ done
+.endif