pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/perl5 - enabling some tuning options to control 6...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/712a39a89ac0
branches:  trunk
changeset: 394513:712a39a89ac0
user:      sno <sno%pkgsrc.org@localhost>
date:      Thu Jun 11 10:32:29 2009 +0000

description:
- enabling some tuning options to control 64-bit usage of built perl
- add support for Module::Install

Oked by joerg@

diffstat:

 lang/perl5/Makefile  |  85 +++++++++++++++++++++++++++++++++++++--------------
 lang/perl5/module.mk |  35 ++++++++++++++++++--
 2 files changed, 93 insertions(+), 27 deletions(-)

diffs (235 lines):

diff -r 41b1922533ef -r 712a39a89ac0 lang/perl5/Makefile
--- a/lang/perl5/Makefile       Thu Jun 11 10:07:21 2009 +0000
+++ b/lang/perl5/Makefile       Thu Jun 11 10:32:29 2009 +0000
@@ -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+=       -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.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 @@
 #
 .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 @@
 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 @@
 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 !empty(PKG_OPTIONS:M64bitint)
+CONFIGURE_ARGS+=       -Duse64bitint
+.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 ${OPSYS} == "IRIX"
-.  if defined(ABI) && ${ABI} == "64"
-CONFIGURE_ARGS+=       -Duse64bitint
-.  endif
+.if !empty(LIBSWANTED)
+CONFIGURE_ARGS+=       -Dlibswanted=${LIBSWANTED:Q}
 .endif
 
 # Remove a spurious workdir reference
@@ -285,6 +323,7 @@
 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 -r 41b1922533ef -r 712a39a89ac0 lang/perl5/module.mk
--- a/lang/perl5/module.mk      Thu Jun 11 10:07:21 2009 +0000
+++ b/lang/perl5/module.mk      Thu Jun 11 10:32:29 2009 +0000
@@ -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_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 @@
 .  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 @@
 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_PARAMS.makemaker+=        INSTALLDIRS=vendor
 MAKE_PARAMS.modbuild+= installdirs=vendor
+MAKE_PARAMS.modinst+=  installdirs=vendor
 
 MAKE_PARAMS+=  ${MAKE_PARAMS.${_PERL5_MODTYPE}}
 
@@ -115,6 +127,21 @@
                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
 



Home | Main Index | Thread Index | Old Index