aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralane <alane@FreeBSD.org>2002-11-24 01:47:49 +0800
committeralane <alane@FreeBSD.org>2002-11-24 01:47:49 +0800
commit269d08e50595a415fb45dd5f8f468fc3aa40ca6f (patch)
treeba6029ef4db1c83e1edcf40155ee8556c9d06735
parentc0142055fad604ece529bf0925f3859b4a51f78e (diff)
downloadfreebsd-ports-gnome-269d08e50595a415fb45dd5f8f468fc3aa40ca6f.tar.gz
freebsd-ports-gnome-269d08e50595a415fb45dd5f8f468fc3aa40ca6f.tar.zst
freebsd-ports-gnome-269d08e50595a415fb45dd5f8f468fc3aa40ca6f.zip
Only use File::Spec if below perl 5.6.1.
PR: 44775
-rw-r--r--net/p5-RPC-XML/Makefile22
1 files changed, 19 insertions, 3 deletions
diff --git a/net/p5-RPC-XML/Makefile b/net/p5-RPC-XML/Makefile
index d7a201b62b35..c0d9f6460000 100644
--- a/net/p5-RPC-XML/Makefile
+++ b/net/p5-RPC-XML/Makefile
@@ -14,8 +14,7 @@ PKGNAMEPREFIX= p5-
MAINTAINER= dom@happygiraffe.net
-BUILD_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/File/Spec.pm:${PORTSDIR}/devel/p5-File-Spec \
- ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/XML/Parser.pm:${PORTSDIR}/textproc/p5-XML-Parser \
+BUILD_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/XML/Parser.pm:${PORTSDIR}/textproc/p5-XML-Parser \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/LWP/UserAgent.pm:${PORTSDIR}/www/p5-libwww
RUN_DEPENDS= ${BUILD_DEPENDS}
@@ -28,4 +27,21 @@ MAN3= Apache::RPC::Server.3 \
RPC::XML::Client.3 \
RPC::XML::Parser.3
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+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}
+
+.if ${PERL_LEVEL} < 500601
+BUILD_DEPENDS+= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/File/Spec.pm:${PORTSDIR}/devel/p5-File-Spec
+.endif # ${PERL_LEVEL} < 500601
+
+.include <bsd.port.post.mk>