aboutsummaryrefslogtreecommitdiff
path: root/textproc/p5-Pod-Parser
diff options
context:
space:
mode:
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>