diff options
author | jmmv <jmmv@pkgsrc.org> | 2004-10-25 18:02:20 +0000 |
---|---|---|
committer | jmmv <jmmv@pkgsrc.org> | 2004-10-25 18:02:20 +0000 |
commit | f604984f302daea1a57f88895c3c58d10d462cc2 (patch) | |
tree | bf5e90a4d4747511d3f0737c0ba6219ad31ec853 /mk | |
parent | 0c4849511b6e1a6b4ef59acff7249e2444624c47 (diff) | |
download | pkgsrc-f604984f302daea1a57f88895c3c58d10d462cc2.tar.gz |
Introduce the PKGCONFIG_OVERRIDE_STAGE variable to let a package
specify when the pkgconfig substitutions have to be applied; defaults
to pre-configure. This is useful because some packages modify the .pc
files during the build process (adding -L flags), so they have to wait
until the build finishes to add the correct rpaths.
Also modify the regular expression in PKGCONFIG_OVERRIDE_SED to match
and fix multiple -L flags, instead of just one.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 2a5e83fc668..144be5a6236 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1522 2004/10/21 17:18:44 tv Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1523 2004/10/25 18:02:20 jmmv Exp $ # # This file is in the public domain. # @@ -2268,10 +2268,17 @@ do-config-star-override: .endif PKGCONFIG_OVERRIDE_SED= \ - -e 's|^\(Libs:.*[ ]\)-L\([ ]*[^ ]*\)\(.*\)$$|\1${COMPILER_RPATH_FLAG}\2 -L\2\3|' + '/^Libs:.*[ ]/s|-L\([ ]*[^ ]*\)|${COMPILER_RPATH_FLAG}\1 -L\1|g' +PKGCONFIG_OVERRIDE_STAGE?= pre-configure .if defined(PKGCONFIG_OVERRIDE) && !empty(PKGCONFIG_OVERRIDE) +. if ${PKGCONFIG_OVERRIDE_STAGE} == "pre-configure" _CONFIGURE_PREREQ+= subst-pkgconfig +. elif ${PKGCONFIG_OVERRIDE_STAGE} == "post-configure" +_CONFIGURE_POSTREQ+= subst-pkgconfig +. else +SUBST_STAGE.pkgconfig= ${PKGCONFIG_OVERRIDE_STAGE} +. endif SUBST_CLASSES+= pkgconfig SUBST_MESSAGE.pkgconfig= "Adding rpaths to pkgconfig files." SUBST_FILES.pkgconfig= ${PKGCONFIG_OVERRIDE:S/^${WRKSRC}\///} |