aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/p5-Pod-Parser
diff options
context:
space:
mode:
authoralane <alane@FreeBSD.org>2002-11-15 09:37:43 +0800
committeralane <alane@FreeBSD.org>2002-11-15 09:37:43 +0800
commitdab1e1cb7ae41cd0f7503009123487546586a651 (patch)
treeb6a73a89b246dcd4ce95927fdb9f1e5d3b3a4d90 /textproc/p5-Pod-Parser
parent688f4508b89e33471bb31a530062cbdf40af4cbc (diff)
downloadfreebsd-ports-gnome-dab1e1cb7ae41cd0f7503009123487546586a651.tar.gz
freebsd-ports-gnome-dab1e1cb7ae41cd0f7503009123487546586a651.tar.zst
freebsd-ports-gnome-dab1e1cb7ae41cd0f7503009123487546586a651.zip
Don't have File::Spec as dep if perl > 5.6.0.
PR: 44725 Approved by: maintainer timeout
Diffstat (limited to 'textproc/p5-Pod-Parser')
-rw-r--r--textproc/p5-Pod-Parser/Makefile24
1 files changed, 22 insertions, 2 deletions
diff --git a/textproc/p5-Pod-Parser/Makefile b/textproc/p5-Pod-Parser/Makefile
index 861c0198138c..57f5e2ccb18a 100644
--- a/textproc/p5-Pod-Parser/Makefile
+++ b/textproc/p5-Pod-Parser/Makefile
@@ -14,7 +14,6 @@ PKGNAMEPREFIX= p5-
MAINTAINER= skv@FreeBSD.org
-BUILD_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/File/Spec.pm:${PORTSDIR}/devel/p5-File-Spec
RUN_DEPENDS= ${BUILD_DEPENDS}
PERL_CONFIGURE= yes
@@ -29,4 +28,25 @@ MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
post-patch:
@${FIND} ${WRKSRC} -name \*.orig -exec ${RM} {} \;
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+SITE_PERL?= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}
+
+perl_major=${PERL_VERSION:C|^([1-9]+).*|\1|}
+_perl_minor=00${PERL_VERSION:C|^([1-9]+)\.([0-9]+).*|\2|}
+perl_minor=${_perl_minor:C|^.*(...)|\1|}
+.if ${perl_minor} >= 100
+perl_minor=${PERL_VERSION:C|^([1-9]+)\.([0-9][0-9][0-9]).*|\2|}
+perl_patch=${PERL_VERSION:C|^.*(..)|\1|}
+.else # ${perl_minor} < 100
+_perl_patch=0${PERL_VERSION:C|^([1-9]+)\.([0-9]+)\.*|0|}
+perl_patch=${_perl_patch:C|^.*(..)|\1|}
+.endif # ${perl_minor} < 100
+PERL_LEVEL=${perl_major}${perl_minor}${perl_patch}
+
+BUILD_DEPENDS=
+.if ${PERL_LEVEL} < 500601
+BUILD_DEPENDS+= ${SITE_PERL}/File/Spec.pm:${PORTSDIR}/devel/p5-File-Spec
+.endif # ${PERL_LEVEL} < 500601
+
+.include <bsd.port.post.mk>