diff --git a/perl-5.10.0-disable_test_hosts.patch b/perl-5.10.0-disable_test_hosts.patch deleted file mode 100644 index b8e6ba9..0000000 --- a/perl-5.10.0-disable_test_hosts.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up perl-5.10.0/lib/Net/Config.pm.disable_test_hosts perl-5.10.0/lib/Net/Config.pm ---- perl-5.10.0/lib/Net/Config.pm.disable_test_hosts 2007-12-21 11:41:12.000000000 -0500 -+++ perl-5.10.0/lib/Net/Config.pm 2007-12-21 11:41:20.000000000 -0500 -@@ -29,7 +29,7 @@ eval { local $SIG{__DIE__}; require Net: - ftp_firewall => undef, - ftp_ext_passive => 1, - ftp_int_passive => 1, -- test_hosts => 1, -+ test_hosts => 0, - test_exist => 1, - ); - diff --git a/perl-5.10.0-reorderINC.patch b/perl-5.10.0-reorderINC.patch deleted file mode 100644 index 1f1a94b..0000000 --- a/perl-5.10.0-reorderINC.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff -up perl-5.10.0/perl.c.BAD perl-5.10.0/perl.c ---- perl-5.10.0/perl.c.BAD 2009-03-09 09:55:05.000000000 -0400 -+++ perl-5.10.0/perl.c 2009-03-09 10:00:41.000000000 -0400 -@@ -4753,9 +4753,6 @@ S_init_perllib(pTHX) - incpush(APPLLIB_EXP, TRUE, TRUE, TRUE, TRUE); - #endif - --#ifdef ARCHLIB_EXP -- incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); --#endif - #ifdef MACOS_TRADITIONAL - { - Stat_t tmpstatbuf; -@@ -4764,6 +4761,10 @@ S_init_perllib(pTHX) - - if (!macperl) - macperl = ""; -+ -+#ifdef ARCHLIB_EXP -+ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); -+#endif - - Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl); - if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) -@@ -4777,14 +4778,6 @@ S_init_perllib(pTHX) - if (!PL_tainting) - incpush(":", FALSE, FALSE, TRUE, FALSE); - #else --#ifndef PRIVLIB_EXP --# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" --#endif --#if defined(WIN32) -- incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE); --#else -- incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE); --#endif - - #ifdef SITEARCH_EXP - /* sitearch is always relative to sitelib on Windows for -@@ -4828,6 +4821,19 @@ S_init_perllib(pTHX) - incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE, TRUE); - #endif - -+#ifdef ARCHLIB_EXP -+ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); -+#endif -+ -+#ifndef PRIVLIB_EXP -+# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" -+#endif -+#if defined(WIN32) -+ incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE); -+#else -+ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE); -+#endif -+ - #ifdef PERL_OTHERLIBDIRS - incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE, TRUE); - #endif diff --git a/perl-5.10.1-CVE_2009_3626.patch b/perl-5.10.1-CVE_2009_3626.patch deleted file mode 100644 index bde4dff..0000000 --- a/perl-5.10.1-CVE_2009_3626.patch +++ /dev/null @@ -1,87 +0,0 @@ -diff -up perl-5.10.1/ext/re/t/regop.t.git perl-5.10.1/ext/re/t/regop.t ---- perl-5.10.1/ext/re/t/regop.t.git 2009-12-21 19:31:07.564141841 +0100 -+++ perl-5.10.1/ext/re/t/regop.t 2009-12-21 19:31:55.158142088 +0100 -@@ -233,12 +233,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. -@@ -258,4 +258,4 @@ Got 100 bytes for offset annotations. - Offsets: [12] - 1:1[3] 3:4[0] - %MATCHED% --Freeing REx: "[q]" -\ No newline at end of file -+Freeing REx: "[q]" -diff -up perl-5.10.1/regcomp.c.git perl-5.10.1/regcomp.c ---- perl-5.10.1/regcomp.c.git 2009-12-21 19:32:05.893141719 +0100 -+++ perl-5.10.1/regcomp.c 2009-12-21 19:33:35.106141384 +0100 -@@ -2820,13 +2820,16 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_ - } - } 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 -up perl-5.10.1/regexec.c.git perl-5.10.1/regexec.c ---- perl-5.10.1/regexec.c.git 2009-12-21 19:33:50.570141632 +0100 -+++ perl-5.10.1/regexec.c 2009-12-21 19:36:41.300142175 +0100 -@@ -1006,16 +1006,15 @@ Perl_re_intuit_start(pTHX_ REGEXP * cons - - #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 ); \ -@@ -1054,9 +1053,6 @@ uvc, charid, foldlen, foldbuf, uniflags) - 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) \ diff --git a/perl-add-symbols.patch b/perl-add-symbols.patch deleted file mode 100644 index f8f4dd9..0000000 --- a/perl-add-symbols.patch +++ /dev/null @@ -1,112 +0,0 @@ -2009-12-02 Stepan Kasal - - * add the extra symbols, even though DEBUGGING is not defined - -diff -ur perl-5.10.1.orig/hv.c perl-5.10.1/hv.c ---- perl-5.10.1.orig/hv.c 2009-06-10 14:36:34.000000000 +0200 -+++ perl-5.10.1/hv.c 2009-12-02 15:05:07.000000000 +0100 -@@ -2926,7 +2926,7 @@ - =cut - */ - --#ifdef DEBUGGING -+/* #ifdef DEBUGGING */ - - void - Perl_hv_assert(pTHX_ HV *hv) -@@ -2991,7 +2991,7 @@ - HvEITER_set(hv, eiter); - } - --#endif -+/* #endif */ - - /* - * Local variables: -diff -ur perl-5.10.1.orig/makedef.pl perl-5.10.1/makedef.pl ---- perl-5.10.1.orig/makedef.pl 2009-12-02 14:42:12.000000000 +0100 -+++ perl-5.10.1/makedef.pl 2009-12-02 14:42:04.000000000 +0100 -@@ -617,7 +617,7 @@ - )]; - } - --unless ($define{'DEBUGGING'}) { -+unless (1 || $define{'DEBUGGING'}) { - skip_symbols [qw( - Perl_deb_growlevel - Perl_debop -diff -ur perl-5.10.1.orig/pad.c perl-5.10.1/pad.c ---- perl-5.10.1.orig/pad.c 2009-04-22 23:43:43.000000000 +0200 -+++ perl-5.10.1/pad.c 2009-12-02 14:39:21.000000000 +0100 -@@ -912,7 +912,7 @@ - } - - --#ifdef DEBUGGING -+/* #ifdef DEBUGGING */ - /* - =for apidoc pad_sv - -@@ -963,7 +963,7 @@ - ); - PL_curpad[po] = sv; - } --#endif -+/* #endif */ - - - -diff -ur perl-5.10.1.orig/perl.h perl-5.10.1/perl.h ---- perl-5.10.1.orig/perl.h 2009-07-06 13:18:58.000000000 +0200 -+++ perl-5.10.1/perl.h 2009-12-02 15:06:44.000000000 +0100 -@@ -4457,7 +4457,7 @@ - EXTCONST unsigned char PL_freq[]; - #endif - --#ifdef DEBUGGING -+/* #ifdef DEBUGGING */ - #ifdef DOINIT - EXTCONST char* const PL_block_type[] = { - "NULL", -@@ -4473,7 +4473,7 @@ - #else - EXTCONST char* PL_block_type[]; - #endif --#endif -+/* #endif */ - - /* These are all the compile time options that affect binary compatibility. - Other compile time options that are binary compatible are in perl.c -diff -ur perl-5.10.1.orig/perlvars.h perl-5.10.1/perlvars.h ---- perl-5.10.1.orig/perlvars.h 2009-02-12 23:58:17.000000000 +0100 -+++ perl-5.10.1/perlvars.h 2009-12-02 15:10:39.000000000 +0100 -@@ -112,9 +112,9 @@ - PERLVARI(Gsig_trapped, int, 0) - #endif - --#ifdef DEBUGGING -+/* #ifdef DEBUGGING */ - PERLVAR(Gwatch_pvx, char*) --#endif -+/* #endif */ - - #ifdef PERL_GLOBAL_STRUCT - PERLVAR(Gppaddr, Perl_ppaddr_t*) /* or opcode.h */ ---- perl-5.10.1/proto.h.kasal 2009-12-02 15:18:39.000000000 +0100 -+++ perl-5.10.1/proto.h 2009-12-02 15:29:51.000000000 +0100 -@@ -6068,13 +6068,13 @@ - #define PERL_ARGS_ASSERT_PAD_CHECK_DUP \ - assert(name); assert(ourstash) - --#ifdef DEBUGGING -+/* #ifdef DEBUGGING */ - PERL_CALLCONV void Perl_pad_setsv(pTHX_ PADOFFSET po, SV* sv) - __attribute__nonnull__(pTHX_2); - #define PERL_ARGS_ASSERT_PAD_SETSV \ - assert(sv) - --#endif -+/* #endif */ - PERL_CALLCONV void Perl_pad_block_start(pTHX_ int full); - PERL_CALLCONV void Perl_pad_tidy(pTHX_ padtidy_type type); - PERL_CALLCONV void Perl_do_dump_pad(pTHX_ I32 level, PerlIO *file, PADLIST *padlist, int full) diff --git a/perl-much-better-swap-logic.patch b/perl-much-better-swap-logic.patch deleted file mode 100644 index 2675b42..0000000 --- a/perl-much-better-swap-logic.patch +++ /dev/null @@ -1,246 +0,0 @@ -Backport of commit e9105d30 in blead perl. - -diff -urpN perl-5.10.1.orig/embed.fnc perl-5.10.1/embed.fnc ---- perl-5.10.1.orig/embed.fnc 2009-08-15 18:36:34.000000000 +0200 -+++ perl-5.10.1/embed.fnc 2009-11-26 00:12:48.000000000 +0100 -@@ -1658,7 +1658,6 @@ ERsn |U8* |reghop4 |NN U8 *s|I32 off|NN - #endif - ERsn |U8* |reghopmaybe3 |NN U8 *s|I32 off|NN const U8 *lim - ERs |char* |find_byclass |NN regexp * prog|NN const regnode *c|NN char *s|NN const char *strend|NULLOK regmatch_info *reginfo --Es |void |swap_match_buff|NN regexp * prog - Es |void |to_utf8_substr |NN regexp * prog - Es |void |to_byte_substr |NN regexp * prog - ERs |I32 |reg_check_named_buff_matched |NN const regexp *rex \ -diff -urpN perl-5.10.1.orig/embed.h perl-5.10.1/embed.h ---- perl-5.10.1.orig/embed.h 2009-07-27 23:37:52.000000000 +0200 -+++ perl-5.10.1/embed.h 2009-11-26 00:12:48.000000000 +0100 -@@ -1452,7 +1452,6 @@ - #if defined(PERL_CORE) || defined(PERL_EXT) - #define reghopmaybe3 S_reghopmaybe3 - #define find_byclass S_find_byclass --#define swap_match_buff S_swap_match_buff - #define to_utf8_substr S_to_utf8_substr - #define to_byte_substr S_to_byte_substr - #define reg_check_named_buff_matched S_reg_check_named_buff_matched -@@ -3783,7 +3782,6 @@ - #if defined(PERL_CORE) || defined(PERL_EXT) - #define reghopmaybe3 S_reghopmaybe3 - #define find_byclass(a,b,c,d,e) S_find_byclass(aTHX_ a,b,c,d,e) --#define swap_match_buff(a) S_swap_match_buff(aTHX_ a) - #define to_utf8_substr(a) S_to_utf8_substr(aTHX_ a) - #define to_byte_substr(a) S_to_byte_substr(aTHX_ a) - #define reg_check_named_buff_matched(a,b) S_reg_check_named_buff_matched(aTHX_ a,b) -diff -urpN perl-5.10.1.orig/ext/Devel-PPPort/parts/embed.fnc perl-5.10.1/ext/Devel-PPPort/parts/embed.fnc ---- perl-5.10.1.orig/ext/Devel-PPPort/parts/embed.fnc 2009-07-27 23:37:52.000000000 +0200 -+++ perl-5.10.1/ext/Devel-PPPort/parts/embed.fnc 2009-11-26 00:12:48.000000000 +0100 -@@ -1677,7 +1677,6 @@ ERsn |U8* |reghop4 |NN U8 *s|I32 off|NN - #endif - ERsn |U8* |reghopmaybe3 |NN U8 *s|I32 off|NN const U8 *lim - ERs |char* |find_byclass |NN regexp * prog|NN const regnode *c|NN char *s|NN const char *strend|NULLOK regmatch_info *reginfo --Es |void |swap_match_buff|NN regexp * prog - Es |void |to_utf8_substr |NN regexp * prog - Es |void |to_byte_substr |NN regexp * prog - ERs |I32 |reg_check_named_buff_matched |NN const regexp *rex \ -diff -urpN perl-5.10.1.orig/pod/perlreapi.pod perl-5.10.1/pod/perlreapi.pod ---- perl-5.10.1.orig/pod/perlreapi.pod 2009-07-27 23:37:52.000000000 +0200 -+++ perl-5.10.1/pod/perlreapi.pod 2009-11-26 00:12:48.000000000 +0100 -@@ -598,7 +598,7 @@ engine should use something else. - - =head2 C - --TODO: document -+Unused. Left in for compatibility with perl 5.10.0. - - =head2 C - -diff -urpN perl-5.10.1.orig/pod/perlreguts.pod perl-5.10.1/pod/perlreguts.pod ---- perl-5.10.1.orig/pod/perlreguts.pod 2009-07-27 23:37:52.000000000 +0200 -+++ perl-5.10.1/pod/perlreguts.pod 2009-11-26 00:12:48.000000000 +0100 -@@ -810,13 +810,12 @@ value to other engine implementations. - - =item C - --C is an extra set of startp/endp stored in a C --struct. This is used when the last successful match was from the same pattern --as the current pattern, so that a partial match doesn't overwrite the --previous match's results. When this field is data filled the matching --engine will swap buffers before every match attempt. If the match fails, --then it swaps them back. If it's successful it leaves them. This field --is populated on demand and is by default null. -+C formerly was an extra set of startp/endp stored in a -+C struct. This was used when the last successful match -+was from the same pattern as the current pattern, so that a partial -+match didn't overwrite the previous match's results, but it caused a -+problem with re-entrant code such as trying to build the UTF-8 swashes. -+Currently unused and left for backward compatibility with 5.10.0. - - =item C - -diff -urpN perl-5.10.1.orig/proto.h perl-5.10.1/proto.h ---- perl-5.10.1.orig/proto.h 2009-08-15 18:36:34.000000000 +0200 -+++ perl-5.10.1/proto.h 2009-11-26 00:12:48.000000000 +0100 -@@ -5445,11 +5445,6 @@ STATIC char* S_find_byclass(pTHX_ regexp - #define PERL_ARGS_ASSERT_FIND_BYCLASS \ - assert(prog); assert(c); assert(s); assert(strend) - --STATIC void S_swap_match_buff(pTHX_ regexp * prog) -- __attribute__nonnull__(pTHX_1); --#define PERL_ARGS_ASSERT_SWAP_MATCH_BUFF \ -- assert(prog) -- - STATIC void S_to_utf8_substr(pTHX_ regexp * prog) - __attribute__nonnull__(pTHX_1); - #define PERL_ARGS_ASSERT_TO_UTF8_SUBSTR \ -diff -urpN perl-5.10.1.orig/regcomp.c perl-5.10.1/regcomp.c ---- perl-5.10.1.orig/regcomp.c 2009-07-27 23:37:52.000000000 +0200 -+++ perl-5.10.1/regcomp.c 2009-11-26 00:12:48.000000000 +0100 -@@ -9361,7 +9361,6 @@ Perl_pregfree(pTHX_ REGEXP *r) - if (r->saved_copy) - SvREFCNT_dec(r->saved_copy); - #endif -- Safefree(r->swap); - Safefree(r->offs); - Safefree(r); - } -@@ -9413,7 +9412,6 @@ Perl_reg_temp_copy (pTHX_ REGEXP *r) { - ret->saved_copy = NULL; - #endif - ret->mother_re = r; -- ret->swap = NULL; - - return ret; - } -diff -urpN perl-5.10.1.orig/regexec.c perl-5.10.1/regexec.c ---- perl-5.10.1.orig/regexec.c 2009-07-27 23:37:52.000000000 +0200 -+++ perl-5.10.1/regexec.c 2009-11-26 00:12:48.000000000 +0100 -@@ -1733,28 +1733,6 @@ S_find_byclass(pTHX_ regexp * prog, cons - return s; - } - --static void --S_swap_match_buff (pTHX_ regexp *prog) --{ -- regexp_paren_pair *t; -- -- PERL_ARGS_ASSERT_SWAP_MATCH_BUFF; -- -- if (!prog->swap) { -- /* We have to be careful. If the previous successful match -- was from this regex we don't want a subsequent paritally -- successful match to clobber the old results. -- So when we detect this possibility we add a swap buffer -- to the re, and switch the buffer each match. If we fail -- we switch it back, otherwise we leave it swapped. -- */ -- Newxz(prog->swap, (prog->nparens + 1), regexp_paren_pair); -- } -- t = prog->swap; -- prog->swap = prog->offs; -- prog->offs = t; --} -- - - /* - - regexec_flags - match a regexp against a string -@@ -1783,7 +1761,7 @@ Perl_regexec_flags(pTHX_ REGEXP * const - I32 multiline; - RXi_GET_DECL(prog,progi); - regmatch_info reginfo; /* create some info to pass to regtry etc */ -- bool swap_on_fail = 0; -+ regexp_paren_pair *swap = NULL; - GET_RE_DEBUG_FLAGS_DECL; - - PERL_ARGS_ASSERT_REGEXEC_FLAGS; -@@ -1861,9 +1839,16 @@ Perl_regexec_flags(pTHX_ REGEXP * const - reginfo.ganch = strbeg; - } - if (PL_curpm && (PM_GETRE(PL_curpm) == prog)) { -- swap_on_fail = 1; -- swap_match_buff(prog); /* do we need a save destructor here for -- eval dies? */ -+ /* We have to be careful. If the previous successful match -+ was from this regex we don't want a subsequent partially -+ successful match to clobber the old results. -+ So when we detect this possibility we add a swap buffer -+ to the re, and switch the buffer each match. If we fail -+ we switch it back, otherwise we leave it swapped. -+ */ -+ swap = prog->offs; -+ /* do we need a save destructor here for eval dies? */ -+ Newxz(prog->offs, (prog->nparens + 1), regexp_paren_pair); - } - if (!(flags & REXEC_CHECKED) && (prog->check_substr != NULL || prog->check_utf8 != NULL)) { - re_scream_pos_data d; -@@ -2162,6 +2147,7 @@ Perl_regexec_flags(pTHX_ REGEXP * const - goto phooey; - - got_it: -+ Safefree(swap); - RX_MATCH_TAINTED_set(prog, PL_reg_flags & RF_tainted); - - if (PL_reg_eval_set) -@@ -2207,10 +2193,12 @@ phooey: - PL_colors[4], PL_colors[5])); - if (PL_reg_eval_set) - restore_pos(aTHX_ prog); -- if (swap_on_fail) -+ if (swap) { - /* we failed :-( roll it back */ -- swap_match_buff(prog); -- -+ Safefree(prog->offs); -+ prog->offs = swap; -+ } -+ - return 0; - } - -diff -urpN perl-5.10.1.orig/regexp.h perl-5.10.1/regexp.h ---- perl-5.10.1.orig/regexp.h 2009-07-27 23:37:52.000000000 +0200 -+++ perl-5.10.1/regexp.h 2009-11-26 00:12:48.000000000 +0100 -@@ -88,7 +88,7 @@ typedef struct regexp { - /* Data about the last/current match. These are modified during matching*/ - U32 lastparen; /* last open paren matched */ - U32 lastcloseparen; /* last close paren matched */ -- regexp_paren_pair *swap; /* Swap copy of *offs */ -+ regexp_paren_pair *swap; /* Unused: 5.10.1 and later */ - regexp_paren_pair *offs; /* Array of offsets for (@-) and (@+) */ - - char *subbeg; /* saved or original string -diff -urpN perl-5.10.1.orig/t/op/pat.t perl-5.10.1/t/op/pat.t ---- perl-5.10.1.orig/t/op/pat.t 2009-07-27 23:37:52.000000000 +0200 -+++ perl-5.10.1/t/op/pat.t 2009-11-26 00:12:48.000000000 +0100 -@@ -13,7 +13,7 @@ sub run_tests; - - $| = 1; - --my $EXPECTED_TESTS = 4065; # Update this when adding/deleting tests. -+my $EXPECTED_TESTS = 4066; # Update this when adding/deleting tests. - - BEGIN { - chdir 't' if -d 't'; -@@ -4349,6 +4349,24 @@ sub run_tests { - } - } - -+ # This only works under -DEBUGGING because it relies on an assert(). -+ { -+ local $BugId = '60508'; -+ local $Message = "Check capture offset re-entrancy of utf8 code."; -+ -+ sub fswash { $_[0] =~ s/([>X])//g; } -+ -+ my $k1 = "." x 4 . ">>"; -+ fswash($k1); -+ -+ my $k2 = "\x{f1}\x{2022}"; -+ $k2 =~ s/([\360-\362])/>/g; -+ fswash($k2); -+ -+ iseq($k2, "\x{2022}", "utf8::SWASHNEW doesn't cause capture leaks"); -+ } -+ -+ - { - local $BugId = 65372; # minimal CURLYM limited to 32767 matches - my @pat = ( diff --git a/perl-perlio-incorrect-errno.patch b/perl-perlio-incorrect-errno.patch deleted file mode 100644 index ac72ab4..0000000 --- a/perl-perlio-incorrect-errno.patch +++ /dev/null @@ -1,83 +0,0 @@ -From e57cc2468d765872b20810478b94ead3906f1912 Mon Sep 17 00:00:00 2001 -From: Stepan Kasal -Date: Wed, 3 Jun 2009 12:03:55 +0200 -Subject: [PATCH] fix RT 39060, errno incorrectly set in perlio - ---- - MANIFEST | 1 + - perlio.c | 12 +++++++----- - t/io/errno.t | 26 ++++++++++++++++++++++++++ - 3 files changed, 34 insertions(+), 5 deletions(-) - create mode 100644 t/io/errno.t - -diff --git a/MANIFEST b/MANIFEST -index b7c9341..be3be43 100644 ---- a/MANIFEST -+++ b/MANIFEST -@@ -3899,6 +3899,7 @@ t/io/binmode.t See if binmode() works - t/io/crlf.t See if :crlf works - t/io/crlf_through.t See if pipe passes data intact with :crlf - t/io/dup.t See if >& works right -+t/io/errno.t See if $! is correctly set - t/io/fflush.t See if auto-flush on fork/exec/system/qx works - t/io/fs.t See if directory manipulations work - t/io/inplace.t See if inplace editing works -diff --git a/perlio.c b/perlio.c -index 0a086a8..e92a32a 100644 ---- a/perlio.c -+++ b/perlio.c -@@ -1784,12 +1784,14 @@ PerlIO_has_base(PerlIO *f) - int - PerlIO_fast_gets(PerlIO *f) - { -- if (PerlIOValid(f) && (PerlIOBase(f)->flags & PERLIO_F_FASTGETS)) { -- const PerlIO_funcs * const tab = PerlIOBase(f)->tab; -+ if (PerlIOValid(f)) { -+ if (PerlIOBase(f)->flags & PERLIO_F_FASTGETS) { -+ const PerlIO_funcs * const tab = PerlIOBase(f)->tab; - -- if (tab) -- return (tab->Set_ptrcnt != NULL); -- SETERRNO(EINVAL, LIB_INVARG); -+ if (tab) -+ return (tab->Set_ptrcnt != NULL); -+ SETERRNO(EINVAL, LIB_INVARG); -+ } - } - else - SETERRNO(EBADF, SS_IVCHAN); -diff --git a/t/io/errno.t b/t/io/errno.t -new file mode 100644 -index 0000000..b55e3db ---- /dev/null -+++ b/t/io/errno.t -@@ -0,0 +1,26 @@ -+#!./perl -+# vim: ts=4 sts=4 sw=4: -+ -+# $! may not be set if EOF was reached without any error. -+# http://rt.perl.org/rt3/Ticket/Display.html?id=39060 -+ -+use strict; -+require './test.pl'; -+ -+plan( tests => 16 ); -+ -+my $test_prog = 'while(<>){print}; print $!'; -+ -+for my $perlio ('perlio', 'stdio') { -+ $ENV{PERLIO} = $perlio; -+ for my $test_in ("test\n", "test") { -+ my $test_in_esc = $test_in; -+ $test_in_esc =~ s/\n/\\n/g; -+ for my $rs_code ('', '$/=undef', '$/=\2', '$/=\1024') { -+ is( runperl( prog => "$rs_code; $test_prog", -+ stdin => $test_in, stderr => 1), -+ $test_in, -+ "Wrong errno, PERLIO=$ENV{PERLIO} stdin='$test_in_esc'"); -+ } -+ } -+} --- -1.6.2 - diff --git a/perl-suid-noroot.patch b/perl-suid-noroot.patch deleted file mode 100644 index 488185d..0000000 --- a/perl-suid-noroot.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- perl-5.10.1/installperl.orig 2009-11-18 15:44:47.000000000 +0100 -+++ perl-5.10.1/installperl 2009-11-18 15:50:32.000000000 +0100 -@@ -235,7 +235,7 @@ - - # Do some quick sanity checks. - --if (!$opts{notify} && $d_dosuid && $>) { die "You must run as root to install suidperl\n"; } -+# if (!$opts{notify} && $d_dosuid && $>) { die "You must run as root to install suidperl\n"; } - - $installbin || die "No installbin directory in config.sh\n"; - -d $installbin || mkpath($installbin, $opts{verbose}, 0777); diff --git a/perl-update-ExtUtils-CBuilder.patch b/perl-update-ExtUtils-CBuilder.patch deleted file mode 100644 index bf0893a..0000000 --- a/perl-update-ExtUtils-CBuilder.patch +++ /dev/null @@ -1,1347 +0,0 @@ -ExtUtils-CBuilder-0.27 - -diff -urN perl-5.10.1.orig/MANIFEST perl-5.10.1/MANIFEST ---- perl-5.10.1.orig/MANIFEST 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/MANIFEST 2009-12-01 11:52:20.000000000 +0100 -@@ -2166,6 +2166,7 @@ - lib/ExtUtils/CBuilder/t/00-have-compiler.t ExtUtils::CBuilder tests - lib/ExtUtils/CBuilder/t/01-basic.t tests for ExtUtils::CBuilder - lib/ExtUtils/CBuilder/t/02-link.t tests for ExtUtils::CBuilder -+lib/ExtUtils/CBuilder/t/03-cplusplus.t tests for ExtUtils::CBuilder - lib/ExtUtils/Changes MakeMaker change log - lib/ExtUtils/Changes_EU-Install ExtUtils-Install change log - lib/ExtUtils/Command/MM.pm Calling MM functions from the cmd line -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/Base.pm perl-5.10.1/lib/ExtUtils/CBuilder/Base.pm ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/Base.pm 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/Base.pm 2009-12-01 10:38:49.000000000 +0100 -@@ -9,7 +9,7 @@ - use IO::File; - - use vars qw($VERSION); --$VERSION = '0.2602'; -+$VERSION = '0.27'; - - sub new { - my $class = shift; -@@ -21,6 +21,7 @@ - while (my ($k,$v) = each %Config) { - $self->{config}{$k} = $v unless exists $self->{config}{$k}; - } -+ $self->{config}{cc} = $ENV{CC} if exists $ENV{CC}; - return $self; - } - -@@ -98,6 +99,7 @@ - my @extra_compiler_flags = $self->split_like_shell($args{extra_compiler_flags}); - my @cccdlflags = $self->split_like_shell($cf->{cccdlflags}); - my @ccflags = $self->split_like_shell($cf->{ccflags}); -+ push @ccflags, qw/-x c++/ if $args{'C++'}; - my @optimize = $self->split_like_shell($cf->{optimize}); - my @flags = (@include_dirs, @defines, @cccdlflags, @extra_compiler_flags, - $self->arg_nolink, -@@ -114,7 +116,7 @@ - } - - sub have_compiler { -- my ($self) = @_; -+ my ($self, $is_cplusplus) = @_; - return $self->{have_compiler} if defined $self->{have_compiler}; - - my $result; -@@ -125,6 +127,7 @@ - # don't clobber existing files (rare, but possible) - my $rand = int(rand(2**31)); - my $tmpfile = File::Spec->catfile($dir, "compilet-$rand.c"); -+ $tmpfile .= "c" if $is_cplusplus; - if ( -e $tmpfile ) { - redo DIR if $attempts--; - next DIR; -@@ -132,13 +135,19 @@ - - { - my $FH = IO::File->new("> $tmpfile") or die "Can't create $tmpfile: $!"; -- print $FH "int boot_compilet() { return 1; }\n"; -+ if ( $is_cplusplus ) { -+ print $FH "class Bogus { public: int boot_compilet() { return 1; } };\n"; -+ } -+ else { -+ print $FH "int boot_compilet() { return 1; }\n"; -+ } - } - - my ($obj_file, @lib_files); - eval { - local $^W = 0; -- $obj_file = $self->compile(source => $tmpfile); -+ local $self->{quiet} = 1; -+ $obj_file = $self->compile('C++' => $is_cplusplus, source => $tmpfile); - @lib_files = $self->link(objects => $obj_file, module_name => 'compilet'); - }; - $result = $@ ? 0 : 1; -@@ -152,6 +161,11 @@ - return $self->{have_compiler} = $result; - } - -+sub have_cplusplus { -+ push @_, 1; -+ goto &have_compiler; -+} -+ - sub lib_file { - my ($self, $dl_file) = @_; - $dl_file =~ s/\.[^.]+$//; -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/Changes perl-5.10.1/lib/ExtUtils/CBuilder/Changes ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/Changes 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/Changes 2009-12-01 10:37:31.000000000 +0100 -@@ -1,5 +1,48 @@ - Revision history for Perl extension ExtUtils::CBuilder. - -+0.27 - Thu Oct 29 21:29:56 EDT 2009 -+ -+ Other: -+ - Removed Build.PL to avoid creating a circular dependency -+ - Added version numbers to Windows compiler driver modules -+ -+0.26_05 - Sun Oct 25 17:29:02 EDT 2009 -+ -+ Bugs fixed: -+ - Fixed t/02link.t failures on cygwin with Perl 5.8 [David Golden] -+ -+ Other: -+ - Made have_compiler (and have_cplusplus) quiet without echoing -+ the test command to STDOUT [David Golden] -+ -+0.26_04 - Mon Oct 19 21:57:46 EDT 2009 -+ -+ Enhancements: -+ - Added 'have_cplusplus()' method to check for C++ support -+ - Added patches for building Perl with mingw64 [Sisyphus] -+ - Allow CC environment variable to override $Config{cc} -+ -+ Bugs fixed: -+ - Fixed link executable command for Win32 MSVC (RT#40819) [Cosimo -+ Streppone] -+ - Removed MSVC version check when embedding a manifest file -+ (RT #43002) [Steve Hay] -+ -+ Other: -+ - Split Windows compiler driver packages into individual *.pm files -+ -+0.260301 - Sat Aug 29 11:04:41 EDT 2009 -+ -+ Bugs fixed: -+ - Fixed linking error on Win32 with gcc compiler (RT#49000) -+ [kmx] -+ -+0.2603 - Sat Jul 18 06:56:06 EDT 2009 -+ -+ Bugs fixed: -+ - Makefile.PL had wrong INSTALLDIRS setting for older Perls -+ (RT#47985) [David Golden] -+ - 0.2602 - Sat Jul 4 10:57:12 EDT 2009 - - Bugs fixed: -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/Unix.pm perl-5.10.1/lib/ExtUtils/CBuilder/Platform/Unix.pm ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/Unix.pm 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/Platform/Unix.pm 2009-12-01 10:38:49.000000000 +0100 -@@ -4,7 +4,7 @@ - use ExtUtils::CBuilder::Base; - - use vars qw($VERSION @ISA); --$VERSION = '0.2602'; -+$VERSION = '0.27'; - @ISA = qw(ExtUtils::CBuilder::Base); - - sub link_executable { -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/VMS.pm perl-5.10.1/lib/ExtUtils/CBuilder/Platform/VMS.pm ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/VMS.pm 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/Platform/VMS.pm 2009-12-01 10:38:49.000000000 +0100 -@@ -4,7 +4,7 @@ - use ExtUtils::CBuilder::Base; - - use vars qw($VERSION @ISA); --$VERSION = '0.2602'; -+$VERSION = '0.27'; - @ISA = qw(ExtUtils::CBuilder::Base); - - use File::Spec::Functions qw(catfile catdir); -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm perl-5.10.1/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm 1970-01-01 01:00:00.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm 2009-12-01 10:38:49.000000000 +0100 -@@ -0,0 +1,130 @@ -+package ExtUtils::CBuilder::Platform::Windows::BCC; -+ -+use vars qw($VERSION); -+$VERSION = '0.27'; -+ -+sub format_compiler_cmd { -+ my ($self, %spec) = @_; -+ -+ foreach my $path ( @{ $spec{includes} || [] }, -+ @{ $spec{perlinc} || [] } ) { -+ $path = '-I' . $path; -+ } -+ -+ %spec = $self->write_compiler_script(%spec) -+ if $spec{use_scripts}; -+ -+ return [ grep {defined && length} ( -+ $spec{cc}, '-c' , -+ @{$spec{includes}} , -+ @{$spec{cflags}} , -+ @{$spec{optimize}} , -+ @{$spec{defines}} , -+ @{$spec{perlinc}} , -+ "-o$spec{output}" , -+ $spec{source} , -+ ) ]; -+} -+ -+sub write_compiler_script { -+ my ($self, %spec) = @_; -+ -+ my $script = File::Spec->catfile( $spec{srcdir}, -+ $spec{basename} . '.ccs' ); -+ -+ $self->add_to_cleanup($script); -+ -+ print "Generating script '$script'\n" if !$self->{quiet}; -+ -+ my $SCRIPT = IO::File->new( ">$script" ) -+ or die( "Could not create script '$script': $!" ); -+ -+ # XXX Borland "response files" seem to be unable to accept macro -+ # definitions containing quoted strings. Escaping strings with -+ # backslash doesn't work, and any level of quotes are stripped. The -+ # result is is a floating point number in the source file where a -+ # string is expected. So we leave the macros on the command line. -+ print $SCRIPT join( "\n", -+ map { ref $_ ? @{$_} : $_ } -+ grep defined, -+ delete( -+ @spec{ qw(includes cflags optimize perlinc) } ) -+ ); -+ -+ push @{$spec{includes}}, '@"' . $script . '"'; -+ -+ return %spec; -+} -+ -+sub format_linker_cmd { -+ my ($self, %spec) = @_; -+ -+ foreach my $path ( @{$spec{libpath}} ) { -+ $path = "-L$path"; -+ } -+ -+ push( @{$spec{startup}}, 'c0d32.obj' ) -+ unless ( $spec{starup} && @{$spec{startup}} ); -+ -+ %spec = $self->write_linker_script(%spec) -+ if $spec{use_scripts}; -+ -+ return [ grep {defined && length} ( -+ $spec{ld} , -+ @{$spec{lddlflags}} , -+ @{$spec{libpath}} , -+ @{$spec{other_ldflags}} , -+ @{$spec{startup}} , -+ @{$spec{objects}} , ',', -+ $spec{output} , ',', -+ $spec{map_file} , ',', -+ $spec{libperl} , -+ @{$spec{perllibs}} , ',', -+ $spec{def_file} -+ ) ]; -+} -+ -+sub write_linker_script { -+ my ($self, %spec) = @_; -+ -+ # To work around Borlands "unique" commandline syntax, -+ # two scripts are used: -+ -+ my $ld_script = File::Spec->catfile( $spec{srcdir}, -+ $spec{basename} . '.lds' ); -+ my $ld_libs = File::Spec->catfile( $spec{srcdir}, -+ $spec{basename} . '.lbs' ); -+ -+ $self->add_to_cleanup($ld_script, $ld_libs); -+ -+ print "Generating scripts '$ld_script' and '$ld_libs'.\n" if !$self->{quiet}; -+ -+ # Script 1: contains options & names of object files. -+ my $LD_SCRIPT = IO::File->new( ">$ld_script" ) -+ or die( "Could not create linker script '$ld_script': $!" ); -+ -+ print $LD_SCRIPT join( " +\n", -+ map { @{$_} } -+ grep defined, -+ delete( -+ @spec{ qw(lddlflags libpath other_ldflags startup objects) } ) -+ ); -+ -+ # Script 2: contains name of libs to link against. -+ my $LD_LIBS = IO::File->new( ">$ld_libs" ) -+ or die( "Could not create linker script '$ld_libs': $!" ); -+ -+ print $LD_LIBS join( " +\n", -+ (delete $spec{libperl} || ''), -+ @{delete $spec{perllibs} || []}, -+ ); -+ -+ push @{$spec{lddlflags}}, '@"' . $ld_script . '"'; -+ push @{$spec{perllibs}}, '@"' . $ld_libs . '"'; -+ -+ return %spec; -+} -+ -+1; -+ -+ -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm perl-5.10.1/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm 1970-01-01 01:00:00.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm 2009-12-01 10:38:49.000000000 +0100 -@@ -0,0 +1,151 @@ -+package ExtUtils::CBuilder::Platform::Windows::GCC; -+ -+use vars qw($VERSION); -+$VERSION = '0.27'; -+ -+sub format_compiler_cmd { -+ my ($self, %spec) = @_; -+ -+ foreach my $path ( @{ $spec{includes} || [] }, -+ @{ $spec{perlinc} || [] } ) { -+ $path = '-I' . $path; -+ } -+ -+ # split off any -arguments included in cc -+ my @cc = split / (?=-)/, $spec{cc}; -+ -+ return [ grep {defined && length} ( -+ @cc, '-c' , -+ @{$spec{includes}} , -+ @{$spec{cflags}} , -+ @{$spec{optimize}} , -+ @{$spec{defines}} , -+ @{$spec{perlinc}} , -+ '-o', $spec{output} , -+ $spec{source} , -+ ) ]; -+} -+ -+sub format_linker_cmd { -+ my ($self, %spec) = @_; -+ my $cf = $self->{config}; -+ -+ # The Config.pm variable 'libperl' is hardcoded to the full name -+ # of the perl import library (i.e. 'libperl56.a'). GCC will not -+ # find it unless the 'lib' prefix & the extension are stripped. -+ $spec{libperl} =~ s/^(?:lib)?([^.]+).*$/-l$1/; -+ -+ unshift( @{$spec{other_ldflags}}, '-nostartfiles' ) -+ if ( $spec{startup} && @{$spec{startup}} ); -+ -+ # From ExtUtils::MM_Win32: -+ # -+ ## one thing for GCC/Mingw32: -+ ## we try to overcome non-relocateable-DLL problems by generating -+ ## a (hopefully unique) image-base from the dll's name -+ ## -- BKS, 10-19-1999 -+ File::Basename::basename( $spec{output} ) =~ /(....)(.{0,4})/; -+ $spec{image_base} = sprintf( "0x%x0000", unpack('n', $1 ^ $2) ); -+ -+ %spec = $self->write_linker_script(%spec) -+ if $spec{use_scripts}; -+ -+ foreach my $path ( @{$spec{libpath}} ) { -+ $path = "-L$path"; -+ } -+ -+ my @cmds; # Stores the series of commands needed to build the module. -+ -+ my $DLLTOOL = $cf->{dlltool} || 'dlltool'; -+ -+ push @cmds, [ -+ $DLLTOOL, '--def' , $spec{def_file}, -+ '--output-exp' , $spec{explib} -+ ]; -+ -+ # split off any -arguments included in ld -+ my @ld = split / (?=-)/, $spec{ld}; -+ -+ push @cmds, [ grep {defined && length} ( -+ @ld , -+ '-o', $spec{output} , -+ "-Wl,--base-file,$spec{base_file}" , -+ "-Wl,--image-base,$spec{image_base}" , -+ @{$spec{lddlflags}} , -+ @{$spec{libpath}} , -+ @{$spec{startup}} , -+ @{$spec{objects}} , -+ @{$spec{other_ldflags}} , -+ $spec{libperl} , -+ @{$spec{perllibs}} , -+ $spec{explib} , -+ $spec{map_file} ? ('-Map', $spec{map_file}) : '' -+ ) ]; -+ -+ push @cmds, [ -+ $DLLTOOL, '--def' , $spec{def_file}, -+ '--output-exp' , $spec{explib}, -+ '--base-file' , $spec{base_file} -+ ]; -+ -+ push @cmds, [ grep {defined && length} ( -+ @ld , -+ '-o', $spec{output} , -+ "-Wl,--image-base,$spec{image_base}" , -+ @{$spec{lddlflags}} , -+ @{$spec{libpath}} , -+ @{$spec{startup}} , -+ @{$spec{objects}} , -+ @{$spec{other_ldflags}} , -+ $spec{libperl} , -+ @{$spec{perllibs}} , -+ $spec{explib} , -+ $spec{map_file} ? ('-Map', $spec{map_file}) : '' -+ ) ]; -+ -+ return @cmds; -+} -+ -+sub write_linker_script { -+ my ($self, %spec) = @_; -+ -+ my $script = File::Spec->catfile( $spec{srcdir}, -+ $spec{basename} . '.lds' ); -+ -+ $self->add_to_cleanup($script); -+ -+ print "Generating script '$script'\n" if !$self->{quiet}; -+ -+ my $SCRIPT = IO::File->new( ">$script" ) -+ or die( "Could not create script '$script': $!" ); -+ -+ print $SCRIPT ( 'SEARCH_DIR(' . $_ . ")\n" ) -+ for @{delete $spec{libpath} || []}; -+ -+ # gcc takes only one startup file, so the first object in startup is -+ # specified as the startup file and any others are shifted into the -+ # beginning of the list of objects. -+ if ( $spec{startup} && @{$spec{startup}} ) { -+ print $SCRIPT 'STARTUP(' . shift( @{$spec{startup}} ) . ")\n"; -+ unshift @{$spec{objects}}, -+ @{delete $spec{startup} || []}; -+ } -+ -+ print $SCRIPT 'INPUT(' . join( ',', -+ @{delete $spec{objects} || []} -+ ) . ")\n"; -+ -+ print $SCRIPT 'INPUT(' . join( ' ', -+ (delete $spec{libperl} || ''), -+ @{delete $spec{perllibs} || []}, -+ ) . ")\n"; -+ -+ #it is important to keep the order 1.linker_script - 2.other_ldflags -+ unshift @{$spec{other_ldflags}}, '"' . $script . '"'; -+ -+ return %spec; -+} -+ -+1; -+ -+ -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm perl-5.10.1/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm 1970-01-01 01:00:00.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm 2009-12-01 10:38:49.000000000 +0100 -@@ -0,0 +1,131 @@ -+package ExtUtils::CBuilder::Platform::Windows::MSVC; -+ -+use vars qw($VERSION); -+$VERSION = '0.27'; -+ -+sub arg_exec_file { -+ my ($self, $file) = @_; -+ return "/OUT:$file"; -+} -+ -+sub format_compiler_cmd { -+ my ($self, %spec) = @_; -+ -+ foreach my $path ( @{ $spec{includes} || [] }, -+ @{ $spec{perlinc} || [] } ) { -+ $path = '-I' . $path; -+ } -+ -+ %spec = $self->write_compiler_script(%spec) -+ if $spec{use_scripts}; -+ -+ return [ grep {defined && length} ( -+ $spec{cc},'-nologo','-c', -+ @{$spec{includes}} , -+ @{$spec{cflags}} , -+ @{$spec{optimize}} , -+ @{$spec{defines}} , -+ @{$spec{perlinc}} , -+ "-Fo$spec{output}" , -+ $spec{source} , -+ ) ]; -+} -+ -+sub write_compiler_script { -+ my ($self, %spec) = @_; -+ -+ my $script = File::Spec->catfile( $spec{srcdir}, -+ $spec{basename} . '.ccs' ); -+ -+ $self->add_to_cleanup($script); -+ print "Generating script '$script'\n" if !$self->{quiet}; -+ -+ my $SCRIPT = IO::File->new( ">$script" ) -+ or die( "Could not create script '$script': $!" ); -+ -+ print $SCRIPT join( "\n", -+ map { ref $_ ? @{$_} : $_ } -+ grep defined, -+ delete( -+ @spec{ qw(includes cflags optimize defines perlinc) } ) -+ ); -+ -+ push @{$spec{includes}}, '@"' . $script . '"'; -+ -+ return %spec; -+} -+ -+sub format_linker_cmd { -+ my ($self, %spec) = @_; -+ my $cf = $self->{config}; -+ -+ foreach my $path ( @{$spec{libpath}} ) { -+ $path = "-libpath:$path"; -+ } -+ -+ my $output = $spec{output}; -+ -+ $spec{def_file} &&= '-def:' . $spec{def_file}; -+ $spec{output} &&= '-out:' . $spec{output}; -+ $spec{manifest} &&= '-manifest ' . $spec{manifest}; -+ $spec{implib} &&= '-implib:' . $spec{implib}; -+ $spec{map_file} &&= '-map:' . $spec{map_file}; -+ -+ %spec = $self->write_linker_script(%spec) -+ if $spec{use_scripts}; -+ -+ my @cmds; # Stores the series of commands needed to build the module. -+ -+ push @cmds, [ grep {defined && length} ( -+ $spec{ld} , -+ @{$spec{lddlflags}} , -+ @{$spec{libpath}} , -+ @{$spec{other_ldflags}} , -+ @{$spec{startup}} , -+ @{$spec{objects}} , -+ $spec{map_file} , -+ $spec{libperl} , -+ @{$spec{perllibs}} , -+ $spec{def_file} , -+ $spec{implib} , -+ $spec{output} , -+ ) ]; -+ -+ # Embed the manifest file if it exists -+ push @cmds, [ -+ 'if', 'exist', $spec{manifest}, 'mt', '-nologo', $spec{manifest}, '-outputresource:' . "$output;2" -+ ]; -+ -+ return @cmds; -+} -+ -+sub write_linker_script { -+ my ($self, %spec) = @_; -+ -+ my $script = File::Spec->catfile( $spec{srcdir}, -+ $spec{basename} . '.lds' ); -+ -+ $self->add_to_cleanup($script); -+ -+ print "Generating script '$script'\n" if !$self->{quiet}; -+ -+ my $SCRIPT = IO::File->new( ">$script" ) -+ or die( "Could not create script '$script': $!" ); -+ -+ print $SCRIPT join( "\n", -+ map { ref $_ ? @{$_} : $_ } -+ grep defined, -+ delete( -+ @spec{ qw(lddlflags libpath other_ldflags -+ startup objects libperl perllibs -+ def_file implib map_file) } ) -+ ); -+ -+ push @{$spec{lddlflags}}, '@"' . $script . '"'; -+ -+ return %spec; -+} -+ -+1; -+ -+ -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/Windows.pm perl-5.10.1/lib/ExtUtils/CBuilder/Platform/Windows.pm ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/Windows.pm 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/Platform/Windows.pm 2009-12-01 10:38:49.000000000 +0100 -@@ -10,16 +10,36 @@ - use IO::File; - - use vars qw($VERSION @ISA); --$VERSION = '0.2602'; -+$VERSION = '0.27'; - @ISA = qw(ExtUtils::CBuilder::Base); - -+=begin comment -+ -+The compiler-specific packages implement functions for generating properly -+formatted commandlines for the compiler being used. Each package -+defines two primary functions 'format_linker_cmd()' & -+'format_compiler_cmd()' that accepts a list of named arguments (a -+hash) and returns a list of formatted options suitable for invoking the -+compiler. By default, if the compiler supports scripting of its -+operation then a script file is built containing the options while -+those options are removed from the commandline, and a reference to the -+script is pushed onto the commandline in their place. Scripting the -+compiler in this way helps to avoid the problems associated with long -+commandlines under some shells. -+ -+=end comment -+ -+=cut -+ - sub new { - my $class = shift; - my $self = $class->SUPER::new(@_); - my $cf = $self->{config}; - - # Inherit from an appropriate compiler driver class -- unshift @ISA, "ExtUtils::CBuilder::Platform::Windows::" . $self->_compiler_type; -+ my $driver = "ExtUtils::CBuilder::Platform::Windows::" . $self->_compiler_type; -+ eval "require $driver" or die "Could not load compiler driver: $@"; -+ unshift @ISA, $driver; - - return $self; - } -@@ -238,422 +258,6 @@ - - 1; - --######################################################################## -- --=begin comment -- --The packages below implement functions for generating properly --formatted commandlines for the compiler being used. Each package --defines two primary functions 'format_linker_cmd()' & --'format_compiler_cmd()' that accepts a list of named arguments (a --hash) and returns a list of formatted options suitable for invoking the --compiler. By default, if the compiler supports scripting of its --operation then a script file is built containing the options while --those options are removed from the commandline, and a reference to the --script is pushed onto the commandline in their place. Scripting the --compiler in this way helps to avoid the problems associated with long --commandlines under some shells. -- --=end comment -- --=cut -- --######################################################################## --package ExtUtils::CBuilder::Platform::Windows::MSVC; -- --sub format_compiler_cmd { -- my ($self, %spec) = @_; -- -- foreach my $path ( @{ $spec{includes} || [] }, -- @{ $spec{perlinc} || [] } ) { -- $path = '-I' . $path; -- } -- -- %spec = $self->write_compiler_script(%spec) -- if $spec{use_scripts}; -- -- return [ grep {defined && length} ( -- $spec{cc},'-nologo','-c', -- @{$spec{includes}} , -- @{$spec{cflags}} , -- @{$spec{optimize}} , -- @{$spec{defines}} , -- @{$spec{perlinc}} , -- "-Fo$spec{output}" , -- $spec{source} , -- ) ]; --} -- --sub write_compiler_script { -- my ($self, %spec) = @_; -- -- my $script = File::Spec->catfile( $spec{srcdir}, -- $spec{basename} . '.ccs' ); -- -- $self->add_to_cleanup($script); -- print "Generating script '$script'\n" if !$self->{quiet}; -- -- my $SCRIPT = IO::File->new( ">$script" ) -- or die( "Could not create script '$script': $!" ); -- -- print $SCRIPT join( "\n", -- map { ref $_ ? @{$_} : $_ } -- grep defined, -- delete( -- @spec{ qw(includes cflags optimize defines perlinc) } ) -- ); -- -- push @{$spec{includes}}, '@"' . $script . '"'; -- -- return %spec; --} -- --sub format_linker_cmd { -- my ($self, %spec) = @_; -- my $cf = $self->{config}; -- -- foreach my $path ( @{$spec{libpath}} ) { -- $path = "-libpath:$path"; -- } -- -- my $output = $spec{output}; -- -- $spec{def_file} &&= '-def:' . $spec{def_file}; -- $spec{output} &&= '-out:' . $spec{output}; -- $spec{manifest} &&= '-manifest ' . $spec{manifest}; -- $spec{implib} &&= '-implib:' . $spec{implib}; -- $spec{map_file} &&= '-map:' . $spec{map_file}; -- -- %spec = $self->write_linker_script(%spec) -- if $spec{use_scripts}; -- -- my @cmds; # Stores the series of commands needed to build the module. -- -- push @cmds, [ grep {defined && length} ( -- $spec{ld} , -- @{$spec{lddlflags}} , -- @{$spec{libpath}} , -- @{$spec{other_ldflags}} , -- @{$spec{startup}} , -- @{$spec{objects}} , -- $spec{map_file} , -- $spec{libperl} , -- @{$spec{perllibs}} , -- $spec{def_file} , -- $spec{implib} , -- $spec{output} , -- ) ]; -- -- # Embed the manifest file for VC 2005 (aka VC 8) or higher, but not for the 64-bit Platform SDK compiler -- if ($cf->{ivsize} == 4 && $cf->{cc} eq 'cl' and $cf->{ccversion} =~ /^(\d+)/ and $1 >= 14) { -- push @cmds, [ -- 'if', 'exist', $spec{manifest}, 'mt', '-nologo', $spec{manifest}, '-outputresource:' . "$output;2" -- ]; -- } -- -- return @cmds; --} -- --sub write_linker_script { -- my ($self, %spec) = @_; -- -- my $script = File::Spec->catfile( $spec{srcdir}, -- $spec{basename} . '.lds' ); -- -- $self->add_to_cleanup($script); -- -- print "Generating script '$script'\n" if !$self->{quiet}; -- -- my $SCRIPT = IO::File->new( ">$script" ) -- or die( "Could not create script '$script': $!" ); -- -- print $SCRIPT join( "\n", -- map { ref $_ ? @{$_} : $_ } -- grep defined, -- delete( -- @spec{ qw(lddlflags libpath other_ldflags -- startup objects libperl perllibs -- def_file implib map_file) } ) -- ); -- -- push @{$spec{lddlflags}}, '@"' . $script . '"'; -- -- return %spec; --} -- --1; -- --######################################################################## --package ExtUtils::CBuilder::Platform::Windows::BCC; -- --sub format_compiler_cmd { -- my ($self, %spec) = @_; -- -- foreach my $path ( @{ $spec{includes} || [] }, -- @{ $spec{perlinc} || [] } ) { -- $path = '-I' . $path; -- } -- -- %spec = $self->write_compiler_script(%spec) -- if $spec{use_scripts}; -- -- return [ grep {defined && length} ( -- $spec{cc}, '-c' , -- @{$spec{includes}} , -- @{$spec{cflags}} , -- @{$spec{optimize}} , -- @{$spec{defines}} , -- @{$spec{perlinc}} , -- "-o$spec{output}" , -- $spec{source} , -- ) ]; --} -- --sub write_compiler_script { -- my ($self, %spec) = @_; -- -- my $script = File::Spec->catfile( $spec{srcdir}, -- $spec{basename} . '.ccs' ); -- -- $self->add_to_cleanup($script); -- -- print "Generating script '$script'\n" if !$self->{quiet}; -- -- my $SCRIPT = IO::File->new( ">$script" ) -- or die( "Could not create script '$script': $!" ); -- -- # XXX Borland "response files" seem to be unable to accept macro -- # definitions containing quoted strings. Escaping strings with -- # backslash doesn't work, and any level of quotes are stripped. The -- # result is is a floating point number in the source file where a -- # string is expected. So we leave the macros on the command line. -- print $SCRIPT join( "\n", -- map { ref $_ ? @{$_} : $_ } -- grep defined, -- delete( -- @spec{ qw(includes cflags optimize perlinc) } ) -- ); -- -- push @{$spec{includes}}, '@"' . $script . '"'; -- -- return %spec; --} -- --sub format_linker_cmd { -- my ($self, %spec) = @_; -- -- foreach my $path ( @{$spec{libpath}} ) { -- $path = "-L$path"; -- } -- -- push( @{$spec{startup}}, 'c0d32.obj' ) -- unless ( $spec{starup} && @{$spec{startup}} ); -- -- %spec = $self->write_linker_script(%spec) -- if $spec{use_scripts}; -- -- return [ grep {defined && length} ( -- $spec{ld} , -- @{$spec{lddlflags}} , -- @{$spec{libpath}} , -- @{$spec{other_ldflags}} , -- @{$spec{startup}} , -- @{$spec{objects}} , ',', -- $spec{output} , ',', -- $spec{map_file} , ',', -- $spec{libperl} , -- @{$spec{perllibs}} , ',', -- $spec{def_file} -- ) ]; --} -- --sub write_linker_script { -- my ($self, %spec) = @_; -- -- # To work around Borlands "unique" commandline syntax, -- # two scripts are used: -- -- my $ld_script = File::Spec->catfile( $spec{srcdir}, -- $spec{basename} . '.lds' ); -- my $ld_libs = File::Spec->catfile( $spec{srcdir}, -- $spec{basename} . '.lbs' ); -- -- $self->add_to_cleanup($ld_script, $ld_libs); -- -- print "Generating scripts '$ld_script' and '$ld_libs'.\n" if !$self->{quiet}; -- -- # Script 1: contains options & names of object files. -- my $LD_SCRIPT = IO::File->new( ">$ld_script" ) -- or die( "Could not create linker script '$ld_script': $!" ); -- -- print $LD_SCRIPT join( " +\n", -- map { @{$_} } -- grep defined, -- delete( -- @spec{ qw(lddlflags libpath other_ldflags startup objects) } ) -- ); -- -- # Script 2: contains name of libs to link against. -- my $LD_LIBS = IO::File->new( ">$ld_libs" ) -- or die( "Could not create linker script '$ld_libs': $!" ); -- -- print $LD_LIBS join( " +\n", -- (delete $spec{libperl} || ''), -- @{delete $spec{perllibs} || []}, -- ); -- -- push @{$spec{lddlflags}}, '@"' . $ld_script . '"'; -- push @{$spec{perllibs}}, '@"' . $ld_libs . '"'; -- -- return %spec; --} -- --1; -- --######################################################################## --package ExtUtils::CBuilder::Platform::Windows::GCC; -- --sub format_compiler_cmd { -- my ($self, %spec) = @_; -- -- foreach my $path ( @{ $spec{includes} || [] }, -- @{ $spec{perlinc} || [] } ) { -- $path = '-I' . $path; -- } -- -- # split off any -arguments included in cc -- my @cc = split / (?=-)/, $spec{cc}; -- -- return [ grep {defined && length} ( -- @cc, '-c' , -- @{$spec{includes}} , -- @{$spec{cflags}} , -- @{$spec{optimize}} , -- @{$spec{defines}} , -- @{$spec{perlinc}} , -- '-o', $spec{output} , -- $spec{source} , -- ) ]; --} -- --sub format_linker_cmd { -- my ($self, %spec) = @_; -- -- # The Config.pm variable 'libperl' is hardcoded to the full name -- # of the perl import library (i.e. 'libperl56.a'). GCC will not -- # find it unless the 'lib' prefix & the extension are stripped. -- $spec{libperl} =~ s/^(?:lib)?([^.]+).*$/-l$1/; -- -- unshift( @{$spec{other_ldflags}}, '-nostartfiles' ) -- if ( $spec{startup} && @{$spec{startup}} ); -- -- # From ExtUtils::MM_Win32: -- # -- ## one thing for GCC/Mingw32: -- ## we try to overcome non-relocateable-DLL problems by generating -- ## a (hopefully unique) image-base from the dll's name -- ## -- BKS, 10-19-1999 -- File::Basename::basename( $spec{output} ) =~ /(....)(.{0,4})/; -- $spec{image_base} = sprintf( "0x%x0000", unpack('n', $1 ^ $2) ); -- -- %spec = $self->write_linker_script(%spec) -- if $spec{use_scripts}; -- -- foreach my $path ( @{$spec{libpath}} ) { -- $path = "-L$path"; -- } -- -- my @cmds; # Stores the series of commands needed to build the module. -- -- push @cmds, [ -- 'dlltool', '--def' , $spec{def_file}, -- '--output-exp' , $spec{explib} -- ]; -- -- # split off any -arguments included in ld -- my @ld = split / (?=-)/, $spec{ld}; -- -- push @cmds, [ grep {defined && length} ( -- @ld , -- '-o', $spec{output} , -- "-Wl,--base-file,$spec{base_file}" , -- "-Wl,--image-base,$spec{image_base}" , -- @{$spec{lddlflags}} , -- @{$spec{libpath}} , -- @{$spec{startup}} , -- @{$spec{objects}} , -- @{$spec{other_ldflags}} , -- $spec{libperl} , -- @{$spec{perllibs}} , -- $spec{explib} , -- $spec{map_file} ? ('-Map', $spec{map_file}) : '' -- ) ]; -- -- push @cmds, [ -- 'dlltool', '--def' , $spec{def_file}, -- '--output-exp' , $spec{explib}, -- '--base-file' , $spec{base_file} -- ]; -- -- push @cmds, [ grep {defined && length} ( -- @ld , -- '-o', $spec{output} , -- "-Wl,--image-base,$spec{image_base}" , -- @{$spec{lddlflags}} , -- @{$spec{libpath}} , -- @{$spec{startup}} , -- @{$spec{objects}} , -- @{$spec{other_ldflags}} , -- $spec{libperl} , -- @{$spec{perllibs}} , -- $spec{explib} , -- $spec{map_file} ? ('-Map', $spec{map_file}) : '' -- ) ]; -- -- return @cmds; --} -- --sub write_linker_script { -- my ($self, %spec) = @_; -- -- my $script = File::Spec->catfile( $spec{srcdir}, -- $spec{basename} . '.lds' ); -- -- $self->add_to_cleanup($script); -- -- print "Generating script '$script'\n" if !$self->{quiet}; -- -- my $SCRIPT = IO::File->new( ">$script" ) -- or die( "Could not create script '$script': $!" ); -- -- print $SCRIPT ( 'SEARCH_DIR(' . $_ . ")\n" ) -- for @{delete $spec{libpath} || []}; -- -- # gcc takes only one startup file, so the first object in startup is -- # specified as the startup file and any others are shifted into the -- # beginning of the list of objects. -- if ( $spec{startup} && @{$spec{startup}} ) { -- print $SCRIPT 'STARTUP(' . shift( @{$spec{startup}} ) . ")\n"; -- unshift @{$spec{objects}}, -- @{delete $spec{startup} || []}; -- } -- -- print $SCRIPT 'INPUT(' . join( ',', -- @{delete $spec{objects} || []} -- ) . ")\n"; -- -- print $SCRIPT 'INPUT(' . join( ' ', -- (delete $spec{libperl} || ''), -- @{delete $spec{perllibs} || []}, -- ) . ")\n"; -- -- push @{$spec{other_ldflags}}, '"' . $script . '"'; -- -- return %spec; --} -- --1; -- - __END__ - - =head1 NAME -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/aix.pm perl-5.10.1/lib/ExtUtils/CBuilder/Platform/aix.pm ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/aix.pm 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/Platform/aix.pm 2009-12-01 10:38:49.000000000 +0100 -@@ -5,7 +5,7 @@ - use File::Spec; - - use vars qw($VERSION @ISA); --$VERSION = '0.2602'; -+$VERSION = '0.27'; - @ISA = qw(ExtUtils::CBuilder::Platform::Unix); - - sub need_prelink { 1 } -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/cygwin.pm perl-5.10.1/lib/ExtUtils/CBuilder/Platform/cygwin.pm ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/cygwin.pm 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/Platform/cygwin.pm 2009-12-01 10:38:49.000000000 +0100 -@@ -5,13 +5,16 @@ - use ExtUtils::CBuilder::Platform::Unix; - - use vars qw($VERSION @ISA); --$VERSION = '0.2602'; -+$VERSION = '0.27'; - @ISA = qw(ExtUtils::CBuilder::Platform::Unix); - -+# TODO: If a specific exe_file name is requested, if the exe created -+# doesn't have that name, we might want to rename it. Apparently asking -+# for an exe of "foo" might result in "foo.exe". Alternatively, we should -+# make sure the return value is correctly "foo.exe". -+# C.f http://rt.cpan.org/Public/Bug/Display.html?id=41003 - sub link_executable { - my $self = shift; -- # $Config{ld} is okay. Circumvent the Unix ld=cc override in the superclass. -- local $self->{config}{cc} = $self->{config}{ld}; - return $self->SUPER::link_executable(@_); - } - -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/darwin.pm perl-5.10.1/lib/ExtUtils/CBuilder/Platform/darwin.pm ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/darwin.pm 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/Platform/darwin.pm 2009-12-01 10:38:49.000000000 +0100 -@@ -4,7 +4,7 @@ - use ExtUtils::CBuilder::Platform::Unix; - - use vars qw($VERSION @ISA); --$VERSION = '0.2602'; -+$VERSION = '0.27'; - @ISA = qw(ExtUtils::CBuilder::Platform::Unix); - - sub compile { -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/dec_osf.pm perl-5.10.1/lib/ExtUtils/CBuilder/Platform/dec_osf.pm ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/dec_osf.pm 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/Platform/dec_osf.pm 2009-12-01 10:38:49.000000000 +0100 -@@ -6,7 +6,7 @@ - - use vars qw($VERSION @ISA); - @ISA = qw(ExtUtils::CBuilder::Platform::Unix); --$VERSION = '0.2602'; -+$VERSION = '0.27'; - - sub link_executable { - my $self = shift; -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/os2.pm perl-5.10.1/lib/ExtUtils/CBuilder/Platform/os2.pm ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/Platform/os2.pm 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/Platform/os2.pm 2009-12-01 10:38:49.000000000 +0100 -@@ -4,7 +4,7 @@ - use ExtUtils::CBuilder::Platform::Unix; - - use vars qw($VERSION @ISA); --$VERSION = '0.2602'; -+$VERSION = '0.27'; - @ISA = qw(ExtUtils::CBuilder::Platform::Unix); - - sub need_prelink { 1 } -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/t/00-have-compiler.t perl-5.10.1/lib/ExtUtils/CBuilder/t/00-have-compiler.t ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/t/00-have-compiler.t 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/t/00-have-compiler.t 2009-12-01 10:39:10.000000000 +0100 -@@ -4,12 +4,6 @@ - my $perl; - BEGIN { - $perl = File::Spec->rel2abs($^X); -- if ($ENV{PERL_CORE}) { -- chdir 't' if -d 't'; -- chdir '../lib/ExtUtils/CBuilder' -- or die "Can't chdir to lib/ExtUtils/CBuilder: $!"; -- @INC = qw(../..); -- } - } - - use strict; -@@ -22,22 +16,30 @@ - } - } - --plan tests => 4; -+plan tests => 6; - - require_ok "ExtUtils::CBuilder"; - - my $b = eval { ExtUtils::CBuilder->new(quiet => 1) }; - ok( $b, "got CBuilder object" ) or diag $@; - -+my $bogus_path = 'djaadjfkadjkfajdf'; -+my $run_perl = "$perl -e1 --"; - # test missing compiler --$b->{config}{cc} = 'djaadjfkadjkfajdf'; --$b->{config}{ld} = 'djaadjfkadjkfajdf'; -+$b->{config}{cc} = $bogus_path; -+$b->{config}{ld} = $bogus_path; -+ -+$b->{have_compiler} = undef; - is( $b->have_compiler, 0, "have_compiler: fake missing cc" ); -+$b->{have_compiler} = undef; -+is( $b->have_cplusplus, 0, "have_cplusplus: fake missing c++" ); - - # test found compiler -+$b->{config}{cc} = $run_perl; -+$b->{config}{ld} = $run_perl; - $b->{have_compiler} = undef; --$b->{config}{cc} = "$perl -e1 --"; --$b->{config}{ld} = "$perl -e1 --"; - is( $b->have_compiler, 1, "have_compiler: fake present cc" ); -+$b->{have_compiler} = undef; -+is( $b->have_cplusplus, 1, "have_cpp_compiler: fake present c++" ); - -- -+# test missing cpp compiler -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/t/02-link.t perl-5.10.1/lib/ExtUtils/CBuilder/t/02-link.t ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/t/02-link.t 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/t/02-link.t 2009-12-02 12:08:01.000000000 +0100 -@@ -35,7 +35,7 @@ - plan skip_all => "no compiler available for testing"; - } - else { -- plan tests => 7; -+ plan tests => 8; - } - - ok $b, "created EU::CB object"; -@@ -56,13 +56,14 @@ - - # Link - SKIP: { -- skip "error compiling source", 3 -+ skip "error compiling source", 4 - unless -e $object_file; - - my @temps; - eval { ($exe_file, @temps) = $b->link_executable(objects => $object_file) }; - is $@, q{}, "no exception from linking"; - ok -e $exe_file, "found executable file"; -+ ok -x $exe_file, "executable file appears to be executable"; - - if ($^O eq 'os2') { # Analogue of LDLOADPATH... - # Actually, not needed now, since we do not link with the generated DLL -@@ -74,9 +75,9 @@ - - # Try the executable - my $ec = my_system($exe_file); -- is $ec, 11, "got expected exit code from executable" -- or print( $? == -1 ? "# Could not run '$exe_file'\n" -- : "# Unexpected exit code '$ec'\n"); -+ is( $ec, 11, "got expected exit code from executable" ) -+ or diag( $ec == -1 ? "Could not run '$exe_file': $!\n" -+ : "Unexpected exit code '$ec'\n"); - } - - # Clean up -@@ -92,8 +93,10 @@ - - sub my_system { - my $cmd = shift; -+ my $ec; - if ($^O eq 'VMS') { -- return system("mcr $cmd"); -+ $ec = system("mcr $cmd"); - } -- return system($cmd) >> 8; -+ $ec = system($cmd); -+ return $ec == -1 ? -1 : $ec >> 8; - } -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder/t/03-cplusplus.t perl-5.10.1/lib/ExtUtils/CBuilder/t/03-cplusplus.t ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder/t/03-cplusplus.t 1970-01-01 01:00:00.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder/t/03-cplusplus.t 2009-12-02 12:08:01.000000000 +0100 -@@ -0,0 +1,73 @@ -+#! perl -w -+ -+BEGIN { -+ if ($ENV{PERL_CORE}) { -+ chdir 't' if -d 't'; -+ chdir '../lib/ExtUtils/CBuilder' -+ or die "Can't chdir to lib/ExtUtils/CBuilder: $!"; -+ @INC = qw(../..); -+ } -+} -+ -+use strict; -+use Test::More; -+BEGIN { -+ if ($^O eq 'VMS') { -+ # So we can get the return value of system() -+ require vmsish; -+ import vmsish; -+ } -+} -+use ExtUtils::CBuilder; -+use File::Spec; -+ -+# TEST doesn't like extraneous output -+my $quiet = $ENV{PERL_CORE} && !$ENV{HARNESS_ACTIVE}; -+my ($source_file, $object_file, $lib_file); -+ -+my $b = ExtUtils::CBuilder->new(quiet => $quiet); -+ -+# test plan -+if ( ! $b->have_cplusplus ) { -+ plan skip_all => "no compiler available for testing"; -+} -+else { -+ plan tests => 7; -+} -+ -+ok $b, "created EU::CB object"; -+ -+ok $b->have_cplusplus, "have_cplusplus"; -+ -+$source_file = File::Spec->catfile('t', 'compilet.cc'); -+{ -+ local *FH; -+ open FH, "> $source_file" or die "Can't create $source_file: $!"; -+ print FH "class Bogus { public: int boot_compilet() { return 1; } };\n"; -+ close FH; -+} -+ok -e $source_file, "source file '$source_file' created"; -+ -+$object_file = $b->object_file($source_file); -+ok 1; -+ -+is $object_file, $b->compile(source => $source_file, 'C++' => 1); -+ -+$lib_file = $b->lib_file($object_file); -+ok 1; -+ -+my ($lib, @temps) = $b->link(objects => $object_file, -+ module_name => 'compilet'); -+$lib =~ tr/"'//d; -+is $lib_file, $lib; -+ -+for ($source_file, $object_file, $lib_file) { -+ tr/"'//d; -+ 1 while unlink; -+} -+ -+if ($^O eq 'VMS') { -+ 1 while unlink 'COMPILET.LIS'; -+ 1 while unlink 'COMPILET.OPT'; -+} -+ -diff -urN perl-5.10.1.orig/lib/ExtUtils/CBuilder.pm perl-5.10.1/lib/ExtUtils/CBuilder.pm ---- perl-5.10.1.orig/lib/ExtUtils/CBuilder.pm 2009-12-02 11:59:51.000000000 +0100 -+++ perl-5.10.1/lib/ExtUtils/CBuilder.pm 2009-12-01 10:38:49.000000000 +0100 -@@ -5,7 +5,7 @@ - use File::Basename (); - - use vars qw($VERSION @ISA); --$VERSION = '0.2602'; -+$VERSION = '0.27'; - $VERSION = eval $VERSION; - - # Okay, this is the brute-force method of finding out what kind of -@@ -133,6 +133,10 @@ - link a sample C library. The sample will be compiled in the system - tempdir or, if that fails for some reason, in the current directory. - -+=item have_cplusplus -+ -+Just like have_compiler but for C++ instead of C. -+ - =item compile - - Compiles a C source file and produces an object file. The name of the -@@ -161,6 +165,11 @@ - this is not possible, as a string containing all the arguments - together. - -+=item C -+ -+Specifies that the source file is a C++ source file and sets appropriate -+compiler flags -+ - =back - - The operation of this method is also affected by the diff --git a/perl-update-File-Path.patch b/perl-update-File-Path.patch deleted file mode 100644 index 0cfd1e2..0000000 --- a/perl-update-File-Path.patch +++ /dev/null @@ -1,287 +0,0 @@ -File-Path-2.08 - -diff -urN perl-5.10.1.orig/lib/File/Path.pm perl-5.10.1/lib/File/Path.pm ---- perl-5.10.1.orig/lib/File/Path.pm 2009-06-27 18:14:41.000000000 +0200 -+++ perl-5.10.1/lib/File/Path.pm 2009-12-01 11:43:31.000000000 +0100 -@@ -17,7 +17,7 @@ - - use Exporter (); - use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); --$VERSION = '2.07_03'; -+$VERSION = '2.08'; - @ISA = qw(Exporter); - @EXPORT = qw(mkpath rmtree); - @EXPORT_OK = qw(make_path remove_tree); -@@ -81,6 +81,34 @@ - $arg->{mode} = delete $arg->{mask} if exists $arg->{mask}; - $arg->{mode} = 0777 unless exists $arg->{mode}; - ${$arg->{error}} = [] if exists $arg->{error}; -+ $arg->{owner} = delete $arg->{user} if exists $arg->{user}; -+ $arg->{owner} = delete $arg->{uid} if exists $arg->{uid}; -+ if (exists $arg->{owner} and $arg->{owner} =~ /\D/) { -+ my $uid = (getpwnam $arg->{owner})[2]; -+ if (defined $uid) { -+ $arg->{owner} = $uid; -+ } -+ else { -+ _error($arg, "unable to map $arg->{owner} to a uid, ownership not changed"); -+ delete $arg->{owner}; -+ } -+ } -+ if (exists $arg->{group} and $arg->{group} =~ /\D/) { -+ my $gid = (getgrnam $arg->{group})[2]; -+ if (defined $gid) { -+ $arg->{group} = $gid; -+ } -+ else { -+ _error($arg, "unable to map $arg->{group} to a gid, group ownership not changed"); -+ delete $arg->{group}; -+ } -+ } -+ if (exists $arg->{owner} and not exists $arg->{group}) { -+ $arg->{group} = -1; # chown will leave group unchanged -+ } -+ if (exists $arg->{group} and not exists $arg->{owner}) { -+ $arg->{owner} = -1; # chown will leave owner unchanged -+ } - $paths = [@_]; - } - return _mkpath($arg, $paths); -@@ -107,6 +135,12 @@ - print "mkdir $path\n" if $arg->{verbose}; - if (mkdir($path,$arg->{mode})) { - push(@created, $path); -+ if (exists $arg->{owner}) { -+ # NB: $arg->{group} guaranteed to be set during initialisation -+ if (!chown $arg->{owner}, $arg->{group}, $path) { -+ _error($arg, "Cannot change ownership of $path to $arg->{owner}:$arg->{group}"); -+ } -+ } - } - else { - my $save_bang = $!; -@@ -422,8 +456,8 @@ - - =head1 VERSION - --This document describes version 2.07 of File::Path, released --2008-11-09. -+This document describes version 2.08 of File::Path, released -+2009-10-04. - - =head1 SYNOPSIS - -@@ -505,6 +539,34 @@ - a fatal error that will cause the program will halt, unless trapped - in an C block. - -+=item owner => $owner -+ -+=item user => $owner -+ -+=item uid => $owner -+ -+If present, will cause any created directory to be owned by C<$owner>. -+If the value is numeric, it will be interpreted as a uid, otherwise -+as username is assumed. An error will be issued if the username cannot be -+mapped to a uid, or the uid does not exist, or the process lacks the -+privileges to change ownership. -+ -+Ownwership of directories that already exist will not be changed. -+ -+C and C are aliases of C. -+ -+=item group => $group -+ -+If present, will cause any created directory to be owned by the group C<$group>. -+If the value is numeric, it will be interpreted as a gid, otherwise -+as group name is assumed. An error will be issued if the group name cannot be -+mapped to a gid, or the gid does not exist, or the process lacks the -+privileges to change group ownership. -+ -+Group ownwership of directories that already exist will not be changed. -+ -+ make_path '/var/tmp/webcache', {owner=>'nobody', group=>'nogroup'}; -+ - =back - - =item mkpath( $dir ) -@@ -672,6 +734,17 @@ - - use File::Path qw(remove_tree rmtree); - -+=head3 API CHANGES -+ -+The API was changed in the 2.0 branch. For a time, C and -+C tried, unsuccessfully, to deal with the two different -+calling mechanisms. This approach was considered a failure. -+ -+The new semantics are now only available with C and -+C. The old semantics are only available through -+C and C. Users are strongly encouraged to upgrade -+to at least 2.08 in order to avoid surprises. -+ - =head3 SECURITY CONSIDERATIONS - - There were race conditions 1.x implementations of File::Path's -@@ -835,6 +908,20 @@ - to restore the permissions on the file to a possibly less permissive - setting. (Permissions given in octal). - -+=item unable to map [owner] to a uid, ownership not changed"); -+ -+C was instructed to give the ownership of created -+directories to the symbolic name [owner], but C did -+not return the corresponding numeric uid. The directory will -+be created, but ownership will not be changed. -+ -+=item unable to map [group] to a gid, group ownership not changed -+ -+C was instructed to give the group ownership of created -+directories to the symbolic name [group], but C did -+not return the corresponding numeric gid. The directory will -+be created, but group ownership will not be changed. -+ - =back - - =head1 SEE ALSO -@@ -885,7 +972,7 @@ - =head1 COPYRIGHT - - This module is copyright (C) Charles Bailey, Tim Bunce and --David Landgren 1995-2008. All rights reserved. -+David Landgren 1995-2009. All rights reserved. - - =head1 LICENSE - -diff -urN perl-5.10.1.orig/lib/File/Path.t perl-5.10.1/lib/File/Path.t ---- perl-5.10.1.orig/lib/File/Path.t 2009-06-27 18:14:41.000000000 +0200 -+++ perl-5.10.1/lib/File/Path.t 2009-12-01 11:43:48.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - --use Test::More tests => 121; -+use Test::More tests => 129; - use Config; - - BEGIN { -@@ -323,7 +323,7 @@ - # test bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487319 - skip "Don't need Force_Writeable semantics on $^O", 4 - if grep {$^O eq $_} qw(amigaos dos epoc MSWin32 MacOS os2); -- skip "Symlinks not available", 4 unless $Config{'d_symlink'}; -+ skip "Symlinks not available", 4 unless $Config{d_symlink}; - $dir = 'bug487319'; - $dir2 = 'bug487319-symlink'; - @created = make_path($dir, {mask => 0700}); -@@ -381,7 +381,7 @@ - SKIP: { - skip "extra scenarios not set up, see eg/setup-extra-tests", 14 - unless -e $extra; -- skip "Symlinks not available", 14 unless $Config{'d_symlink'}; -+ skip "Symlinks not available", 14 unless $Config{d_symlink}; - - my ($list, $err); - $dir = catdir( 'EXTRA', '1' ); -@@ -434,6 +434,78 @@ - } - - SKIP: { -+ my $skip_count = 8; # DRY -+ skip "getpwent() not implemented on $^O", $skip_count -+ unless $Config{d_getpwent}; -+ skip "getgrent() not implemented on $^O", $skip_count -+ unless $Config{d_getgrent}; -+ skip 'not running as root', $skip_count -+ unless $< == 0; -+ -+ my $dir_stem = $dir = catdir($tmp_base, 'owned-by'); -+ -+ # find the highest uid ('nobody' or similar) -+ my $max_uid = 0; -+ my $max_user = undef; -+ while (my @u = getpwent()) { -+ if ($max_uid < $u[2]) { -+ $max_uid = $u[2]; -+ $max_user = $u[0]; -+ } -+ } -+ skip 'getpwent() appears to be insane', $skip_count -+ unless $max_uid > 0; -+ -+ # find the highest gid ('nogroup' or similar) -+ my $max_gid = 0; -+ my $max_group = undef; -+ while (my @g = getgrent()) { -+ if ($max_gid < $g[2]) { -+ $max_gid = $g[2]; -+ $max_group = $g[0]; -+ } -+ } -+ skip 'getgrent() appears to be insane', $skip_count -+ unless $max_gid > 0; -+ -+ $dir = catdir($dir_stem, 'aaa'); -+ @created = make_path($dir, {owner => $max_user}); -+ is(scalar(@created), 2, "created a directory owned by $max_user..."); -+ my $dir_uid = (stat $created[0])[4]; -+ is($dir_uid, $max_uid, "... owned by $max_uid"); -+ -+ $dir = catdir($dir_stem, 'aab'); -+ @created = make_path($dir, {group => $max_group}); -+ is(scalar(@created), 1, "created a directory owned by group $max_group..."); -+ my $dir_gid = (stat $created[0])[5]; -+ is($dir_gid, $max_gid, "... owned by group $max_gid"); -+ -+ $dir = catdir($dir_stem, 'aac'); -+ @created = make_path($dir, {user => $max_user, group => $max_group}); -+ is(scalar(@created), 1, "created a directory owned by $max_user:$max_group..."); -+ ($dir_uid, $dir_gid) = (stat $created[0])[4,5]; -+ is($dir_uid, $max_uid, "... owned by $max_uid"); -+ is($dir_gid, $max_gid, "... owned by group $max_gid"); -+ -+ SKIP: { -+ skip 'Test::Output not available', 1 -+ unless $has_Test_Output; -+ -+ # invent a user and group that don't exist -+ do { ++$max_user } while (getpwnam($max_user)); -+ do { ++$max_group } while (getgrnam($max_group)); -+ -+ $dir = catdir($dir_stem, 'aad'); -+ stderr_like( -+ sub {make_path($dir, {user => $max_user, group => $max_group})}, -+ qr{\Aunable to map $max_user to a uid, ownership not changed: .* at \S+ line \d+ -+unable to map $max_group to a gid, group ownership not changed: .* at \S+ line \d+\b}, -+ "created a directory not owned by $max_user:$max_group..." -+ ); -+ } -+} -+ -+SKIP: { - skip 'Test::Output not available', 14 - unless $has_Test_Output; - -@@ -574,15 +646,15 @@ - my $xx = $x . "x"; - - # setup -- ok(mkpath($xx)); -- ok(chdir($xx)); -+ ok(mkpath($xx), "make $xx"); -+ ok(chdir($xx), "... and chdir $xx"); - END { -- ok(chdir($p)); -- ok(rmtree($xx)); -+ ok(chdir($p), "... now chdir $p"); -+ ok(rmtree($xx), "... and finally rmtree $xx"); - } - - # create and delete directory - my $px = catdir($p, $x); -- ok(mkpath($px)); -- ok(rmtree($px), "rmtree"); # fails in File-Path-2.07 -+ ok(mkpath($px), 'create and delete directory 2.07'); -+ ok(rmtree($px), '.. rmtree fails in File-Path-2.07'); - } diff --git a/perl-update-Module-Build.patch b/perl-update-Module-Build.patch deleted file mode 100644 index a0770d4..0000000 --- a/perl-update-Module-Build.patch +++ /dev/null @@ -1,1541 +0,0 @@ -Module-Build-0.35 - -diff -urN perl-5.10.1.orig/MANIFEST perl-5.10.1/MANIFEST ---- perl-5.10.1.orig/MANIFEST 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/MANIFEST 2009-12-01 11:52:20.000000000 +0100 -@@ -2625,6 +2625,7 @@ - lib/Module/Build/t/ext.t Module::Build - lib/Module/Build/t/files.t Module::Build - lib/Module/Build/t/help.t Module::Build -+lib/Module/Build/t/install_extra_target.t Module::Build - lib/Module/Build/t/install.t Module::Build - lib/Module/Build/t/lib/DistGen.pm Module::Build - lib/Module/Build/t/lib/MBTest.pm Module::Build -diff -urN perl-5.10.1.orig/lib/Module/Build/API.pod perl-5.10.1/lib/Module/Build/API.pod ---- perl-5.10.1.orig/lib/Module/Build/API.pod 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/API.pod 2009-12-01 11:51:27.000000000 +0100 -@@ -78,7 +78,9 @@ - - This parameter determines whether Module::Build will add itself - automatically to configure_requires (and build_requires) if Module::Build --is not already there. The default value is true. -+is not already there. The required version will be the last 'major' release, -+as defined by the decimal version truncated to two decimal places (e.g. 0.34, -+instead of 0.3402). The default value is true. - - =item auto_features - -@@ -387,23 +389,24 @@ - ( - module_name => 'Foo::Bar', - get_options => { -- loud => { store => \$loud }, -- dbd => { type => '=s' }, -- quantity => { type => '+' }, -+ Loud => { store => \$loud }, -+ Dbd => { type => '=s' }, -+ Quantity => { type => '+' }, - } - ); - - print STDERR "HEY, ARE YOU LISTENING??\n" if $loud; -- print "We'll use the ", $build->args('dbd'), " DBI driver\n"; -+ print "We'll use the ", $build->args('Dbd'), " DBI driver\n"; - print "Are you sure you want that many?\n" -- if $build->args('quantity') > 2; -+ if $build->args('Quantity') > 2; - - The arguments for such a specification can be called like so: - -- perl Build.PL --loud --dbd=DBD::pg --quantity --quantity --quantity -+ perl Build.PL --Loud --Dbd=DBD::pg --Quantity --Quantity --Quantity - - B Any option specifications that conflict with Module::Build's own --options (defined by its properties) will throw an exception. -+options (defined by its properties) will throw an exception. Use capitalized -+option names to avoid unintended conflicts with future Module::Build options. - - Consult the Getopt::Long documentation for details on its usage. - -@@ -1809,8 +1812,6 @@ - - =item install_base() - --=item install_sets() -- - =item installdirs() - - =item libdoc_dirs() -@@ -1831,8 +1832,6 @@ - - =item orig_dir() - --=item original_prefix() -- - =item perl() - - =item pm_files() -diff -urN perl-5.10.1.orig/lib/Module/Build/Base.pm perl-5.10.1/lib/Module/Build/Base.pm ---- perl-5.10.1.orig/lib/Module/Build/Base.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Base.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -4,7 +4,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - BEGIN { require 5.00503 } - -@@ -42,7 +42,6 @@ - $self->dist_name; - $self->dist_version; - -- $self->_set_install_paths; - $self->_find_nested_builds; - - return $self; -@@ -86,8 +85,6 @@ - - $self->{invoked_action} = $self->{action} ||= 'build'; - -- $self->_set_install_paths; -- - return $self; - } - -@@ -208,10 +205,12 @@ - } - - --sub _set_install_paths { -+# install paths must be generated when requested to be sure all changes -+# to config (from various sources) are included -+sub _default_install_paths { - my $self = shift; - my $c = $self->{config}; -- my $p = $self->{properties}; -+ my $p = {}; - - my @libstyle = $c->get('installstyle') ? - File::Spec->splitdir($c->get('installstyle')) : qw(lib perl5); -@@ -318,7 +317,7 @@ - libhtml => ['html'], - }, - }; -- -+ return $p - } - - sub _find_nested_builds { -@@ -1839,6 +1838,8 @@ - sub _merge_arglist { - my( $self, $opts1, $opts2 ) = @_; - -+ $opts1 ||= {}; -+ $opts2 ||= {}; - my %new_opts = %$opts1; - while (my ($key, $val) = each %$opts2) { - if ( exists( $opts1->{$key} ) ) { -@@ -2738,7 +2739,8 @@ - my $outfile = File::Spec->catfile($mandir, $manpage); - next if $self->up_to_date( $file, $outfile ); - $self->log_info("Manifying $file -> $outfile\n"); -- $parser->parse_from_file( $file, $outfile ); -+ eval { $parser->parse_from_file( $file, $outfile ); 1 } -+ or $self->log_warn("Error creating '$outfile': $@\n"); - $files->{$file} = $outfile; - } - } -@@ -2762,7 +2764,8 @@ - my $outfile = File::Spec->catfile( $mandir, $manpage); - next if $self->up_to_date( $file, $outfile ); - $self->log_info("Manifying $file -> $outfile\n"); -- $parser->parse_from_file( $file, $outfile ); -+ eval { $parser->parse_from_file( $file, $outfile ); 1 } -+ or $self->log_warn("Error creating '$outfile': $@\n"); - $files->{$file} = $outfile; - } - } -@@ -3754,7 +3757,8 @@ - && $self->auto_configure_requires - && ! exists $prereq_types{'configure_requires'}{'Module::Build'} - ) { -- $prereq_types{configure_requires}{'Module::Build'} = $VERSION; -+ (my $ver = $VERSION) =~ s/^(\d+\.\d\d).*$/$1/; # last major release only -+ $prereq_types{configure_requires}{'Module::Build'} = $ver; - } - - for my $t ( keys %prereq_types ) { -@@ -3976,7 +3980,10 @@ - $self->do_system($self->split_like_shell($self->{args}{tar}), $tar_flags, "$file.tar", $dir); - $self->do_system($self->split_like_shell($self->{args}{gzip}), "$file.tar") if $self->{args}{gzip}; - } else { -- require Archive::Tar; -+ eval { require Archive::Tar && Archive::Tar->VERSION(1.08); 1 } -+ or die "You must install Archive::Tar to make a distribution tarball\n". -+ "or specify a binary tar program with the '--tar' option.\n". -+ "See the documentation for the 'dist' action.\n"; - - # Archive::Tar versions >= 1.09 use the following to enable a compatibility - # hack so that the resulting archive is compatible with older clients. -@@ -4018,73 +4025,118 @@ - return $map->{$type} = $value; - } - -+sub install_sets { -+ # Usage: install_sets('site'), install_sets('site', 'lib'), -+ # or install_sets('site', 'lib' => $value); -+ my ($self, $dirs, $key, $value) = @_; -+ $dirs = $self->installdirs unless defined $dirs; -+ # update property before merging with defaults -+ if ( @_ == 4 && defined $dirs && defined $key) { -+ # $value can be undef; will mask default -+ $self->{properties}{install_sets}{$dirs}{$key} = $value; -+ } -+ my $map = { $self->_merge_arglist( -+ $self->{properties}{install_sets}, -+ $self->_default_install_paths->{install_sets} -+ )}; -+ if ( defined $dirs && defined $key ) { -+ return $map->{$dirs}{$key}; -+ } -+ elsif ( defined $dirs ) { -+ return $map->{$dirs}; -+ } -+ else { -+ croak "Can't determine installdirs for install_sets()"; -+ } -+} -+ -+sub original_prefix { -+ # Usage: original_prefix(), original_prefix('lib'), -+ # or original_prefix('lib' => $value); -+ my ($self, $key, $value) = @_; -+ # update property before merging with defaults -+ if ( @_ == 3 && defined $key) { -+ # $value can be undef; will mask default -+ $self->{properties}{original_prefix}{$key} = $value; -+ } -+ my $map = { $self->_merge_arglist( -+ $self->{properties}{original_prefix}, -+ $self->_default_install_paths->{original_prefix} -+ )}; -+ return $map unless defined $key; -+ return $map->{$key} -+} -+ - sub install_base_relpaths { - # Usage: install_base_relpaths(), install_base_relpaths('lib'), - # or install_base_relpaths('lib' => $value); - my $self = shift; -- my $map = $self->{properties}{install_base_relpaths}; -+ if ( @_ > 1 ) { # change values before merge -+ $self->_set_relpaths($self->{properties}{install_base_relpaths}, @_); -+ } -+ my $map = { $self->_merge_arglist( -+ $self->{properties}{install_base_relpaths}, -+ $self->_default_install_paths->{install_base_relpaths} -+ )}; - return $map unless @_; -- return $self->_relpaths($map, @_); -+ my $relpath = $map->{$_[0]}; -+ return defined $relpath ? File::Spec->catdir( @$relpath ) : undef; - } - -- --# Translated from ExtUtils::MM_Any::init_INSTALL_from_PREFIX --sub prefix_relative { -- my ($self, $type) = @_; -- my $installdirs = $self->installdirs; -- -- my $relpath = $self->install_sets($installdirs)->{$type}; -- -- return $self->_prefixify($relpath, -- $self->original_prefix($installdirs), -- $type, -- ); -+# Defaults to use in case the config install paths cannot be prefixified. -+sub prefix_relpaths { -+ # Usage: prefix_relpaths('site'), prefix_relpaths('site', 'lib'), -+ # or prefix_relpaths('site', 'lib' => $value); -+ my $self = shift; -+ my $installdirs = shift || $self->installdirs -+ or croak "Can't determine installdirs for prefix_relpaths()"; -+ if ( @_ > 1 ) { # change values before merge -+ $self->{properties}{prefix_relpaths}{$installdirs} ||= {}; -+ $self->_set_relpaths($self->{properties}{prefix_relpaths}{$installdirs}, @_); -+ } -+ my $map = {$self->_merge_arglist( -+ $self->{properties}{prefix_relpaths}{$installdirs}, -+ $self->_default_install_paths->{prefix_relpaths}{$installdirs} -+ )}; -+ return $map unless @_; -+ my $relpath = $map->{$_[0]}; -+ return defined $relpath ? File::Spec->catdir( @$relpath ) : undef; - } - --sub _relpaths { -+sub _set_relpaths { - my $self = shift; -- my( $map, $type, $value ) = ( @_, '' ); -+ my( $map, $type, $value ) = @_; - - Carp::croak( 'Type argument missing' ) - unless defined( $type ); - -- my @value = (); -- -- # delete existing value if $value is literal undef() -- unless ( defined( $value ) ) { -- delete( $map->{$type} ); -- return undef; -- } -- -- # return existing value if no new $value is given -- elsif ( $value eq '' ) { -- return undef unless exists $map->{$type}; -- @value = @{ $map->{$type} }; -+ # set undef if $value is literal undef() -+ if ( ! defined( $value ) ) { -+ $map->{$type} = undef; -+ return; - } -- - # set value if $value is a valid relative path - else { - Carp::croak( "Value must be a relative path" ) - if File::Spec::Unix->file_name_is_absolute($value); - -- @value = split( /\//, $value ); -+ my @value = split( /\//, $value ); - $map->{$type} = \@value; - } -- -- return File::Spec->catdir( @value ); - } - --# Defaults to use in case the config install paths cannot be prefixified. --sub prefix_relpaths { -- # Usage: prefix_relpaths('site'), prefix_relpaths('site', 'lib'), -- # or prefix_relpaths('site', 'lib' => $value); -- my $self = shift; -- my $installdirs = shift || $self->installdirs; -- my $map = $self->{properties}{prefix_relpaths}{$installdirs}; -- return $map unless @_; -- return $self->_relpaths($map, @_); --} -+# Translated from ExtUtils::MM_Any::init_INSTALL_from_PREFIX -+sub prefix_relative { -+ my ($self, $type) = @_; -+ my $installdirs = $self->installdirs; - -+ my $relpath = $self->install_sets($installdirs)->{$type}; -+ -+ return $self->_prefixify($relpath, -+ $self->original_prefix($installdirs), -+ $type, -+ ); -+} - - # Translated from ExtUtils::MM_Unix::prefixify() - sub _prefixify { -diff -urN perl-5.10.1.orig/lib/Module/Build/Changes perl-5.10.1/lib/Module/Build/Changes ---- perl-5.10.1.orig/lib/Module/Build/Changes 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Changes 2009-12-01 11:50:30.000000000 +0100 -@@ -1,5 +1,48 @@ - Revision history for Perl extension Module::Build. - -+0.35 - Thu Aug 27 09:12:02 EDT 2009 -+ -+ Bug fixes: -+ - Fix t/destinations.t segfault on 5.6.2 -+ -+0.34_06 - Sat Aug 22 21:58:26 EDT 2009 -+ -+ Bug fixes: -+ - Multiple test fixes for OS2 [Ilya Zakharevich] -+ - Generated.ppd files use :utf8 if possible (RT#48827) [Olivier Mengue] -+ - Fixed preservation of custom install_paths on resume (RT#41166) -+ [David Golden] -+ - Warn instead of crashing when Pod::Man tries to create files with -+ colons on vfat partitions on unix (RT#45544) [David Golden] -+ -+0.34_05 - Sun Aug 9 22:31:37 EDT 2009 -+ -+ Bug fixes: -+ - When auto_configure_requires is true (the default), Module::Build will -+ only add last 'major' version of Module:Build (e.g. 0.XX) to -+ configure_requires to avoid specifying a minor development release not -+ available on CPAN [David Golden] -+ -+0.34_04 - Sat Aug 8 11:02:24 EDT 2009 -+ -+ Other: -+ - Added documentation warning that 'get_options' should be capitalized -+ to avoid conflicting with future Module::Build options and changed -+ the examples accordingly. -+ -+0.34_03 - Sat Aug 8 07:39:16 EDT 2009 -+ -+ Bug fixes: -+ - Fixed failing xs.t if /tmp is mounted noexec (RT#47331) [David Golden] -+ - Fixed failing debug.t on VMS (RT#48362) [Craig Berry] -+ - Prevent par.t from dying on error in .zip extraction [David Golden] -+ - Fixed potential runthrough.t failure on 5.6.2 [David Golden] -+ -+ Other: -+ - Archive::Tar changed from 'requires' to 'recommends' so non-authors -+ without IO::Zlib can still use Module::Build to install modules -+ [reported by Matt Trout, fix by David Golden] -+ - 0.340201 - Sun Aug 9 22:11:04 EDT 2009 - - Other: -@@ -9,7 +52,7 @@ - - Bug-fixes: - - Bundled Module::Build::Version updated to bring into sync with CPAN -- version.pm 0.77 -+ version.pm 0.77 [John Peacock] - - 0.34_01 - Sat Jul 18 16:32:09 EDT 2009 - -diff -urN perl-5.10.1.orig/lib/Module/Build/Compat.pm perl-5.10.1/lib/Module/Build/Compat.pm ---- perl-5.10.1.orig/lib/Module/Build/Compat.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Compat.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - - use File::Basename (); - use File::Spec; -@@ -318,7 +318,9 @@ - my $unlink = $class->oneliner('1 while unlink $ARGV[0]', [], [$args{makefile}]); - $unlink =~ s/\$/\$\$/g unless $class->is_vmsish; - -- my $maketext = <<"EOF"; -+ my $maketext = ($^O eq 'os2' ? "SHELL = sh\n\n" : ''); -+ -+ $maketext .= <<"EOF"; - all : force_do_it - $perl $Build - realclean : force_do_it -diff -urN perl-5.10.1.orig/lib/Module/Build/Config.pm perl-5.10.1/lib/Module/Build/Config.pm ---- perl-5.10.1.orig/lib/Module/Build/Config.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Config.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Config; - -diff -urN perl-5.10.1.orig/lib/Module/Build/Cookbook.pm perl-5.10.1/lib/Module/Build/Cookbook.pm ---- perl-5.10.1.orig/lib/Module/Build/Cookbook.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Cookbook.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -1,7 +1,7 @@ - package Module::Build::Cookbook; - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - - - =head1 NAME -diff -urN perl-5.10.1.orig/lib/Module/Build/Dumper.pm perl-5.10.1/lib/Module/Build/Dumper.pm ---- perl-5.10.1.orig/lib/Module/Build/Dumper.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Dumper.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -1,7 +1,7 @@ - package Module::Build::Dumper; - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - - # This is just a split-out of a wrapper function to do Data::Dumper - # stuff "the right way". See: -diff -urN perl-5.10.1.orig/lib/Module/Build/ModuleInfo.pm perl-5.10.1/lib/Module/Build/ModuleInfo.pm ---- perl-5.10.1.orig/lib/Module/Build/ModuleInfo.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/ModuleInfo.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -8,7 +8,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - - use File::Spec; -diff -urN perl-5.10.1.orig/lib/Module/Build/Notes.pm perl-5.10.1/lib/Module/Build/Notes.pm ---- perl-5.10.1.orig/lib/Module/Build/Notes.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Notes.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -4,7 +4,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Data::Dumper; - use IO::File; -diff -urN perl-5.10.1.orig/lib/Module/Build/PPMMaker.pm perl-5.10.1/lib/Module/Build/PPMMaker.pm ---- perl-5.10.1.orig/lib/Module/Build/PPMMaker.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/PPMMaker.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - - # This code is mostly borrowed from ExtUtils::MM_Unix 6.10_03, with a -@@ -113,6 +113,7 @@ - my $ppd_file = "$dist{name}.ppd"; - my $fh = IO::File->new(">$ppd_file") - or die "Cannot write to $ppd_file: $!"; -+ $fh->binmode(":utf8") if $fh->can("binmode"); - print $fh $ppd; - close $fh; - -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/Amiga.pm perl-5.10.1/lib/Module/Build/Platform/Amiga.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/Amiga.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/Amiga.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Module::Build::Base; - -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/Default.pm perl-5.10.1/lib/Module/Build/Platform/Default.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/Default.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/Default.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Module::Build::Base; - -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/EBCDIC.pm perl-5.10.1/lib/Module/Build/Platform/EBCDIC.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/EBCDIC.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/EBCDIC.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Module::Build::Base; - -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/MPEiX.pm perl-5.10.1/lib/Module/Build/Platform/MPEiX.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/MPEiX.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/MPEiX.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Module::Build::Base; - -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/MacOS.pm perl-5.10.1/lib/Module/Build/Platform/MacOS.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/MacOS.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/MacOS.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Module::Build::Base; - use vars qw(@ISA); -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/RiscOS.pm perl-5.10.1/lib/Module/Build/Platform/RiscOS.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/RiscOS.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/RiscOS.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Module::Build::Base; - -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/Unix.pm perl-5.10.1/lib/Module/Build/Platform/Unix.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/Unix.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/Unix.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Module::Build::Base; - -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/VMS.pm perl-5.10.1/lib/Module/Build/Platform/VMS.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/VMS.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/VMS.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Module::Build::Base; - -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/VOS.pm perl-5.10.1/lib/Module/Build/Platform/VOS.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/VOS.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/VOS.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Module::Build::Base; - -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/Windows.pm perl-5.10.1/lib/Module/Build/Platform/Windows.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/Windows.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/Windows.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - - use Config; -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/aix.pm perl-5.10.1/lib/Module/Build/Platform/aix.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/aix.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/aix.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Module::Build::Platform::Unix; - -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/cygwin.pm perl-5.10.1/lib/Module/Build/Platform/cygwin.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/cygwin.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/cygwin.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Module::Build::Platform::Unix; - -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/darwin.pm perl-5.10.1/lib/Module/Build/Platform/darwin.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/darwin.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/darwin.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Module::Build::Platform::Unix; - -diff -urN perl-5.10.1.orig/lib/Module/Build/Platform/os2.pm perl-5.10.1/lib/Module/Build/Platform/os2.pm ---- perl-5.10.1.orig/lib/Module/Build/Platform/os2.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/Platform/os2.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use Module::Build::Platform::Unix; - -diff -urN perl-5.10.1.orig/lib/Module/Build/PodParser.pm perl-5.10.1/lib/Module/Build/PodParser.pm ---- perl-5.10.1.orig/lib/Module/Build/PodParser.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/PodParser.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -2,7 +2,7 @@ - - use strict; - use vars qw($VERSION); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - use vars qw(@ISA); - -diff -urN perl-5.10.1.orig/lib/Module/Build/t/PL_files.t perl-5.10.1/lib/Module/Build/t/PL_files.t ---- perl-5.10.1.orig/lib/Module/Build/t/PL_files.t 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/PL_files.t 2009-12-01 11:53:14.000000000 +0100 -@@ -82,5 +82,5 @@ - my %cleanup = map { $_ => 1 } $mb->cleanup; - is($cleanup{foo}, undef, "generated special file not added to cleanup"); - -- -+ $dist->chdir_original if $dist->did_chdir; - } -diff -urN perl-5.10.1.orig/lib/Module/Build/t/add_property.t perl-5.10.1/lib/Module/Build/t/add_property.t ---- perl-5.10.1.orig/lib/Module/Build/t/add_property.t 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/add_property.t 2009-12-01 11:53:14.000000000 +0100 -@@ -91,3 +91,5 @@ - ok $err = $@, 'Should catch exception for invalid "installdirs" value'; - like $err, qr/ERROR: installdirs must be one of "core", "site", or "vendor"/, - 'And it should suggest the proper values in the error message'; -+ -+$dist->chdir_original if $dist->did_chdir; -diff -urN perl-5.10.1.orig/lib/Module/Build/t/compat.t perl-5.10.1/lib/Module/Build/t/compat.t ---- perl-5.10.1.orig/lib/Module/Build/t/compat.t 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/compat.t 2009-12-01 11:53:14.000000000 +0100 -@@ -216,28 +216,46 @@ - my $libarch2 = File::Spec->catdir($libdir2, 'arch'); - - SKIP: { -+ my @cases = ( -+ { -+ label => "INSTALLDIRS=vendor", -+ args => [ 'INSTALLDIRS=vendor', "INSTALLVENDORLIB=$libdir2", "INSTALLVENDORARCH=$libarch2"], -+ check => qr/\Q$libdir2\E .* Simple\.pm/ix, -+ }, -+ { -+ label => "PREFIX=\$libdir2", -+ args => [ "PREFIX=$libdir2"], -+ check => qr/\Q$libdir2\E .* Simple\.pm/ix, -+ }, -+ { -+ label => "PREFIX=\$libdir2 LIB=mylib", -+ args => [ "PREFIX=$libdir2", "LIB=mylib" ], -+ check => qr{\Q$libdir2\E[/\\]mylib[/\\]Simple\.pm}ix, -+ }, -+ ); -+ - require ExtUtils::Install; -- skip "Needs ExtUtils::Install 1.32 or later", 2 -+ skip "Needs ExtUtils::Install 1.32 or later", 2 * @cases - if ExtUtils::Install->VERSION < 1.32; - -- my @make_args = ('INSTALLDIRS=vendor', "INSTALLVENDORLIB=$libdir2", "INSTALLVENDORARCH=$libarch2"); -- -- if ($is_vms_mms) { # VMS MMK/MMS macros use different syntax. -- $make_args[0] = '/macro=("' . join('","',@make_args) . '")'; -- pop @make_args while scalar(@make_args) > 1; -- } -- -- ($output) = stdout_stderr_of( -- sub { -- $ran_ok = $mb->do_system(@make, 'fakeinstall', @make_args); -+ for my $c (@cases) { -+ my @make_args = @{$c->{args}}; -+ if ($is_vms_mms) { # VMS MMK/MMS macros use different syntax. -+ $make_args[0] = '/macro=("' . join('","',@make_args) . '")'; -+ pop @make_args while scalar(@make_args) > 1; - } -- ); -- -- ok $ran_ok, "make fakeinstall with INSTALLDIRS=vendor ran ok"; -- $output =~ s/^/# /gm; # Don't confuse our own test output -- like $output, -- qr/\Q$libdir2\E .* Simple\.pm/ix, -- 'Should have installdirs=vendor'; -+ ($output) = stdout_stderr_of( -+ sub { -+ $result = $mb->run_perl_script('Makefile.PL', [], \@make_args); -+ $ran_ok = $mb->do_system(@make, 'fakeinstall'); -+ } -+ ); -+ -+ ok $ran_ok, "fakeinstall $c->{label} ran ok"; -+ $output =~ s/^/# /gm; # Don't confuse our own test output -+ like $output, $c->{check}, -+ "Saw destination directory for $c->{label}"; -+ } - } - - stdout_of( sub { $mb->do_system(@make, 'realclean'); } ); -diff -urN perl-5.10.1.orig/lib/Module/Build/t/debug.t perl-5.10.1/lib/Module/Build/t/debug.t ---- perl-5.10.1.orig/lib/Module/Build/t/debug.t 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/debug.t 2009-12-01 11:53:14.000000000 +0100 -@@ -21,12 +21,8 @@ - # Test debug output - { - my $output; -- $output = stdout_of sub { -- Module::Build->run_perl_script('Build.PL', [], []) -- }; -- $output = stdout_of sub { -- Module::Build->run_perl_script('Build', [], ['--debug']) -- }; -+ $output = stdout_of sub { $dist->run_build_pl }; -+ $output = stdout_of sub { $dist->run_build('--debug') }; - like($output, '/Starting ACTION_build.*?Starting ACTION_code.*?Finished ACTION_code.*?Finished ACTION_build/ms', - "found nested ACTION_* debug statements" - ); -diff -urN perl-5.10.1.orig/lib/Module/Build/t/destinations.t perl-5.10.1/lib/Module/Build/t/destinations.t ---- perl-5.10.1.orig/lib/Module/Build/t/destinations.t 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/destinations.t 2009-12-01 11:53:14.000000000 +0100 -@@ -248,13 +248,14 @@ - } - - # Poke at the innards of MB to change the default install locations. -- local $mb->install_sets->{site} = \%test_config; -+ my $old = $mb->install_sets->{site} = \%test_config; - $mb->config(siteprefixexp => catdir(File::Spec->rootdir, - 'wierd', 'prefix')); - - my $prefix = catdir('another', 'prefix'); - $mb->prefix($prefix); - test_prefix($prefix, \%test_config); -+ $mb->install_sets->{site} = $old; - } - - -diff -urN perl-5.10.1.orig/lib/Module/Build/t/help.t perl-5.10.1/lib/Module/Build/t/help.t ---- perl-5.10.1.orig/lib/Module/Build/t/help.t 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/help.t 2009-12-01 11:53:14.000000000 +0100 -@@ -22,7 +22,7 @@ - - my $restart = sub { - $dist->clean(); -- chdir( $cwd ); -+ DistGen::chdir_all( $cwd ); - File::Path::rmtree( $tmp ); - # we're redefining the same package as we go, so... - delete($::{'MyModuleBuilder::'}); -@@ -274,7 +274,7 @@ - - # cleanup - $dist->clean(); --chdir( $cwd ); -+DistGen::chdir_all($cwd); - File::Path::rmtree( $tmp ); - - # vim:ts=2:sw=2:et:sta -diff -urN perl-5.10.1.orig/lib/Module/Build/t/install_extra_target.t perl-5.10.1/lib/Module/Build/t/install_extra_target.t ---- perl-5.10.1.orig/lib/Module/Build/t/install_extra_target.t 1970-01-01 01:00:00.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/install_extra_target.t 2009-08-27 15:19:29.000000000 +0200 -@@ -0,0 +1,137 @@ -+#!perl -w -+# Contributed by: Thorben Jaendling -+ -+use strict; -+use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; -+use MBTest tests => 8; -+ -+require_ok 'Module::Build'; -+ensure_blib('Module::Build'); -+ -+use File::Spec::Functions qw( catdir ); -+ -+my $tmp = MBTest->tmpdir; -+my $output; -+ -+use DistGen; -+my $dist = DistGen->new( dir => $tmp ); -+ -+# note("Dist is in $tmp\n"); -+ -+$dist->add_file("Build.PL", <<'===EOF==='); -+#!perl -w -+ -+use strict; -+use Module::Build; -+ -+my $subclass = Module::Build->subclass(code => <<'=EOF='); -+sub copy_files -+{ -+ my $self = shift; -+ my $dir = shift; -+ -+ my $files = $self->rscan_dir($dir, sub {-f $_ and not m!/\.|[#~]$!}); -+ -+ foreach my $file (@$files) { -+ $self->copy_if_modified(from => $file, to_dir => "blib"); -+ } -+} -+ -+#Copy etc files to blib -+sub process_etc_files -+{ -+ my $self = shift; -+ -+ $self->copy_files("etc"); -+} -+ -+#Copy share files to blib -+sub process_share_files -+{ -+ my $self = shift; -+ -+ $self->copy_files("share"); -+} -+ -+1; -+=EOF= -+ -+my $build = $subclass->new( -+ module_name => 'Simple', -+ license => 'perl' -+); -+ -+$build->add_build_element('etc'); -+$build->add_build_element('share'); -+ -+my $distdir = lc $build->dist_name(); -+ -+foreach my $id ('core', 'site', 'vendor') { -+ #Where to install these build types when using prefix symantics -+ $build->prefix_relpaths($id, 'share' => "share/$distdir"); -+ $build->prefix_relpaths($id, 'etc' => "etc/$distdir"); -+ -+ #Where to install these build types when using default symantics -+ my $set = $build->install_sets($id); -+ $set->{'share'} = '/usr/'.($id eq 'site' ? 'local/':'')."share/$distdir"; -+ $set->{'etc'} = ($id eq 'site' ? '/usr/local/etc/':'/etc/').$distdir; -+} -+ -+#Where to install these types when using install_base symantics -+$build->install_base_relpaths('share' => "share/$distdir"); -+$build->install_base_relpaths('etc' => "etc/$distdir"); -+ -+$build->create_build_script(); -+ -+===EOF=== -+ -+#Test Build.PL exists ok? -+ -+$dist->add_file("etc/config", <<'===EOF==='); -+[main] -+Foo = bar -+Jim = bob -+ -+[supplemental] -+stardate = 1234344 -+ -+===EOF=== -+ -+$dist->add_file("share/data", <<'===EOF==='); -+7 * 9 = 42? -+ -+===EOF=== -+ -+$dist->add_file("share/html/index.html", <<'===EOF==='); -+ -+ -+

Hello World!

-+ -+ -+ -+===EOF=== -+ -+$dist->regen; -+$dist->chdir_in; -+ -+my $installdest = catdir($tmp, 't', "install_extra_targets-$$"); -+ -+$output = stdout_of sub { $dist->run_build_pl("--install_base=$installdest") }; -+ -+$output .= stdout_of sub { $dist->run_build }; -+ -+my $error; -+$error++ unless ok(-e "blib/etc/config", "Built etc/config"); -+$error++ unless ok(-e "blib/share/data", "Built share/data"); -+$error++ unless ok(-e "blib/share/html/index.html", "Built share/html"); -+diag "OUTPUT:\n$output" if $error; -+ -+$output = stdout_of sub { $dist->run_build('install') }; -+ -+$error = 0; -+$error++ unless ok(-e "$installdest/etc/simple/config", "installed etc/config"); -+$error++ unless ok(-e "$installdest/share/simple/data", "installed share/data"); -+$error++ unless ok(-e "$installdest/share/simple/html/index.html", "installed share/html"); -+diag "OUTPUT:\n$output" if $error; -+ -+$dist->remove(); -diff -urN perl-5.10.1.orig/lib/Module/Build/t/lib/DistGen.pm perl-5.10.1/lib/Module/Build/t/lib/DistGen.pm ---- perl-5.10.1.orig/lib/Module/Build/t/lib/DistGen.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/lib/DistGen.pm 2009-12-01 11:53:14.000000000 +0100 -@@ -62,6 +62,13 @@ - - return($string); - } -+ -+sub chdir_all ($) { -+ # OS/2 has "current directory per disk", undeletable; -+ # doing chdir() to another disk won't change cur-dir of initial disk... -+ chdir('/') if $^O eq 'os2'; -+ chdir shift; -+} - ######################################################################## - - sub new { -@@ -72,7 +79,7 @@ - $options{dir} ||= Cwd::cwd(); - - my %data = ( -- skip_manifest => 0, -+ no_manifest => 0, - xs => 0, - %options, - ); -@@ -286,7 +293,7 @@ - my $real_filename = $self->_real_filename( $file ); - my $fullname = File::Spec->catfile( $dist_dirname, $real_filename ); - if ( -e $fullname ) { -- 1 while unlink( $fullname ); -+ 1 while unlink( $fullname ); - } - print "Unlinking pending file '$file'\n" if $VERBOSE; - delete( $self->{pending}{remove}{$file} ); -@@ -297,8 +304,8 @@ - my $real_filename = $self->_real_filename( $file ); - my $fullname = File::Spec->catfile( $dist_dirname, $real_filename ); - -- if ( ! -e $fullname || -- ( -e $fullname && $self->{pending}{change}{$file} ) ) { -+ if ( ! -e $fullname || -+ ( -e $fullname && $self->{pending}{change}{$file} ) ) { - - print "Changed file '$file'.\n" if $VERBOSE; - -@@ -326,7 +333,7 @@ - } - - my $manifest = File::Spec->catfile( $dist_dirname, 'MANIFEST' ); -- unless ( $self->{skip_manifest} ) { -+ unless ( $self->{no_manifest} ) { - if ( -e $manifest ) { - 1 while unlink( $manifest ); - } -@@ -388,7 +395,7 @@ - } - }, ($^O eq 'VMS' ? './' : File::Spec->curdir) ); - -- chdir( $here ); -+ chdir_all( $here ); - } - - sub remove { -@@ -478,10 +485,23 @@ - - croak("never called chdir_in()") unless($self->{original_dir}); - my $dir = $self->{original_dir}; -- chdir($dir) or die "Can't chdir to '$dir': $!"; -+ chdir_all($dir) or die "Can't chdir to '$dir': $!"; - } - ######################################################################## - -+sub run_build_pl { -+ my ($self, @args) = @_; -+ require Module::Build; -+ Module::Build->run_perl_script('Build.PL', [], [@args]) -+} -+ -+sub run_build { -+ my ($self, @args) = @_; -+ require Module::Build; -+ my $build_script = $^O eq 'VMS' ? 'Build.com' : 'Build'; -+ Module::Build->run_perl_script($build_script, [], [@args]) -+} -+ - 1; - - __END__ -@@ -495,20 +515,59 @@ - - use DistGen; - -- my $dist = DistGen->new(dir => $tmp); -- ... -+ # create distribution and prepare to test -+ my $dist = DistGen->new(name => 'Foo::Bar', dir => $tmp); -+ $dist->regen; -+ $dist->chdir_in; -+ -+ # change distribution files - $dist->add_file('t/some_test.t', $contents); -- ... -+ $dist->change_file('MANIFEST.SKIP', $new_contents); -+ $dist->remove_file('t/some_test.t'); - $dist->regen; - -- chdir($dist->dirname) or -- die "Cannot chdir to '@{[$dist->dirname]}': $!"; -- ... -+ # clean up extraneous files - $dist->clean; -- ... -- chdir($cwd) or die "cannot return to $cwd"; -+ -+ # exercise the command-line interface -+ $dist->run_build_pl(); -+ $dist->run_build('test'); -+ -+ # finish testing and clean up -+ $dist->chdir_original; - $dist->remove; - -+=head1 USAGE -+ -+A DistGen object manages a set of files in a distribution directory. -+ -+The constructor and some methods only define the target state of the -+distribution. They do B make any changes to the filesystem: -+ -+ new -+ add_file -+ change_file -+ change_build_pl -+ remove_file -+ -+Other methods then change the filesystem to match the target state of -+the distribution (or to remove it entirely): -+ -+ regen -+ clean -+ remove -+ -+Other methods are provided for a convenience during testing. The -+most important are ones that manage the current directory: -+ -+ chdir_in -+ chdir_original -+ -+Additional methods portably encapsulate running Build.PL and Build: -+ -+ run_build_pl -+ run_build -+ - =head1 API - - =head2 Constructor -@@ -519,9 +578,10 @@ - - my $tmp = MBTest->tmpdir; - my $dist = DistGen->new( -- name => 'Foo::Bar', -- dir => $tmp, -- xs => 1, -+ name => 'Foo::Bar', -+ dir => $tmp, -+ xs => 1, -+ no_manifest => 0, - ); - - The parameters are as follows. -@@ -544,33 +604,84 @@ - - If true, generates an XS based module. - -+=item no_manifest -+ -+If true, C will not create a MANIFEST file. -+ - =back - --=head2 Manipulating the Distribution -+The following files are added as part of the default distribution: - --These methods immediately affect the filesystem. -+ Build.PL -+ lib/Simple.pm # based on name parameter -+ t/basic.t - --=head3 regen() -+If an XS module is generated, Simple.pm and basic.t are different and -+the following files are also added: - --Regenerate all missing or changed files. -+ typemap -+ lib/Simple.xs # based on name parameter - -- $dist->regen(clean => 1); -+=head2 Adding and editing files - --If the optional C argument is given, it also removes any --extraneous files that do not belong to the distribution. -+Note that C<$filename> should always be specified with unix-style paths, -+and are relative to the distribution root directory, e.g. C. - --=head2 chdir_in -+No changes are made to the filesystem until the distribution is regenerated. - --Change directory into the dist root. -+=head3 add_file() - -- $dist->chdir_in; -+Add a $filename containing $content to the distribution. - --=head2 chdir_original -+ $dist->add_file( $filename, $content ); - --Returns to whatever directory you were in before chdir_in() (regardless --of the cwd.) -+=head3 change_file() - -- $dist->chdir_original; -+Changes the contents of $filename to $content. No action is performed -+until the distribution is regenerated. -+ -+ $dist->change_file( $filename, $content ); -+ -+=head3 change_build_pl() -+ -+A wrapper around change_file specifically for setting Build.PL. Instead -+of file C<$content>, it takes a hash-ref of Module::Build constructor -+arguments: -+ -+ $dist->change_build_pl( -+ { -+ module_name => $dist->name, -+ dist_version => '3.14159265', -+ license => 'perl', -+ create_readme => 1, -+ } -+ ); -+ -+=head3 get_file -+ -+Retrieves the target contents of C<$filename>. -+ -+ $content = $dist->get_file( $filename ); -+ -+=head3 remove_file() -+ -+Removes C<$filename> from the distribution. -+ -+ $dist->remove_file( $filename ); -+ -+=head2 Changing the distribution directory -+ -+These methods immediately affect the filesystem. -+ -+=head3 regen() -+ -+Regenerate all missing or changed files. Also deletes any files -+flagged for removal with remove_file(). -+ -+ $dist->regen(clean => 1); -+ -+If the optional C argument is given, it also removes any -+extraneous files that do not belong to the distribution. - - =head3 clean() - -@@ -595,31 +706,41 @@ - - Removes the entire distribution directory. - --=head2 Editing Files -+=head2 Changing directories - --Note that C<$filename> should always be specified with unix-style paths, --and are relative to the distribution root directory, e.g. C. -+=head3 chdir_in - --No filesystem action is performed until the distribution is regenerated. -+Change directory into the dist root. - --=head3 add_file() -+ $dist->chdir_in; - --Add a $filename containing $content to the distribution. -+=head3 chdir_original - -- $dist->add_file( $filename, $content ); -+Returns to whatever directory you were in before chdir_in() (regardless -+of the cwd.) - --=head3 remove_file() -+ $dist->chdir_original; - --Removes C<$filename> from the distribution. -+=head2 Command-line helpers - -- $dist->remove_file( $filename ); -+These use Module::Build->run_perl_script() to ensure that Build.PL or Build are -+run in a separate process using the current perl interpreter. (Module::Build -+is loaded on demand). They also ensure appropriate naming for operating -+systems that require a suffix for Build. - --=head3 change_file() -+=head3 run_build_pl - --Changes the contents of $filename to $content. No action is performed --until the distribution is regenerated. -+Runs Build.PL using the current perl interpreter. Any arguments are -+passed on the command line. - -- $dist->change_file( $filename, $content ); -+ $dist->run_build_pl('--quiet'); -+ -+=head3 run_build -+ -+Runs Build using the current perl interpreter. Any arguments are -+passed on the command line. -+ -+ $dist->run_build(qw/test --verbose/); - - =head2 Properties - -@@ -627,6 +748,8 @@ - - Returns the name of the distribution. - -+ $dist->name: # e.g. Foo::Bar -+ - =head3 dirname() - - Returns the directory where the distribution is created. -diff -urN perl-5.10.1.orig/lib/Module/Build/t/lib/MBTest.pm perl-5.10.1/lib/Module/Build/t/lib/MBTest.pm ---- perl-5.10.1.orig/lib/Module/Build/t/lib/MBTest.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/lib/MBTest.pm 2009-12-01 11:53:14.000000000 +0100 -@@ -123,8 +123,10 @@ - - # Setup a temp directory - sub tmpdir { -+ my ($self, $usr_tmp) = @_; - return File::Temp::tempdir( 'MB-XXXXXXXX', -- CLEANUP => 1, DIR => $ENV{PERL_CORE} ? Cwd::cwd : File::Spec->tmpdir -+ CLEANUP => 1, DIR => $ENV{PERL_CORE} ? Cwd::cwd : -+ $usr_tmp ? $usr_tmp : File::Spec->tmpdir - ); - } - -@@ -200,7 +202,20 @@ - my $have_c_compiler; - stderr_of( sub {$have_c_compiler = $mb->have_c_compiler} ); - -- return ($have_c_compiler, $mb->feature('C_support')); -+ # check noexec tmpdir -+ my $tmp_exec; -+ if ( $have_c_compiler ) { -+ my $dir = MBTest->tmpdir; -+ my $c_file = File::Spec->catfile($dir,'test.c'); -+ open my $fh, ">", $c_file; -+ print {$fh} "int main() { return 0; }\n"; -+ close $fh; -+ my $exe = $mb->cbuilder->link_executable( -+ objects => $mb->cbuilder->compile( source => $c_file ) -+ ); -+ $tmp_exec = 0 == system( $exe ); -+ } -+ return ($have_c_compiler, $mb->feature('C_support'), $tmp_exec); - } - - sub have_module { -diff -urN perl-5.10.1.orig/lib/Module/Build/t/metadata.t perl-5.10.1/lib/Module/Build/t/metadata.t ---- perl-5.10.1.orig/lib/Module/Build/t/metadata.t 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/metadata.t 2009-12-01 11:53:14.000000000 +0100 -@@ -65,6 +65,9 @@ - - { - my $mb_prereq = { 'Module::Build' => $Module::Build::VERSION }; -+ my $mb_config_req = { -+ 'Module::Build' => int($Module::Build::VERSION * 100)/100 -+ }; - my $node = $mb->prepare_metadata( {} ); - - # exists() doesn't seem to work here -@@ -73,7 +76,7 @@ - is $node->{abstract}, $metadata{dist_abstract}; - is_deeply $node->{author}, $metadata{dist_author}; - is $node->{license}, $metadata{license}; -- is_deeply $node->{configure_requires}, $mb_prereq, 'Add M::B to configure_requires'; -+ is_deeply $node->{configure_requires}, $mb_config_req, 'Add M::B to configure_requires'; - like $node->{generated_by}, qr{Module::Build}; - ok defined( $node->{'meta-spec'}{version} ), - "'meta-spec' -> 'version' field present in META.yml"; -diff -urN perl-5.10.1.orig/lib/Module/Build/t/metadata2.t perl-5.10.1/lib/Module/Build/t/metadata2.t ---- perl-5.10.1.orig/lib/Module/Build/t/metadata2.t 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/metadata2.t 2009-12-01 11:53:14.000000000 +0100 -@@ -19,7 +19,7 @@ - skip( 'YAML_support feature is not enabled', 4 ) - unless Module::Build::ConfigData->feature('YAML_support'); - -- my $dist = DistGen->new( dir => $tmp, skip_manifest => 1 ); -+ my $dist = DistGen->new( dir => $tmp, no_manifest => 1 ); - $dist->regen; - - $dist->chdir_in; -diff -urN perl-5.10.1.orig/lib/Module/Build/t/runthrough.t perl-5.10.1/lib/Module/Build/t/runthrough.t ---- perl-5.10.1.orig/lib/Module/Build/t/runthrough.t 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/runthrough.t 2009-12-01 11:53:14.000000000 +0100 -@@ -16,7 +16,6 @@ - - use DistGen; - my $dist = DistGen->new( dir => $tmp ); --$dist->remove_file( 't/basic.t' ); - $dist->change_build_pl - ({ - module_name => 'Simple', -@@ -29,22 +28,6 @@ - #!perl -w - print "Hello, World!\n"; - --- --$dist->add_file( 'test.pl', <<'---' ); --#!/usr/bin/perl -- --use Test; --plan tests => 2; -- --ok 1; -- --require Module::Build; --skip $ENV{PERL_CORE} && "no blib in core", -- $INC{'Module/Build.pm'}, qr/blib/, 'Module::Build should be loaded from blib'; -- --print "# Cwd: ", Module::Build->cwd, "\n"; --print "# \@INC: (@INC)\n"; --print "Done.\n"; # t/compat.t looks for this ----- - $dist->add_file( 'lib/Simple/Script.PL', <<'---' ); - #!perl -w - -@@ -116,9 +99,9 @@ - - unless ($all_ok) { - # We use diag() so Test::Harness doesn't get confused. -- diag("vvvvvvvvvvvvvvvvvvvvv Simple/test.pl output vvvvvvvvvvvvvvvvvvvvv"); -+ diag("vvvvvvvvvvvvvvvvvvvvv Simple/t/basic.t output vvvvvvvvvvvvvvvvvvvvv"); - diag($output); -- diag("^^^^^^^^^^^^^^^^^^^^^ Simple/test.pl output ^^^^^^^^^^^^^^^^^^^^^"); -+ diag("^^^^^^^^^^^^^^^^^^^^^ Simple/t/basic.t output ^^^^^^^^^^^^^^^^^^^^^"); - } - } - -@@ -150,10 +133,8 @@ - cmp_ok $1, '==', $mb->VERSION, "Check version used to create META.yml: $1 == " . $mb->VERSION; - - SKIP: { -- skip( "not sure if we can create a tarball on this platform", 1 ) -- unless $mb->check_installed_version('Archive::Tar', 0) || -- $mb->isa('Module::Build::Platform::Unix'); -- -+ skip( "Archive::Tar 1.08+ not installed", 1 ) -+ unless eval { require Archive::Tar && Archive::Tar->VERSION(1.08); 1 }; - $mb->add_to_cleanup($mb->dist_dir . ".tar.gz"); - eval {$mb->dispatch('dist')}; - is $@, ''; -diff -urN perl-5.10.1.orig/lib/Module/Build/t/script_dist.t perl-5.10.1/lib/Module/Build/t/script_dist.t ---- perl-5.10.1.orig/lib/Module/Build/t/script_dist.t 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/script_dist.t 2009-12-01 11:53:14.000000000 +0100 -@@ -77,3 +77,4 @@ - my $yml = YAML::LoadFile('META.yml'); - is_deeply($yml->{provides}, \%meta_provides); - } -+$dist->chdir_original if $dist->did_chdir; -diff -urN perl-5.10.1.orig/lib/Module/Build/t/tilde.t perl-5.10.1/lib/Module/Build/t/tilde.t ---- perl-5.10.1.orig/lib/Module/Build/t/tilde.t 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/tilde.t 2009-12-01 11:53:14.000000000 +0100 -@@ -55,10 +55,6 @@ - - is( run_sample( $p => '~/foo' )->$p(), "$home/foo" ); - -- is( run_sample( $p => '~~' )->$p(), '~~' ); -- -- is( run_sample( $p => '~ foo' )->$p(), '~ foo' ); -- - is( run_sample( $p => '~/ foo')->$p(), "$home/ foo" ); - - is( run_sample( $p => '~/fo o')->$p(), "$home/fo o" ); -@@ -91,6 +87,10 @@ - - $mb->$p('~'); - is( $mb->$p(), '~', 'API does not expand tildes' ); -+ -+ skip "On OS/2 EMX all users are equal", 2 if $^O eq 'os2'; -+ is( run_sample( $p => '~~' )->$p(), '~~' ); -+ is( run_sample( $p => '~ foo' )->$p(), '~ foo' ); - } - - # Again, with named users -diff -urN perl-5.10.1.orig/lib/Module/Build/t/write_default_maniskip.t perl-5.10.1/lib/Module/Build/t/write_default_maniskip.t ---- perl-5.10.1.orig/lib/Module/Build/t/write_default_maniskip.t 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/write_default_maniskip.t 2009-12-01 11:53:14.000000000 +0100 -@@ -5,11 +5,14 @@ - - use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; - use MBTest 'no_plan'; -+use DistGen; -+use Cwd; - - use_ok 'Module::Build'; - ensure_blib 'Module::Build'; - - { -+ my $cwd = Cwd::cwd; - chdir MBTest->tmpdir(); - - my $build = Module::Build->new( -@@ -34,4 +37,6 @@ - like $have, qr/^\Q$head\E/, "default MANIFEST.SKIP used"; - like $have, qr/^# Avoid Module::Build generated /ms, "Module::Build specific entries"; - like $have, qr/Foo-Bar-/, "distribution tarball entry"; -+ -+ DistGen::chdir_all($cwd); - } -diff -urN perl-5.10.1.orig/lib/Module/Build/t/xs.t perl-5.10.1/lib/Module/Build/t/xs.t ---- perl-5.10.1.orig/lib/Module/Build/t/xs.t 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build/t/xs.t 2009-12-01 11:53:14.000000000 +0100 -@@ -6,8 +6,10 @@ - use Module::Build; - use Config; - -+my $tmp; -+ - { -- my ($have_c_compiler, $C_support_feature) = check_compiler(); -+ my ($have_c_compiler, $C_support_feature, $tmp_exec) = check_compiler(); - - if (! $C_support_feature) { - plan skip_all => 'C_support not enabled'; -@@ -20,6 +22,8 @@ - } else { - plan tests => 23; - } -+ require Cwd; -+ $tmp = MBTest->tmpdir( $tmp_exec ? undef : Cwd::cwd ); - } - - ensure_blib('Module::Build'); -@@ -27,9 +31,6 @@ - - ######################### - -- --my $tmp = MBTest->tmpdir; -- - use DistGen; - my $dist = DistGen->new( dir => $tmp, xs => 1 ); - $dist->regen; -diff -urN perl-5.10.1.orig/lib/Module/Build.pm perl-5.10.1/lib/Module/Build.pm ---- perl-5.10.1.orig/lib/Module/Build.pm 2009-12-01 17:01:57.000000000 +0100 -+++ perl-5.10.1/lib/Module/Build.pm 2009-12-01 11:51:27.000000000 +0100 -@@ -15,7 +15,7 @@ - - use vars qw($VERSION @ISA); - @ISA = qw(Module::Build::Base); --$VERSION = '0.340201'; -+$VERSION = '0.35'; - $VERSION = eval $VERSION; - - # Okay, this is the brute-force method of finding out what kind of diff --git a/perl-update-Parse-CPAN-Meta.patch b/perl-update-Parse-CPAN-Meta.patch deleted file mode 100644 index 322637e..0000000 --- a/perl-update-Parse-CPAN-Meta.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up perl-5.10.1/lib/Parse/CPAN/Meta.pm.old perl-5.10.1/lib/Parse/CPAN/Meta.pm ---- perl-5.10.1/lib/Parse/CPAN/Meta.pm.old 2009-06-10 18:37:40.000000000 +0200 -+++ perl-5.10.1/lib/Parse/CPAN/Meta.pm 2009-12-22 13:08:39.089184165 +0100 -@@ -15,7 +15,7 @@ BEGIN { - # Class structure - require 5.004; - require Exporter; -- $Parse::CPAN::Meta::VERSION = '1.39'; -+ $Parse::CPAN::Meta::VERSION = '1.40'; - @Parse::CPAN::Meta::ISA = qw{ Exporter }; - @Parse::CPAN::Meta::EXPORT_OK = qw{ Load LoadFile }; - }