I maintain a bunch of -stable boxes that have a need for perl 5.6.1 and
various modules compiled against that version.  As anyone running
-stable knows, it can be a real hassle to maintain 5.6.1 in addition to
ensuring that modules use the ports and not userland (5.0053) version of
perl.

I've come up with the following patches than I'm hoping people could
test and comment on.  Hopefully, if there aren't any issues they could
be rolled into the ports system.

Apply the patches and define "USE_PORTS_PERL= true" in /etc/make.conf.

I've been using these patches for a while and have not had any problems.

Also, a big shout-out to Knu and his portinstall package.  It's
recursive bulid/install features have made all this absolutely easy to
test.

        --Jerry
--- lang/perl5/Makefile.orig    Wed Oct 31 13:16:36 2001
+++ lang/perl5/Makefile Wed Oct 31 13:20:20 2001
@@ -31,7 +31,7 @@
 .include <bsd.port.pre.mk>
 
 # If you know what you are doing, you may disable this!
-.if ${OSVERSION} > 300003
+.if ${OSVERSION} > 300003 && !defined(USE_PORTS_PERL)
 FORBIDDEN=     perl is in system
 .endif
 
--- Mk/bsd.port.mk.orig Tue Oct  9 03:37:34 2001
+++ Mk/bsd.port.mk      Wed Oct 31 13:15:31 2001
@@ -905,6 +905,17 @@
 .endif
 .endif
 
+.if defined(USE_PORTS_PERL)
+PERL_VERSION=  5.6.1
+PERL_VER=              5.6.1
+PERL5=                 ${LOCALBASE}/bin/perl${PERL_VERSION}
+PERL=                  ${LOCALBASE}/bin/perl
+.if defined(USE_PERL5) || defined(PERL_CONFIGURE)
+BUILD_DEPENDS+=        perl${PERL_VERSION}:${PORTSDIR}/lang/perl5
+RUN_DEPENDS+=  perl${PERL_VERSION}:${PORTSDIR}/lang/perl5
+.endif
+.endif
+
 .if defined(USE_XLIB)
 .if ${XFREE86_VERSION} == 3
 # Don't try to build XFree86-3 even if ALWAYS_BUILD_DEPENDS is defined --

Reply via email to