Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jun 2001 02:19:55 +0800
From:      "Vanilla I . Shu" <vanilla@FreeBSD.org>
To:        freebsd-ports@freebsd.org
Cc:        portmgr@Freebsd.org
Subject:   split perl into bsd.perl.mk
Message-ID:  <20010607021954.A31882@play.cirx.org>

next in thread | raw e-mail | index | archive | help

--ZoaI/ZTpAVc4A5k6
Content-Type: multipart/mixed; boundary="jI8keyz6grp/JLjh"
Content-Disposition: inline


--jI8keyz6grp/JLjh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi.

I split all perl variable into bsd.perl.mk

Could someone review it?..

I add two variable PERL_SITEDIR & PERL_SITEARCHDIR.

and keep old PERL_VER & PERL_ARCH on PLIST_SUB for compatible.


--=20
Retired from the DAMN Taiwan military in the end of 2000.

vanilla (@) FreeBSD.ORG / http://people.FreeBSD.ORG/~vanilla

--jI8keyz6grp/JLjh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bsd.perl.mk"

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

.if !defined(Perl_Include)

Perl_Include=			bsd.perl.mk
Perl_Include_MAINTAINER=	vanilla@FreeBSD.org

# The variables:
#
# USE_PERL5:		Says that the port uses perl5 for building and 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.
# PERL_CONFIGURE:	Configure using Perl's MakeMaker.  Implies USE_PERL5.
# PERL_VERSION:		Full version of perl5 (see below for current value).
# PERL_VER:		Short version of perl5 (see below for current value).
# PERL_ARCH:		Directory name of architecture dependent libraries
#			(${ARCH}-freebsd for the version before 5.6.0)
# PERL_SITEDIR:		Location of site modules tree.
#			It's the same like "lib/perl5/site_perl/${PERL_VER}"
# PERL_SITEARCHDIR:	Location of site modules tree too, but it's for architecture libraries.
#			It's the same like "lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}
#

.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
PERL_SITEDIR=	lib/perl5/site_perl/${PERL_VER}
PERL_SITEARCHDIR=	lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}
PLIST_SUB+=	PERL_VERSION=${PERL_VERSION} \
		PERL_VER=${PERL_VER} \
		PERL_ARCH=${PERL_ARCH} \
		PERL_SITEDIR=${PERL_SITEDIR} \
		PERL_SITEARCHDIR=${PERL_SITEARCHDIR}

.if exists(/usr/bin/perl5) && ${OSVERSION} >= 300000
# 3.0-current after perl5 import
.if !exists(/usr/bin/perl${PERL_VERSION}) && defined(USE_PERL5)
pre-everything:
	@${ECHO} "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)
BUILD_DEPENDS+=	perl${PERL_VERSION}:${PORTSDIR}/lang/perl5
RUN_DEPENDS+=	perl${PERL_VERSION}:${PORTSDIR}/lang/perl5
.endif
.endif

.if defined(PERL_CONFIGURE)
CONFIGURE_ARGS+=	CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}"
CONFIGURE_SCRIPT?=	Makefile.PL
USE_PERL5=	yes
.undef HAS_CONFIGURE

do-configure:
	@${ECHO} "Configure for ${PORTNAME}"
	@cd ${CONFIGURE_WRKSRC} && \
		${SETENV} ${CONFIGURE_ENV} \
		${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
.endif
.endif		# ! defined(Perl_Include)

--jI8keyz6grp/JLjh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="patch-bsd.port.mk"
Content-Transfer-Encoding: quoted-printable

--- bsd.port.mk.old	Thu Jun  7 00:06:11 2001
+++ bsd.port.mk	Thu Jun  7 00:07:20 2001
@@ -707,6 +707,8 @@
=20
 .include "${PORTSDIR}/Mk/bsd.gnome.mk"
=20
+.include "${PORTSDIR}/Mk/bsd.perl.mk"
+
 # defaults to 3.3.6; will be changed to 4.0 when it is ready
 XFREE86_VERSION?=3D	3
=20
@@ -847,41 +849,6 @@
 .endif
 .endif
=20
-.if ${OSVERSION} >=3D 500007
-PERL_VERSION=3D	5.6.0
-PERL_VER=3D		5.6.0
-PERL_ARCH=3D		mach
-.else
-.if ${OSVERSION} >=3D 300000
-PERL_VERSION=3D	5.00503
-.else
-PERL_VERSION=3D	5.00502
-.endif
-PERL_VER=3D		5.005
-PERL_ARCH=3D		${ARCH}-freebsd
-.endif
-PLIST_SUB+=3D		PERL_VERSION=3D${PERL_VERSION} \
-				PERL_VER=3D${PERL_VER} \
-				PERL_ARCH=3D${PERL_ARCH}
-
-.if exists(/usr/bin/perl5) && ${OSVERSION} >=3D 300000
-# 3.0-current after perl5 import
-.if !exists(/usr/bin/perl${PERL_VERSION}) && defined(USE_PERL5)
-pre-everything::
-	@${ECHO} "Error: you don't have the right version of perl in /usr/bin."
-	@${FALSE}
-.endif
-PERL5=3D			/usr/bin/perl${PERL_VERSION}
-PERL=3D			/usr/bin/perl
-.else
-PERL5=3D			${LOCALBASE}/bin/perl${PERL_VERSION}
-PERL=3D			${LOCALBASE}/bin/perl
-.if defined(USE_PERL5)
-BUILD_DEPENDS+=3D	perl${PERL_VERSION}:${PORTSDIR}/lang/perl5
-RUN_DEPENDS+=3D	perl${PERL_VERSION}:${PORTSDIR}/lang/perl5
-.endif
-.endif
-
 .if defined(USE_XLIB)
 .if ${XFREE86_VERSION} =3D=3D 3
 # Don't try to build XFree86-3 even if ALWAYS_BUILD_DEPENDS is defined --
@@ -1250,13 +1217,6 @@
 PKGBASE?=3D			${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
 PKGLATESTFILE?=3D		${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX}
=20
-.if defined(PERL_CONFIGURE)
-CONFIGURE_ARGS+=3D	CC=3D"${CC}" CCFLAGS=3D"${CFLAGS}" PREFIX=3D"${PREFIX}"
-CONFIGURE_SCRIPT?=3D	Makefile.PL
-USE_PERL5=3D			yes
-.undef HAS_CONFIGURE
-.endif
-
 CONFIGURE_SCRIPT?=3D	configure
 CONFIGURE_TARGET?=3D	${MACHINE_ARCH}--freebsd${OSREL}
 CONFIGURE_LOG?=3D		config.log
@@ -1803,11 +1763,6 @@
 			${ECHO} "(end of \"${CONFIGURE_LOG}\")"; \
 			${FALSE}; \
 		fi)
-.endif
-.if defined(PERL_CONFIGURE)
-	@cd ${CONFIGURE_WRKSRC} && \
-		${SETENV} ${CONFIGURE_ENV} \
-		${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
 .endif
 .if defined(USE_IMAKE)
 	@(cd ${CONFIGURE_WRKSRC}; ${SETENV} ${MAKE_ENV} ${XMKMF})

--jI8keyz6grp/JLjh--

--ZoaI/ZTpAVc4A5k6
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iQEeBAEUAwAGBQI7HnRJAAoJELvsbuRo88EEdu8D/iIpKBvs4ijIdka4Klcx4n4U
BCw8aaCcuKAHb9WEB7A6bJET7p9Gh+9SN04jhEbPucbyo7kFfW7x6gwDA3+/lex5
IBC8YO7mB4FwJwNiN1tB8o64ahVfnBvFlVNbv1Br7CXsWDMMwZ7OKcdYpexkG//f
7fAxOycTZ9xt526hXyNrA/4rak17dT3ocwPskmCBCXW0jhEFsYVb6A171qkc+0QN
Nv5EeGG34lDzJBC/AfjD54P7xbZbMB/BbOEgk/tL4lkEqWvYrN8H1mDkmyUgykYd
kIYO1I+9J8c80aFa2fvcPr8MM51sGOyKEbtGTbDfativLprdD4Bb5eojGk3fXzXl
5w==
=vxwb
-----END PGP SIGNATURE-----

--ZoaI/ZTpAVc4A5k6--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010607021954.A31882>