aboutsummaryrefslogtreecommitdiff
path: root/Mk/Uses/perl5.mk
diff options
context:
space:
mode:
Diffstat (limited to 'Mk/Uses/perl5.mk')
-rw-r--r--Mk/Uses/perl5.mk27
1 files changed, 19 insertions, 8 deletions
diff --git a/Mk/Uses/perl5.mk b/Mk/Uses/perl5.mk
index 9d3d8e436474..818954fb2c22 100644
--- a/Mk/Uses/perl5.mk
+++ b/Mk/Uses/perl5.mk
@@ -42,12 +42,13 @@ IGNORE= Incorrect 'USES+=perl5:${perl5_ARGS}' perl5 takes no arguments
USE_PERL5?= run build
-.if exists(${LOCALBASE}/bin/perl5)
+# remove when 5.20 goes away.
.sinclude "${LOCALBASE}/etc/perl5_version"
-.if !defined(PERL_VERSION)
-PERL_VERSION!= perl -e 'printf "%vd\n", $$^V;'
-.endif
+.if defined(PERL_VERSION)
+PERL5_DEPEND= ${PERL5}
+THIS_IS_OLD_PERL= yes
.else
+# end of remove
.include "${PORTSDIR}/Mk/bsd.default-versions.mk"
.if ${PERL5_DEFAULT} == 5.16
.include "${PORTSDIR}/lang/perl5.16/version.mk"
@@ -105,6 +106,12 @@ SITE_ARCH_REL?= ${SITE_PERL_REL}/${PERL_ARCH}/${PERL_VER}
SITE_ARCH?= ${LOCALBASE}/${SITE_ARCH_REL}
SITE_MAN3_REL?= ${SITE_PERL_REL}/man/man3
SITE_MAN3?= ${PREFIX}/${SITE_MAN3_REL}
+.if defined(THIS_IS_OLD_PERL)
+SITE_MAN1_REL?= share/man/man1
+.else
+SITE_MAN1_REL?= ${SITE_PERL_REL}/man/man1
+.endif
+SITE_MAN1?= ${PREFIX}/${SITE_MAN1_REL}
PERL5= ${LOCALBASE}/bin/perl${PERL_VERSION}
PERL= ${LOCALBASE}/bin/perl
@@ -165,6 +172,7 @@ _INCLUDE_USES_PERL5_POST_MK= yes
PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \
PERL_VER=${PERL_VER} \
+ PERL5_MAN1=${SITE_MAN1_REL} \
PERL5_MAN3=${SITE_MAN3_REL} \
SITE_PERL=${SITE_PERL_REL} \
SITE_ARCH=${SITE_ARCH_REL}
@@ -218,19 +226,19 @@ CONFIGURE_ENV+= PERL_MM_USE_DEFAULT="YES"
.endif # configure
.if ${_USE_PERL5:Mextract}
-EXTRACT_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
+EXTRACT_DEPENDS+= ${PERL5_DEPEND}:${PORTSDIR}/lang/${PERL_PORT}
.endif
.if ${_USE_PERL5:Mpatch}
-PATCH_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
+PATCH_DEPENDS+= ${PERL5_DEPEND}:${PORTSDIR}/lang/${PERL_PORT}
.endif
.if ${_USE_PERL5:Mbuild}
-BUILD_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
+BUILD_DEPENDS+= ${PERL5_DEPEND}:${PORTSDIR}/lang/${PERL_PORT}
.endif
.if ${_USE_PERL5:Mrun}
-RUN_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
+RUN_DEPENDS+= ${PERL5_DEPEND}:${PORTSDIR}/lang/${PERL_PORT}
.endif
.if ${_USE_PERL5:Mconfigure}
@@ -238,6 +246,9 @@ CONFIGURE_ARGS+= CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \
INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib"
CONFIGURE_SCRIPT?= Makefile.PL
MAN3PREFIX?= ${PREFIX}/${SITE_PERL_REL}
+.if !defined(THIS_IS_OLD_PERL)
+MAN1PREFIX?= ${PREFIX}/${SITE_PERL_REL}
+.endif
.undef HAS_CONFIGURE
.if !target(do-configure)