diff options
author | sno <sno> | 2009-06-11 10:32:29 +0000 |
---|---|---|
committer | sno <sno> | 2009-06-11 10:32:29 +0000 |
commit | 94904651c21989a99f34fbf656d860690c5f7261 (patch) | |
tree | d7efc1d996af90f4fee6540788388846d11a344f | |
parent | 1feb66d96e989e84a8a62293841a683cfee15859 (diff) | |
download | pkgsrc-94904651c21989a99f34fbf656d860690c5f7261.tar.gz |
- enabling some tuning options to control 64-bit usage of built perl
- add support for Module::Install
Oked by joerg@
-rw-r--r-- | lang/perl5/Makefile | 85 | ||||
-rw-r--r-- | lang/perl5/module.mk | 35 |
2 files changed, 93 insertions, 27 deletions
diff --git a/lang/perl5/Makefile b/lang/perl5/Makefile index fc712736006..4f4970e2cfc 100644 --- a/lang/perl5/Makefile +++ b/lang/perl5/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.151 2009/05/19 08:59:19 wiz Exp $ +# $NetBSD: Makefile,v 1.152 2009/06/11 10:32:29 sno Exp $ DISTNAME= perl-5.10.0 CATEGORIES= lang devel perl5 @@ -71,7 +71,6 @@ CONFIGURE_ARGS+= -Darchname="${MACHINE_ARCH}-${LOWER_OPSYS}" CONFIGURE_ARGS+= -Dcc=${CC:Q} CONFIGURE_ARGS+= -Doptimize=${CFLAGS:M*:Q} CONFIGURE_ARGS+= -Ui_malloc -CONFIGURE_ARGS+= -Uusemymalloc CONFIGURE_ARGS+= -Uinstallusrbinperl MAKE_ENV+= LC_ALL="C" MAKE_JOBS_SAFE= no @@ -170,7 +169,7 @@ LIBSWANTED.Linux= m crypt dl nsl LIBSWANTED.NetBSD= m crypt LIBSWANTED.OpenBSD= m crypt LIBSWANTED.SunOS= m crypt dl socket nsl -LIBSWANTED.AIX= m crypt dl socket nsl bind c +LIBSWANTED.AIX= m crypt dl socket nsl bind c LIBSWANTED= ${LIBSWANTED.${OPSYS}} # Nail down the directories in which the system libraries may be found. @@ -199,19 +198,8 @@ LOCINCPATH= ${LOCALBASE}/include # .if ${OBJECT_FMT} == "a.out" LOCLIBRPATHFLAGS= ${LOCLIBPATH:S/^/${LINKER_RPATH_FLAG} /g} -.elif ${OBJECT_FMT} == "ELF" -LOCLIBRPATHFLAGS= ${LOCLIBPATH:S/^/${COMPILER_RPATH_FLAG}/g} -.elif ${OBJECT_FMT} == "XCOFF" +.elif ${OBJECT_FMT} == "ELF" || ${OBJECT_FMT} == "XCOFF" LOCLIBRPATHFLAGS= ${LOCLIBPATH:S/^/${COMPILER_RPATH_FLAG}/g} -. if !empty(PKG_OPTIONS:Mthreads) -LOCLIBRPATHFLAGS+= \ - ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}-thread-multi-64all/CORE \ - ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}-thread-multi/CORE -. else -LOCLIBRPATHFLAGS+= \ - ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}-multi-64all/CORE \ - ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}-multi/CORE -. endif .else LOCLIBRPATHFLAGS= # empty .endif @@ -240,12 +228,30 @@ PKG_HACKS+= broken-vax-pthreads PERL5_BUILD_THREADS_SUPPORT= no .endif +.include "../../mk/compiler.mk" + PKG_OPTIONS_VAR= PKG_OPTIONS.perl -PKG_SUPPORTED_OPTIONS= debug threads +PKG_OPTIONS_REQUIRED_GROUPS= perlbits +PKG_OPTIONS_GROUP.perlbits= 64bitauto 64bitint 64bitmore 64bitall 64bitnone +PKG_SUPPORTED_OPTIONS= debug threads mstats .if !empty(PERL5_BUILD_THREADS_SUPPORT:M[yY][eE][sS]) PKG_SUGGESTED_OPTIONS= threads .endif +.if ${OPSYS} == "IRIX" +. if defined(ABI) && ${ABI} == "64" +PKG_SUGGESTED_OPTIONS+= 64bitint +. endif +.elif ${OPSYS} == "AIX" +. if defined(ABI) && ${ABI} == "64" +PKG_SUGGESTED_OPTIONS+= 64bitall +. else +PKG_SUGGESTED_OPTIONS+= 64bitnone +. endif +.else +PKG_SUGGESTED_OPTIONS+= 64bitauto +.endif + .include "../../mk/bsd.options.mk" .if !empty(PKG_OPTIONS:Mthreads) @@ -253,24 +259,56 @@ PKG_SUGGESTED_OPTIONS= threads CONFIGURE_ARGS+= -Duseithreads CFLAGS+= ${PTHREAD_CFLAGS} LIBSWANTED+= ${PTHREAD_LIBS:M-l*:S/^-l//} +. if ${OBJECT_FMT} == "XCOFF" +PERL5_RPATH_THREAD=-thread +. endif .else CONFIGURE_ARGS+= -Uuseithreads +. if ${OBJECT_FMT} == "XCOFF" +PERL5_RPATH_THREAD= +. endif .endif .if !empty(PKG_OPTIONS:Mdebug) CFLAGS+= -DDEBUGGING .endif -.if !empty(LIBSWANTED) -CONFIGURE_ARGS+= -Dlibswanted=${LIBSWANTED:Q} +.if !empty(PKG_OPTIONS:Mmstats) +CFLAGS+= -DPERL_DEBUGGING_MSTATS +CONFIGURE_ARGS+= -Dusemymalloc +.else +CONFIGURE_ARGS+= -Uusemymalloc .endif -.include "../../mk/compiler.mk" - -.if ${OPSYS} == "IRIX" -. if defined(ABI) && ${ABI} == "64" +.if !empty(PKG_OPTIONS:M64bitint) CONFIGURE_ARGS+= -Duse64bitint -. endif +.if ${OBJECT_FMT} == "XCOFF" +LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi-64int/CORE +.endif +.elif !empty(PKG_OPTIONS:M64bitmore) +CONFIGURE_ARGS+= -Dusemorebits +.if ${OBJECT_FMT} == "XCOFF" +LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi-64int-ld/CORE +.endif +.elif !empty(PKG_OPTIONS:M64bitall) +CONFIGURE_ARGS+= -Duse64bitall +.if ${OBJECT_FMT} == "XCOFF" +LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi-64all/CORE +.endif +.elif !empty(PKG_OPTIONS:M64bitnone) +CONFIGURE_ARGS+= -Uuse64bitall -Uusemorebits -Uuse64bitint +.if ${OBJECT_FMT} == "XCOFF" +LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi/CORE +.endif +.else +.if ${OBJECT_FMT} == "XCOFF" +BROKEN= XCOFF targets need the path specified where libperl.a resides.\ +Please choose on of 64bitint 64bitmore 64bitall or 64bitnone to allow this. +.endif +.endif + +.if !empty(LIBSWANTED) +CONFIGURE_ARGS+= -Dlibswanted=${LIBSWANTED:Q} .endif # Remove a spurious workdir reference @@ -285,6 +323,7 @@ REPLACE_PERL+= lib/File/DosGlob.pm REPLACE_PERL+= lib/version.pm REPLACE_PERL+= lib/Math/BigFloat/Trace.pm REPLACE_PERL+= lib/Math/BigInt/Trace.pm +REPLACE_PERL+= lib/unicore/mktables # And replace a perl interpreter during the pre-install stage # I think this may be a bootstrap script, so can't use REPLACE_PERL diff --git a/lang/perl5/module.mk b/lang/perl5/module.mk index 90f286c8106..761573b3146 100644 --- a/lang/perl5/module.mk +++ b/lang/perl5/module.mk @@ -1,4 +1,4 @@ -# $NetBSD: module.mk,v 1.59 2009/05/16 07:22:04 rillig Exp $ +# $NetBSD: module.mk,v 1.60 2009/06/11 10:32:29 sno Exp $ # # This Makefile fragment is intended to be included by packages that build # and install perl5 modules. @@ -26,8 +26,11 @@ # PERL5_LDFLAGS extra linker flags to pass on to the build # process. # -# PERL5_MODULE_TYPE "MakeMaker" or "Module::Build" depending on which -# framework is used to build/install the module. +# PERL5_MODULE_TYPE "MakeMaker", "Module::Build" or "Module::Install" +# depending on which framework is used to build/install +# the module. + +.include "../../lang/perl5/license.mk" .if !defined(_PERL5_MODULE_MK) _PERL5_MODULE_MK= # defined @@ -37,7 +40,8 @@ _PERL5_MODULE_MK= # defined PERL5_MODULE_TYPE?= MakeMaker .if (${PERL5_MODULE_TYPE} != "MakeMaker") && \ - (${PERL5_MODULE_TYPE} != "Module::Build") + (${PERL5_MODULE_TYPE} != "Module::Build") && \ + (${PERL5_MODULE_TYPE} != "Module::Install") PKG_FAIL_REASON+= "\`\`${PERL5_MODULE_TYPE}'' is not a supported PERL5_MODULE_TYPE." .endif @@ -53,6 +57,8 @@ _PERL5_MODBUILD_DESTDIR_OPTION=--destdir ${DESTDIR:Q} . else _PERL5_MODBUILD_DESTDIR_OPTION= . endif +.elif ${PERL5_MODULE_TYPE} == "Module::Install" +_PERL5_MODTYPE= modinst .elif ${PERL5_MODULE_TYPE} == "MakeMaker" _PERL5_MODTYPE= makemaker .endif @@ -72,6 +78,11 @@ BUILDLINK_DEPMETHOD.perl+= full BUILD_DEPENDS+= {perl>=5.10,p5-Module-Build>=0.2608nb1}:../../devel/p5-Module-Build .endif +.if empty(PKGPATH:Mdevel/p5-Module-Install) && \ + (${PERL5_MODULE_TYPE} == "Module::Install") +BUILD_DEPENDS+= p5-Module-Install>=0.91:../../devel/p5-Module-Install +.endif + ########################################################################### ### @@ -88,6 +99,7 @@ MAKE_ENV+= LC_ALL=C # MAKE_PARAMS.makemaker+= INSTALLDIRS=vendor MAKE_PARAMS.modbuild+= installdirs=vendor +MAKE_PARAMS.modinst+= installdirs=vendor MAKE_PARAMS+= ${MAKE_PARAMS.${_PERL5_MODTYPE}} @@ -115,6 +127,21 @@ do-modbuild-configure: fi; \ done +.PHONY: do-modinst-configure +do-modinst-configure: + ${RUN} \ + for dir in ${PERL5_CONFIGURE_DIRS}; do \ + cd ${WRKSRC}; \ + if ${TEST} -d "$$dir"/inc/Module; then \ + ${RM} -rf "$$dir"/inc/Module; \ + fi; \ + if ${TEST} -f "$$dir"/Makefile.PL; then \ + cd "$$dir"; \ + ${SETENV} ${MAKE_ENV} \ + ${BUILDLINK_PREFIX.perl}/bin/perl Makefile.PL --skipdeps ${MAKE_PARAMS}; \ + fi; \ + done + .PHONY: perl5-configure perl5-configure: do-${_PERL5_MODTYPE}-configure |