From b3e0438cf68e117824a1f61ca1c1f9830ab05a2d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 1 Nov 2010 11:47:21 +0100 Subject: [PATCH] perl: update to 5.12.2, bump abi_depends. --- srcpkgs/perl/depends | 2 +- srcpkgs/perl/files/perlbin.sh | 13 ++ .../perl/patches/find_pwd_from_busybox.diff | 10 -- srcpkgs/perl/patches/perl-5.10.1-utf8-1.patch | 167 ------------------ srcpkgs/perl/template | 87 ++++++--- 5 files changed, 76 insertions(+), 203 deletions(-) create mode 100644 srcpkgs/perl/files/perlbin.sh delete mode 100644 srcpkgs/perl/patches/find_pwd_from_busybox.diff delete mode 100644 srcpkgs/perl/patches/perl-5.10.1-utf8-1.patch diff --git a/srcpkgs/perl/depends b/srcpkgs/perl/depends index 883682de821..7f9e0f2d2a2 100644 --- a/srcpkgs/perl/depends +++ b/srcpkgs/perl/depends @@ -1,2 +1,2 @@ -abi_depends=">=5.10.0" +abi_depends=">=5.12.0" api_depends="${abi_depends}" diff --git a/srcpkgs/perl/files/perlbin.sh b/srcpkgs/perl/files/perlbin.sh new file mode 100644 index 00000000000..414266162df --- /dev/null +++ b/srcpkgs/perl/files/perlbin.sh @@ -0,0 +1,13 @@ +# Set path to perl scripts. + +# Add dirs to path if they exist. +for _dir_ in site vendor core; do + if [ -d /usr/lib/perl5/${_dir_}_perl/bin ]; then + PATH=$PATH:/usr/lib/perl5/${_dir_}_perl/bin + fi +done +export PATH + +# If you have modules in non-standard directories you can add them here. +#export PERLLIB=dir1:dir2 + diff --git a/srcpkgs/perl/patches/find_pwd_from_busybox.diff b/srcpkgs/perl/patches/find_pwd_from_busybox.diff deleted file mode 100644 index 66a28faafa6..00000000000 --- a/srcpkgs/perl/patches/find_pwd_from_busybox.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- lib/Cwd.pm.orig 2010-10-28 03:05:03.000000000 +0200 -+++ lib/Cwd.pm 2010-10-28 03:05:29.000000000 +0200 -@@ -336,6 +336,7 @@ $METHOD_MAP{NT} = $METHOD_MAP{MSWin32}; - my $pwd_cmd; - foreach my $try ('/bin/pwd', - '/usr/bin/pwd', -+ '/usr/local/bin/pwd', - '/QOpenSys/bin/pwd', # OS/400 PASE. - ) { - diff --git a/srcpkgs/perl/patches/perl-5.10.1-utf8-1.patch b/srcpkgs/perl/patches/perl-5.10.1-utf8-1.patch deleted file mode 100644 index c1a56fbe760..00000000000 --- a/srcpkgs/perl/patches/perl-5.10.1-utf8-1.patch +++ /dev/null @@ -1,167 +0,0 @@ -Submitted By: Robert Connolly (ashes) -Date: 2010-02-24 -Initial Package Version: 5.10.1 -Upstream Status: From upstream -Origin: Git -http://perl5.git.perl.org/perl.git/patch/0abd0d78a73da1c4d13b1c700526b7e5d03b32d4 -Description: Bug fix for invalid utf-8 characters causing Perl to crash. - -http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3626 - -From 0abd0d78a73da1c4d13b1c700526b7e5d03b32d4 Mon Sep 17 00:00:00 2001 -From: Yves Orton -Date: Sun, 25 Oct 2009 20:37:08 +0100 -Subject: [PATCH] disable non-unicode case insensitive trie matching - -Also revert 8902bb05b18c9858efa90229ca1ee42b17277554 as it merely -masked one symptom of the deeper problems. - -Also fixes RT #69973, which was a segfault which was exposed by -8902bb05, see the ticket for further details. - -http://rt.perl.org/rt3//Public/Bug/Display.html?id=69973 - -At the code of this is the problem that in unicode matching a bunch -of code points have case folding rules beyond just A-Z/a-z. Since -the case folding rules are decided at runtime by the string, we cant -use the same TRIE tables for both unicode/non-unicode matching. - -Until this is reconciled or some other solution is found case insensitive -matching only gets the TRIE optimisation when the pattern is uniocde. - -From CaseFolding.txt: - -00B5; C; 03BC; # MICRO SIGN -00C0; C; 00E0; # LATIN CAPITAL LETTER A WITH GRAVE -00C1; C; 00E1; # LATIN CAPITAL LETTER A WITH ACUTE -00C2; C; 00E2; # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -00C3; C; 00E3; # LATIN CAPITAL LETTER A WITH TILDE -00C4; C; 00E4; # LATIN CAPITAL LETTER A WITH DIAERESIS -00C5; C; 00E5; # LATIN CAPITAL LETTER A WITH RING ABOVE -00C6; C; 00E6; # LATIN CAPITAL LETTER AE -00C7; C; 00E7; # LATIN CAPITAL LETTER C WITH CEDILLA -00C8; C; 00E8; # LATIN CAPITAL LETTER E WITH GRAVE -00C9; C; 00E9; # LATIN CAPITAL LETTER E WITH ACUTE -00CA; C; 00EA; # LATIN CAPITAL LETTER E WITH CIRCUMFLEX -00CB; C; 00EB; # LATIN CAPITAL LETTER E WITH DIAERESIS -00CC; C; 00EC; # LATIN CAPITAL LETTER I WITH GRAVE -00CD; C; 00ED; # LATIN CAPITAL LETTER I WITH ACUTE -00CE; C; 00EE; # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -00CF; C; 00EF; # LATIN CAPITAL LETTER I WITH DIAERESIS -00D0; C; 00F0; # LATIN CAPITAL LETTER ETH -00D1; C; 00F1; # LATIN CAPITAL LETTER N WITH TILDE -00D2; C; 00F2; # LATIN CAPITAL LETTER O WITH GRAVE -00D3; C; 00F3; # LATIN CAPITAL LETTER O WITH ACUTE -00D4; C; 00F4; # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -00D5; C; 00F5; # LATIN CAPITAL LETTER O WITH TILDE -00D6; C; 00F6; # LATIN CAPITAL LETTER O WITH DIAERESIS -00D8; C; 00F8; # LATIN CAPITAL LETTER O WITH STROKE -00D9; C; 00F9; # LATIN CAPITAL LETTER U WITH GRAVE -00DA; C; 00FA; # LATIN CAPITAL LETTER U WITH ACUTE -00DB; C; 00FB; # LATIN CAPITAL LETTER U WITH CIRCUMFLEX -00DC; C; 00FC; # LATIN CAPITAL LETTER U WITH DIAERESIS -00DD; C; 00FD; # LATIN CAPITAL LETTER Y WITH ACUTE -00DE; C; 00FE; # LATIN CAPITAL LETTER THORN -00DF; F; 0073 0073; # LATIN SMALL LETTER SHARP S ---- - ext/re/t/regop.t | 12 ++++++------ - regcomp.c | 17 +++++++++++------ - regexec.c | 9 ++------- - 3 files changed, 19 insertions(+), 19 deletions(-) - -diff --git a/ext/re/t/regop.t b/ext/re/t/regop.t -index 9118bf6..46e6ec0 100644 ---- ext/re/t/regop.t -+++ ext/re/t/regop.t -@@ -231,12 +231,12 @@ anchored "ABC" at 0 - #Freeing REx: "(\\.COM|\\.EXE|\\.BAT|\\.CMD|\\.VBS|\\.VBE|\\.JS|\\.JSE|\\."...... - %MATCHED% - floating ""$ at 3..4 (checking floating) --1:1[1] 3:2[1] 5:2[64] 45:83[1] 47:84[1] 48:85[0] --stclass EXACTF <.> minlen 3 --Found floating substr ""$ at offset 30... --Does not contradict STCLASS... --Guessed: match at offset 26 --Matching stclass EXACTF <.> against ".exe" -+#1:1[1] 3:2[1] 5:2[64] 45:83[1] 47:84[1] 48:85[0] -+#stclass EXACTF <.> minlen 3 -+#Found floating substr ""$ at offset 30... -+#Does not contradict STCLASS... -+#Guessed: match at offset 26 -+#Matching stclass EXACTF <.> against ".exe" - --- - #Compiling REx "[q]" - #size 12 nodes Got 100 bytes for offset annotations. -diff --git a/regcomp.c b/regcomp.c -index 6e9fa26..eb5f12f 100644 ---- regcomp.c -+++ regcomp.c -@@ -2833,13 +2833,18 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, - } - } else { - /* -- Currently we assume that the trie can handle unicode and ascii -- matches fold cased matches. If this proves true then the following -- define will prevent tries in this situation. -- -- #define TRIE_TYPE_IS_SAFE (UTF || optype==EXACT) --*/ -+ Currently we do not believe that the trie logic can -+ handle case insensitive matching properly when the -+ pattern is not unicode (thus forcing unicode semantics). -+ -+ If/when this is fixed the following define can be swapped -+ in below to fully enable trie logic. -+ - #define TRIE_TYPE_IS_SAFE 1 -+ -+*/ -+#define TRIE_TYPE_IS_SAFE (UTF || optype==EXACT) -+ - if ( last && TRIE_TYPE_IS_SAFE ) { - make_trie( pRExC_state, - startbranch, first, cur, tail, count, -diff --git a/regexec.c b/regexec.c -index 402ede3..ec09c28 100644 ---- regexec.c -+++ regexec.c -@@ -1105,16 +1105,15 @@ Perl_re_intuit_start(pTHX_ REGEXP * const rx, SV *sv, char *strpos, - - #define REXEC_TRIE_READ_CHAR(trie_type, trie, widecharmap, uc, uscan, len, \ - uvc, charid, foldlen, foldbuf, uniflags) STMT_START { \ -- UV uvc_unfolded = 0; \ - switch (trie_type) { \ - case trie_utf8_fold: \ - if ( foldlen>0 ) { \ -- uvc_unfolded = uvc = utf8n_to_uvuni( uscan, UTF8_MAXLEN, &len, uniflags ); \ -+ uvc = utf8n_to_uvuni( uscan, UTF8_MAXLEN, &len, uniflags ); \ - foldlen -= len; \ - uscan += len; \ - len=0; \ - } else { \ -- uvc_unfolded = uvc = utf8n_to_uvuni( (U8*)uc, UTF8_MAXLEN, &len, uniflags ); \ -+ uvc = utf8n_to_uvuni( (U8*)uc, UTF8_MAXLEN, &len, uniflags ); \ - uvc = to_uni_fold( uvc, foldbuf, &foldlen ); \ - foldlen -= UNISKIP( uvc ); \ - uscan = foldbuf + UNISKIP( uvc ); \ -@@ -1140,7 +1139,6 @@ uvc, charid, foldlen, foldbuf, uniflags) STMT_START { \ - uvc = (UV)*uc; \ - len = 1; \ - } \ -- \ - if (uvc < 256) { \ - charid = trie->charmap[ uvc ]; \ - } \ -@@ -1153,9 +1151,6 @@ uvc, charid, foldlen, foldbuf, uniflags) STMT_START { \ - charid = (U16)SvIV(*svpp); \ - } \ - } \ -- if (!charid && trie_type == trie_utf8_fold && !UTF) { \ -- charid = trie->charmap[uvc_unfolded]; \ -- } \ - } STMT_END - - #define REXEC_FBC_EXACTISH_CHECK(CoNd) \ --- -1.6.5.2.74.g610f9.dirty - diff --git a/srcpkgs/perl/template b/srcpkgs/perl/template index 70f6fb42dd7..0e137cb2170 100644 --- a/srcpkgs/perl/template +++ b/srcpkgs/perl/template @@ -1,13 +1,11 @@ # Template build file for 'perl'. pkgname=perl -version=5.10.1 -revision=2 -distfiles="http://www.cpan.org/src/$pkgname-$version.tar.gz" -build_style=configure -configure_script="./Configure" +version=5.12.2 +distfiles="http://www.cpan.org/src/5.0/$pkgname-$version.tar.bz2" +build_style=custom-install short_desc="Practical Extraction and Report Language" maintainer="Juan RP " -checksum=cb7f26ea4b2b28d6644354d87a269d01cac1b635287dae64e88eeafa24b44f35 +checksum=3b9a75fe4ae7a9a2a17be8c8c64754ef6fd706ca528170737b03e3db7d8eae0e long_desc=" Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including @@ -25,25 +23,64 @@ Add_dependency run db Add_dependency build gdbm-devel Add_dependency build db-devel -pre_configure() +do_build() { - local p5_base p5_apiver args + ./Configure \ + -des -Dusethreads -Duseshrplib \ + -Dinstallprefix=/usr \ + -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/lib/perl5/core_perl/bin \ + -Dsitescript=/usr/lib/perl5/site_perl/bin \ + -Dvendorscript=/usr/lib/perl5/vendor_perl/bin \ + -Dinc_version_list=none \ + -Dman1ext=1p -Dman3ext=3p \ + -Dcccdlflags="-fPIC" -Doptimize="${XBPS_CFLAGS}" - cd $wrksrc || return 1 - # Taken from NetBSD. - p5_base="/usr/lib/perl5" - p5_apiver="$(awk '/\#define[ ]*PERL_API_REVISION/ { R = $3 } \ - /\#define[ ]*PERL_API_VERSION/ { r = "."$3 } \ - /\#define[ ]*PERL_API_SUBVERSION/ { s = "."$3 } \ - END { printf "%s%s%s\n", R, r, s }' patchlevel.h)" - - args="-Dusethreads -des -Dprefix=/usr \ - -Duselargefiles -Uusesfio -Dinstallstyle=lib/perl5 \ - -Uinstallusrbinperl -Duseshrplib \ - -Dman1dir=/usr/share/man/man1 \ - -Dman3dir=/usr/share/man/man3 \ - -Dprivlib=${p5_base}/${p5_apiver} \ - -Dsitelib=${p5_base}/site_perl/${p5_apiver} \ - -Dvendorlib=${p5_base}/vendor_perl/${p5_apiver}" - export configure_args="${args}" + make ${makejobs} +} + +do_install() +{ + # We use the same defaults than Arch Linux. + make DESTDIR=${DESTDIR} install || return 1 + + # Make a link from perl${version} to perl. + cd ${DESTDIR}/usr/bin && ln -sf perl${version} perl + + ### CPAN Settings ### + # Set CPAN default config to use the site directories. + sed -e '/(makepl_arg =>/ s/""/"INSTALLDIRS=site"/' \ + -e '/(mbuildpl_arg =>/ s/""/"installdirs=site"/' \ + -i ${DESTDIR}/usr/share/perl5/core_perl/CPAN/FirstTime.pm + + ### CPANPLUS Settings ### + # Set CPANPLUS default config to use the site directories. + sed -e "/{'makemakerflags'}/ s/'';/'INSTALLDIRS=site';/" \ + -e "/{'buildflags'}/ s/'';/'installdirs=site';/" \ + -i ${DESTDIR}/usr/share/perl5/core_perl/CPANPLUS/Config.pm + + # Profile script so set paths to perl scripts. + install -D -m644 ${FILESDIR}/perlbin.sh \ + ${DESTDIR}/etc/profile.d/perlbin.sh + + # Remove all pod files *except* those under + # /usr/share/perl5/core_perl/pod/ (FS#16488) + rm -f ${DESTDIR}/usr/share/perl5/core_perl/*.pod + for d in ${DESTDIR}/usr/share/perl5/core_perl/*; do + if [ -d $d -a $(basename $d) != "pod" ]; then + find $d -name *.pod -delete + fi + done + find ${DESTDIR}/usr/lib -name *.pod -delete + find ${DESTDIR} -name .packlist -delete + + # Make a symlink so that libperl.so is accesible. + cd ${DESTDIR}/usr/lib && \ + ln -sf ./perl5/core_perl/CORE/libperl.so libperl.so }