From b2e4c34ed46b897526daf1553615860307d19abc Mon Sep 17 00:00:00 2001 From: jmmv Date: Sat, 2 Oct 2004 13:58:58 +0000 Subject: Rework the way intltool is overriden in packages that use it. Up until now we were running intltoolize before the configure stage, which replaced all intltool-*.in files with symlinks to the ones installed by this package. However, the new version of intltool, 0.31.3, has added new substitution patterns to the scripts, which must be replaced by configure scripts at configuration time. The problem is that old configure scripts (pre-0.31.3) do not know about these patterns, which results in them not being substituted, thus causing build failures. So, to fix this issue, replace all intltool-* files _after_ the configure stage, just like we do with libtool. Additional patters might be added through the INTLTOOL_OVERRIDE variable, but I doubt this will be needed). While here, update the dependency to 0.31.3 (has no other effect, as this package is only used at build time by other packages). --- textproc/intltool/buildlink3.mk | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'textproc') diff --git a/textproc/intltool/buildlink3.mk b/textproc/intltool/buildlink3.mk index 730da0c65b1..6dc05943da9 100644 --- a/textproc/intltool/buildlink3.mk +++ b/textproc/intltool/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.4 2004/06/27 17:27:12 jmmv Exp $ +# $NetBSD: buildlink3.mk,v 1.5 2004/10/02 13:58:58 jmmv Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ INTLTOOL_BUILDLINK3_MK:= ${INTLTOOL_BUILDLINK3_MK}+ @@ -11,7 +11,7 @@ BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nintltool} BUILDLINK_PACKAGES+= intltool .if !empty(INTLTOOL_BUILDLINK3_MK:M+) -BUILDLINK_DEPENDS.intltool+= intltool>=0.31 +BUILDLINK_DEPENDS.intltool+= intltool>=0.31.3 BUILDLINK_PKGSRCDIR.intltool?= ../../textproc/intltool BUILDLINK_DEPMETHOD.intltool?= build .endif # INTLTOOL_BUILDLINK3_MK @@ -23,14 +23,19 @@ USE_PERL5?= build .if !empty(INTLTOOL_BUILDLINK3_MK:M+) CONFIGURE_ENV+= INTLTOOL_PERL="${PERL5}" INTLTOOLIZE= ${BUILDLINK_PREFIX.intltool}/bin/intltoolize +INTLTOOL_OVERRIDE?= intltool-* */intltool-* -_CONFIGURE_PREREQ+= intltoolize +_CONFIGURE_POSTREQ+= override-intltool -.PHONY: intltoolize -intltoolize: +.PHONY: override-intltool +override-intltool: ${_PKG_SILENT}${_PKG_DEBUG} \ ${ECHO} "=> Overriding intltool." - @cd ${WRKSRC} && ${INTLTOOLIZE} --force >/dev/null 2>&1 + @cd ${WRKSRC} && for f in ${INTLTOOL_OVERRIDE}; do \ + if ${TEST} -f ${BUILDLINK_PREFIX.intltool}/bin/${f}; then \ + ${CP} ${BUILDLINK_PREFIX.intltool}/bin/${f} ${f}; \ + fi; \ + done .endif # INTLTOOL_BUILDLINK3_MK BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} -- cgit v1.2.3