diff options
author | jlam <jlam@pkgsrc.org> | 2001-11-25 23:09:19 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-11-25 23:09:19 +0000 |
commit | 654a7540827da2c87b1781b112ba3fbc22d50ae9 (patch) | |
tree | 1b7f3be3f41f1235df80d02af5bd32ec2763518b /lang/perl5 | |
parent | d14905f88dd227e1467c0745ced67415dc2ced9c (diff) | |
download | pkgsrc-654a7540827da2c87b1781b112ba3fbc22d50ae9.tar.gz |
Allow passing flags to linker and to compiler via LDFLAGS and CPPFLAGS
settings in the package Makefile.
Diffstat (limited to 'lang/perl5')
-rw-r--r-- | lang/perl5/buildlink.mk | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lang/perl5/buildlink.mk b/lang/perl5/buildlink.mk index ba01628ee7c..bb885b24afa 100644 --- a/lang/perl5/buildlink.mk +++ b/lang/perl5/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.1 2001/11/24 04:40:31 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.2 2001/11/25 23:09:19 jlam Exp $ # # This Makefile fragment is included by packages that use perl. # @@ -24,9 +24,13 @@ BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.perl} _CONFIG_PM= ${PERL5_ARCHLIB}/Config.pm _BUILDLINK_CONFIG_PM= ${_CONFIG_PM:S/${BUILDLINK_PREFIX.perl}\//${BUILDLINK_DIR}\//} +_LDFLAGS_LIBDIRS?= ${LDFLAGS:M-L*:S/^-L//} + _CONFIG_PM_SED= \ - -e "s|-I${LOCALBASE}/include|-I${BUILDLINK_DIR}/include|g" \ - -e "s|-L${LOCALBASE}/lib|-L${BUILDLINK_DIR}/lib|g" + -e "/^libpth=/s|${LOCALBASE}/lib|${_LDFLAGS_LIBDIRS}|g" \ + -e "/^libspath=/s|${LOCALBASE}/lib|${_LDFLAGS_LIBDIRS}|g" \ + -e "s|-I${LOCALBASE}/include|${CPPFLAGS}|g" \ + -e "s|-L${LOCALBASE}/lib|${LDFLAGS}|g" .if exists(${PERL5}) . if exists(${BUILDLINK_PREFIX.perl}/share/mk/bsd.perl.mk) |