aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
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
parent688f4508b89e33471bb31a530062cbdf40af4cbc (diff)
downloadfreebsd-ports-graphics-dab1e1cb7ae41cd0f7503009123487546586a651.tar.gz
freebsd-ports-graphics-dab1e1cb7ae41cd0f7503009123487546586a651.tar.zst
freebsd-ports-graphics-dab1e1cb7ae41cd0f7503009123487546586a651.zip
Don't have File::Spec as dep if perl > 5.6.0.
PR: 44725 Approved by: maintainer timeout
Diffstat (limited to 'textproc')
-rw-r--r--textproc/p5-Pod-Parser/Makefile24
-rw-r--r--textproc/p5-PodParser/Makefile24
2 files changed, 44 insertions, 4 deletions
diff --git a/textproc/p5-Pod-Parser/Makefile b/textproc/p5-Pod-Parser/Makefile
index 861c0198138..57f5e2ccb18 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>
diff --git a/textproc/p5-PodParser/Makefile b/textproc/p5-PodParser/Makefile
index 861c0198138..57f5e2ccb18 100644
--- a/textproc/p5-PodParser/Makefile
+++ b/textproc/p5-PodParser/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>