summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2002-11-17 05:16:16 +0000
committerKris Kennaway <kris@FreeBSD.org>2002-11-17 05:16:16 +0000
commita8090228cab1d27809494584facd16b31bfa9994 (patch)
treed59a14d9c10b542c3fd3f99dcb22fe2eb3638514 /Mk
parentResurrection of port devel/pear (diff)
Clean up handling of perl-related variables:
* Add USE_PERL_RUN and USE_PERL_BUILD to add {RUN,BUILD}_DEPENDS on the perl5 port if required (i.e. on 5.0 or later) (USE_PERL adds both, which is not always appropriate) [1] * On 5.0 systems without perl, depend on the full path to the perl port binaries to not pick up the system perl wrapper * If PERL_CONFIGURE is defined, move the USE_PERL setting earlier in the makefile so it actually adds a dependency. [2] Noticed by: dougb [1] Submitted by: sobomax [2] Tested on: bento
Notes
Notes: svn path=/head/; revision=70287
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk18
1 files changed, 13 insertions, 5 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 8f30c56529a3..9831537e1bc3 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -200,6 +200,8 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# LIBTOOLFLAGS - Additional flags to pass to ltconfig
# (default: --disable-ltlibs)
# USE_PERL5 - Says that the port uses perl5 for building and running.
+# USE_PERL5_BUILD - Says that the port uses perl5 for building.
+# USE_PERL5_RUN - Says that the port uses perl5 for running.
# PERL5 - Set to full path of perl5, either in the system or
# installed from a port.
# PERL - Set to full path of perl5, either in the system or
@@ -1006,8 +1008,13 @@ PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \
PERL_VER=${PERL_VER} \
PERL_ARCH=${PERL_ARCH}
+.if defined(PERL_CONFIGURE)
+USE_PERL5= yes
+.endif
+
.if exists(/usr/bin/perl5) && ${OSVERSION} >= 300000 && ${OSVERSION} < 500036
-.if !exists(/usr/bin/perl${PERL_VERSION}) && defined(USE_PERL5)
+.if !exists(/usr/bin/perl${PERL_VERSION}) && ( defined(USE_PERL5) || \
+ defined(USE_PERL5_BUILD) || defined(USE_PERL5_RUN) )
pre-everything::
@${ECHO_CMD} "Error: you don't have the right version of perl in /usr/bin."
@${FALSE}
@@ -1017,9 +1024,11 @@ PERL= /usr/bin/perl
.else
PERL5= ${LOCALBASE}/bin/perl${PERL_VERSION}
PERL= ${LOCALBASE}/bin/perl
-.if defined(USE_PERL5)
-BUILD_DEPENDS+= perl${PERL_VERSION}:${PORTSDIR}/lang/perl5
-RUN_DEPENDS+= perl${PERL_VERSION}:${PORTSDIR}/lang/perl5
+.if defined(USE_PERL5) || defined(USE_PERL5_BUILD)
+BUILD_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/perl5
+.endif
+.if defined(USE_PERL5) || defined(USE_PERL5_RUN)
+RUN_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/perl5
.endif
.endif
@@ -1744,7 +1753,6 @@ PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${LATEST_LINK}${PKG_SUFX}
CONFIGURE_ARGS+= CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \
INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib"
CONFIGURE_SCRIPT?= Makefile.PL
-USE_PERL5= yes
.undef HAS_CONFIGURE
.endif