pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/perl5 Move options from Makefile to options.mk an...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f336d2e98d43
branches:  trunk
changeset: 610672:f336d2e98d43
user:      sbd <sbd%pkgsrc.org@localhost>
date:      Fri Nov 02 21:22:10 2012 +0000

description:
Move options from Makefile to options.mk and remove a duplicate .include of
mk/compiler.mk

diffstat:

 lang/perl5/Makefile   |  95 +-------------------------------------------------
 lang/perl5/options.mk |  95 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+), 93 deletions(-)

diffs (215 lines):

diff -r ce98ed12ca2a -r f336d2e98d43 lang/perl5/Makefile
--- a/lang/perl5/Makefile       Fri Nov 02 20:59:45 2012 +0000
+++ b/lang/perl5/Makefile       Fri Nov 02 21:22:10 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.187 2012/11/02 08:26:59 sbd Exp $
+# $NetBSD: Makefile,v 1.188 2012/11/02 21:22:10 sbd Exp $
 
 .include "license.mk"
 .include "Makefile.common"
@@ -152,17 +152,7 @@
 .endif
 
 .include "../../mk/dlopen.buildlink3.mk"
-
-CHECK_BUILTIN.pthread:=        yes
-.include "../../mk/pthread.builtin.mk"
-CHECK_BUILTIN.pthread:=        no
-
-# By default, build with threads only if the threads are native.
-.if !empty(USE_BUILTIN.pthread:M[yY][eE][sS])
-PERL5_BUILD_THREADS_SUPPORT=   yes
-.else
-PERL5_BUILD_THREADS_SUPPORT=   ${DLOPEN_REQUIRE_PTHREADS}
-.endif
+.include "options.mk"
 
 .if !empty(MACHINE_PLATFORM:MMirBSD*)
 SUBST_CLASSES+=                        mirbsd-paths
@@ -172,87 +162,6 @@
 SUBST_MESSAGE.mirbsd-paths=    Do not use non-pkgsrc paths on MirBSD.
 .endif
 
-.include "../../mk/compiler.mk"
-
-PKG_OPTIONS_VAR=               PKG_OPTIONS.perl
-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)
-.  include "../../mk/pthread.buildlink3.mk"
-CONFIGURE_ARGS+=       -Duseithreads
-CFLAGS+=               ${PTHREAD_CFLAGS}
-LDFLAGS+=              ${PTHREAD_LDFLAGS}
-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(PKG_OPTIONS:Mmstats)
-CFLAGS+=               -DPERL_DEBUGGING_MSTATS
-CONFIGURE_ARGS+=       -Dusemymalloc
-.else
-CONFIGURE_ARGS+=       -Uusemymalloc
-.endif
-
-.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
-SUBST_VARS.policysh+=  LOCLIBRPATHFLAGS
-
 # Remove a spurious workdir reference
 SUBST_CLASSES+=                rm
 SUBST_STAGE.rm=                pre-install
diff -r ce98ed12ca2a -r f336d2e98d43 lang/perl5/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/perl5/options.mk     Fri Nov 02 21:22:10 2012 +0000
@@ -0,0 +1,95 @@
+# $NetBSD: options.mk,v 1.1 2012/11/02 21:22:10 sbd Exp $
+
+PKG_OPTIONS_VAR=               PKG_OPTIONS.perl
+PKG_OPTIONS_REQUIRED_GROUPS=   perlbits
+PKG_OPTIONS_GROUP.perlbits=    64bitauto 64bitint 64bitmore 64bitall 64bitnone
+PKG_SUPPORTED_OPTIONS=         debug threads mstats
+
+CHECK_BUILTIN.pthread:=        yes
+.include "../../mk/pthread.builtin.mk"
+CHECK_BUILTIN.pthread:=        no
+
+# By default, build with threads only if the threads are native.
+.if !empty(USE_BUILTIN.pthread:M[yY][eE][sS])
+PERL5_BUILD_THREADS_SUPPORT=   yes
+.else
+PERL5_BUILD_THREADS_SUPPORT=   ${DLOPEN_REQUIRE_PTHREADS}
+.endif
+
+# Needs to be include here for the broken-vax-pthreads hack
+.include "hacks.mk"
+
+.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)
+.  include "../../mk/pthread.buildlink3.mk"
+CONFIGURE_ARGS+=       -Duseithreads
+CFLAGS+=               ${PTHREAD_CFLAGS}
+LDFLAGS+=              ${PTHREAD_LDFLAGS}
+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(PKG_OPTIONS:Mmstats)
+CFLAGS+=               -DPERL_DEBUGGING_MSTATS
+CONFIGURE_ARGS+=       -Dusemymalloc
+.else
+CONFIGURE_ARGS+=       -Uusemymalloc
+.endif
+
+.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
+SUBST_VARS.policysh+=  LOCLIBRPATHFLAGS



Home | Main Index | Thread Index | Old Index