aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2002-11-17 13:16:16 +0800
committerkris <kris@FreeBSD.org>2002-11-17 13:16:16 +0800
commit351661df778b8e04a48ccc79c1c16e6411f43eab (patch)
treec85befa6575c92a14d6f6df3502ed49102e7faf5
parentd1744ccf83fa08506bafa2404fd3aef1fd2d5194 (diff)
downloadfreebsd-ports-gnome-351661df778b8e04a48ccc79c1c16e6411f43eab.tar.gz
freebsd-ports-gnome-351661df778b8e04a48ccc79c1c16e6411f43eab.tar.zst
freebsd-ports-gnome-351661df778b8e04a48ccc79c1c16e6411f43eab.zip
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
-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