From 140205526f882bd8be5a70c7d6a1a7b68b4ac9b7 Mon Sep 17 00:00:00 2001 From: dkwo Date: Sat, 25 Sep 2021 21:27:15 +0200 Subject: [PATCH] perl: edit config, remove patches --- srcpkgs/perl/patches/D-SHA-CFLAGS.diff | 34 ------- srcpkgs/perl/patches/cleanup-paths.diff | 89 ------------------- srcpkgs/perl/patches/cpan_definstalldirs.diff | 38 -------- srcpkgs/perl/patches/cross-Makefile.SH.patch | 62 ------------- .../perl/patches/drop_fstack_protector.diff | 59 ------------ srcpkgs/perl/patches/usr_local.diff | 64 ------------- srcpkgs/perl/template | 58 +++++++----- 7 files changed, 37 insertions(+), 367 deletions(-) delete mode 100644 srcpkgs/perl/patches/D-SHA-CFLAGS.diff delete mode 100644 srcpkgs/perl/patches/cleanup-paths.diff delete mode 100644 srcpkgs/perl/patches/cpan_definstalldirs.diff delete mode 100644 srcpkgs/perl/patches/cross-Makefile.SH.patch delete mode 100644 srcpkgs/perl/patches/drop_fstack_protector.diff delete mode 100644 srcpkgs/perl/patches/usr_local.diff diff --git a/srcpkgs/perl/patches/D-SHA-CFLAGS.diff b/srcpkgs/perl/patches/D-SHA-CFLAGS.diff deleted file mode 100644 index 7c580648d22a..000000000000 --- a/srcpkgs/perl/patches/D-SHA-CFLAGS.diff +++ /dev/null @@ -1,34 +0,0 @@ -From 6d8f0056bcf9dfdd34a6cb5e4ccac44bebbc3edd Mon Sep 17 00:00:00 2001 -From: Vladimir Smirnov -Date: Mon, 15 Jun 2015 22:15:59 +0200 -Subject: [PATCH] [PATCH] Do not set custom CFLAGS in cpan/Digest-SHA - -Bug-Gentoo: https://bugs.gentoo.org/506818 - -Patch-Name: gentoo/D-SHA-CFLAGS.diff - -Original-By: Matthias Maier ---- - cpan/Digest-SHA/Makefile.PL | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/cpan/Digest-SHA/Makefile.PL b/cpan/Digest-SHA/Makefile.PL -index af2c0c3..65f4771 100644 ---- a/cpan/Digest-SHA/Makefile.PL -+++ b/cpan/Digest-SHA/Makefile.PL -@@ -64,12 +64,6 @@ if ($^O eq 'VMS') { - } - } - -- # Enhance performance on Intel when using gcc -- --if ($Config{archname} =~ /^i[3456]86/ && $Config{ccname} eq 'gcc') { -- push(@extra, OPTIMIZE => '-O1 -fomit-frame-pointer'); --} -- - my $fussy = '-Wall -Wextra -Wconversion -Wcast-align -Wpointer-arith '; - push(@extra, CCFLAGS => $fussy . $Config{ccflags}) if $opt_w; - --- -2.4.3 - diff --git a/srcpkgs/perl/patches/cleanup-paths.diff b/srcpkgs/perl/patches/cleanup-paths.diff deleted file mode 100644 index 4456b667d5de..000000000000 --- a/srcpkgs/perl/patches/cleanup-paths.diff +++ /dev/null @@ -1,89 +0,0 @@ ---- a/Configure -+++ b/Configure -@@ -107,28 +107,6 @@ - fi - fi - --: Proper PATH setting --paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin' --paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin" --paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin" --paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin" --paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb" --paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin" --paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib" --paths="$paths /sbin /usr/sbin /usr/libexec" --paths="$paths /system/gnu_library/bin" -- --for p in $paths --do -- case "$p_$PATH$p_" in -- *$p_$p$p_*) ;; -- *) test -d $p && PATH=$PATH$p_$p ;; -- esac --done -- --PATH=.$p_$PATH --export PATH -- - : shall we be using ksh? - inksh='' - needksh='' -@@ -8795,57 +8773,6 @@ - ;; - esac - --# How will the perl executable find the installed shared $libperl? --# Add $xxx to ccdlflags. --# If we can't figure out a command-line option, use $shrpenv to --# set env LD_RUN_PATH. The main perl makefile uses this. --shrpdir=$archlibexp/CORE --xxx='' --tmp_shrpenv='' --if "$useshrplib"; then -- case "$osname" in -- aix) -- # We'll set it in Makefile.SH... -- ;; -- solaris) -- xxx="-R $shrpdir" -- ;; -- freebsd|minix|mirbsd|netbsd|openbsd|interix|dragonfly|bitrig) -- xxx="-Wl,-R$shrpdir" -- ;; -- bsdos|linux|irix*|dec_osf|gnu*|haiku) -- xxx="-Wl,-rpath,$shrpdir" -- ;; -- hpux*) -- # hpux doesn't like the default, either. -- tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\"" -- ;; -- cygwin) -- # cygwin needs only ldlibpth -- ;; -- *) -- tmp_shrpenv="env LD_RUN_PATH=$shrpdir" -- ;; -- esac -- case "$xxx" in -- '') ;; -- *) -- # Only add $xxx if it isn't already in ccdlflags. -- case " $ccdlflags " in -- *" $xxx "*) ;; -- *) ccdlflags="$ccdlflags $xxx" -- cat <&4 -- --Adding $xxx to the flags --passed to $ld so that the perl executable will find the --installed shared $libperl. -- --EOM -- ;; -- esac -- ;; -- esac --fi - # Fix ccdlflags in AIX for building external extensions. - # (For building Perl itself bare -bE:perl.exp is needed, - # Makefile.SH takes care of this.) diff --git a/srcpkgs/perl/patches/cpan_definstalldirs.diff b/srcpkgs/perl/patches/cpan_definstalldirs.diff deleted file mode 100644 index 3f420feded49..000000000000 --- a/srcpkgs/perl/patches/cpan_definstalldirs.diff +++ /dev/null @@ -1,38 +0,0 @@ -From 91c395844c280f07b4eeb4aa20f1b2abd9fe1126 Mon Sep 17 00:00:00 2001 -From: Torsten Veller -Date: Sat, 14 Apr 2012 13:34:20 +0200 -Subject: Provide a sensible INSTALLDIRS default for modules installed from - CPAN. - -Some modules which are included in core set INSTALLDIRS => 'perl' -explicitly in Makefile.PL or Build.PL. This makes sense for the normal @INC -ordering, but not ours. -Taken from Debian. - -Patch-Name: gentoo/cpan_definstalldirs.diff ---- - cpan/CPAN/lib/CPAN/FirstTime.pm | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/cpan/CPAN/lib/CPAN/FirstTime.pm b/cpan/CPAN/lib/CPAN/FirstTime.pm -index 5030ef9..5953cb7 100644 ---- a/cpan/CPAN/lib/CPAN/FirstTime.pm -+++ b/cpan/CPAN/lib/CPAN/FirstTime.pm -@@ -990,7 +990,7 @@ sub init { - my_prompt_loop(prefer_installer => 'MB', $matcher, 'MB|EUMM|RAND'); - - if (!$matcher or 'makepl_arg make_arg' =~ /$matcher/) { -- my_dflt_prompt(makepl_arg => "", $matcher); -+ my_dflt_prompt(makepl_arg => "INSTALLDIRS=site", $matcher); - my_dflt_prompt(make_arg => "", $matcher); - if ( $CPAN::Config->{makepl_arg} =~ /LIBS=|INC=/ ) { - $CPAN::Frontend->mywarn( -@@ -1022,7 +1022,7 @@ sub init { - my_dflt_prompt(make_install_arg => $CPAN::Config->{make_arg} || "", - $matcher); - -- my_dflt_prompt(mbuildpl_arg => "", $matcher); -+ my_dflt_prompt(mbuildpl_arg => "--installdirs site", $matcher); - my_dflt_prompt(mbuild_arg => "", $matcher); - - if (exists $CPAN::HandleConfig::keys{mbuild_install_build_command} diff --git a/srcpkgs/perl/patches/cross-Makefile.SH.patch b/srcpkgs/perl/patches/cross-Makefile.SH.patch deleted file mode 100644 index c10163c42947..000000000000 --- a/srcpkgs/perl/patches/cross-Makefile.SH.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- a/Makefile.SH 2015-06-16 13:22:55.921083153 +0200 -+++ b/Makefile.SH 2015-06-16 13:26:14.198352302 +0200 -@@ -311,6 +311,7 @@ - OBJ_EXT = $_o - PATH_SEP = $p_ - -+ifeq (,\$(CROSS_PERL)) - # Macros to invoke a copy of miniperl during the build. Targets which - # are built using these macros should depend on \$(MINIPERL_EXE) - MINIPERL_EXE = miniperl\$(EXE_EXT) -@@ -342,6 +343,23 @@ - # Macros to run our tests - RUN_TESTS = \$(LDLIBPTH) ./runtests - -+else # CROSS_PERL -+ -+# Macros to invoke a copy of miniperl during the build. Targets which -+# are built using these macros should depend on \$(MINIPERL_EXE) -+MINIPERL_EXE = miniperl\$(EXE_EXT) -+MINIPERL = \$(CROSS_PERL) -+HOST_MINIPERL = \$(CROSS_PERL) -+ -+# Macros to invoke a copy of our fully operational perl during the build. -+PERL_EXE = perl\$(EXE_EXT) -+RUN_PERL = \$(CROSS_PERL) -+ -+# Macros to run our tests -+RUN_TESTS = echo "Not running tests" -+ -+endif # CROSS_PERL -+ - dynamic_ext = $dynamic_list - dynamic_ext_re = $dynamic_ext_re - static_ext = $static_list -@@ -580,6 +598,9 @@ - $(RUN_PERL) Porting/manisort -q -o MANIFEST; sh -c true) - @touch $(MANIFEST_SRT) - -+# Cross building requires a separate target to allow manipulation of the build tree -+extensions: $(dynamic_ext) $(nonxs_ext) -+ - .PHONY: all utilities - - # Both git_version.h and lib/Config_git.pl are built -@@ -662,6 +683,9 @@ - - globals$(OBJ_EXT): $(generated_headers) - -+ifeq (,$(CROSS_PERL)) -+# If we're cross-building, we should have uudmap.h and bitcount.h -+# provided already - uudmap.h mg_data.h: bitcount.h - - generate_uudmap$(OBJ_EXT): mg_raw.h -@@ -686,6 +710,7 @@ - $spitshell >>$Makefile <<'!NO!SUBS!' - generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT) - $(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs) -+endif - - !NO!SUBS! - ;; diff --git a/srcpkgs/perl/patches/drop_fstack_protector.diff b/srcpkgs/perl/patches/drop_fstack_protector.diff deleted file mode 100644 index 3b5ba892a4c0..000000000000 --- a/srcpkgs/perl/patches/drop_fstack_protector.diff +++ /dev/null @@ -1,59 +0,0 @@ -From 423890b1db83fce87d1283293a3d207e8f18aff4 Mon Sep 17 00:00:00 2001 -From: Vladimir Smirnov -Date: Mon, 19 May 2014 19:44:44 +0400 -Subject: [PATCH] Don't force -fstack-protector on everyone - -Bug-Gentoo: https://bugs.gentoo.org/348557 - -Patch-Name: gentoo/drop_fstack_protector.diff - -Original by Torsten Veller, ported to perl 5.20 - - -diff -ruN perl-5.24.0-RC5.orig/Configure perl-5.24.0-RC5/Configure ---- a/Configure 2016-04-27 00:11:09.000000000 +0200 -+++ b/Configure 2016-05-05 21:32:53.575232970 +0200 -@@ -5633,21 +5616,6 @@ - ;; - *) dflt="$ldflags";; - esac --# See note above about -fstack-protector --case "$ccflags" in --*-fstack-protector-strong*) -- case "$dflt" in -- *-fstack-protector-strong*) ;; # Don't add it again -- *) dflt="$dflt -fstack-protector-strong" ;; -- esac -- ;; --*-fstack-protector*) -- case "$dflt" in -- *-fstack-protector*) ;; # Don't add it again -- *) dflt="$dflt -fstack-protector" ;; -- esac -- ;; --esac - - : Try to guess additional flags to pick up local libraries. - for thislibdir in $libpth; do -@@ -8570,21 +8538,6 @@ - ''|' ') dflt='none' ;; - esac - -- case "$ldflags" in -- *-fstack-protector-strong*) -- case "$dflt" in -- *-fstack-protector-strong*) ;; # Don't add it again -- *) dflt="$dflt -fstack-protector-strong" ;; -- esac -- ;; -- *-fstack-protector*) -- case "$dflt" in -- *-fstack-protector*) ;; # Don't add it again -- *) dflt="$dflt -fstack-protector" ;; -- esac -- ;; -- esac -- - rp="Any special flags to pass to $ld to create a dynamically loaded library?" - . ./myread - case "$ans" in diff --git a/srcpkgs/perl/patches/usr_local.diff b/srcpkgs/perl/patches/usr_local.diff deleted file mode 100644 index 86eb2a495659..000000000000 --- a/srcpkgs/perl/patches/usr_local.diff +++ /dev/null @@ -1,64 +0,0 @@ -From 1b9950c255b7d5f13b8c65bde26151908f30fc10 Mon Sep 17 00:00:00 2001 -From: Vladimir Smirnov -Date: Mon, 19 May 2014 19:58:00 +0400 -Subject: [PATCH] Remove /usr/local paths - -remove /usr/local paths from all stuff thats used -in Configure script - -Patch-Name: gentoo/usr_local.diff -Original-By: Torsten Veller ---- - Configure | 16 +++++++--------- - 1 file changed, 7 insertions(+), 9 deletions(-) - -diff --git a/Configure b/Configure -index 63b8848..d0a3c28 100755 ---- a/Configure -+++ b/Configure -@@ -1315,8 +1315,7 @@ archobjs='' - archname='' - : Possible local include directories to search. - : Set locincpth to "" in a hint file to defeat local include searches. --locincpth="/usr/local/include /opt/local/include /usr/gnu/include" --locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include" -+locincpth="" - : - : no include file wanted by default - inclwanted='' -@@ -1329,12 +1328,11 @@ libnames='' - : change the next line if compiling for Xenix/286 on Xenix/386 - xlibpth='/usr/lib/386 /lib/386' - : Possible local library directories to search. --loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" --loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" -+loclibpth="" - - : general looking path for locating libraries - glibpth="/lib /usr/lib $xlibpth" --glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib" -+glibpth="$glibpth /usr/ccs/lib /usr/ucblib" - test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth" - test -f /shlib/libc.so && glibpth="/shlib $glibpth" - test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64" -@@ -4914,7 +4912,7 @@ esac - : Set private lib path - case "$plibpth" in - '') if ./mips; then -- plibpth="$incpath/usr/lib $sysroot/usr/local/lib $sysroot/usr/ccs/lib" -+ plibpth="$incpath/usr/lib $sysroot/usr/ccs/lib" - fi;; - esac - case "$libpth" in -@@ -20513,7 +20511,7 @@ else - case "$ranlib" in - :) ranlib='';; - '') -- ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin` -+ ranlib=`./loc ranlib X /usr/bin /bin` - $test -f $ranlib || ranlib='' - ;; - esac --- -1.9.3 - diff --git a/srcpkgs/perl/template b/srcpkgs/perl/template index da223660988a..cf1011f45765 100644 --- a/srcpkgs/perl/template +++ b/srcpkgs/perl/template @@ -141,29 +141,28 @@ for f in ${provides}; do replaces+=" $($XBPS_UHELPER_CMD getpkgname ${f})>=0" done -post_extract() { - cp -a ../perl-cross-${_perl_cross_version}/* . -} - do_configure() { - local _args="-Dusethreads -Duseshrplib -Dusesoname -Dusevendorprefix - -Dprefix=/usr -Dvendorprefix=/usr + local _args="-Dusethreads + -Duseshrplib + -Dusesoname + -Dusevendorprefix + -Dprefix=/usr + -Dvendorprefix=/usr -Dprivlib=/usr/share/perl5/core_perl -Darchlib=/usr/lib/perl5/core_perl -Dsitelib=/usr/share/perl5/site_perl -Dsitearch=/usr/lib/perl5/site_perl -Dvendorlib=/usr/share/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl - -Dscriptdir=/usr/bin -Dvendorscript=/usr/bin - -Dinc_version_list=none -Dman1ext=1p -Dman3ext=3p + -Dscriptdir=/usr/bin + -Dvendorscript=/usr/bin + -Dinc_version_list=none + -Dman1ext=1p + -Dman3ext=3p -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dd_sockaddr_in6=define" - if [ "$CROSS_BUILD" ]; then - _args+=" --target=$XBPS_CROSS_TRIPLET" - fi - LDFLAGS+=" -Wl,-z,stack-size=2097152 -pthread" export HOSTLDFLAGS+=" -pthread" @@ -175,15 +174,32 @@ do_configure() { fi export LD="$CC" - ./configure --prefix=/usr $_args \ - -Dcccdlflags="-fPIC" \ - -Doptimize=" -Wall ${CFLAGS} " -Dccflags=" ${CFLAGS} " \ - -Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}" \ - -Dperl_static_inline='static __inline__' -Dd_static_inline || - { - cat ./config.log - return 42 - } + if [ "$CROSS_BUILD" ]; then + _args+=" --target=$XBPS_CROSS_TRIPLET" + cp -a ../perl-cross-${_perl_cross_version}/* . + ./configure --prefix=/usr $_args \ + -Dcccdlflags="-fPIC" \ + -Doptimize=" -Wall ${CFLAGS} " \ + -Dccflags=" ${CFLAGS} " \ + -Dlddlflags="-shared ${LDFLAGS}" \ + -Dldflags="${LDFLAGS}" \ + -Dperl_static_inline='static __inline__' \ + -Dd_static_inline || + { + cat ./config.log + return 42 + } + else + ./Configure -des $_args \ + -Dcccdlflags="-fPIC" \ + -Doptimize=" -Wall ${CFLAGS} " \ + -Dccflags=" ${CFLAGS} " \ + -Dlddlflags="-shared ${LDFLAGS}" \ + -Dldflags="${LDFLAGS}" \ + -Dperl_static_inline='static __inline__' \ + -Dd_static_inline \ + -Dusemultiplicity + fi } do_check() {