Bug 55515 - [patch] extract perl stuff from bsd.port.mk into bsd.perl.mk
Summary: [patch] extract perl stuff from bsd.port.mk into bsd.perl.mk
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-13 01:20 UTC by Sergey Matveychuk
Modified: 2007-09-17 07:11 UTC (History)
1 user (show)

See Also:


Attachments
perls.patch (808 bytes, patch)
2003-08-13 22:34 UTC, Sergey Matveychuk
no flags Details | Diff
remove_perl.patch (5.20 KB, patch)
2003-08-16 22:50 UTC, Sergey Matveychuk
no flags Details | Diff
remove_perl.patch (5.20 KB, patch)
2003-08-16 22:59 UTC, Sergey Matveychuk
no flags Details | Diff
bsd.perl.mk (4.04 KB, text/plain)
2003-08-20 20:39 UTC, Sergey Matveychuk
no flags Details
bsd.perl.mk (4.01 KB, text/plain)
2003-08-25 16:17 UTC, Sergey Matveychuk
no flags Details
bsd.perl.mk.patch (914 bytes, patch)
2004-01-16 10:40 UTC, Sergey Matveychuk
no flags Details | Diff
bsd.port.mk.patch (9.26 KB, patch)
2004-06-17 16:13 UTC, Sergey Matveychuk
no flags Details | Diff
bsd.perl.mk (5.63 KB, text/plain)
2004-06-17 16:13 UTC, Sergey Matveychuk
no flags Details
perl-ports.patch (1.61 KB, patch)
2004-06-17 16:13 UTC, Sergey Matveychuk
no flags Details | Diff
mp3riot.patch (324 bytes, patch)
2004-06-26 07:56 UTC, Sergey Matveychuk
no flags Details | Diff
metalist.patch (409 bytes, patch)
2004-06-26 07:56 UTC, Sergey Matveychuk
no flags Details | Diff
perl-ports.patch (14.10 KB, patch)
2004-06-26 11:21 UTC, Sergey Matveychuk
no flags Details | Diff
perl-ports.patch (14.10 KB, patch)
2004-06-26 16:23 UTC, Sergey Matveychuk
no flags Details | Diff
bsd.port.mk.perl-patch (9.47 KB, text/plain)
2004-08-13 07:37 UTC, Sergey Matveychuk
no flags Details
bsd.perl.mk (5.84 KB, text/plain)
2004-08-13 07:37 UTC, Sergey Matveychuk
no flags Details
perl-ports.diff (24.29 KB, patch)
2004-08-17 09:13 UTC, Sergey Matveychuk
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Matveychuk 2003-08-13 01:20:03 UTC
	
	Extract perl related stuff from bsd.port.mk into bsd.perl.mk.
	No functionality change. Only code moving.

	New file: bsd.perl.mk

Fix: 

# -*- mode: Makefile; tab-width: 4; -*-
# ex: ts=4
#
# $FreeBSD: $
#

##
# USE_PERL5		- Says that the port uses perl5 for building and running.
# USE_PERL5_BUILD	- Says that the port uses perl5 for building.
# USE_PERL5_RUN		- Says that the port uses perl5 for running.
# PERL5			- Set to full path of perl5, either in the system or
#				  installed from a port.
# PERL			- Set to full path of perl5, either in the system or
#				  installed from a port, but without the version number.
#				  Use this if you need to replace "#!" lines in scripts.
# PERL_VERSION	- Full version of perl5 (see below for current value).
# PERL_VER		- Short version of perl5 (see below for current value).
# PERL_LEVEL	- Perl version as an integer of the form MNNNPP, where
#					M is major version, N is minor version, and P is
#					the patch level. E.g., PERL_VERSION=5.6.1 would give
#					a PERL_LEVEL of 500601. This can be used in comparisons
#					to determine if the version of perl is high enough,
#					whether a particular dependency is needed, etc.
# PERL_ARCH		- Directory name of architecture dependent libraries
#				  (value: ${ARCH}-freebsd).
# PERL_PORT		- Name of the perl port that is installed
#				  (value: perl5)
# SITE_PERL		- Directory name where site specific perl packages go.
#					This value is added to PLIST_SUB.
##

.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 ${OSVERSION} >= 500032
PERL_VERSION?=	5.6.1
PERL_VER?=		5.6.1
PERL_ARCH?=		mach
.else
.if ${OSVERSION} >= 500007
PERL_VERSION?=	5.6.0
PERL_VER?=		5.6.0
PERL_ARCH?=		mach
.else
.if ${OSVERSION} >= 300000
PERL_VERSION?=	5.00503
.else
PERL_VERSION?=	5.00502
.endif
PERL_VER?=		5.005
PERL_ARCH?=		${ARCH}-freebsd
.endif
.endif

.if ${PERL_LEVEL} >= 500800
PERL_PORT?=	perl5.8
.else
PERL_PORT?=	perl5
.endif

SITE_PERL?=	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}

PLIST_SUB+=		PERL_VERSION=${PERL_VERSION} \
				PERL_VER=${PERL_VER} \
				PERL_ARCH=${PERL_ARCH} \
				SITE_PERL=${SITE_PERL:S|^${LOCALBASE}/||}

.if defined(PERL_CONFIGURE)
USE_PERL5=	yes
USE_REINPLACE=yes
.endif

.if exists(/usr/bin/perl5) && ${OSVERSION} >= 300000 && ${OSVERSION} < 500036
.if !exists(/usr/bin/perl${PERL_VERSION}) && ( defined(USE_PERL5) || \
	defined(USE_PERL5_BUILD) || defined(USE_PERL5_RUN) )
pre-everything::
	@${ECHO_CMD} "Error: you don't have the right version of perl in /usr/bin."
	@${FALSE}
.endif
PERL5=			/usr/bin/perl${PERL_VERSION}
PERL=			/usr/bin/perl
.else
PERL5=			${LOCALBASE}/bin/perl${PERL_VERSION}
PERL=			${LOCALBASE}/bin/perl
.if defined(USE_PERL5) || defined(USE_PERL5_BUILD)
BUILD_DEPENDS+=	${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
.endif
.if defined(USE_PERL5) || defined(USE_PERL5_RUN)
RUN_DEPENDS+=	${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
.endif
.endif

.if defined(PERL_CONFIGURE)
CONFIGURE_ARGS+=	CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \
			INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib"
CONFIGURE_SCRIPT?=	Makefile.PL
MAN3PREFIX?=		${PREFIX}/lib/perl5/${PERL_VERSION}
.undef HAS_CONFIGURE
.endif


.if defined(PERL_CONFIGURE)
.if !target(do-configure)
do-configure:
	@if [ -f ${SCRIPTDIR}/configure ]; then \
		cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \
		  ${SCRIPTDIR}/configure; \
	fi
	@cd ${CONFIGURE_WRKSRC} && \
		${SETENV} ${CONFIGURE_ENV} \
		${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
	@cd ${CONFIGURE_WRKSRC} && \
		${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile
.endif
.endif
--- bsd.perl.mk ends here -----Bb41nVphmpOfjYLYo4IE67DVALnmo6av8qBzVM5iI9gCzJuJ
Content-Type: text/plain; name="remove_perl.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="remove_perl.patch"

--- bsd.port.mk.1.460	Thu Jul 31 09:21:16 2003
+++ bsd.port.mk	Wed Aug 13 04:02:05 2003
@@ -306,29 +306,6 @@
 #				  CPPFLAGS and LDFLAGS in CONFIGURE_ENV.
 #				  Default: not set.
 ##
-# USE_PERL5		- Says that the port uses perl5 for building and running.
-# USE_PERL5_BUILD	- Says that the port uses perl5 for building.
-# USE_PERL5_RUN		- Says that the port uses perl5 for running.
-# PERL5			- Set to full path of perl5, either in the system or
-#				  installed from a port.
-# PERL			- Set to full path of perl5, either in the system or
-#				  installed from a port, but without the version number.
-#				  Use this if you need to replace "#!" lines in scripts.
-# PERL_VERSION	- Full version of perl5 (see below for current value).
-# PERL_VER		- Short version of perl5 (see below for current value).
-# PERL_LEVEL	- Perl version as an integer of the form MNNNPP, where
-#					M is major version, N is minor version, and P is
-#					the patch level. E.g., PERL_VERSION=5.6.1 would give
-#					a PERL_LEVEL of 500601. This can be used in comparisons
-#					to determine if the version of perl is high enough,
-#					whether a particular dependency is needed, etc.
-# PERL_ARCH		- Directory name of architecture dependent libraries
-#				  (value: ${ARCH}-freebsd).
-# PERL_PORT		- Name of the perl port that is installed
-#				  (value: perl5)
-# SITE_PERL		- Directory name where site specific perl packages go.
-#					This value is added to PLIST_SUB.
-##
 # USE_BISON		- Says that the port uses bison for building.
 ##
 # USE_IMAKE		- Says that the port uses imake.  Implies USE_X_PREFIX.
@@ -958,22 +935,6 @@
 PREFIX?=		${LOCALBASE}
 .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 defined(USE_OPENSSL)
 .if ${OSVERSION} >= 400014
 .if !exists(/usr/lib/libcrypto.so)
@@ -1032,6 +993,10 @@
 .include "${PORTSDIR}/Mk/bsd.ruby.mk"
 .endif
 
+.if defined(USE_PERL) || defined(PERL_CONFIGURE)
+.include "${PORTSDIR}/Mk/bsd.perl.mk"
+.endif
+
 .if defined(USE_QT) || defined(USE_QT2) || defined(USE_QT_VER) || defined(USE_KDELIBS_VER) || defined(USE_KDEBASE_VER)
 .include "${PORTSDIR}/Mk/bsd.kde.mk"
 .endif
@@ -1413,64 +1378,6 @@
 .endif
 .endif
 
-.if ${OSVERSION} >= 500032
-PERL_VERSION?=	5.6.1
-PERL_VER?=		5.6.1
-PERL_ARCH?=		mach
-.else
-.if ${OSVERSION} >= 500007
-PERL_VERSION?=	5.6.0
-PERL_VER?=		5.6.0
-PERL_ARCH?=		mach
-.else
-.if ${OSVERSION} >= 300000
-PERL_VERSION?=	5.00503
-.else
-PERL_VERSION?=	5.00502
-.endif
-PERL_VER?=		5.005
-PERL_ARCH?=		${ARCH}-freebsd
-.endif
-.endif
-
-.if ${PERL_LEVEL} >= 500800
-PERL_PORT?=	perl5.8
-.else
-PERL_PORT?=	perl5
-.endif
-
-SITE_PERL?=	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}
-
-PLIST_SUB+=		PERL_VERSION=${PERL_VERSION} \
-				PERL_VER=${PERL_VER} \
-				PERL_ARCH=${PERL_ARCH} \
-				SITE_PERL=${SITE_PERL:S|^${LOCALBASE}/||}
-
-.if defined(PERL_CONFIGURE)
-USE_PERL5=	yes
-USE_REINPLACE=yes
-.endif
-
-.if exists(/usr/bin/perl5) && ${OSVERSION} >= 300000 && ${OSVERSION} < 500036
-.if !exists(/usr/bin/perl${PERL_VERSION}) && ( defined(USE_PERL5) || \
-	defined(USE_PERL5_BUILD) || defined(USE_PERL5_RUN) )
-pre-everything::
-	@${ECHO_CMD} "Error: you don't have the right version of perl in /usr/bin."
-	@${FALSE}
-.endif
-PERL5=			/usr/bin/perl${PERL_VERSION}
-PERL=			/usr/bin/perl
-.else
-PERL5=			${LOCALBASE}/bin/perl${PERL_VERSION}
-PERL=			${LOCALBASE}/bin/perl
-.if defined(USE_PERL5) || defined(USE_PERL5_BUILD)
-BUILD_DEPENDS+=	${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
-.endif
-.if defined(USE_PERL5) || defined(USE_PERL5_RUN)
-RUN_DEPENDS+=	${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
-.endif
-.endif
-
 .if defined(USE_XLIB)
 .if ${XFREE86_VERSION} == 3
 # Don't try to build XFree86-3 even if ALWAYS_BUILD_DEPENDS is defined --
@@ -2207,14 +2114,6 @@
 LATEST_LINK?=		${PKGBASE}
 PKGLATESTFILE=		${PKGLATESTREPOSITORY}/${LATEST_LINK}${PKG_SUFX}
 
-.if defined(PERL_CONFIGURE)
-CONFIGURE_ARGS+=	CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \
-			INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib"
-CONFIGURE_SCRIPT?=	Makefile.PL
-MAN3PREFIX?=		${PREFIX}/lib/perl5/${PERL_VERSION}
-.undef HAS_CONFIGURE
-.endif
-
 CONFIGURE_SCRIPT?=	configure
 CONFIGURE_TARGET?=	${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CONFIGURE_LOG?=		config.log
@@ -2860,13 +2759,6 @@
 			 ${ECHO_CMD} "      on your system (e.g. an \`ls ${PKG_DBDIR}\`).") | /usr/bin/fmt 75 79 ; \
 			 ${FALSE}; \
 		fi)
-.endif
-.if defined(PERL_CONFIGURE)
-	@cd ${CONFIGURE_WRKSRC} && \
-		${SETENV} ${CONFIGURE_ENV} \
-		${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
-	@cd ${CONFIGURE_WRKSRC} && \
-		${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile
 .endif
 .if defined(USE_IMAKE)
 	@(cd ${CONFIGURE_WRKSRC}; ${SETENV} ${MAKE_ENV} ${XMKMF})
Comment 1 Joe Marcus Clarke freebsd_committer 2003-08-13 01:22:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

Over to portmgr for review and testing.
Comment 2 Sergey Matveychuk 2003-08-13 22:34:30 UTC
This patch breaks perl5 and perl5.8 ports install.
Here is a little and trivial patchset to that ports to fix it.

----
Sem.
Comment 3 Sergey Matveychuk 2003-08-16 22:50:38 UTC
Sorry, the patch has a little but bad typo.
.if defined(USR_PERL)
instead of
.if defined(USE_PERL5)

sorry. Here is a right patch to bsd.port.mk

----
Sem.
Comment 4 Sergey Matveychuk 2003-08-16 22:59:24 UTC
Sergey Matveychuk wrote:
> Sorry, the patch has a little but bad typo.
> .if defined(USR_PERL)
> instead of
> .if defined(USE_PERL5)
> 
> sorry. Here is a right patch to bsd.port.mk

Oops! Sorry again. I've attached an old patch :(
Next try...

----
Sem.
Comment 5 Joe Marcus Clarke freebsd_committer 2003-08-17 19:49:30 UTC
State Changed
From-To: open->analyzed

Patches being tested on bento.
Comment 6 Joe Marcus Clarke 2003-08-18 22:24:48 UTC
On Sat, 2003-08-16 at 17:59, Sergey Matveychuk wrote:
> Sergey Matveychuk wrote:
> > Sorry, the patch has a little but bad typo.
> > .if defined(USR_PERL)
> > instead of
> > .if defined(USE_PERL5)
> > 
> > sorry. Here is a right patch to bsd.port.mk
> 
> Oops! Sorry again. I've attached an old patch :(
> Next try...


FYI, this patch breaks quite a few ports that don't set USE_PERL5 or
PERL_CONFIGURE correctly before bsd.port.pre.mk.  I'm fixing them on the
fly now, but you may want to cook up some patches for maintainers to
look at.

Joe

> 
> ----
> Sem.
> 
> ______________________________________________________________________
> --- bsd.port.mk.1.460	Thu Jul 31 09:21:16 2003
> +++ bsd.port.mk	Wed Aug 13 04:02:05 2003
> @@ -306,29 +306,6 @@
>  #				  CPPFLAGS and LDFLAGS in CONFIGURE_ENV.
>  #				  Default: not set.
>  ##
> -# USE_PERL5		- Says that the port uses perl5 for building and running.
> -# USE_PERL5_BUILD	- Says that the port uses perl5 for building.
> -# USE_PERL5_RUN		- Says that the port uses perl5 for running.
> -# PERL5			- Set to full path of perl5, either in the system or
> -#				  installed from a port.
> -# PERL			- Set to full path of perl5, either in the system or
> -#				  installed from a port, but without the version number.
> -#				  Use this if you need to replace "#!" lines in scripts.
> -# PERL_VERSION	- Full version of perl5 (see below for current value).
> -# PERL_VER		- Short version of perl5 (see below for current value).
> -# PERL_LEVEL	- Perl version as an integer of the form MNNNPP, where
> -#					M is major version, N is minor version, and P is
> -#					the patch level. E.g., PERL_VERSION=5.6.1 would give
> -#					a PERL_LEVEL of 500601. This can be used in comparisons
> -#					to determine if the version of perl is high enough,
> -#					whether a particular dependency is needed, etc.
> -# PERL_ARCH		- Directory name of architecture dependent libraries
> -#				  (value: ${ARCH}-freebsd).
> -# PERL_PORT		- Name of the perl port that is installed
> -#				  (value: perl5)
> -# SITE_PERL		- Directory name where site specific perl packages go.
> -#					This value is added to PLIST_SUB.
> -##
>  # USE_BISON		- Says that the port uses bison for building.
>  ##
>  # USE_IMAKE		- Says that the port uses imake.  Implies USE_X_PREFIX.
> @@ -958,22 +935,6 @@
>  PREFIX?=		${LOCALBASE}
>  .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 defined(USE_OPENSSL)
>  .if ${OSVERSION} >= 400014
>  .if !exists(/usr/lib/libcrypto.so)
> @@ -1032,6 +993,10 @@
>  .include "${PORTSDIR}/Mk/bsd.ruby.mk"
>  .endif
>  
> +.if defined(USE_PERL5) || defined(PERL_CONFIGURE)
> +.include "${PORTSDIR}/Mk/bsd.perl.mk"
> +.endif
> +
>  .if defined(USE_QT) || defined(USE_QT2) || defined(USE_QT_VER) || defined(USE_KDELIBS_VER) || defined(USE_KDEBASE_VER)
>  .include "${PORTSDIR}/Mk/bsd.kde.mk"
>  .endif
> @@ -1413,64 +1378,6 @@
>  .endif
>  .endif
>  
> -.if ${OSVERSION} >= 500032
> -PERL_VERSION?=	5.6.1
> -PERL_VER?=		5.6.1
> -PERL_ARCH?=		mach
> -.else
> -.if ${OSVERSION} >= 500007
> -PERL_VERSION?=	5.6.0
> -PERL_VER?=		5.6.0
> -PERL_ARCH?=		mach
> -.else
> -.if ${OSVERSION} >= 300000
> -PERL_VERSION?=	5.00503
> -.else
> -PERL_VERSION?=	5.00502
> -.endif
> -PERL_VER?=		5.005
> -PERL_ARCH?=		${ARCH}-freebsd
> -.endif
> -.endif
> -
> -.if ${PERL_LEVEL} >= 500800
> -PERL_PORT?=	perl5.8
> -.else
> -PERL_PORT?=	perl5
> -.endif
> -
> -SITE_PERL?=	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}
> -
> -PLIST_SUB+=		PERL_VERSION=${PERL_VERSION} \
> -				PERL_VER=${PERL_VER} \
> -				PERL_ARCH=${PERL_ARCH} \
> -				SITE_PERL=${SITE_PERL:S|^${LOCALBASE}/||}
> -
> -.if defined(PERL_CONFIGURE)
> -USE_PERL5=	yes
> -USE_REINPLACE=yes
> -.endif
> -
> -.if exists(/usr/bin/perl5) && ${OSVERSION} >= 300000 && ${OSVERSION} < 500036
> -.if !exists(/usr/bin/perl${PERL_VERSION}) && ( defined(USE_PERL5) || \
> -	defined(USE_PERL5_BUILD) || defined(USE_PERL5_RUN) )
> -pre-everything::
> -	@${ECHO_CMD} "Error: you don't have the right version of perl in /usr/bin."
> -	@${FALSE}
> -.endif
> -PERL5=			/usr/bin/perl${PERL_VERSION}
> -PERL=			/usr/bin/perl
> -.else
> -PERL5=			${LOCALBASE}/bin/perl${PERL_VERSION}
> -PERL=			${LOCALBASE}/bin/perl
> -.if defined(USE_PERL5) || defined(USE_PERL5_BUILD)
> -BUILD_DEPENDS+=	${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
> -.endif
> -.if defined(USE_PERL5) || defined(USE_PERL5_RUN)
> -RUN_DEPENDS+=	${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
> -.endif
> -.endif
> -
>  .if defined(USE_XLIB)
>  .if ${XFREE86_VERSION} == 3
>  # Don't try to build XFree86-3 even if ALWAYS_BUILD_DEPENDS is defined --
> @@ -2207,14 +2114,6 @@
>  LATEST_LINK?=		${PKGBASE}
>  PKGLATESTFILE=		${PKGLATESTREPOSITORY}/${LATEST_LINK}${PKG_SUFX}
>  
> -.if defined(PERL_CONFIGURE)
> -CONFIGURE_ARGS+=	CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \
> -			INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib"
> -CONFIGURE_SCRIPT?=	Makefile.PL
> -MAN3PREFIX?=		${PREFIX}/lib/perl5/${PERL_VERSION}
> -.undef HAS_CONFIGURE
> -.endif
> -
>  CONFIGURE_SCRIPT?=	configure
>  CONFIGURE_TARGET?=	${MACHINE_ARCH}-portbld-freebsd${OSREL}
>  CONFIGURE_LOG?=		config.log
> @@ -2860,13 +2759,6 @@
>  			 ${ECHO_CMD} "      on your system (e.g. an \`ls ${PKG_DBDIR}\`).") | /usr/bin/fmt 75 79 ; \
>  			 ${FALSE}; \
>  		fi)
> -.endif
> -.if defined(PERL_CONFIGURE)
> -	@cd ${CONFIGURE_WRKSRC} && \
> -		${SETENV} ${CONFIGURE_ENV} \
> -		${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
> -	@cd ${CONFIGURE_WRKSRC} && \
> -		${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile
>  .endif
>  .if defined(USE_IMAKE)
>  	@(cd ${CONFIGURE_WRKSRC}; ${SETENV} ${MAKE_ENV} ${XMKMF})

-- 
PGP Key : http://www.marcuscom.com/pgp.asc

Comment 7 Sergey Matveychuk 2003-08-20 20:39:03 UTC
I'v descover some ports set PERL_CONFIGURE before bsd.port.pre.mk.
It's wrong and PERL_CONFIGURE must be moved above bsd.port.pre.mk.

Here is a full list of this ports:

converters/p5-Convert-Morse
databases/p5-Mysql
databases/p5-DBD-mysql
devel/p5-Dialog
devel/p5-Devel-Peek
mail/p5-Mail-SpamAssassin
math/p5-Math-Currency
math/p5-Math-FixedPrecision
net/p5-Net-SNMP
shells/vshnu
www/checkbot
www/p5-CGI-Cache
www/mod_frontpage

I've attached a new bsd.perl.mk file that prevent include it twice.

----
Sem.
Comment 8 Sergey Matveychuk 2003-08-21 03:51:29 UTC
Sorry. Remove a debug line '@echo perl do-configure' from bsd.perl.mk 
please.

-- 
Sem.
Comment 9 Sergey Matveychuk 2003-08-25 16:17:10 UTC
Here is a good bsd.perl.mk

----
Sem.
Comment 10 Oliver Eikemeier 2003-11-11 15:08:52 UTC
It looks like I can't override do-configure *after* bsd.port.pre.mk
now when PERL_CONFIGURE is set, there should be a pre- and post-part.

And what is wrong with:

  .include <bsd.port.pre.mk>

  .if (we-have-the-right-perl-version-installed)
  #enable perl support
  USE_PERL=	yes
  ...
  .endif

to autodetect if I want to add perl support to a port?
Comment 11 Sergey Matveychuk 2003-11-12 04:25:35 UTC
Oliver Eikemeier wrote:
> It looks like I can't override do-configure *after* bsd.port.pre.mk
> now when PERL_CONFIGURE is set, there should be a pre- and post-part.
> 
> And what is wrong with:
> 
>  .include <bsd.port.pre.mk>
> 
>  .if (we-have-the-right-perl-version-installed)
>  #enable perl support
>  USE_PERL=    yes
>  ...
>  .endif
> 
> to autodetect if I want to add perl support to a port?

I think more port style will:
USE_PERL=yes
BROKEN_WITH_PERL=5.005	# not implemented yet

But I agree, I need more testing with pre/post stage.
Remember, it's my first echelon of patches? :)

---
Sem.
Comment 12 Oliver Eikemeier 2003-11-12 09:42:04 UTC
Sergey Matveychuk wrote:

> Oliver Eikemeier wrote:
> 
>> It looks like I can't override do-configure *after* bsd.port.pre.mk
>> now when PERL_CONFIGURE is set, there should be a pre- and post-part.
>>
>> And what is wrong with:
>>
>>  .include <bsd.port.pre.mk>
>>
>>  .if (we-have-the-right-perl-version-installed)
>>  #enable perl support
>>  USE_PERL=    yes
>>  ...
>>  .endif
>>
>> to autodetect if I want to add perl support to a port?
> 
> I think more port style will:
> USE_PERL=yes
> BROKEN_WITH_PERL=5.005    # not implemented yet

I don't think BROKEN_WITH_* is very useful. If I want to break my port,
I can do that myself and _give a reason_.

But what I wanted to demonstrate is conditionally adding perl support
to an application, not breaking it.

> But I agree, I need more testing with pre/post stage.
> Remember, it's my first echelon of patches? :)

Ready for the next wave...
Comment 13 Sergey Matveychuk 2003-11-12 13:55:12 UTC
Oliver Eikemeier wrote:

> I don't think BROKEN_WITH_* is very useful. If I want to break my port,
> I can do that myself and _give a reason_.

Nope. You misunderstood. BROKEN_WITH_* marks ports only if some 
condition satisfied. E.g. BROKEN_WITH_MYSQL (see comments in 
bsd.port.mk): BROKEN_WITH_MYSQL=41 mean port will not build if you have 
mysql4.1 installed, but just ignores if you use 3.23 or 4.0.

---
Sem.
Comment 14 Oliver Eikemeier 2003-11-12 14:10:12 UTC
Sergey Matveychuk wrote:

> Oliver Eikemeier wrote:
> 
>> I don't think BROKEN_WITH_* is very useful. If I want to break my port,
>> I can do that myself and _give a reason_.
> 
> Nope. You misunderstood. BROKEN_WITH_* marks ports only if some 
> condition satisfied. E.g. BROKEN_WITH_MYSQL (see comments in 
> bsd.port.mk): BROKEN_WITH_MYSQL=41 mean port will not build if you have 
> mysql4.1 installed, but just ignores if you use 3.23 or 4.0.

But why? Can I fix it by installing MySQL 4.0? Can I fix it by deinstalling
MySQL? Does the port support MySQL 3.23? I think I got the idea, it just
doesn't seem to be very useful to me.

USE_MYSQL=	4.0+

would mean that I need at least version 4.0 of MySQL, and I can issue an
error message when I can't install this version because it conflicts with
the already installed version 3.23. But "This port doesn't work with MySQL
version 41" is pretty uninformative. I want at least "This port needs
MySQL version 3.23 or 4.0".
Comment 15 Sergey Matveychuk 2003-11-12 15:26:40 UTC
Oliver Eikemeier wrote:

> But why? Can I fix it by installing MySQL 4.0? Can I fix it by deinstalling

It was not me who contrive it :)

> MySQL? Does the port support MySQL 3.23? I think I got the idea, it just
> doesn't seem to be very useful to me.
> 
> USE_MYSQL=    4.0+
 >
 > would mean that I need at least version 4.0 of MySQL, and I can issue an

It's resonable, but like my example before, some ports may be broken 
with 4.1 because of API's change and work fine with 3.23 and 4.0. Here 
is BROKEN_WITH_* quite fine.

---
Sem.
Comment 16 Oliver Eikemeier 2003-11-12 17:05:58 UTC
Sergey Matveychuk wrote:

> Oliver Eikemeier wrote:
> 
>> But why? Can I fix it by installing MySQL 4.0? Can I fix it by 
>> deinstalling
> 
> It was not me who contrive it :)
> 
>> MySQL? Does the port support MySQL 3.23? I think I got the idea, it just
>> doesn't seem to be very useful to me.
>>
>> USE_MYSQL=    4.0+
> 
>  > would mean that I need at least version 4.0 of MySQL, and I can issue an
> 
> It's resonable, but like my example before, some ports may be broken 
> with 4.1 because of API's change and work fine with 3.23 and 4.0. Here 
> is BROKEN_WITH_* quite fine.

Nope, because I (as a user) don't know how to fix it. The port has to tell me
"I work with 3.23 and 4.0, but not with 4.1". Otherwise I might assume I have
to wait for 4.2. Or try with 4.0, only to discover that the port needs 3.23.

I don't think we need a marco for this, though, because there should be few
such cases. So I don't think BROKEN_WITH_* is a good idea.
Comment 17 Joe Marcus Clarke 2003-11-12 17:12:22 UTC
On Wed, 2003-11-12 at 12:05, Oliver Eikemeier wrote:
> Sergey Matveychuk wrote:
> 
> > Oliver Eikemeier wrote:
> > 
> >> But why? Can I fix it by installing MySQL 4.0? Can I fix it by 
> >> deinstalling
> > 
> > It was not me who contrive it :)
> > 
> >> MySQL? Does the port support MySQL 3.23? I think I got the idea, it just
> >> doesn't seem to be very useful to me.
> >>
> >> USE_MYSQL=    4.0+
> > 
> >  > would mean that I need at least version 4.0 of MySQL, and I can issue an
> > 
> > It's resonable, but like my example before, some ports may be broken 
> > with 4.1 because of API's change and work fine with 3.23 and 4.0. Here 
> > is BROKEN_WITH_* quite fine.
> 
> Nope, because I (as a user) don't know how to fix it. The port has to tell me
> "I work with 3.23 and 4.0, but not with 4.1". Otherwise I might assume I have
> to wait for 4.2. Or try with 4.0, only to discover that the port needs 3.23.
> 
> I don't think we need a marco for this, though, because there should be few
> such cases. So I don't think BROKEN_WITH_* is a good idea.


I agree.  I like the way the Java ports handle this.  The way we do it
now is along the same lines:

.if ${PERL_LEVEL} < 500600
IGNORE=    blah-blah requires Perl 5.6.x or higher
.endif

Joe

-- 
PGP Key : http://www.marcuscom.com/pgp.asc

Comment 18 Sergey Matveychuk 2003-11-13 01:48:05 UTC
Joe Marcus Clarke wrote:
> I agree.  I like the way the Java ports handle this.  The way we do it
> now is along the same lines:
> 
> .if ${PERL_LEVEL} < 500600
> IGNORE=    blah-blah requires Perl 5.6.x or higher
> .endif

OK. It's quite easy to implement:
__prefix=${USE_PERL:C/[^[:digit:].]+$//}
__suffix=${USE_PERL:C/^[0-9.]+//}
__need_perl=${__prefix:C/\.//g:C/^([0-9])/\1./}
__have_perl=${PERL_VER:C/\.//g:C/^([0-9])/\1./}

.if ${__suffix} == "" && ${__have_perl} != ${__need_perl}
IGNORE= You need perl ${__prefix} exectly
.endif
.if ${__suffix} == "+" && ${__have_perl} < ${__need_perl}
IGNORE= You need perl ${__prefix} or grater
.endif
.if ${__suffix} == "-" && ${__have_perl} > ${__need_perl}
IGNORE= You need perl ${__prefix} or less
.endif

But I think BROKEN_WITH_* we need anyway just in case.

---
Sem.
Comment 19 Oliver Eikemeier 2003-11-13 01:57:34 UTC
Sergey Matveychuk wrote:

> Joe Marcus Clarke wrote:
> 
>> I agree.  I like the way the Java ports handle this.  The way we do it
>> now is along the same lines:
>>
>> .if ${PERL_LEVEL} < 500600
>> IGNORE=    blah-blah requires Perl 5.6.x or higher
>> .endif
> 
> OK. It's quite easy to implement:
> __prefix=${USE_PERL:C/[^[:digit:].]+$//}
> __suffix=${USE_PERL:C/^[0-9.]+//}
> __need_perl=${__prefix:C/\.//g:C/^([0-9])/\1./}
> __have_perl=${PERL_VER:C/\.//g:C/^([0-9])/\1./}
> 
> .if ${__suffix} == "" && ${__have_perl} != ${__need_perl}
> IGNORE= You need perl ${__prefix} exectly
> .endif
> .if ${__suffix} == "+" && ${__have_perl} < ${__need_perl}
> IGNORE= You need perl ${__prefix} or grater
> .endif
> .if ${__suffix} == "-" && ${__have_perl} > ${__need_perl}
> IGNORE= You need perl ${__prefix} or less
> .endif
> 
> But I think BROKEN_WITH_* we need anyway just in case.

I'll be totally happy with only

USE_PERL=	yes/5.6/5.6+/5.8/5.8+

everthing else should be handled manually. How many port do we have
that need something else?
Comment 20 Sergey Matveychuk 2003-11-13 03:33:41 UTC
Oliver Eikemeier wrote:

> I'll be totally happy with only
> 
> USE_PERL=    yes/5.6/5.6+/5.8/5.8+
> 
> everthing else should be handled manually. How many port do we have
> that need something else?

OK. I'll ask marcus@: what about tradition where we used to see:
USE_*= yes/undefined
WANT_*_VER= <version>
?

I think USE_*= <version> looks better.

---
Sem.
Comment 21 Joe Marcus Clarke 2003-11-13 03:35:46 UTC
On Wed, 2003-11-12 at 22:33, Sergey Matveychuk wrote:
> Oliver Eikemeier wrote:
> 
> > I'll be totally happy with only
> > 
> > USE_PERL=    yes/5.6/5.6+/5.8/5.8+
> > 
> > everthing else should be handled manually. How many port do we have
> > that need something else?
> 
> OK. I'll ask marcus@: what about tradition where we used to see:
> USE_*= yes/undefined
> WANT_*_VER= <version>
> ?
> 
> I think USE_*= <version> looks better.


I tend to agree.  Like I said, I kind of like the way Java handles this
kind of thing.  And since Perl has more than two versions, it kind of
makes sense to do it this way.

Joe

> 
> ---
> Sem.

-- 
PGP Key : http://www.marcuscom.com/pgp.asc
Comment 22 Sergey Matveychuk 2003-11-13 04:08:30 UTC
Joe Marcus Clarke wrote:
> On Wed, 2003-11-12 at 22:33, Sergey Matveychuk wrote:
> 
>>Oliver Eikemeier wrote:
>>
>>
>>>I'll be totally happy with only
>>>
>>>USE_PERL=    yes/5.6/5.6+/5.8/5.8+
>>>
>>>everthing else should be handled manually. How many port do we have
>>>that need something else?
>>
>>OK. I'll ask marcus@: what about tradition where we used to see:
>>USE_*= yes/undefined
>>WANT_*_VER= <version>
>>?
>>
>>I think USE_*= <version> looks better.
> 
> 
> I tend to agree.  Like I said, I kind of like the way Java handles this
> kind of thing.  And since Perl has more than two versions, it kind of
> makes sense to do it this way.

I told about a common ports style. Not only perl.
Well, I'll Cc kris@. AFAIR he sticks a conservative view.
Kris, what do you think?

Anyway we can do backward compatibility.

---
Sem.
Comment 23 Jun Kuriyama freebsd_committer 2004-01-12 04:03:51 UTC
What's the current status of this PR?
Comment 24 Sergey Matveychuk 2004-01-12 08:21:01 UTC
kuriyama@FreeBSD.org wrote:

> What's the current status of this PR?
> 

tobez@ is thinking still.
This PR brakes some bad formed perl ports. (w/o USE_PERL5 or bad placed 
it, etc.)
They must be fixed first.

-- 
Sem.
Comment 25 Jun Kuriyama freebsd_committer 2004-01-16 02:55:13 UTC
I've fixed some ports and some of others are alread fixed.

Rest of broken ports are:

     devel/p5-Dialog
     mail/p5-Mail-SpamAssassin
     shells/vshnu
     www/checkbot
     www/p5-CGI-Cache
     www/mod_frontpage

I'll fix them when I find a time for it...
Comment 26 Sergey Matveychuk 2004-01-16 10:40:12 UTC
kuriyama@FreeBSD.org wrote:

> I've fixed some ports and some of others are alread fixed.
> 
> Rest of broken ports are:

We need to split bsd.perl.mk on PRE and POST for this.
Here is a patch.

-- 
Sem.
Comment 27 Kris Kennaway 2004-06-17 08:42:55 UTC
What's the status of this PR?  The audit trail mentions that certain
ports are known to need a patch to work with this PR; have patches
been committed?  If not, can you please submit them as a followup?  If
there is still interest in working on this, once I have a more
complete patch I can perform another build to locate ports that
require further work.

Kris
Comment 28 Sergey Matveychuk 2004-06-17 09:24:21 UTC
Kris Kennaway wrote:
> What's the status of this PR?  The audit trail mentions that certain
> ports are known to need a patch to work with this PR; have patches
> been committed?  If not, can you please submit them as a followup?  If
> there is still interest in working on this, once I have a more
> complete patch I can perform another build to locate ports that
> require further work.
> 
> Kris

AFAIR kuriyama@ fixed almost all perl ports. He had troubles with a 
couple of them. After I've split bsd.perl.mk on pre- and post- parts 
(the second patch) fixing them is trivial.

I think the patch needs to test on bento again to find out broken ports.
But the patch is really obsoleted a little (a couple variables I guess, 
not much perl-related stuff will committed) and I need to review it. 
I'll do it as soon as I can (may be this evening or this weekend).

---
Sem.
Comment 29 Kris Kennaway 2004-06-17 09:28:14 UTC
On Thu, Jun 17, 2004 at 12:24:21PM +0400, Sergey Matveychuk wrote:
> Kris Kennaway wrote:
> >What's the status of this PR?  The audit trail mentions that certain
> >ports are known to need a patch to work with this PR; have patches
> >been committed?  If not, can you please submit them as a followup?  If
> >there is still interest in working on this, once I have a more
> >complete patch I can perform another build to locate ports that
> >require further work.
> >
> >Kris
> 
> AFAIR kuriyama@ fixed almost all perl ports. He had troubles with a 
> couple of them. After I've split bsd.perl.mk on pre- and post- parts 
> (the second patch) fixing them is trivial.
> 
> I think the patch needs to test on bento again to find out broken ports.
> But the patch is really obsoleted a little (a couple variables I guess, 
> not much perl-related stuff will committed) and I need to review it. 
> I'll do it as soon as I can (may be this evening or this weekend).

Great.  Once you're ready I'll throw it on pointyhat and give you the
list of broken ports.

Kris
Comment 30 Sergey Matveychuk 2004-06-17 16:13:25 UTC
I was wrong that the patch obsoleted a little.
I almost complete rewrote it and refined a lot with my current experience.

Attachments are: patch for bsd.port.mk, bsd.perl.mk itself and patches 
for three perl ports I know will broken (I think all other was fixed 
before).

So I'll wait for your report after running port build.

---
Sem.
Comment 31 Kris Kennaway 2004-06-25 23:52:03 UTC
On Thu, Jun 17, 2004 at 07:13:25PM +0400, Sergey Matveychuk wrote:
> I was wrong that the patch obsoleted a little.
> I almost complete rewrote it and refined a lot with my current experience.
> 
> Attachments are: patch for bsd.port.mk, bsd.perl.mk itself and patches 
> for three perl ports I know will broken (I think all other was fixed 
> before).
> 
> So I'll wait for your report after running port build.

This patch doesn't pass 'make index':

Generating INDEX - please wait.."Makefile", line 96: Malformed conditional (${PERL_LEVEL} < 500601)
"Makefile", line 96: Need an operator
"Makefile", line 98: if-less endif
"Makefile", line 98: Need an operator
make: fatal errors encountered -- cannot continue
===> chinese/metalist failed
*** Error code 1
"Makefile", line 27: Malformed conditional (${PERL_LEVEL} < 500600)
"Makefile", line 27: Need an operator
"Makefile", line 29: if-less endif
"Makefile", line 29: Need an operator
make: fatal errors encountered -- cannot continue
===> audio/mp3riot failed
*** Error code 1
2 errors

Kris
Comment 32 Sergey Matveychuk 2004-06-26 07:56:57 UTC
Patches here.

-- 
Sem.
Comment 33 Sergey Matveychuk 2004-06-26 11:21:09 UTC
More patches.

It's weird for me. All this ports was fixed by kuriyama@!
I have no ideas why he didn't commit his work :((

-- 
Sem.
Comment 34 Kris Kennaway 2004-06-26 11:56:54 UTC
On Sat, Jun 26, 2004 at 10:56:57AM +0400, Sergey Matveychuk wrote:
> Patches here.

Does this fix the build completely?  Those were just the first two
failures, and there are probably lots more.

Kris
Comment 35 Sergey Matveychuk 2004-06-26 16:23:40 UTC
More patches.

It's weird for me. All this ports was fixed by kuriyama@!
I have no ideas why he didn't commit his work :((

-- 
Sem.

Comment 36 Kris Kennaway 2004-07-08 12:20:17 UTC
On Sat, Jun 26, 2004 at 07:23:40PM +0400, Sergey Matveychuk wrote:
> More patches.
> 
> It's weird for me. All this ports was fixed by kuriyama@!
> I have no ideas why he didn't commit his work :((

Thanks, I'm now testing this again.  I had to add a couple more
USE_PERL5=yes to make index build.  Results as they appear, stay
tuned..

Kris
Comment 37 Sergey Matveychuk freebsd_committer 2004-08-13 07:37:20 UTC
Here is an adapted patch for modern bsd.port.mk and suitable bsd.perl.mk.

-- 
Sem.
Comment 38 Sergey Matveychuk freebsd_committer 2004-08-17 09:13:30 UTC
Here is a patch for all bad formed ports I've found.

-- 
Sem.
Comment 39 Sergey Matveychuk freebsd_committer 2005-03-20 12:08:19 UTC
The reason for the PR was to take perl related stuff out of bsd.port.mk. 
It would make possible to change it without interfering with not perl 
depended ports.

One and a half year has gone. I've tried to keep it up to date and to 
fix ports it makes broken (most bad formed perl depended ports).

There was plans for perl ports improvements after the PR committed but I 
  forgot most now.

Now it's out of date. I have neither physical nor mental power to care 
of it later. So it should be closed if nobody wants to care of it.

If you do and you have any questions, write me, I'll answer any of them.

-- 
Sem.
Comment 40 Kris Kennaway freebsd_committer 2005-10-21 00:54:53 UTC
State Changed
From-To: analyzed->suspended

This is a good idea in principle, but it needs more work to implement. 
Suspend in case an interested party comes along later. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55515 


Manually adding to audit trail by linimon:

at the portmgr meeting at BSDCan 2007, we agreed that this is still a
worthwhile idea, if we can find someone to implement it.

Comment 41 Gabor Kovesdan freebsd_committer 2007-06-18 13:10:32 UTC
Short response to note, that I'm addressing this issue in the SoC 2007 
program.

-- 
Gabor Kovesdan
FreeBSD Volunteer

EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org
WEB:   http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org
Comment 42 Mark Linimon freebsd_committer freebsd_triage 2007-09-17 06:56:14 UTC
State Changed
From-To: suspended->closed

A bsd.perl.mk related to the ideas proposed by sem@ has been committed, 
based on work submitted by gabor in ports/115730 as part of the Google 
Summer of Code 2007. 

Because of the fact that it is perfectly legitimate for a port to want to 
set a conditional dependency on perl based on OPTIONS, for now bsd.perl.mk 
is unconditionally included, and some of the default settings remain in 
bsd.port.mk.  This is intended to be an intermediate step of doing what 
sem@ originally proposed.  pav@ has suggested a WANT_PERL mechanism to 
deal with these kinds of ports. 

Thanks go to marcus and kris for doing earlier testing, and kuriyama and 
others for additional work along the way. 

Special thanks go to sem@ for persistence; this was a hard problem to 
solve and there's still a ways to go yet.  I'm sorry that it took as long 
as it did to clear through the backlog and get to this one.