Date: Sun, 25 Jan 2004 02:27:20 +0100 (CET) From: Dag-Erling Smørgrav <des@des.no> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/61857: [PATCH] use recent Perl on recent FreeBSD Message-ID: <20040125012720.514AA33C9A@dwp.des.no> Resent-Message-ID: <200401250130.i0P1UJK0071288@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 61857 >Category: ports >Synopsis: [PATCH] use recent Perl on recent FreeBSD >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jan 24 17:30:19 PST 2004 >Closed-Date: >Last-Modified: >Originator: Dag-Erling Smørgrav >Release: FreeBSD 5.2-CURRENT i386 >Organization: >Environment: System: FreeBSD dwp.des.no 5.2-CURRENT FreeBSD 5.2-CURRENT #22: Sat Jan 24 20:11:54 CET 2004 des@dwp.des.no:/usr/obj/usr/src/sys/dwp_smp i386 ports-current >Description: the ports system still defaults to a three-years-old version of Perl, even on the most recent FreeBSD version. while this isn't really a problem for someone relying entirely on the ports tree, anyone using pre-compiled packages will be screwed because packages that depend on Perl will forcibly install Perl 5.6.1 on top of Perl 5.8.2 on top of this, Perl 5.6.1 is by default built to use the system malloc() despite a known bug causing it to perform very poorly when not using its own malloc() implementation. there is also a bug in bsd.ports.mk's Perl support: PERL_LEVEL is derived from PERL_VERSION before PERL_VERSION is actually defined, resulting in PERL_LEVEL not being defined at all. as a result, the default value of PERL_VERSION is irrelevant since the actual Perl port to use is selected on the basis of PERL_LEVEL which is undefined on systems which don't already have Perl. >How-To-Repeat: # pkg_add -r perl5.8 # pkg_add -r porteasy and watch perl5 overwrite (parts of) perl5.8 and forcibly install symlinks and /etc/make.conf entries making it the only Perl. >Fix: apply the attached patch. --- ports-perl.diff begins here --- Index: Mk/bsd.port.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.483 diff -u -r1.483 bsd.port.mk --- Mk/bsd.port.mk 24 Jan 2004 01:26:30 -0000 1.483 +++ Mk/bsd.port.mk 25 Jan 2004 00:48:55 -0000 @@ -1133,22 +1133,11 @@ RUN_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT} .endif -.if !defined(PERL_LEVEL) && defined(PERL_VERSION) -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 ${OSVERSION} >= 501113 +PERL_VERSION?= 5.8.2 +PERL_VER?= 5.8.2 +PERL_ARCH?= mach .else -PERL_LEVEL=0 -.endif # !defined(PERL_LEVEL) && defined(PERL_VERSION) - .if ${OSVERSION} >= 500032 PERL_VERSION?= 5.6.1 PERL_VER?= 5.6.1 @@ -1168,6 +1157,23 @@ PERL_ARCH?= ${ARCH}-freebsd .endif .endif +.endif + +.if !defined(PERL_LEVEL) && defined(PERL_VERSION) +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} +.else +PERL_LEVEL=0 +.endif # !defined(PERL_LEVEL) && defined(PERL_VERSION) .if ${PERL_LEVEL} >= 500800 PERL_PORT?= perl5.8 --- ports-perl.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040125012720.514AA33C9A>