summaryrefslogtreecommitdiff
path: root/lang/perl5
diff options
context:
space:
mode:
authorjlam <jlam>2003-09-12 23:10:03 +0000
committerjlam <jlam>2003-09-12 23:10:03 +0000
commit6aa5912a6568a50608fff3065ad3628d81048a07 (patch)
tree1e7eac1cf45d6c4096b77a4e9fbbd12ce26816d5 /lang/perl5
parent34cba3116a29ef3d0ee8acf2db17af02aba71bac (diff)
downloadpkgsrc-6aa5912a6568a50608fff3065ad3628d81048a07.tar.gz
Make this work in pkgviews world where perl's prefix isn't necessarily
buildlink2's idea of BUILDLINK_PREFIX.perl (which usuall ${LOCALBASE}).
Diffstat (limited to 'lang/perl5')
-rw-r--r--lang/perl5/buildlink2.mk13
1 files changed, 10 insertions, 3 deletions
diff --git a/lang/perl5/buildlink2.mk b/lang/perl5/buildlink2.mk
index 3cb17ff63b4..16c38abd3ec 100644
--- a/lang/perl5/buildlink2.mk
+++ b/lang/perl5/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.4 2002/09/05 20:43:19 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.5 2003/09/12 23:10:03 jlam Exp $
.if !defined(PERL5_BUILDLINK2_MK)
PERL5_BUILDLINK2_MK= # defined
@@ -20,9 +20,16 @@ EVAL_PREFIX+= BUILDLINK_PREFIX.perl=perl
BUILDLINK_PREFIX.perl_DEFAULT= ${LOCALBASE}
PERL5?= ${BUILDLINK_PREFIX.perl}/bin/perl
+.if !defined(_PERL5_PREFIX)
+. if exists(${PERL5})
+_PERL5_PREFIX!= eval `${PERL5} -V:prefix 2>/dev/null`; ${ECHO} $${prefix}
+MAKE_FLAGS+= _PERL5_PREFIX="${_PERL5_PREFIX}"
+. endif
+.endif
+
BUILDLINK_FILES.perl= \
- ${PERL5_ARCHLIB:S/^${BUILDLINK_PREFIX.perl}\///}/CORE/* \
- ${PERL5_ARCHLIB:S/^${BUILDLINK_PREFIX.perl}\///}/auto/DynaLoader/DynaLoader.a
+ ${PERL5_ARCHLIB:S/^${_PERL5_PREFIX}\///}/CORE/* \
+ ${PERL5_ARCHLIB:S/^${_PERL5_PREFIX}\///}/auto/DynaLoader/DynaLoader.a
BUILDLINK_TARGETS+= perl-buildlink