rpms/perl/devel perl-USE_MM_LD_RUN_PATH.patch, NONE, 1.1 perl-add-symbols.patch, NONE, 1.1 perl-much-better-swap-logic.patch, NONE, 1.1 perl-perlbug-tag.patch, NONE, 1.1 perl-suid-noroot.patch, NONE, 1.1 perl-update-ExtUtils-CBuilder.patch, 1.1, 1.2 perl-update-File-Path.patch, 1.1, 1.2 perl-update-Module-Build.patch, 1.1, 1.2 perl.spec, 1.237, 1.238 02_fix_pod2html_dl, 1.1, NONE 07_fix_nullok, 1.1, NONE 08_fix_udp_typo, 1.1, NONE 09_fix_memory_debugging, 1.1, NONE 10_fix_h2ph_include_quote, 1.1, NONE 11_disable_vstring_warning, 1.1, NONE 15_fix_local_symtab, 1.1, NONE 16_fix_perlio_teardown_prototype, 1.1, NONE 17_fix_getopt_long_callback, 1.1, NONE 18_fix_bigint_floats, 1.1, NONE 25_fix_cgi_tempdir, 1.1, NONE 27_fix_sys_syslog_timeout, 1.1, NONE 28_fix_inplace_sort, 1.1, NONE 30_fix_freetmps, 1.1, NONE 31_fix_attributes_unknown_error, 1.1, NONE 32891.patch, 1.1, NONE 32_fix_fork_rand, 1.1, NONE 34_fix_qr-memory-leak-2, 1.1, NONE 36_fix_file_temp_cleanup, 1.1, NONE 37_fix_coredump_indicator, 1.1, NONE 38_fix_weaken_memleak, 1.1, NONE perl-5.10.0-Archive-Extract-onlystdout.patch, 1.1, NONE perl-5.10.0-Change33640.patch, 1.2, NONE perl-5.10.0-Change33881.patch, 1.1, NONE perl-5.10.0-Change33896.patch, 1.1, NONE perl-5.10.0-Change33897.patch, 1.1, NONE perl-5.10.0-Change34507.patch, 1.1, NONE perl-5.10.0-PerlIO-via-change34025.patch, 1.1, NONE perl-5.10.0-USE_MM_LD_RUN_PATH.patch, 1.2, NONE perl-5.10.0-accessXOK.patch, 1.1, NONE perl-5.10.0-bz448392.patch, 1.2, NONE perl-5.10.0-fix_file_path_rmtree_setuid.patch, 1.1, NONE perl-5.10.0-much-better-swap-logic.patch, 1.1, NONE perl-5.10.0-perlbug-tag.patch, 1.1, NONE perl-5.10.0-pos.patch, 1.3, NONE perl-5.10.0-stlocal.patch, 1.1, NONE perl-5.8.0-root.patch, 1.1, NONE perl-CGI-t-util-58.patch, 1.1, NONE perl-bz509676.patch, 1.1, NONE perl-skip-prereq.patch, 1.1, NONE
Štěpán Kasal
kasal at fedoraproject.org
Thu Dec 3 11:37:19 UTC 2009
- Previous message (by thread): rpms/svnkit/devel svnkit-1.3.2-dependencies.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 sources, 1.6, 1.7 svnkit.spec, 1.13, 1.14 svnkit-1.2.2-dependencies.patch, 1.1, NONE
- Next message (by thread): rpms/man-pages/F-12 man-pages-3.22-sched_setaffinity.patch, 1.1, 1.2 man-pages.spec, 1.123, 1.124
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: kasal
Update of /cvs/extras/rpms/perl/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11034
Modified Files:
perl-update-ExtUtils-CBuilder.patch
perl-update-File-Path.patch perl-update-Module-Build.patch
perl.spec
Added Files:
perl-USE_MM_LD_RUN_PATH.patch perl-add-symbols.patch
perl-much-better-swap-logic.patch perl-perlbug-tag.patch
perl-suid-noroot.patch
Removed Files:
02_fix_pod2html_dl 07_fix_nullok 08_fix_udp_typo
09_fix_memory_debugging 10_fix_h2ph_include_quote
11_disable_vstring_warning 15_fix_local_symtab
16_fix_perlio_teardown_prototype 17_fix_getopt_long_callback
18_fix_bigint_floats 25_fix_cgi_tempdir
27_fix_sys_syslog_timeout 28_fix_inplace_sort 30_fix_freetmps
31_fix_attributes_unknown_error 32891.patch 32_fix_fork_rand
34_fix_qr-memory-leak-2 36_fix_file_temp_cleanup
37_fix_coredump_indicator 38_fix_weaken_memleak
perl-5.10.0-Archive-Extract-onlystdout.patch
perl-5.10.0-Change33640.patch perl-5.10.0-Change33881.patch
perl-5.10.0-Change33896.patch perl-5.10.0-Change33897.patch
perl-5.10.0-Change34507.patch
perl-5.10.0-PerlIO-via-change34025.patch
perl-5.10.0-USE_MM_LD_RUN_PATH.patch
perl-5.10.0-accessXOK.patch perl-5.10.0-bz448392.patch
perl-5.10.0-fix_file_path_rmtree_setuid.patch
perl-5.10.0-much-better-swap-logic.patch
perl-5.10.0-perlbug-tag.patch perl-5.10.0-pos.patch
perl-5.10.0-stlocal.patch perl-5.8.0-root.patch
perl-CGI-t-util-58.patch perl-bz509676.patch
perl-skip-prereq.patch
Log Message:
- new upstream version
- release number must be high, because of stale version numbers of some
of the subpackages
- drop upstreamed patches
- update the versions of bundled modules
- shorten the paths in @INC
- build without DEBUGGING
- implement compatibility measures for the above two changes, for a short
transition period
- provide perl(:MODULE_COMPAT_5.10.0), for that transition period only
perl-USE_MM_LD_RUN_PATH.patch:
Liblist.pm | 5 +++++
MM_Unix.pm | 2 +-
MakeMaker.pm | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
3 files changed, 62 insertions(+), 3 deletions(-)
--- NEW FILE perl-USE_MM_LD_RUN_PATH.patch ---
diff -up perl-5.10.1/lib/ExtUtils/MM_Unix.pm.runpath perl-5.10.1/lib/ExtUtils/MM_Unix.pm
--- perl-5.10.1/lib/ExtUtils/MM_Unix.pm.runpath 2009-11-18 16:08:45.000000000 +0100
+++ perl-5.10.1/lib/ExtUtils/MM_Unix.pm 2009-11-18 16:09:32.000000000 +0100
@@ -944,7 +944,7 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $
}
my $ld_run_path_shell = "";
- if ($self->{LD_RUN_PATH} ne "") {
+ if (($self->{LD_RUN_PATH} ne "") && ($self->{USE_MM_LD_RUN_PATH})) {
$ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" ';
}
diff -up perl-5.10.1/lib/ExtUtils/Liblist.pm.runpath perl-5.10.1/lib/ExtUtils/Liblist.pm
--- perl-5.10.1/lib/ExtUtils/Liblist.pm.runpath 2009-11-18 16:08:45.000000000 +0100
+++ perl-5.10.1/lib/ExtUtils/Liblist.pm 2009-11-18 16:09:32.000000000 +0100
@@ -88,6 +88,11 @@ libraries. LD_RUN_PATH is a colon separ
in LDLOADLIBS. It is passed as an environment variable to the process
that links the shared library.
+Fedora extension: This generation of LD_RUN_PATH is disabled by default.
+To use the generated LD_RUN_PATH for all links, set the USE_MM_LD_RUN_PATH
+MakeMaker object attribute / argument, (or set the $USE_MM_LD_RUN_PATH
+environment variable).
+
=head2 BSLOADLIBS
List of those libraries that are needed but can be linked in
diff -up perl-5.10.1/lib/ExtUtils/MakeMaker.pm.runpath perl-5.10.1/lib/ExtUtils/MakeMaker.pm
--- perl-5.10.1/lib/ExtUtils/MakeMaker.pm.runpath 2009-11-18 16:08:45.000000000 +0100
+++ perl-5.10.1/lib/ExtUtils/MakeMaker.pm 2009-11-18 16:32:50.000000000 +0100
@@ -262,7 +262,7 @@ sub full_setup {
PERL_SRC PERM_DIR PERM_RW PERM_RWX
PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE PPM_INSTALL_EXEC
PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
- SIGN SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
+ SIGN SKIP TYPEMAPS USE_MM_LD_RUN_PATH VERSION VERSION_FROM XS XSOPT XSPROTOARG
XS_VERSION clean depend dist dynamic_lib linkext macro realclean
tool_autosplit
@@ -406,7 +406,27 @@ sub new {
# PRINT_PREREQ is RedHatism.
if ("@ARGV" =~ /\bPRINT_PREREQ\b/) {
$self->_PRINT_PREREQ;
- }
+ }
+
+ # USE_MM_LD_RUN_PATH - another RedHatism to disable automatic RPATH generation
+ if ( ( ! $self->{USE_MM_LD_RUN_PATH} )
+ &&( ("@ARGV" =~ /\bUSE_MM_LD_RUN_PATH(=([01]))?\b/)
+ ||( exists( $ENV{USE_MM_LD_RUN_PATH} )
+ &&( $ENV{USE_MM_LD_RUN_PATH} =~ /([01])?$/ )
+ )
+ )
+ )
+ {
+ my $v = $1;
+ if( $v )
+ {
+ $v = ($v=~/=([01])$/)[0];
+ }else
+ {
+ $v = 1;
+ };
+ $self->{USE_MM_LD_RUN_PATH}=$v;
+ };
print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose;
if (-f "MANIFEST" && ! -f "Makefile"){
@@ -2319,6 +2339,40 @@ precedence. A typemap in the current di
precedence, even if it isn't listed in TYPEMAPS. The default system
typemap has lowest precedence.
+=item USE_MM_LD_RUN_PATH
+
+boolean
+The Fedora perl MakeMaker distribution differs from the standard
+upstream release in that it disables use of the MakeMaker generated
+LD_RUN_PATH by default, UNLESS this attribute is specified , or the
+USE_MM_LD_RUN_PATH environment variable is set during the MakeMaker run.
+
+The upstream MakeMaker will set the ld(1) environment variable LD_RUN_PATH
+to the concatenation of every -L ld(1) option directory in which a -l ld(1)
+option library is found, which is used as the ld(1) -rpath option if none
+is specified. This means that, if your application builds shared libraries
+and your MakeMaker application links to them, that the absolute paths of the
+libraries in the build tree will be inserted into the RPATH header of all
+MakeMaker generated binaries, and that such binaries will be unable to link
+to these libraries if they do not still reside in the build tree directories
+(unlikely) or in the system library directories (/lib or /usr/lib), regardless
+of any LD_LIBRARY_PATH setting. So if you specified -L../mylib -lmylib , and
+ your 'libmylib.so' gets installed into /some_directory_other_than_usr_lib,
+ your MakeMaker application will be unable to link to it, even if LD_LIBRARY_PATH
+is set to include /some_directory_other_than_usr_lib, because RPATH overrides
+LD_LIBRARY_PATH.
+
+So for Fedora MakeMaker builds LD_RUN_PATH is NOT generated by default for
+every link. You can still use explicit -rpath ld options or the LD_RUN_PATH
+environment variable during the build to generate an RPATH for the binaries.
+
+You can set the USE_MM_LD_RUN_PATH attribute to 1 on the MakeMaker command
+line or in the WriteMakefile arguments to enable generation of LD_RUN_PATH
+for every link command.
+
+USE_MM_LD_RUN_PATH will default to 1 (LD_RUN_PATH will be used) IF the
+$USE_MM_LD_RUN_PATH environment variable is set during a MakeMaker run.
+
=item VENDORPREFIX
Like PERLPREFIX, but only for the vendor install locations.
perl-add-symbols.patch:
hv.c | 4 ++--
makedef.pl | 2 +-
pad.c | 4 ++--
perl.h | 4 ++--
perlvars.h | 4 ++--
proto.h | 4 ++--
6 files changed, 11 insertions(+), 11 deletions(-)
--- NEW FILE perl-add-symbols.patch ---
2009-12-02 Stepan Kasal <skasal at redhat.com>
* 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)
perl-much-better-swap-logic.patch:
embed.fnc | 1
embed.h | 2 -
ext/Devel-PPPort/parts/embed.fnc | 1
pod/perlreapi.pod | 2 -
pod/perlreguts.pod | 13 +++++------
proto.h | 5 ----
regcomp.c | 2 -
regexec.c | 46 ++++++++++++++-------------------------
regexp.h | 2 -
t/op/pat.t | 20 ++++++++++++++++
10 files changed, 44 insertions(+), 50 deletions(-)
--- NEW FILE perl-much-better-swap-logic.patch ---
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<swap>
-TODO: document
+Unused. Left in for compatibility with perl 5.10.0.
=head2 C<offs>
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<swap>
-C<swap> is an extra set of startp/endp stored in a C<regexp_paren_ofs>
-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<swap> formerly was an extra set of startp/endp stored in a
+C<regexp_paren_ofs> 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<offsets>
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 = (
perl-perlbug-tag.patch:
perlbug.PL | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
--- NEW FILE perl-perlbug-tag.patch ---
--- perl-5.10.1/utils/perlbug.PL.fedora 2009-08-12 20:49:24.000000000 +0200
+++ perl-5.10.1/utils/perlbug.PL 2009-11-18 15:56:15.000000000 +0100
@@ -27,8 +27,6 @@ open OUT, ">$file" or die "Can't create
open PATCH_LEVEL, "<" . catfile(updir, "patchlevel.h")
or die "Can't open patchlevel.h: $!";
-my $patchlevel_date = (stat PATCH_LEVEL)[9];
-
while (<PATCH_LEVEL>) {
last if $_ =~ /^\s*static\s+(?:const\s+)?char.*?local_patches\[\]\s*=\s*{\s*$/;
}
@@ -71,9 +69,8 @@ $Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-my \$config_tag1 = '$extract_version - $Config{cf_time}';
+my \$config_tag1 = '$extract_version';
-my \$patchlevel_date = $patchlevel_date;
my \$patch_tags = '$patch_tags';
my \@patches = (
$patch_desc
@@ -333,17 +330,6 @@ sub Init {
$ok = '';
if ($::opt_o) {
if ($::opt_o eq 'k' or $::opt_o eq 'kay') {
- my $age = time - $patchlevel_date;
- if ($::opt_o eq 'k' and $age > 60 * 24 * 60 * 60 ) {
- my $date = localtime $patchlevel_date;
- print <<"EOF";
-"perlbug -ok" and "perlbug -nok" do not report on Perl versions which
-are more than 60 days old. This Perl version was constructed on
-$date. If you really want to report this, use
-"perlbug -okay" or "perlbug -nokay".
-EOF
- exit();
- }
# force these options
unless ($::opt_n) {
$::opt_S = 1; # don't prompt for send
@@ -730,8 +716,8 @@ EFF
print OUT <<EFF;
---
EFF
- print OUT "This perlbug was built using Perl $config_tag1\n",
- "It is being executed now by Perl $config_tag2.\n\n"
+ print OUT "This perlbug was built using Perl $config_tag1 in the Fedora build system.\n",
+ "It is being executed now by Perl $config_tag2.\n\n"
if $config_tag2 ne $config_tag1;
print OUT <<EOF;
perl-suid-noroot.patch:
installperl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE perl-suid-noroot.patch ---
--- 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);
perl-update-ExtUtils-CBuilder.patch:
MANIFEST | 1
lib/ExtUtils/CBuilder.pm | 11
lib/ExtUtils/CBuilder/Base.pm | 22 +
lib/ExtUtils/CBuilder/Changes | 43 ++
lib/ExtUtils/CBuilder/Platform/Unix.pm | 2
lib/ExtUtils/CBuilder/Platform/VMS.pm | 2
lib/ExtUtils/CBuilder/Platform/Windows.pm | 440 +------------------------
lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm | 130 +++++++
lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm | 151 ++++++++
lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm | 131 +++++++
lib/ExtUtils/CBuilder/Platform/aix.pm | 2
lib/ExtUtils/CBuilder/Platform/cygwin.pm | 9
lib/ExtUtils/CBuilder/Platform/darwin.pm | 2
lib/ExtUtils/CBuilder/Platform/dec_osf.pm | 2
lib/ExtUtils/CBuilder/Platform/os2.pm | 2
lib/ExtUtils/CBuilder/t/00-have-compiler.t | 26 -
lib/ExtUtils/CBuilder/t/02-link.t | 17
lib/ExtUtils/CBuilder/t/03-cplusplus.t | 73 ++++
18 files changed, 615 insertions(+), 451 deletions(-)
Index: perl-update-ExtUtils-CBuilder.patch
===================================================================
RCS file: /cvs/extras/rpms/perl/devel/perl-update-ExtUtils-CBuilder.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- perl-update-ExtUtils-CBuilder.patch 11 Mar 2009 21:12:37 -0000 1.1
+++ perl-update-ExtUtils-CBuilder.patch 3 Dec 2009 11:37:17 -0000 1.2
@@ -1,444 +1,1347 @@
-perl-update-ExtUtils-CBuilder-0.24
+ExtUtils-CBuilder-0.27
-diff -urN perl-5.10.0.orig/lib/ExtUtils/CBuilder/Base.pm perl-5.10.0/lib/ExtUtils/CBuilder/Base.pm
---- perl-5.10.0.orig/lib/ExtUtils/CBuilder/Base.pm 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/ExtUtils/CBuilder/Base.pm 2009-03-11 20:12:36.000000000 +0100
-@@ -6,9 +6,10 @@
- use Cwd ();
- use Config;
- use Text::ParseWords;
-+use IO::File;
+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.21';
-+$VERSION = '0.24';
+-$VERSION = '0.2602';
++$VERSION = '0.27';
sub new {
my $class = shift;
-@@ -118,10 +119,8 @@
-
- my $tmpfile = File::Spec->catfile(File::Spec->tmpdir, 'compilet.c');
- {
-- local *FH;
-- open FH, "> $tmpfile" or die "Can't create $tmpfile: $!";
-- print FH "int boot_compilet() { return 1; }\n";
-- close FH;
-+ my $FH = IO::File->new("> $tmpfile") or die "Can't create $tmpfile: $!";
-+ print $FH "int boot_compilet() { return 1; }\n";
+@@ -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 @@
+ }
- my ($obj_file, @lib_files);
-diff -urN perl-5.10.0.orig/lib/ExtUtils/CBuilder/Changes perl-5.10.0/lib/ExtUtils/CBuilder/Changes
---- perl-5.10.0.orig/lib/ExtUtils/CBuilder/Changes 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/ExtUtils/CBuilder/Changes 2009-03-11 20:13:30.000000000 +0100
-@@ -1,5 +1,31 @@
+ 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.
-+ - Added 'gnu' and 'gnukfreebsd' as Unix variants. [Niko Tyni]
++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]
+
-+ - Brought in some VMS fixes from bleadperl: "Correct and complete
-+ CBuilder's handling of external libraries when linking on VMS."
-+ [Craig Berry]
++0.26_04 - Mon Oct 19 21:57:46 EDT 2009
+
-+0.23 - Sat Apr 19 22:28:03 2008
++ 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}
+
-+ - Fixed some problems (some old, some new) with Strawberry Perl on
-+ Windows. [Alberto Simo~es]
++ 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]
+
-+ - Will now install in the core perl lib directory when the user's
-+ perl is new enough to have us in core. [Yi Ma Mao]
++ Other:
++ - Split Windows compiler driver packages into individual *.pm files
+
-+0.22 - Fri Feb 8 21:52:21 2008
++0.260301 - Sat Aug 29 11:04:41 EDT 2009
+
-+ - Replaced the split_like_shell() method on Windows with a
-+ near-no-op, which is probably more correct and has the benefit of
-+ not messing up UNC paths. [John R. LoVerso, see
-+ http://rt.cpan.org/Ticket/Display.html?id=26545]
++ Bugs fixed:
++ - Fixed linking error on Win32 with gcc compiler (RT#49000)
++ [kmx]
+
-+ - Fixed extra_compiler_flags on Windows, they were being
-+ ignored. [Robert May]
++0.2603 - Sat Jul 18 06:56:06 EDT 2009
+
-+0.21 - Tue Oct 30 06:46:01 2007
++ Bugs fixed:
++ - Makefile.PL had wrong INSTALLDIRS setting for older Perls
++ (RT#47985) [David Golden]
+
- - Clean up perl_src path using Cwd::realpath(). Only affects usage
- as part of the perl core.
+ 0.2602 - Sat Jul 4 10:57:12 EDT 2009
-diff -urN perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/Unix.pm perl-5.10.0/lib/ExtUtils/CBuilder/Platform/Unix.pm
---- perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/Unix.pm 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/ExtUtils/CBuilder/Platform/Unix.pm 2009-03-11 20:12:36.000000000 +0100
+ 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.21';
-+$VERSION = '0.24';
+-$VERSION = '0.2602';
++$VERSION = '0.27';
@ISA = qw(ExtUtils::CBuilder::Base);
sub link_executable {
-diff -urN perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/VMS.pm perl-5.10.0/lib/ExtUtils/CBuilder/Platform/VMS.pm
---- perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/VMS.pm 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/ExtUtils/CBuilder/Platform/VMS.pm 2009-03-11 20:12:36.000000000 +0100
+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.22';
-+$VERSION = '0.24';
+-$VERSION = '0.2602';
++$VERSION = '0.27';
@ISA = qw(ExtUtils::CBuilder::Base);
use File::Spec::Functions qw(catfile catdir);
-@@ -134,7 +134,7 @@
- # In general, we pass through the basic libraries from %Config unchanged.
- # The one exception is that if we're building in the Perl source tree, and
- # a library spec could be resolved via a logical name, we go to some trouble
-- # to insure that the copy in the local tree is used, rather than one to
-+ # to ensure that the copy in the local tree is used, rather than one to
- # which a system-wide logical may point.
- if ($self->perl_src) {
- my($lib,$locspec,$type);
-diff -urN perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/Windows.pm perl-5.10.0/lib/ExtUtils/CBuilder/Platform/Windows.pm
---- perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/Windows.pm 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/ExtUtils/CBuilder/Platform/Windows.pm 2009-03-11 20:12:36.000000000 +0100
-@@ -7,9 +7,10 @@
- use File::Spec;
-
- use ExtUtils::CBuilder::Base;
-+use IO::File;
+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.21';
-+$VERSION = '0.24';
+-$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 {
-@@ -33,61 +34,24 @@
- }
+ my $class = shift;
+ my $self = $class->SUPER::new(@_);
+ my $cf = $self->{config};
- sub split_like_shell {
-- # As it turns out, Windows command-parsing is very different from
-- # Unix command-parsing. Double-quotes mean different things,
-- # backslashes don't necessarily mean escapes, and so on. So we
-- # can't use Text::ParseWords::shellwords() to break a command string
-- # into words. The algorithm below was bashed out by Randy and Ken
-- # (mostly Randy), and there are a lot of regression tests, so we
-- # should feel free to adjust if desired.
--
-+ # Since Windows will pass the whole command string (not an argument
-+ # array) to the target program and make the program parse it itself,
-+ # we don't actually need to do any processing here.
- (my $self, local $_) = @_;
-
- return @$_ if defined() && UNIVERSAL::isa($_, 'ARRAY');
--
-- my @argv;
-- return @argv unless defined() && length();
--
-- my $arg = '';
-- my( $i, $quote_mode ) = ( 0, 0 );
--
-- while ( $i < length() ) {
--
-- my $ch = substr( $_, $i , 1 );
-- my $next_ch = substr( $_, $i+1, 1 );
--
-- if ( $ch eq '\\' && $next_ch eq '"' ) {
-- $arg .= '"';
-- $i++;
-- } elsif ( $ch eq '\\' && $next_ch eq '\\' ) {
-- $arg .= '\\';
-- $i++;
-- } elsif ( $ch eq '"' && $next_ch eq '"' && $quote_mode ) {
-- $quote_mode = !$quote_mode;
-- $arg .= '"';
-- $i++;
-- } elsif ( $ch eq '"' && $next_ch eq '"' && !$quote_mode &&
-- ( $i + 2 == length() ||
-- substr( $_, $i + 2, 1 ) eq ' ' )
-- ) { # for cases like: a"" => [ 'a' ]
-- push( @argv, $arg );
-- $arg = '';
-- $i += 2;
-- } elsif ( $ch eq '"' ) {
-- $quote_mode = !$quote_mode;
-- } elsif ( $ch eq ' ' && !$quote_mode ) {
-- push( @argv, $arg ) if $arg;
-- $arg = '';
-- ++$i while substr( $_, $i + 1, 1 ) eq ' ';
-- } else {
-- $arg .= $ch;
-- }
--
-- $i++;
-- }
--
-- push( @argv, $arg ) if defined( $arg ) && length( $arg );
-- return @argv;
-+ return unless defined() && length();
-+ return ($_);
-+}
-+
-+sub do_system {
-+ # See above
-+ my $self = shift;
-+ my $cmd = join(" ",
-+ grep length,
-+ map {$a=$_;$a=~s/\t/ /g;$a=~s/^\s+|\s+$//;$a}
-+ grep defined, @_);
-+ return $self->SUPER::do_system($cmd);
- }
-
- sub arg_defines {
-@@ -119,7 +83,7 @@
- cflags => [
- $self->split_like_shell($cf->{ccflags}),
- $self->split_like_shell($cf->{cccdlflags}),
-- $self->split_like_shell($cf->{extra_compiler_flags}),
-+ $self->split_like_shell($args{extra_compiler_flags}),
- ],
- optimize => [ $self->split_like_shell($cf->{optimize}) ],
- defines => \@defines,
-@@ -329,18 +293,16 @@
- $self->add_to_cleanup($script);
- print "Generating script '$script'\n" if !$self->{quiet};
+ # 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;
-- open( SCRIPT, ">$script" )
-+ my $SCRIPT = IO::File->new( ">$script" )
- or die( "Could not create script '$script': $!" );
+ return $self;
+ }
+@@ -238,422 +258,6 @@
-- print SCRIPT join( "\n",
-+ print $SCRIPT join( "\n",
- map { ref $_ ? @{$_} : $_ }
- grep defined,
- delete(
- @spec{ qw(includes cflags optimize defines perlinc) } )
- );
+ 1;
-- close SCRIPT;
+-########################################################################
-
- push @{$spec{includes}}, '@"' . $script . '"';
-
- return %spec;
-@@ -402,10 +364,10 @@
-
- print "Generating script '$script'\n" if !$self->{quiet};
-
-- open( SCRIPT, ">$script" )
-+ my $SCRIPT = IO::File->new( ">$script" )
- or die( "Could not create script '$script': $!" );
-
-- print SCRIPT join( "\n",
-+ print $SCRIPT join( "\n",
- map { ref $_ ? @{$_} : $_ }
- grep defined,
- delete(
-@@ -414,8 +376,6 @@
- def_file implib map_file) } )
- );
-
-- close SCRIPT;
+-=begin comment
-
- push @{$spec{lddlflags}}, '@"' . $script . '"';
-
- return %spec;
-@@ -459,7 +419,7 @@
-
- print "Generating script '$script'\n" if !$self->{quiet};
-
-- open( SCRIPT, ">$script" )
-+ my $SCRIPT = IO::File->new( ">$script" )
- or die( "Could not create script '$script': $!" );
-
- # XXX Borland "response files" seem to be unable to accept macro
-@@ -467,15 +427,13 @@
- # 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",
-+ print $SCRIPT join( "\n",
- map { ref $_ ? @{$_} : $_ }
- grep defined,
- delete(
- @spec{ qw(includes cflags optimize perlinc) } )
- );
-
-- close SCRIPT;
--
- push @{$spec{includes}}, '@"' . $script . '"';
-
- return %spec;
-@@ -525,29 +483,25 @@
- print "Generating scripts '$ld_script' and '$ld_libs'.\n" if !$self->{quiet};
-
- # Script 1: contains options & names of object files.
-- open( LD_SCRIPT, ">$ld_script" )
-+ my $LD_SCRIPT = IO::File->new( ">$ld_script" )
- or die( "Could not create linker script '$ld_script': $!" );
-
-- print LD_SCRIPT join( " +\n",
-+ print $LD_SCRIPT join( " +\n",
- map { @{$_} }
- grep defined,
- delete(
- @spec{ qw(lddlflags libpath other_ldflags startup objects) } )
- );
-
-- close LD_SCRIPT;
+-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.
-
- # Script 2: contains name of libs to link against.
-- open( LD_LIBS, ">$ld_libs" )
-+ my $LD_LIBS = IO::File->new( ">$ld_libs" )
- or die( "Could not create linker script '$ld_libs': $!" );
-
-- print LD_LIBS join( " +\n",
-+ print $LD_LIBS join( " +\n",
- (delete $spec{libperl} || ''),
- @{delete $spec{perllibs} || []},
- );
-
-- close LD_LIBS;
+-=end comment
-
- push @{$spec{lddlflags}}, '@"' . $ld_script . '"';
- push @{$spec{perllibs}}, '@"' . $ld_libs . '"';
-
-@@ -669,32 +623,30 @@
-
- print "Generating script '$script'\n" if !$self->{quiet};
-
-- open( SCRIPT, ">$script" )
-+ my $SCRIPT = IO::File->new( ">$script" )
- or die( "Could not create script '$script': $!" );
-
-- print( SCRIPT 'SEARCH_DIR(' . $_ . ")\n" )
-+ 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";
-+ print $SCRIPT 'STARTUP(' . shift( @{$spec{startup}} ) . ")\n";
- unshift @{$spec{objects}},
- @{delete $spec{startup} || []};
- }
-
-- print SCRIPT 'INPUT(' . join( ',',
-+ print $SCRIPT 'INPUT(' . join( ',',
- @{delete $spec{objects} || []}
- ) . ")\n";
+-=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__
-- print SCRIPT 'INPUT(' . join( ' ',
-+ print $SCRIPT 'INPUT(' . join( ' ',
- (delete $spec{libperl} || ''),
- @{delete $spec{perllibs} || []},
- ) . ")\n";
-
-- close SCRIPT;
--
- push @{$spec{other_ldflags}}, '"' . $script . '"';
-
- return %spec;
-diff -urN perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/aix.pm perl-5.10.0/lib/ExtUtils/CBuilder/Platform/aix.pm
---- perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/aix.pm 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/ExtUtils/CBuilder/Platform/aix.pm 2009-03-11 20:12:36.000000000 +0100
+ =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.21';
-+$VERSION = '0.24';
+-$VERSION = '0.2602';
++$VERSION = '0.27';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub need_prelink { 1 }
-diff -urN perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/cygwin.pm perl-5.10.0/lib/ExtUtils/CBuilder/Platform/cygwin.pm
---- perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/cygwin.pm 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/ExtUtils/CBuilder/Platform/cygwin.pm 2009-03-11 20:12:36.000000000 +0100
-@@ -5,7 +5,7 @@
+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.21';
-+$VERSION = '0.24';
+-$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 {
-diff -urN perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/darwin.pm perl-5.10.0/lib/ExtUtils/CBuilder/Platform/darwin.pm
---- perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/darwin.pm 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/ExtUtils/CBuilder/Platform/darwin.pm 2009-03-11 20:12:36.000000000 +0100
+ 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.21';
-+$VERSION = '0.24';
+-$VERSION = '0.2602';
++$VERSION = '0.27';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub compile {
-diff -urN perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/dec_osf.pm perl-5.10.0/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
---- perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/dec_osf.pm 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/ExtUtils/CBuilder/Platform/dec_osf.pm 2009-03-11 20:12:36.000000000 +0100
+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.21';
-+$VERSION = '0.24';
+-$VERSION = '0.2602';
++$VERSION = '0.27';
sub link_executable {
my $self = shift;
-diff -urN perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/os2.pm perl-5.10.0/lib/ExtUtils/CBuilder/Platform/os2.pm
---- perl-5.10.0.orig/lib/ExtUtils/CBuilder/Platform/os2.pm 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/ExtUtils/CBuilder/Platform/os2.pm 2009-03-11 20:12:36.000000000 +0100
+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.21';
-+$VERSION = '0.24';
+-$VERSION = '0.2602';
++$VERSION = '0.27';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub need_prelink { 1 }
-diff -urN perl-5.10.0.orig/lib/ExtUtils/CBuilder/t/01-basic.t perl-5.10.0/lib/ExtUtils/CBuilder/t/01-basic.t
---- perl-5.10.0.orig/lib/ExtUtils/CBuilder/t/01-basic.t 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/ExtUtils/CBuilder/t/01-basic.t 2009-03-11 20:08:15.000000000 +0100
-@@ -53,6 +53,16 @@
+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(../..);
+- }
}
- my @words = $b->split_like_shell(' foo bar');
--ok @words, 2;
--ok $words[0], 'foo';
--ok $words[1], 'bar';
-+
-+skip(
-+ $^O =~ m/MSWin/ ? "Skip under MSWindows" : 0, # whether to skip
-+ @words, 2
-+ );
-+skip(
-+ $^O =~ m/MSWin/ ? "Skip under MSWindows" : 0, # whether to skip
-+ $words[0], 'foo'
-+);
-+skip(
-+ $^O =~ m/MSWin/ ? "Skip under MSWindows" : 0, # whether to skip
-+ $words[1], 'bar'
-+);
-diff -urN perl-5.10.0.orig/lib/ExtUtils/CBuilder.pm perl-5.10.0/lib/ExtUtils/CBuilder.pm
---- perl-5.10.0.orig/lib/ExtUtils/CBuilder.pm 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/ExtUtils/CBuilder.pm 2009-03-11 20:12:36.000000000 +0100
+ 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.21';
-+$VERSION = '0.24';
+-$VERSION = '0.2602';
++$VERSION = '0.27';
$VERSION = eval $VERSION;
# Okay, this is the brute-force method of finding out what kind of
-@@ -36,6 +36,8 @@
- sunos Unix
- cygwin Unix
- os2 Unix
-+ gnu Unix
-+ gnukfreebsd Unix
-
- dos Windows
- MSWin32 Windows
+@@ -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<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
perl-update-File-Path.patch:
Path.pm | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
Path.t | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------
2 files changed, 172 insertions(+), 13 deletions(-)
Index: perl-update-File-Path.patch
===================================================================
RCS file: /cvs/extras/rpms/perl/devel/perl-update-File-Path.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- perl-update-File-Path.patch 11 Mar 2009 21:12:37 -0000 1.1
+++ perl-update-File-Path.patch 3 Dec 2009 11:37:17 -0000 1.2
@@ -1,1215 +1,287 @@
-File-Path-2.07
+File-Path-2.08
-diff -urN perl-5.10.0.orig/lib/File/Path.pm perl-5.10.0/lib/File/Path.pm
---- perl-5.10.0.orig/lib/File/Path.pm 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/File/Path.pm 2009-02-17 14:50:05.000000000 +0100
-@@ -16,13 +16,14 @@
- }
+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);
--$VERSION = '2.04';
-- at ISA = qw(Exporter);
-- at EXPORT = qw(mkpath rmtree);
-+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-+$VERSION = '2.07';
-+ at ISA = qw(Exporter);
-+ at EXPORT = qw(mkpath rmtree);
-+ at EXPORT_OK = qw(make_path remove_tree);
-
--my $Is_VMS = $^O eq 'VMS';
--my $Is_MacOS = $^O eq 'MacOS';
-+my $Is_VMS = $^O eq 'VMS';
-+my $Is_MacOS = $^O eq 'MacOS';
-
- # These OSes complain if you want to remove a file that you have no
- # write permission to:
-@@ -45,22 +46,21 @@
-
- if ($arg->{error}) {
- $object = '' unless defined $object;
-- push @{${$arg->{error}}}, {$object => "$message: $!"};
-+ $message .= ": $!" if $!;
-+ push @{${$arg->{error}}}, {$object => $message};
- }
- else {
- _carp(defined($object) ? "$message for $object: $!" : "$message: $!");
- }
- }
-
-+sub make_path {
-+ push @_, {} unless @_ and UNIVERSAL::isa($_[-1],'HASH');
-+ goto &mkpath;
-+}
-+
- sub mkpath {
-- my $old_style = (
-- UNIVERSAL::isa($_[0],'ARRAY')
-- or (@_ == 2 and (defined $_[1] ? $_[1] =~ /\A\d+\z/ : 1))
-- or (@_ == 3
-- and (defined $_[1] ? $_[1] =~ /\A\d+\z/ : 1)
-- and (defined $_[2] ? $_[2] =~ /\A\d+\z/ : 1)
-- )
-- ) ? 1 : 0;
-+ my $old_style = !(@_ and UNIVERSAL::isa($_[-1],'HASH'));
-
- my $arg;
- my $paths;
-@@ -69,19 +69,14 @@
- my ($verbose, $mode);
- ($paths, $verbose, $mode) = @_;
- $paths = [$paths] unless UNIVERSAL::isa($paths,'ARRAY');
-- $arg->{verbose} = defined $verbose ? $verbose : 0;
-- $arg->{mode} = defined $mode ? $mode : 0777;
-+ $arg->{verbose} = $verbose;
-+ $arg->{mode} = defined $mode ? $mode : 0777;
- }
- else {
-- if (@_ > 0 and UNIVERSAL::isa($_[-1], 'HASH')) {
-- $arg = pop @_;
-- exists $arg->{mask} and $arg->{mode} = delete $arg->{mask};
-- $arg->{mode} = 0777 unless exists $arg->{mode};
-- ${$arg->{error}} = [] if exists $arg->{error};
-- }
-- else {
-- @{$arg}{qw(verbose mode)} = (0, 0777);
-- }
-+ $arg = pop @_;
-+ $arg->{mode} = delete $arg->{mask} if exists $arg->{mask};
-+ $arg->{mode} = 0777 unless exists $arg->{mode};
-+ ${$arg->{error}} = [] if exists $arg->{error};
- $paths = [@_];
- }
- return _mkpath($arg, $paths);
-@@ -91,10 +86,9 @@
- my $arg = shift;
- my $paths = shift;
-
-- local($")=$Is_MacOS ? ":" : "/";
- my(@created,$path);
- foreach $path (@$paths) {
-- next unless length($path);
-+ next unless defined($path) and length($path);
- $path .= '/' if $^O eq 'os2' and $path =~ /^\w:\z/s; # feature of CRT
- # Logic wants Unix paths, so go with the flow.
- if ($Is_VMS) {
-@@ -129,15 +123,13 @@
- return @created;
- }
-
-+sub remove_tree {
-+ push @_, {} unless @_ and UNIVERSAL::isa($_[-1],'HASH');
-+ goto &rmtree;
-+}
-+
- sub rmtree {
-- my $old_style = (
-- UNIVERSAL::isa($_[0],'ARRAY')
-- or (@_ == 2 and (defined $_[1] ? $_[1] =~ /\A\d+\z/ : 1))
-- or (@_ == 3
-- and (defined $_[1] ? $_[1] =~ /\A\d+\z/ : 1)
-- and (defined $_[2] ? $_[2] =~ /\A\d+\z/ : 1)
-- )
-- ) ? 1 : 0;
-+ my $old_style = !(@_ and UNIVERSAL::isa($_[-1],'HASH'));
-
- my $arg;
- my $paths;
-@@ -145,7 +137,7 @@
- if ($old_style) {
- my ($verbose, $safe);
- ($paths, $verbose, $safe) = @_;
-- $arg->{verbose} = defined $verbose ? $verbose : 0;
-+ $arg->{verbose} = $verbose;
- $arg->{safe} = defined $safe ? $safe : 0;
-
- if (defined($paths) and length($paths)) {
-@@ -157,32 +149,55 @@
- }
- }
- else {
-- if (@_ > 0 and UNIVERSAL::isa($_[-1],'HASH')) {
-- $arg = pop @_;
-- ${$arg->{error}} = [] if exists $arg->{error};
-- ${$arg->{result}} = [] if exists $arg->{result};
-- }
-- else {
-- @{$arg}{qw(verbose safe)} = (0, 0);
-- }
-+ $arg = pop @_;
-+ ${$arg->{error}} = [] if exists $arg->{error};
-+ ${$arg->{result}} = [] if exists $arg->{result};
- $paths = [@_];
- }
-
- $arg->{prefix} = '';
- $arg->{depth} = 0;
-
-+ my @clean_path;
- $arg->{cwd} = getcwd() or do {
- _error($arg, "cannot fetch initial working directory");
- return 0;
- };
- for ($arg->{cwd}) { /\A(.*)\Z/; $_ = $1 } # untaint
-
-- @{$arg}{qw(device inode)} = (stat $arg->{cwd})[0,1] or do {
-+ for my $p (@$paths) {
-+ # need to fixup case and map \ to / on Windows
-+ my $ortho_root = $^O eq 'MSWin32' ? _slash_lc($p) : $p;
-+ my $ortho_cwd = $^O eq 'MSWin32' ? _slash_lc($arg->{cwd}) : $arg->{cwd};
-+ my $ortho_root_length = length($ortho_root);
-+ $ortho_root_length-- if $^O eq 'VMS'; # don't compare '.' with ']'
-+ if ($ortho_root_length
-+ && (substr($ortho_root, 0, $ortho_root_length)
-+ eq substr($ortho_cwd, 0, $ortho_root_length))) {
-+ local $! = 0;
-+ _error($arg, "cannot remove path when cwd is $arg->{cwd}", $p);
-+ next;
+ 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 ($Is_MacOS) {
-+ $p = ":$p" unless $p =~ /:/;
-+ $p .= ":" unless $p =~ /:\z/;
++ 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};
++ }
+ }
-+ elsif ($^O eq 'MSWin32') {
-+ $p =~ s{[/\\]\z}{};
++ if (exists $arg->{owner} and not exists $arg->{group}) {
++ $arg->{group} = -1; # chown will leave group unchanged
+ }
-+ else {
-+ $p =~ s{/\z}{};
++ if (exists $arg->{group} and not exists $arg->{owner}) {
++ $arg->{owner} = -1; # chown will leave owner unchanged
+ }
-+ push @clean_path, $p;
-+ }
-+
-+ @{$arg}{qw(device inode perm)} = (lstat $arg->{cwd})[0,1] or do {
- _error($arg, "cannot stat initial working directory", $arg->{cwd});
- return 0;
- };
-
-- return _rmtree($arg, $paths);
-+ return _rmtree($arg, \@clean_path);
- }
-
- sub _rmtree {
-@@ -196,14 +211,6 @@
- my (@files, $root);
- ROOT_DIR:
- foreach $root (@$paths) {
-- if ($Is_MacOS) {
-- $root = ":$root" unless $root =~ /:/;
-- $root .= ":" unless $root =~ /:\z/;
-- }
-- else {
-- $root =~ s{/\z}{};
-- }
--
- # since we chdir into each directory, it may not be obvious
- # to figure out where we are if we generate a message about
- # a file name. We therefore construct a semi-canonical
-@@ -234,13 +241,13 @@
- }
- }
-
-- my ($device, $inode, $perm) = (stat $curdir)[0,1,2] or do {
-+ my ($cur_dev, $cur_inode, $perm) = (stat $curdir)[0,1,2] or do {
- _error($arg, "cannot stat current working directory", $canon);
- next ROOT_DIR;
- };
-
-- ($ldev eq $device and $lino eq $inode)
-- or _croak("directory $canon changed before chdir, expected dev=$ldev inode=$lino, actual dev=$device ino=$inode, aborting.");
-+ ($ldev eq $cur_dev and $lino eq $cur_inode)
-+ or _croak("directory $canon changed before chdir, expected dev=$ldev ino=$lino, actual dev=$cur_dev ino=$cur_inode, aborting.");
-
- $perm &= 07777; # don't forget setuid, setgid, sticky bits
- my $nperm = $perm | 0700;
-@@ -287,7 +294,7 @@
- # remove the contained files before the directory itself
- my $narg = {%$arg};
- @{$narg}{qw(device inode cwd prefix depth)}
-- = ($device, $inode, $updir, $canon, $arg->{depth}+1);
-+ = ($cur_dev, $cur_inode, $updir, $canon, $arg->{depth}+1);
- $count += _rmtree($narg, \@files);
- }
-
-@@ -304,11 +311,11 @@
-
- # ensure that a chdir upwards didn't take us somewhere other
- # than we expected (see CVE-2002-0435)
-- ($device, $inode) = (stat $curdir)[0,1]
-+ ($cur_dev, $cur_inode) = (stat $curdir)[0,1]
- or _croak("cannot stat prior working directory $arg->{cwd}: $!, aborting.");
-
-- ($arg->{device} eq $device and $arg->{inode} eq $inode)
-- or _croak("previous directory $arg->{cwd} changed before entering $canon, expected dev=$ldev inode=$lino, actual dev=$device ino=$inode, aborting.");
-+ ($arg->{device} eq $cur_dev and $arg->{inode} eq $cur_inode)
-+ or _croak("previous directory $arg->{cwd} changed before entering $canon, expected dev=$ldev ino=$lino, actual dev=$cur_dev ino=$cur_inode, aborting.");
-
- if ($arg->{depth} or !$arg->{keep_root}) {
- if ($arg->{safe} &&
-@@ -316,10 +323,8 @@
- print "skipped $root\n" if $arg->{verbose};
- next ROOT_DIR;
- }
-- if (!chmod $perm | 0700, $root) {
-- if ($Force_Writeable) {
-- _error($arg, "cannot make directory writeable", $canon);
-- }
-+ if ($Force_Writeable and !chmod $perm | 0700, $root) {
-+ _error($arg, "cannot make directory writeable", $canon);
- }
- print "rmdir $root\n" if $arg->{verbose};
- if (rmdir $root) {
-@@ -338,7 +343,7 @@
- else {
- # not a directory
- $root = VMS::Filespec::vmsify("./$root")
-- if $Is_VMS
-+ if $Is_VMS
- && !File::Spec->file_name_is_absolute($root)
- && ($root !~ m/(?<!\^)[\]>]+/); # not already in VMS syntax
-
-@@ -351,10 +356,8 @@
- }
-
- my $nperm = $perm & 07777 | 0600;
-- if ($nperm != $perm and not chmod $nperm, $root) {
-- if ($Force_Writeable) {
-- _error($arg, "cannot make file writeable", $canon);
-- }
-+ if ($Force_Writeable and $nperm != $perm and not chmod $nperm, $root) {
-+ _error($arg, "cannot make file writeable", $canon);
- }
- print "unlink $canon\n" if $arg->{verbose};
- # delete all versions under VMS
-@@ -373,10 +376,17 @@
- }
- }
+ $paths = [@_];
}
--
- return $count;
- }
-
-+sub _slash_lc {
-+ # fix up slashes and case on MSWin32 so that we can determine that
-+ # c:\path\to\dir is underneath C:/Path/To
-+ my $path = shift;
-+ $path =~ tr{\\}{/};
-+ return lc($path);
-+}
-+
- 1;
- __END__
-
-@@ -386,59 +396,65 @@
+ 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.04 of File::Path, released
--2007-11-13.
-+This document describes version 2.07 of File::Path, released
-+2008-11-09.
+-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
-- use File::Path;
--
-- # modern
-- mkpath( 'foo/bar/baz', '/zug/zwang', {verbose => 1} );
-+ use File::Path qw(make_path remove_tree);
-
-- rmtree(
-- 'foo/bar/baz', '/zug/zwang',
-- { verbose => 1, error => \my $err_list }
-- );
--
-- # traditional
-- mkpath(['/foo/bar/baz', 'blurfl/quux'], 1, 0711);
-- rmtree(['foo/bar/baz', 'blurfl/quux'], 1, 1);
-+ make_path('foo/bar/baz', '/zug/zwang');
-+ make_path('foo/bar/baz', '/zug/zwang', {
-+ verbose => 1,
-+ mode => 0711,
-+ });
-+
-+ remove_tree('foo/bar/baz', '/zug/zwang');
-+ remove_tree('foo/bar/baz', '/zug/zwang', {
-+ verbose => 1,
-+ error => \my $err_list,
-+ });
-+
-+ # legacy (interface promoted before v2.00)
-+ mkpath('/foo/bar/baz');
-+ mkpath('/foo/bar/baz', 1, 0711);
-+ mkpath(['/foo/bar/baz', 'blurfl/quux'], 1, 0711);
-+ rmtree('foo/bar/baz', 1, 1);
-+ rmtree(['foo/bar/baz', 'blurfl/quux'], 1, 1);
-+
-+ # legacy (interface promoted before v2.06)
-+ mkpath('foo/bar/baz', '/zug/zwang', { verbose => 1, mode => 0711 });
-+ rmtree('foo/bar/baz', '/zug/zwang', { verbose => 1, mode => 0711 });
-
- =head1 DESCRIPTION
-
--The C<mkpath> function provides a convenient way to create directories
--of arbitrary depth. Similarly, the C<rmtree> function provides a
--convenient way to delete an entire directory subtree from the
--filesystem, much like the Unix command C<rm -r>.
--
--Both functions may be called in one of two ways, the traditional,
--compatible with code written since the dawn of time, and modern,
--that offers a more flexible and readable idiom. New code should use
--the modern interface.
--
--=head2 FUNCTIONS
--
--The modern way of calling C<mkpath> and C<rmtree> is with a list
--of directories to create, or remove, respectively, followed by an
--optional hash reference containing keys to control the
--function's behaviour.
--
--=head3 C<mkpath>
--
--The following keys are recognised as parameters to C<mkpath>.
--The function returns the list of files actually created during the
--call.
--
-- my @created = mkpath(
-- qw(/tmp /flub /home/nobody),
-- {verbose => 1, mode => 0750},
-- );
-- print "created $_\n" for @created;
-+This module provide a convenient way to create directories of
-+arbitrary depth and to delete an entire directory subtree from the
-+filesystem.
-
--=over 4
-+The following functions are provided:
-+
-+=over
-+
-+=item make_path( $dir1, $dir2, .... )
-
--=item mode
-+=item make_path( $dir1, $dir2, ...., \%opts )
-+
-+The C<make_path> function creates the given directories if they don't
-+exists before, much like the Unix command C<mkdir -p>.
-+
-+The function accepts a list of directories to be created. Its
-+behaviour may be tuned by an optional hashref appearing as the last
-+parameter on the call.
-+
-+The function returns the list of directories actually created during
-+the call; in scalar context the number of directories created.
-+
-+The following keys are recognised in the option hash:
-+
-+=over
-+
-+=item mode => $num
-
- The numeric permissions mode to apply to each created directory
- (defaults to 0777), to be modified by the current C<umask>. If the
-@@ -447,16 +463,17 @@
-
- C<mask> is recognised as an alias for this parameter.
-
--=item verbose
-+=item verbose => $bool
-
--If present, will cause C<mkpath> to print the name of each directory
-+If present, will cause C<make_path> to print the name of each directory
- as it is created. By default nothing is printed.
-
--=item error
-+=item error => \$err
-
--If present, will be interpreted as a reference to a list, and will
--be used to store any errors that are encountered. See the ERROR
--HANDLING section for more information.
-+If present, it should be a reference to a scalar.
-+This scalar will be made to reference an array, which will
-+be used to store any errors that are encountered. See the L</"ERROR
-+HANDLING"> section for more information.
-
- If this parameter is not used, certain error conditions may raise
+@@ -505,6 +539,34 @@
a fatal error that will cause the program will halt, unless trapped
-@@ -464,53 +481,80 @@
-
- =back
+ in an C<eval> block.
--=head3 C<rmtree>
-+=item mkpath( $dir )
-
--=over 4
-+=item mkpath( $dir, $verbose, $mode )
++=item owner => $owner
+
-+=item mkpath( [$dir1, $dir2,...], $verbose, $mode )
++=item user => $owner
+
-+=item mkpath( $dir1, $dir2,..., \%opt )
++=item uid => $owner
+
-+The mkpath() function provide the legacy interface of make_path() with
-+a different interpretation of the arguments passed. The behaviour and
-+return value of the function is otherwise identical to make_path().
-
--=item verbose
-+=item remove_tree( $dir1, $dir2, .... )
-
--If present, will cause C<rmtree> to print the name of each file as
-+=item remove_tree( $dir1, $dir2, ...., \%opts )
++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.
+
-+The C<remove_tree> function deletes the given directories and any
-+files and subdirectories they might contain, much like the Unix
-+command C<rm -r> or C<del /s> on Windows.
++Ownwership of directories that already exist will not be changed.
+
-+The function accepts a list of directories to be
-+removed. Its behaviour may be tuned by an optional hashref
-+appearing as the last parameter on the call.
++C<user> and C<uid> are aliases of C<owner>.
+
-+The functions returns the number of files successfully deleted.
++=item group => $group
+
-+The following keys are recognised in the option hash:
++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.
+
-+=over
++Group ownwership of directories that already exist will not be changed.
+
-+=item verbose => $bool
++ make_path '/var/tmp/webcache', {owner=>'nobody', group=>'nogroup'};
+
-+If present, will cause C<remove_tree> to print the name of each file as
- it is unlinked. By default nothing is printed.
-
--=item safe
-+=item safe => $bool
-
--When set to a true value, will cause C<rmtree> to skip the files
-+When set to a true value, will cause C<remove_tree> to skip the files
- for which the process lacks the required privileges needed to delete
- files, such as delete privileges on VMS. In other words, the code
- will make no attempt to alter file permissions. Thus, if the process
- is interrupted, no filesystem object will be left in a more
- permissive mode.
-
--=item keep_root
-+=item keep_root => $bool
-
- When set to a true value, will cause all files and subdirectories
- to be removed, except the initially specified directories. This comes
- in handy when cleaning out an application's scratch directory.
-
-- rmtree( '/tmp', {keep_root => 1} );
-+ remove_tree( '/tmp', {keep_root => 1} );
-
--=item result
-+=item result => \$res
-
--If present, will be interpreted as a reference to a list, and will
--be used to store the list of all files and directories unlinked
--during the call. If nothing is unlinked, a reference to an empty
--list is returned (rather than C<undef>).
-+If present, it should be a reference to a scalar.
-+This scalar will be made to reference an array, which will
-+be used to store all files and directories unlinked
-+during the call. If nothing is unlinked, the array will be empty.
-
-- rmtree( '/tmp', {result => \my $list} );
-+ remove_tree( '/tmp', {result => \my $list} );
- print "unlinked $_\n" for @$list;
-
- This is a useful alternative to the C<verbose> key.
-
--=item error
-+=item error => \$err
-
--If present, will be interpreted as a reference to a list,
--and will be used to store any errors that are encountered.
--See the ERROR HANDLING section for more information.
-+If present, it should be a reference to a scalar.
-+This scalar will be made to reference an array, which will
-+be used to store any errors that are encountered. See the L</"ERROR
-+HANDLING"> section for more information.
-
- Removing things is a much more dangerous proposition than
- creating things. As such, there are certain conditions that
--C<rmtree> may encounter that are so dangerous that the only
-+C<remove_tree> may encounter that are so dangerous that the only
- sane action left is to kill the program.
-
- Use C<error> to trap all that is reasonable (problems with
-@@ -519,131 +563,67 @@
-
- =back
-
--=head2 TRADITIONAL INTERFACE
--
--The old interfaces of C<mkpath> and C<rmtree> take a reference to
--a list of directories (to create or remove), followed by a series
--of positional, numeric, modal parameters that control their behaviour.
--
--This design made it difficult to add additional functionality, as
--well as posed the problem of what to do when the calling code only
--needs to set the last parameter. Even though the code doesn't care
--how the initial positional parameters are set, the programmer is
--forced to learn what the defaults are, and specify them.
--
--Worse, if it turns out in the future that it would make more sense
--to change the default behaviour of the first parameter (for example,
--to avoid a security vulnerability), all existing code will remain
--hard-wired to the wrong defaults.
--
--Finally, a series of numeric parameters are much less self-documenting
--in terms of communicating to the reader what the code is doing. Named
--parameters do not have this problem.
--
--In the traditional API, C<mkpath> takes three arguments:
--
--=over 4
--
--=item *
--
--The name of the path to create, or a reference to a list of paths
--to create,
-+=item rmtree( $dir )
-
--=item *
-+=item rmtree( $dir, $verbose, $safe )
-
--a boolean value, which if TRUE will cause C<mkpath> to print the
--name of each directory as it is created (defaults to FALSE), and
-+=item rmtree( [$dir1, $dir2,...], $verbose, $safe )
-
--=item *
-+=item rmtree( $dir1, $dir2,..., \%opt )
-
--the numeric mode to use when creating the directories (defaults to
--0777), to be modified by the current umask.
-+The rmtree() function provide the legacy interface of remove_tree()
-+with a different interpretation of the arguments passed. The behaviour
-+and return value of the function is otherwise identical to
-+remove_tree().
-
- =back
-
--It returns a list of all directories (including intermediates, determined
--using the Unix '/' separator) created. In scalar context it returns
--the number of directories created.
--
--If a system error prevents a directory from being created, then the
--C<mkpath> function throws a fatal error with C<Carp::croak>. This error
--can be trapped with an C<eval> block:
--
-- eval { mkpath($dir) };
-- if ($@) {
-- print "Couldn't create $dir: $@";
-- }
--
--In the traditional API, C<rmtree> takes three arguments:
-+=head2 ERROR HANDLING
-
- =over 4
-
--=item *
-+=item B<NOTE:>
-
--the root of the subtree to delete, or a reference to a list of
--roots. All of the files and directories below each root, as well
--as the roots themselves, will be deleted. If you want to keep
--the roots themselves, you must use the modern API.
--
--=item *
--
--a boolean value, which if TRUE will cause C<rmtree> to print a
--message each time it examines a file, giving the name of the file,
--and indicating whether it's using C<rmdir> or C<unlink> to remove
--it, or that it's skipping it. (defaults to FALSE)
--
--=item *
--
--a boolean value, which if TRUE will cause C<rmtree> to skip any
--files to which you do not have delete access (if running under VMS)
--or write access (if running under another OS). This will change
--in the future when a criterion for 'delete permission' under OSs
--other than VMS is settled. (defaults to FALSE)
-+The following error handling mechanism is considered
-+experimental and is subject to change pending feedback from
-+users.
-
=back
--It returns the number of files, directories and symlinks successfully
--deleted. Symlinks are simply deleted and not followed.
--
--Note also that the occurrence of errors in C<rmtree> using the
--traditional interface can be determined I<only> by trapping diagnostic
--messages using C<$SIG{__WARN__}>; it is not apparent from the return
--value. (The modern interface may use the C<error> parameter to
--record any problems encountered).
--
--=head2 ERROR HANDLING
--
--If C<mkpath> or C<rmtree> encounter an error, a diagnostic message
--will be printed to C<STDERR> via C<carp> (for non-fatal errors),
--or via C<croak> (for fatal errors).
-+If C<make_path> or C<remove_tree> encounter an error, a diagnostic
-+message will be printed to C<STDERR> via C<carp> (for non-fatal
-+errors), or via C<croak> (for fatal errors).
-
- If this behaviour is not desirable, the C<error> attribute may be
- used to hold a reference to a variable, which will be used to store
--the diagnostics. The result is a reference to a list of hash
--references. For each hash reference, the key is the name of the
--file, and the value is the error message (usually the contents of
--C<$!>). An example usage looks like:
--
-- rmpath( 'foo/bar', 'bar/rat', {error => \my $err} );
-- for my $diag (@$err) {
-- my ($file, $message) = each %$diag;
-- print "problem unlinking $file: $message\n";
-+the diagnostics. The variable is made a reference to an array of hash
-+references. Each hash contain a single key/value pair where the key
-+is the name of the file, and the value is the error message (including
-+the contents of C<$!> when appropriate). If a general error is
-+encountered the diagnostic key will be empty.
-+
-+An example usage looks like:
-+
-+ remove_tree( 'foo/bar', 'bar/rat', {error => \my $err} );
-+ if (@$err) {
-+ for my $diag (@$err) {
-+ my ($file, $message) = %$diag;
-+ if ($file eq '') {
-+ print "general error: $message\n";
-+ }
-+ else {
-+ print "problem unlinking $file: $message\n";
-+ }
-+ }
- }
--
--If no errors are encountered, C<$err> will point to an empty list
--(thus there is no need to test for C<undef>). If a general error
--is encountered (for instance, C<rmtree> attempts to remove a directory
--tree that does not exist), the diagnostic key will be empty, only
--the value will be set:
--
-- rmpath( '/no/such/path', {error => \my $err} );
-- for my $diag (@$err) {
-- my ($file, $message) = each %$diag;
-- if ($file eq '') {
-- print "general error: $message\n";
-- }
-+ else {
-+ print "No error encountered\n";
- }
-
-+Note that if no errors are encountered, C<$err> will reference an
-+empty array. This means that C<$err> will always end up TRUE; so you
-+need to test C<@$err> to determine if errors occured.
-+
- =head2 NOTES
-
- C<File::Path> blindly exports C<mkpath> and C<rmtree> into the
-@@ -653,38 +633,18 @@
-
- use File::Path 'rmtree';
-
--=head3 HEURISTICS
-+The routines C<make_path> and C<remove_tree> are B<not> exported
-+by default. You must specify which ones you want to use.
-
--The functions detect (as far as possible) which way they are being
--called and will act appropriately. It is important to remember that
--the heuristic for detecting the old style is either the presence
--of an array reference, or two or three parameters total and second
--and third parameters are numeric. Hence...
-+ use File::Path 'remove_tree';
-
-- mkpath 486, 487, 488;
-+Note that a side-effect of the above is that C<mkpath> and C<rmtree>
-+are no longer exported at all. This is due to the way the C<Exporter>
-+module works. If you are migrating a codebase to use the new
-+interface, you will have to list everything explicitly. But that's
-+just good practice anyway.
-
--... will not assume the modern style and create three directories, rather
--it will create one directory verbosely, setting the permission to
--0750 (488 being the decimal equivalent of octal 750). Here, old
--style trumps new. It must, for backwards compatibility reasons.
--
--If you want to ensure there is absolutely no ambiguity about which
--way the function will behave, make sure the first parameter is a
--reference to a one-element list, to force the old style interpretation:
--
-- mkpath [486], 487, 488;
--
--and get only one directory created. Or add a reference to an empty
--parameter hash, to force the new style:
--
-- mkpath 486, 487, 488, {};
--
--... and hence create the three directories. If the empty hash
--reference seems a little strange to your eyes, or you suspect a
--subsequent programmer might I<helpfully> optimise it away, you
--can add a parameter set to a default value:
--
-- mkpath 486, 487, 488, {verbose => 0};
-+ use File::Path qw(remove_tree rmtree);
-
- =head3 SECURITY CONSIDERATIONS
-
-@@ -701,7 +661,7 @@
-
- Additionally, unless the C<safe> parameter is set (or the
- third parameter in the traditional interface is TRUE), should a
--C<rmtree> be interrupted, files that were originally in read-only
-+C<remove_tree> be interrupted, files that were originally in read-only
- mode may now have their permissions set to a read-write (or "delete
- OK") mode.
-
-@@ -723,43 +683,43 @@
-
- =item mkdir [path]: [errmsg] (SEVERE)
-
--C<mkpath> was unable to create the path. Probably some sort of
-+C<make_path> was unable to create the path. Probably some sort of
- permissions error at the point of departure, or insufficient resources
- (such as free inodes on Unix).
-
- =item No root path(s) specified
+ =item mkpath( $dir )
+@@ -672,6 +734,17 @@
--C<mkpath> was not given any paths to create. This message is only
-+C<make_path> was not given any paths to create. This message is only
- emitted if the routine is called with the traditional interface.
- The modern interface will remain silent if given nothing to do.
+ use File::Path qw(remove_tree rmtree);
- =item No such file or directory
-
--On Windows, if C<mkpath> gives you this warning, it may mean that
-+On Windows, if C<make_path> gives you this warning, it may mean that
- you have exceeded your filesystem's maximum path length.
-
- =item cannot fetch initial working directory: [errmsg]
-
--C<rmtree> attempted to determine the initial directory by calling
-+C<remove_tree> attempted to determine the initial directory by calling
- C<Cwd::getcwd>, but the call failed for some reason. No attempt
- will be made to delete anything.
-
- =item cannot stat initial working directory: [errmsg]
-
--C<rmtree> attempted to stat the initial directory (after having
-+C<remove_tree> attempted to stat the initial directory (after having
- successfully obtained its name via C<getcwd>), however, the call
- failed for some reason. No attempt will be made to delete anything.
-
- =item cannot chdir to [dir]: [errmsg]
-
--C<rmtree> attempted to set the working directory in order to
-+C<remove_tree> attempted to set the working directory in order to
- begin deleting the objects therein, but was unsuccessful. This is
- usually a permissions issue. The routine will continue to delete
- other things, but this directory will be left intact.
-
--=item directory [dir] changed before chdir, expected dev=[n] inode=[n], actual dev=[n] ino=[n], aborting. (FATAL)
-+=item directory [dir] changed before chdir, expected dev=[n] ino=[n], actual dev=[n] ino=[n], aborting. (FATAL)
-
--C<rmtree> recorded the device and inode of a directory, and then
-+C<remove_tree> recorded the device and inode of a directory, and then
- moved into it. It then performed a C<stat> on the current directory
- and detected that the device and inode were no longer the same. As
- this is at the heart of the race condition problem, the program
-@@ -767,14 +727,14 @@
-
- =item cannot make directory [dir] read+writeable: [errmsg]
-
--C<rmtree> attempted to change the permissions on the current directory
-+C<remove_tree> attempted to change the permissions on the current directory
- to ensure that subsequent unlinkings would not run into problems,
- but was unable to do so. The permissions remain as they were, and
- the program will carry on, doing the best it can.
-
- =item cannot read [dir]: [errmsg]
-
--C<rmtree> tried to read the contents of the directory in order
-+C<remove_tree> tried to read the contents of the directory in order
- to acquire the names of the directory entries to be unlinked, but
- was unsuccessful. This is usually a permissions issue. The
- program will continue, but the files in this directory will remain
-@@ -782,61 +742,70 @@
-
- =item cannot reset chmod [dir]: [errmsg]
-
--C<rmtree>, after having deleted everything in a directory, attempted
-+C<remove_tree>, after having deleted everything in a directory, attempted
- to restore its permissions to the original state but failed. The
- directory may wind up being left behind.
-
-+=item cannot remove [dir] when cwd is [dir]
++=head3 API CHANGES
+
-+The current working directory of the program is F</some/path/to/here>
-+and you are attempting to remove an ancestor, such as F</some/path>.
-+The directory tree is left untouched.
++The API was changed in the 2.0 branch. For a time, C<mkpath> and
++C<rmtree> tried, unsuccessfully, to deal with the two different
++calling mechanisms. This approach was considered a failure.
+
-+The solution is to C<chdir> out of the child directory to a place
-+outside the directory tree to be removed.
++The new semantics are now only available with C<make_path> and
++C<remove_tree>. The old semantics are only available through
++C<mkpath> and C<rmtree>. Users are strongly encouraged to upgrade
++to at least 2.08 in order to avoid surprises.
+
- =item cannot chdir to [parent-dir] from [child-dir]: [errmsg], aborting. (FATAL)
-
--C<rmtree>, after having deleted everything and restored the permissions
--of a directory, was unable to chdir back to the parent. This is usually
--a sign that something evil this way comes.
-+C<remove_tree>, after having deleted everything and restored the permissions
-+of a directory, was unable to chdir back to the parent. The program
-+halts to avoid a race condition from occurring.
-
- =item cannot stat prior working directory [dir]: [errmsg], aborting. (FATAL)
-
--C<rmtree> was unable to stat the parent directory after have returned
-+C<remove_tree> was unable to stat the parent directory after have returned
- from the child. Since there is no way of knowing if we returned to
- where we think we should be (by comparing device and inode) the only
- way out is to C<croak>.
-
--=item previous directory [parent-dir] changed before entering [child-dir], expected dev=[n] inode=[n], actual dev=[n] ino=[n], aborting. (FATAL)
-+=item previous directory [parent-dir] changed before entering [child-dir], expected dev=[n] ino=[n], actual dev=[n] ino=[n], aborting. (FATAL)
-
--When C<rmtree> returned from deleting files in a child directory, a
-+When C<remove_tree> returned from deleting files in a child directory, a
- check revealed that the parent directory it returned to wasn't the one
- it started out from. This is considered a sign of malicious activity.
-
- =item cannot make directory [dir] writeable: [errmsg]
-
- Just before removing a directory (after having successfully removed
--everything it contained), C<rmtree> attempted to set the permissions
-+everything it contained), C<remove_tree> attempted to set the permissions
- on the directory to ensure it could be removed and failed. Program
- execution continues, but the directory may possibly not be deleted.
-
- =item cannot remove directory [dir]: [errmsg]
-
--C<rmtree> attempted to remove a directory, but failed. This may because
-+C<remove_tree> attempted to remove a directory, but failed. This may because
- some objects that were unable to be removed remain in the directory, or
- a permissions issue. The directory will be left behind.
-
- =item cannot restore permissions of [dir] to [0nnn]: [errmsg]
-
--After having failed to remove a directory, C<rmtree> was unable to
-+After having failed to remove a directory, C<remove_tree> was unable to
- restore its permissions from a permissive state back to a possibly
- more restrictive setting. (Permissions given in octal).
-
- =item cannot make file [file] writeable: [errmsg]
-
--C<rmtree> attempted to force the permissions of a file to ensure it
-+C<remove_tree> attempted to force the permissions of a file to ensure it
- could be deleted, but failed to do so. It will, however, still attempt
- to unlink the file.
-
- =item cannot unlink file [file]: [errmsg]
-
--C<rmtree> failed to remove a file. Probably a permissions issue.
-+C<remove_tree> failed to remove a file. Probably a permissions issue.
-
- =item cannot restore permissions of [file] to [0nnn]: [errmsg]
+ =head3 SECURITY CONSIDERATIONS
--After having failed to remove a file, C<rmtree> was also unable
-+After having failed to remove a file, C<remove_tree> was also unable
+ 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).
-@@ -879,16 +848,18 @@
- That code was used as a basis for the current code. Their efforts
- are greatly appreciated.
-
-+Gisle Aas made a number of improvements to the documentation for
-+2.07 and his advice and assistance is also greatly appreciated.
-+
- =head1 AUTHORS
-
--Tim Bunce <F<Tim.Bunce at ig.co.uk>> and Charles Bailey
--<F<bailey at newman.upenn.edu>>. Currently maintained by David Landgren
-+Tim Bunce and Charles Bailey. Currently maintained by David Landgren
- <F<david at landgren.net>>.
++=item unable to map [owner] to a uid, ownership not changed");
++
++C<make_path> was instructed to give the ownership of created
++directories to the symbolic name [owner], but C<getpwnam> 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<make_path> was instructed to give the group ownership of created
++directories to the symbolic name [group], but C<getgrnam> 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-2007. All rights reserved.
-+David Landgren 1995-2008. All rights reserved.
+-David Landgren 1995-2008. All rights reserved.
++David Landgren 1995-2009. All rights reserved.
=head1 LICENSE
-diff -urN perl-5.10.0.orig/lib/File/Path.t perl-5.10.0/lib/File/Path.t
---- perl-5.10.0.orig/lib/File/Path.t 2007-12-18 11:47:07.000000000 +0100
-+++ perl-5.10.0/lib/File/Path.t 2009-02-17 14:53:32.000000000 +0100
-@@ -2,17 +2,19 @@
+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 => 99;
-+use Test::More tests => 114;
-+use Config;
+-use Test::More tests => 121;
++use Test::More tests => 129;
+ use Config;
BEGIN {
-- use_ok('File::Path');
-+ use_ok('Cwd');
-+ use_ok('File::Path', qw(rmtree mkpath make_path remove_tree));
- use_ok('File::Spec::Functions');
- }
-
- eval "use Test::Output";
- my $has_Test_Output = $@ ? 0 : 1;
+@@ -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 $Is_VMS = $^O eq 'VMS';
-+my $Is_VMS = $^O eq 'VMS';
+ my ($list, $err);
+ $dir = catdir( 'EXTRA', '1' );
+@@ -434,6 +434,78 @@
+ }
- # first check for stupid permissions second for full, so we clean up
- # behind ourselves
-@@ -45,7 +47,7 @@
- );
-
- # create them
--my @created = mkpath(@dir);
-+my @created = mkpath([@dir]);
-
- is(scalar(@created), 7, "created list of directories");
-
-@@ -79,18 +81,98 @@
- my $dir;
- my $dir2;
-
-+sub gisle {
-+ # background info: @_ = 1; !shift # gives '' not 0
-+ # Message-Id: <3C820CE6-4400-4E91-AF43-A3D19B356E68 at activestate.com>
-+ # http://www.nntp.perl.org/group/perl.perl5.porters/2008/05/msg136625.html
-+ mkpath(shift, !shift, 0755);
-+}
-+
-+sub count {
-+ opendir D, shift or return -1;
-+ my $count = () = readdir D;
-+ closedir D or return -1;
-+ return $count;
-+}
-+
-+{
-+ mkdir 'solo', 0755;
-+ chdir 'solo';
-+ open my $f, '>', 'foo.dat';
-+ close $f;
-+ my $before = count(curdir());
-+ cmp_ok($before, '>', 0, "baseline $before");
-+
-+ gisle('1st', 1);
-+ is(count(curdir()), $before + 1, "first after $before");
-+
-+ $before = count(curdir());
-+ gisle('2nd', 1);
-+ is(count(curdir()), $before + 1, "second after $before");
-+
-+ chdir updir();
-+ rmtree 'solo';
-+}
-+
-+{
-+ mkdir 'solo', 0755;
-+ chdir 'solo';
-+ open my $f, '>', 'foo.dat';
-+ close $f;
-+ my $before = count(curdir());
-+ cmp_ok($before, '>', 0, "ARGV $before");
-+ {
-+ local @ARGV = (1);
-+ mkpath('3rd', !shift, 0755);
+ 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];
++ }
+ }
-+ is(count(curdir()), $before + 1, "third after $before");
++ skip 'getpwent() appears to be insane', $skip_count
++ unless $max_uid > 0;
+
-+ $before = count(curdir());
-+ {
-+ local @ARGV = (1);
-+ mkpath('4th', !shift, 0755);
++ # 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];
++ }
+ }
-+ is(count(curdir()), $before + 1, "fourth after $before");
-+
-+ chdir updir();
-+ rmtree 'solo';
-+}
++ skip 'getgrent() appears to be insane', $skip_count
++ unless $max_gid > 0;
+
- SKIP: {
-- $dir = catdir($tmp_base, 'B');
-- $dir2 = catdir($dir, updir());
-- # IOW: File::Spec->catdir( qw(foo bar), File::Spec->updir ) eq 'foo'
-- # rather than foo/bar/..
-- skip "updir() canonicalises path on this platform", 2
-- if $dir2 eq $tmp_base
-- or $^O eq 'cygwin';
--
-- @created = mkpath($dir2, {mask => 0700});
-- is(scalar(@created), 1, "make directory with trailing parent segment");
-- is($created[0], $dir, "made parent");
-+ # tests for rmtree() of ancestor directory
-+ my $nr_tests = 6;
-+ my $cwd = getcwd() or skip "failed to getcwd: $!", $nr_tests;
-+ my $dir = catdir($cwd, 'remove');
-+ my $dir2 = catdir($cwd, 'remove', 'this', 'dir');
-+
-+ skip "failed to mkpath '$dir2': $!", $nr_tests
-+ unless mkpath($dir2, {verbose => 0});
-+ skip "failed to chdir dir '$dir2': $!", $nr_tests
-+ unless chdir($dir2);
-+
-+ rmtree($dir, {error => \$error});
-+ my $nr_err = @$error;
-+ is($nr_err, 1, "ancestor error");
-+
-+ if ($nr_err) {
-+ my ($file, $message) = each %{$error->[0]};
-+ is($file, $dir, "ancestor named");
-+ my $ortho_dir = $^O eq 'MSWin32' ? File::Path::_slash_lc($dir2) : $dir2;
-+ $^O eq 'MSWin32' and $message
-+ =~ s/\A(cannot remove path when cwd is )(.*)\Z/$1 . File::Path::_slash_lc($2)/e;
-+ is($message, "cannot remove path when cwd is $ortho_dir", "ancestor reason");
-+ ok(-d $dir2, "child not removed");
-+ ok(-d $dir, "ancestor not removed");
-+ }
-+ else {
-+ fail( "ancestor 1");
-+ fail( "ancestor 2");
-+ fail( "ancestor 3");
-+ fail( "ancestor 4");
++ $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..."
++ );
+ }
-+ chdir $cwd;
-+ rmtree($dir);
-+ ok(!(-d $dir), "ancestor now removed");
- };
-
- my $count = rmtree({error => \$error});
-@@ -104,7 +186,7 @@
- $dir = catdir($tmp_base,'C');
- # mkpath returns unix syntax filespecs on VMS
- $dir = VMS::Filespec::unixify($dir) if $Is_VMS;
-- at created = mkpath($tmp_base, $dir);
-+ at created = make_path($tmp_base, $dir);
- is(scalar(@created), 1, "created directory (new style 1)");
- is($created[0], $dir, "created directory (new style 1) cross-check");
-
-@@ -115,7 +197,7 @@
- $dir2 = catdir($tmp_base,'D');
- # mkpath returns unix syntax filespecs on VMS
- $dir2 = VMS::Filespec::unixify($dir2) if $Is_VMS;
-- at created = mkpath($tmp_base, $dir, $dir2);
-+ at created = make_path($tmp_base, $dir, $dir2);
- is(scalar(@created), 1, "created directory (new style 2)");
- is($created[0], $dir2, "created directory (new style 2) cross-check");
-
-@@ -123,8 +205,7 @@
- is($count, 1, "removed directory unsafe mode");
-
- $count = rmtree($dir2, 0, 1);
--my $removed = $Is_VMS ? 0 : 1;
--is($count, $removed, "removed directory safe mode");
-+is($count, 1, "removed directory safe mode");
-
- # mkdir foo ./E/../Y
- # Y should exist
-@@ -135,7 +216,7 @@
- cmp_ok(scalar(@created), '<=', 2, "made less than two dirs because of ..");
- ok( -d catdir($tmp_base, 'Y'), "directory after parent" );
-
-- at created = mkpath(catdir(curdir(), $tmp_base));
-+ at created = make_path(catdir(curdir(), $tmp_base));
- is(scalar(@created), 0, "nothing created")
- or diag(@created);
-
-@@ -195,22 +276,22 @@
- $dir = catdir('a', 'd1');
- $dir2 = catdir('a', 'd2');
-
-- at created = mkpath( $dir, 0, $dir2 );
-+ at created = make_path( $dir, 0, $dir2 );
- is(scalar @created, 3, 'new-style 3 dirs created');
-
--$count = rmtree( $dir, 0, $dir2, );
-+$count = remove_tree( $dir, 0, $dir2, );
- is($count, 3, 'new-style 3 dirs removed');
-
-- at created = mkpath( $dir, $dir2, 1 );
-+ at created = make_path( $dir, $dir2, 1 );
- is(scalar @created, 3, 'new-style 3 dirs created (redux)');
-
--$count = rmtree( $dir, $dir2, 1 );
-+$count = remove_tree( $dir, $dir2, 1 );
- is($count, 3, 'new-style 3 dirs removed (redux)');
-
-- at created = mkpath( $dir, $dir2 );
-+ at created = make_path( $dir, $dir2 );
- is(scalar @created, 2, 'new-style 2 dirs created');
-
--$count = rmtree( $dir, $dir2 );
-+$count = remove_tree( $dir, $dir2 );
- is($count, 2, 'new-style 2 dirs removed');
-
- if (chdir updir()) {
-@@ -220,6 +301,43 @@
- fail("chdir parent: $!");
- }
-
-+SKIP: {
-+ # 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'};
-+ $dir = 'bug487319';
-+ $dir2 = 'bug487319-symlink';
-+ @created = make_path($dir, {mask => 0700});
-+ is(scalar @created, 1, 'bug 487319 setup');
-+ symlink($dir, $dir2);
-+ ok(-e $dir2, "debian bug 487319 setup symlink") or diag($dir2);
-+
-+ chmod 0500, $dir;
-+ my $mask_initial = (stat $dir)[2];
-+ remove_tree($dir2);
-+
-+ my $mask = (stat $dir)[2];
-+ is( $mask, $mask_initial, 'mask of symlink target dir unchanged (debian bug 487319)');
-+
-+ # now try a file
-+ my $file = catfile($dir, 'file');
-+ open my $out, '>', $file;
-+ close $out;
-+
-+ chmod 0500, $file;
-+ $mask_initial = (stat $file)[2];
-+
-+ my $file2 = catfile($dir, 'symlink');
-+ symlink($file, $file2);
-+ remove_tree($file2);
-+
-+ $mask = (stat $file)[2];
-+ is( $mask, $mask_initial, 'mask of symlink target file unchanged (debian bug 487319)');
-+
-+ remove_tree($dir);
+}
+
- # see what happens if a file exists where we want a directory
- SKIP: {
- my $entry = catdir($tmp_base, "file");
-@@ -245,6 +363,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'};
-
- my ($list, $err);
- $dir = catdir( 'EXTRA', '1' );
-@@ -355,8 +474,8 @@
- "rmtree of empty dir carps sensibly"
- );
-
-- stderr_is( sub { mkpath() }, '', "mkpath no args does not carp" );
-- stderr_is( sub { rmtree() }, '', "rmtree no args does not carp" );
-+ stderr_is( sub { make_path() }, '', "make_path no args does not carp" );
-+ stderr_is( sub { remove_tree() }, '', "remove_tree no args does not carp" );
++SKIP: {
+ skip 'Test::Output not available', 14
+ unless $has_Test_Output;
- stdout_is(
- sub {@created = mkpath($dir, 1)},
+@@ -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');
+ }
perl-update-Module-Build.patch:
MANIFEST | 1
lib/Module/Build.pm | 2
lib/Module/Build/API.pod | 23 +-
lib/Module/Build/Base.pm | 158 +++++++++++++-------
lib/Module/Build/Changes | 45 +++++
lib/Module/Build/Compat.pm | 6
lib/Module/Build/Config.pm | 2
lib/Module/Build/Cookbook.pm | 2
lib/Module/Build/Dumper.pm | 2
lib/Module/Build/ModuleInfo.pm | 2
lib/Module/Build/Notes.pm | 2
lib/Module/Build/PPMMaker.pm | 3
lib/Module/Build/Platform/Amiga.pm | 2
lib/Module/Build/Platform/Default.pm | 2
lib/Module/Build/Platform/EBCDIC.pm | 2
lib/Module/Build/Platform/MPEiX.pm | 2
lib/Module/Build/Platform/MacOS.pm | 2
lib/Module/Build/Platform/RiscOS.pm | 2
lib/Module/Build/Platform/Unix.pm | 2
lib/Module/Build/Platform/VMS.pm | 2
lib/Module/Build/Platform/VOS.pm | 2
lib/Module/Build/Platform/Windows.pm | 2
lib/Module/Build/Platform/aix.pm | 2
lib/Module/Build/Platform/cygwin.pm | 2
lib/Module/Build/Platform/darwin.pm | 2
lib/Module/Build/Platform/os2.pm | 2
lib/Module/Build/PodParser.pm | 2
lib/Module/Build/t/PL_files.t | 2
lib/Module/Build/t/add_property.t | 2
lib/Module/Build/t/compat.t | 54 ++++---
lib/Module/Build/t/debug.t | 8 -
lib/Module/Build/t/destinations.t | 3
lib/Module/Build/t/help.t | 4
lib/Module/Build/t/install_extra_target.t | 137 +++++++++++++++++
lib/Module/Build/t/lib/DistGen.pm | 215 ++++++++++++++++++++++------
lib/Module/Build/t/lib/MBTest.pm | 19 ++
lib/Module/Build/t/metadata.t | 5
lib/Module/Build/t/metadata2.t | 2
lib/Module/Build/t/runthrough.t | 27 ---
lib/Module/Build/t/script_dist.t | 1
lib/Module/Build/t/tilde.t | 8 -
lib/Module/Build/t/write_default_maniskip.t | 5
lib/Module/Build/t/xs.t | 9 -
43 files changed, 580 insertions(+), 199 deletions(-)
View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.1 -r 1.2 perl-update-Module-Build.patchIndex: perl-update-Module-Build.patch
===================================================================
RCS file: /cvs/extras/rpms/perl/devel/perl-update-Module-Build.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- perl-update-Module-Build.patch 11 Mar 2009 21:12:37 -0000 1.1
+++ perl-update-Module-Build.patch 3 Dec 2009 11:37:17 -0000 1.2
@@ -1,5715 +1,1541 @@
-Module-Build-0.32
-perl-5.10.0 contained some fixes in the Module::Build testsuite; all
-these have been integrated to Module-Build-0.31012
+Module-Build-0.35
---- perl-5.10.0.orig/MANIFEST 2009-02-20 18:22:32.000000000 +0100
-+++ perl-5.10.0/MANIFEST 2009-03-10 17:07:04.000000000 +0100
-@@ -2156,8 +2156,10 @@
- lib/Module/Build/PodParser.pm Module::Build
- lib/Module/Build/PPMMaker.pm Module::Build
- lib/Module/Build/scripts/config_data Module::Build
-+lib/Module/Build/t/add_property.t Module::Build
- lib/Module/Build/t/basic.t Module::Build
- lib/Module/Build/t/bundled/Tie/CPHash.pm Module::Build.pm
-+lib/Module/Build/t/compat/exit.t Module::Build
- lib/Module/Build/t/compat.t Module::Build
- lib/Module/Build/t/destinations.t Module::Build
- lib/Module/Build/t/extend.t Module::Build
-@@ -2178,9 +2180,12 @@
- lib/Module/Build/t/pod_parser.t Module::Build
- lib/Module/Build/t/ppm.t Module::Build
- lib/Module/Build/t/runthrough.t Module::Build
-+lib/Module/Build/t/script_dist.t Module::Build
-+lib/Module/Build/t/test_file_exts.t Module::Build
- lib/Module/Build/t/test_types.t Module::Build
- lib/Module/Build/t/test_type.t Module::Build
- lib/Module/Build/t/tilde.t Module::Build
-+lib/Module/Build/t/use_tap_harness.t Module::Build
- lib/Module/Build/t/versions.t Module::Build
- lib/Module/Build/t/xs.t Module::Build
- lib/Module/Build/Version.pm Module::Build
-diff -urN perl-5.10.0.orig/lib/Module/Build/API.pod perl-5.10.0/lib/Module/Build/API.pod
---- perl-5.10.0.orig/lib/Module/Build/API.pod 2009-02-20 18:22:32.000000000 +0100
-+++ perl-5.10.0/lib/Module/Build/API.pod 2009-03-10 16:49:12.000000000 +0100
-@@ -211,12 +211,12 @@
-
- [version 0.20]
-
--This should be a short description of the distribution. This is used
--when generating metadata for F<META.yml> and PPD files. If it is not
--given then C<Module::Build> looks in the POD of the module from which
--it gets the distribution's version. It looks for the first line
--matching C<$package\s-\s(.+)>, and uses the captured text as the
--abstract.
-+This should be a short description of the distribution. This is used when
-+generating metadata for F<META.yml> and PPD files. If it is not given
-+then C<Module::Build> looks in the POD of the module from which it gets
-+the distribution's version. If it finds a POD section marked "=head1
-+NAME", then it looks for the first line matching C<\s+-\s+(.+)>,
-+and uses the captured text as the abstract.
-
- =item dist_author
-
-@@ -268,6 +268,10 @@
- this process, so there's no real opportunity to change to something
- better.
-
-+If the target file of L</dist_version_from> contains more than one package
-+declaration, the version returned will be the one matching the configured
-+L</module_name>.
-+
- =item dynamic_config
-
- [version 0.07]
-@@ -502,16 +506,16 @@
- sync with your written documentation if you ever change your licensing
- terms.
-
-+You may also use a license type of C<unknown> if you don't wish to
-+specify your terms in the metadata.
-+
- It is a fatal error to use a license other than the ones mentioned
- above. This is not because I wish to impose licensing terms on you -
- please let me know if you would like another license option to be
--added to the list. You may also use a license type of C<unknown> if
--you don't wish to specify your terms (but this is usually not a good
--idea for you to do!).
--
--I just started out with a small set of licenses to keep things simple,
--figuring I'd let people with actual working knowledge in this area
--tell me what to do. So if that's you, drop me a line.
-+added to the list. I just started out with a small set of licenses to
-+keep things simple, figuring I'd let people with actual working
-+knowledge in this area tell me what to do. So if that's you, drop me
-+a line.
-
- =item meta_add
-
-@@ -683,13 +687,13 @@
-
- An optional parameter specifying a set of files that should be
- installed as executable Perl scripts when the module is installed.
--May be given as an array reference of the files, or as a hash
--reference whose keys are the files (and whose values will currently be
--ignored).
-+May be given as an array reference of the files, as a hash reference
-+whose keys are the files (and whose values will currently be ignored),
-+as a string giving the name of a directory in which to find scripts,
-+or as a string giving the name of a single script file.
-
--The default is to install no script files - in other words, there is
--no default location where Module::Build will look for script files to
--install.
-+The default is to install any scripts found in a F<bin> directory at
-+the top level of the distribution.
-
- For backward compatibility, you may use the parameter C<scripts>
- instead of C<script_files>. Please consider this usage deprecated,
-@@ -725,6 +729,26 @@
- property is true, then the C<t/> directory will be scanned recursively
- for C<*.t> files.
-
-+=item use_tap_harness
-+
-+[version 0.2808_03]
-+
-+An optional parameter indicating whether or not to use TAP::Harness for
-+testing rather than Test::Harness. Defaults to false. If set to true, you must
-+therefore be sure to add TAP::Harness as a requirement for your module in
-+L</build_requires>. Implicitly set to a true value if C<tap_harness_args> is
-+specified.
-+
-+=item tap_harness_args
-+
-+[version 0.2808_03]
-+
-+An optional parameter specifying parameters to be passed to TAP::Harness when
-+running tests. Must be given as a hash reference of parameters; see the
-+L<TAP::Harness|TAP::Harness> documentation for details. Note that specifying
-+this parameter will implicitly set C<use_tap_harness> to a true value. You
-+must therefore be sure to add TAP::Harness as a requirement for your module in
-+L</build_requires>.
-
- =item xs_files
-
-@@ -771,6 +795,86 @@
- defaults to C<MyModuleBuilder>. The C<code> parameter specifies Perl
- code to use as the body of the subclass.
-
-+=item add_property
-+
-+[version 0.31]
-+
-+ package 'My::Build';
-+ use base 'Module::Build';
-+ __PACKAGE__->add_property( 'pedantic' );
-+ __PACKAGE__->add_property( answer => 42 );
-+ __PACKAGE__->add_property(
-+ 'epoch',
-+ default => sub { time },
-+ check => sub {
-+ return 1 if /^\d+$/;
-+ shift->property_error( "'$_' is not an epoch time" );
-+ return 0;
-+ },
-+ );
-+
-+Adds a property to a Module::Build class. Properties are those attributes of a
-+Module::Build object which can be passed to the constructor and which have
-+accessors to get and set them. All of the core properties, such as
-+C<module_name> and C<license>, are defined using this class method.
-+
-+The first argument to C<add_property()> is always the name of the property.
-+The second argument can be either a default value for the property, or a list
-+of key/value pairs. The supported keys are:
-+
-+=over
-+
-+=item C<default>
-+
-+The default value. May optionally be specified as a code reference, in which
-+case the return value from the execution of the code reference will be used.
-+If you need the default to be a code reference, just use a code reference to
-+return it, e.g.:
-+
-+ default => sub { sub { ... } },
-+
-+=item C<check>
-+
-+A code reference that checks that a value specified for the property is valid.
-+During the execution of the code reference, the new value will be included in
-+the C<$_> variable. If the value is correct, the C<check> code reference
-+should return true. If the value is not correct, it sends an error message to
-+C<property_error()> and returns false.
-+
-+=back
-+
-+When this method is called, a new property will be installed in the
-+Module::Build class, and an accessor will be built to allow the property to be
-+get or set on the build object.
-+
[...6637 lines suppressed...]
+ use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib';
+ use MBTest 'no_plan';
++use DistGen;
++use Cwd;
- $mb = Module::Build->new_from_context;
- is $@, '';
-@@ -129,7 +129,6 @@
- is $@, '';
+ use_ok 'Module::Build';
+ ensure_blib 'Module::Build';
- # cleanup
--chdir( $cwd ) or die "Can''t chdir to '$cwd': $!";
- $dist->remove;
+ {
++ 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;
-@@ -208,7 +207,7 @@
- ---
++my $tmp;
++
+ {
+- my ($have_c_compiler, $C_support_feature) = check_compiler();
++ my ($have_c_compiler, $C_support_feature, $tmp_exec) = check_compiler();
- $dist->regen;
--chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!";
-+$dist->chdir_in;
+ 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 @@
- $mb = Module::Build->new_from_context;
-@@ -224,8 +223,4 @@
- is $@, '';
+ #########################
- # cleanup
--chdir( $cwd ) or die "Can''t chdir to '$cwd': $!";
- $dist->remove;
-
--use File::Path;
--rmtree( $tmp );
-diff -urN perl-5.10.0.orig/lib/Module/Build.pm perl-5.10.0/lib/Module/Build.pm
---- perl-5.10.0.orig/lib/Module/Build.pm 2009-02-20 18:22:32.000000000 +0100
-+++ perl-5.10.0/lib/Module/Build.pm 2009-03-10 16:49:12.000000000 +0100
+-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.2808_01';
-+$VERSION = '0.32';
+-$VERSION = '0.340201';
++$VERSION = '0.35';
$VERSION = eval $VERSION;
# Okay, this is the brute-force method of finding out what kind of
-@@ -30,15 +30,18 @@
- dynixptx Unix
- freebsd Unix
- linux Unix
-+ haiku Unix
- hpux Unix
- irix Unix
- darwin Unix
- machten Unix
- midnightbsd Unix
-+ mirbsd Unix
- next Unix
- openbsd Unix
- netbsd Unix
- dec_osf Unix
-+ nto Unix
- svr4 Unix
- svr5 Unix
- sco_sv Unix
-@@ -49,7 +52,9 @@
- cygwin Unix
- os2 Unix
- interix Unix
--
-+ gnu Unix
-+ gnukfreebsd Unix
-+
- dos Windows
- MSWin32 Windows
-
-@@ -156,11 +161,11 @@
- 'actions'. In this case the actions run are 'build' (the default
- action), 'test', and 'install'. Other actions defined so far include:
-
-- build manifest
-- clean manpages
-- code pardist
-- config_data ppd
-- diff ppmdist
-+ build manpages
-+ clean pardist
-+ code ppd
-+ config_data ppmdist
-+ diff prereq_data
- dist prereq_report
- distcheck pure_install
- distclean realclean
-@@ -173,6 +178,7 @@
- help testpod
- html testpodcoverage
- install versioninstall
-+ manifest
-
-
- You can run the 'help' action for a complete list of actions.
-@@ -508,6 +514,14 @@
- output, so you can supply C<tar> and/or C<gzip> parameters to affect
- the result.
-
-+=item prereq_data
-+
-+[version 0.32]
-+
-+This action prints out a Perl data structure of all prerequsites and the versions
-+required. The output can be loaded again using C<eval()>. This can be useful for
-+external tools that wish to query a Build script for prerequisites.
-+
- =item prereq_report
-
- [version 0.28]
-@@ -557,10 +571,10 @@
-
- [version 0.01]
-
--This will use C<Test::Harness> to run any regression tests and report
--their results. Tests can be defined in the standard places: a file
--called C<test.pl> in the top-level directory, or several files ending
--with C<.t> in a C<t/> directory.
-+This will use C<Test::Harness> or C<TAP::Harness> to run any regression
-+tests and report their results. Tests can be defined in the standard
-+places: a file called C<test.pl> in the top-level directory, or several
-+files ending with C<.t> in a C<t/> directory.
-
- If you want tests to be 'verbose', i.e. show details of test execution
- rather than just summary information, pass the argument C<verbose=1>.
-@@ -568,6 +582,14 @@
- If you want to run tests under the perl debugger, pass the argument
- C<debugger=1>.
-
-+If you want to have Module::Build find test files with different file
-+name extensions, pass the C<test_file_exts> argument with an array
-+of extensions, such as C<[qw( .t .s .z )]>.
-+
-+If you want test to be run by C<TAP::Harness>, rather than C<Test::Harness>,
-+pass the argument C<tap_harness_args> as an array reference of arguments to
-+pass to the TAP::Harness constructor.
-+
- In addition, if a file called C<visual.pl> exists in the top-level
- directory, this file will be executed as a Perl script and its output
- will be shown to the user. This is a good place to put speed tests or
-@@ -611,7 +633,7 @@
- ...
- test_types => {
- special => '.st',
-- author => '.at',
-+ author => ['.at', '.pt' ],
- },
- ...
-
Index: perl.spec
===================================================================
RCS file: /cvs/extras/rpms/perl/devel/perl.spec,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -p -r1.237 -r1.238
--- perl.spec 1 Dec 2009 15:14:56 -0000 1.237
+++ perl.spec 3 Dec 2009 11:37:17 -0000 1.238
@@ -1,4 +1,4 @@
-%define perl_version 5.10.0
+%define perl_version 5.10.1
%define perl_epoch 4
%define perl_arch_stem -thread-multi
%define perl_archname %{_arch}-%{_os}%{perl_arch_stem}
@@ -7,7 +7,7 @@
Name: perl
Version: %{perl_version}
-Release: 87%{?dist}
+Release: 100%{?dist}
Epoch: %{perl_epoch}
Summary: Practical Extraction and Report Language
Group: Development/Languages
@@ -15,16 +15,16 @@ Group: Development/Languages
# we have to reflect that in the sub-package containing them.
License: (GPL+ or Artistic) and (GPLv2+ or Artistic)
Url: http://www.perl.org/
-Source0: http://search.cpan.org/CPAN/authors/id/R/RG/RGARCIA/perl-%{perl_version}.tar.gz
+Source0: http://www.cpan.org/src/5.0/perl-%{perl_version}.tar.bz2
Source11: filter-requires.sh
Source12: perl-5.8.0-libnet.cfg
Source13: macros.perl
# Specific to Fedora/RHEL
-Patch1: perl-5.8.0-root.patch
+Patch1: perl-suid-noroot.patch
# Removes date check, Fedora/RHEL specific
-Patch2: perl-5.10.0-perlbug-tag.patch
+Patch2: perl-perlbug-tag.patch
# work around annoying rpath issue
# This is only relevant for Fedora, as it is unlikely
@@ -39,7 +39,7 @@ Patch6: perl-5.10.0-libresolv.pa
# FIXME: May need the "Fedora" references removed before upstreaming
# patches ExtUtils-MakeMaker
-Patch7: perl-5.10.0-USE_MM_LD_RUN_PATH.patch
+Patch7: perl-USE_MM_LD_RUN_PATH.patch
# Skip hostname tests, since hostname lookup isn't available in Fedora
# buildroots by design.
@@ -51,211 +51,110 @@ Patch8: perl-5.10.0-disable_test
# systems.
Patch10: perl-5.10.0-x86_64-io-test-failure.patch
-# http://public.activestate.com/cgi-bin/perlbrowse/p/32891
-Patch11: 32891.patch
-
-# Problem with assertion - add upstream patch
-Patch15: perl-5.10.0-bz448392.patch
-
-# Wrong access test
-Patch16: perl-5.10.0-accessXOK.patch
-
-# fix function pos to handle unicode correctly
-Patch20: perl-5.10.0-pos.patch
-
-# Fix crash when localizing a symtab entry rt#52740
-Patch26: perl-5.10.0-stlocal.patch
-
-# Change 33640: More diagnostics for Fatal.pm, version bumps for all non-dual life modules affected
-# http://www.nntp.perl.org/group/perl.perl5.changes/2008/04/msg21478.html
-Patch28: perl-5.10.0-Change33640.patch
-
-# Change 33881: (33825) Add SEEK_CUR, SEEK_END, SEEK_SET to list of constants POSIX imports from Fcntl
-# (33826) Remove POSIX's internal implementation of S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISREG, pull from Fcntl
-# (33829) Fix typo
-# http://www.nntp.perl.org/group/perl.perl5.changes/2008/05/msg21717.html
-Patch29: perl-5.10.0-Change33881.patch
-
-# Change 33896: Eliminate POSIX::int_macro_int, and all the complex AUTOLOAD fandango
-# http://www.nntp.perl.org/group/perl.perl5.changes/2008/05/msg21732.html
-Patch30: perl-5.10.0-Change33896.patch
-
-# Change 33897: Replaced the WEXITSTATUS, WIFEXITED, WIFSIGNALED, WIFSTOPPED, WSTOPSIG
-# http://www.nntp.perl.org/group/perl.perl5.changes/2008/05/msg21733.html
-Patch31: perl-5.10.0-Change33897.patch
-
-Patch33: perl-5.10.0-PerlIO-via-change34025.patch
-
-# Change 34507: Fix memory leak in single-char character class optimization
-Patch34: perl-5.10.0-Change34507.patch
-
# Reorder @INC: Based on: http://github.com/rafl/perl/commit/b9ba2fadb18b54e35e5de54f945111a56cbcb249
Patch35: perl-5.10.0-reorderINC.patch
-# Fix from Archive::Extract maintainer to only look at stdout
-# We need this because we're using tar >= 1.21
-# included upstream in 0.31_03
-Patch36: perl-5.10.0-Archive-Extract-onlystdout.patch
-
-# Do not distort lib/CGI/t/util-58.t
-# http://rt.perl.org/rt3/Ticket/Display.html?id=64502
-Patch37: perl-CGI-t-util-58.patch
-
-### Debian Patches ###
-
-# Fix issue with (nested) definition lists in lib/Pod/Html.pm
-# Upstream change 32727
-Patch40: 02_fix_pod2html_dl
-
-# Fix NULLOK items
-# Upstream change 33287
-Patch41: 07_fix_nullok
-
-# Fix a typo in the predefined common protocols to make "udp" resolve without netbase
-# Upstream change 33554
-Patch42: 08_fix_udp_typo
-
-# Fix a segmentation fault with 'debugperl -Dm'.
-# Upstream change 33388
-Patch43: 09_fix_memory_debugging
-
-# Allow the quote mark delimiter also for those #include directives chased with "h2ph -a".
-# Also add the directory prefix of the current file when the quote syntax is used;
-# 'require' will only look in @INC, not the current directory.
-# Upstream change 33835
-Patch44: 10_fix_h2ph_include_quote
-
-# Disable the "v-string in use/require is non-portable" warning.
-# Upstream change 32910
-Patch45: 11_disable_vstring_warning
-
-# Fix a segmentation fault occurring in the mod_perl2 test suite.
-# Upstream change 33807
-Patch46: 15_fix_local_symtab
-
-# Fix the PerlIO_teardown prototype to suppress a compiler warning.
-# Upstream change 33370
-Patch47: 16_fix_perlio_teardown_prototype
-
-# Remove numeric overloading of Getopt::Long callback functions.
-# Dual-lived module, fixed on the CPAN side in 2.37_01.
-Patch48: 17_fix_getopt_long_callback
-
-# Fix Math::BigFloat::sqrt() breaking with too many digits.
-# Upstream change 33821
-Patch49: 18_fix_bigint_floats
-
-# Fix memory corruption with in-place sorting.
-# Upstream change 33937
-Patch50: 28_fix_inplace_sort
-
-# Revert an incorrect substitution optimization introduced in 5.10.0.
-# Bug introduced by upstream change 26334, reverted with change 33685 in blead and 33732 in maint-5.10.
-Patch51: 30_fix_freetmps
-
-# Fix 'Unknown error' messages with attribute.pm.
-# Upstream change 33265
-Patch52: 31_fix_attributes_unknown_error
-
-# Stop t/op/fork.t relying on rand().
-# Upstream change 33749
-Patch53: 32_fix_fork_rand
-
-# Fix memory leak with qr//.
-# Adapted from upstream change 34506.
-Patch54: 34_fix_qr-memory-leak-2
-
-# CVE-2005-0448 revisited: File::Path::rmtree no longer allows creating of setuid files.
-# We have 2.07, but it is still missing one fix (the debian patch has two fixes, but one is in 2.07)
-Patch55: perl-5.10.0-fix_file_path_rmtree_setuid.patch
-
-# Fix $? when dumping core.
-Patch56: 37_fix_coredump_indicator
-
-# Fix a memory leak with Scalar::Util::weaken().
-# Upstream change 34209
-Patch57: 38_fix_weaken_memleak
-
-### End of Debian Patches ###
-
# http://rt.perl.org/rt3/Ticket/Display.html?id=39060 (#221113)
Patch58: perl-perlio-incorrect-errno.patch
-# h2ph: generated *.ph files no longer produce warnings when processed
-Patch59: perl-bz509676.patch
-
-# With the Scalar-List-Utils update, more prereq declarations have to
-# be skipped in Makefile.PL files.
-Patch60: perl-skip-prereq.patch
-
# much better swap logic to support reentrancy and fix assert failure
# http://perl5.git.perl.org/perl.git/commitdiff/e9105d30edfbaa7f444bc7984c9bafc8e991ad12
# RT #60508
-Patch61: perl-5.10.0-much-better-swap-logic.patch
+Patch61: perl-much-better-swap-logic.patch
+
+# temporarily export debug symbols even though DEBUGGING is not set:
+Patch62: perl-add-symbols.patch
+
+# version macros for some of the modules:
+%define Archive_Extract_version 0.34
+%define Archive_Tar_version 1.52
+%define File_Fetch_version 0.20
+%define File_Temp_version 0.22
+%define IPC_Cmd_version 0.46
+%define Module_CoreList_version 2.18
+%define Module_Load_Conditional_version 0.30
+%define Pod_Simple_version 3.07
+%define Test_Harness_version 3.17
+%define Test_Simple_version 0.92
+%define Digest_SHA_version 5.47
+# has to be 3.x0, not 3.x
+%define Module_Pluggable_version 3.90
# Update some of the bundled modules
# see http://fedoraproject.org/wiki/Perl/perl.spec for instructions
+# FIXME: predelej na update 0.2602 -> 0.27
+Patch104: perl-update-ExtUtils-CBuilder.patch
+%define ExtUtils_CBuilder_version 0.27
+# FIXME: predelej na update 2.07_03 -> 2.08
+Patch106: perl-update-File-Path.patch
+%define File_Path_version 2.08
+# FIXME: update 340201 -> 0.35
+Patch109: perl-update-Module-Build.patch
+%define Module_Build_real_version 0.35
+# For Module-Build-0.x, the second component has to have four digits.
+%define Module_Build_rpm_version 0.3500
+
+#---
+# FIXME; is 2.18->2.21, should be 2.20->2.21
+# - was 2.21 previously; but it is not a subpackage, can wait
+Patch123: perl-update-Storable.patch
+%define Storable_version 2.20
+
+#---
+#could be 1.19
Patch100: perl-update-constant.patch
%define constant_version 1.17
+# could be 0.36
Patch101: perl-update-Archive-Extract.patch
-%define Archive_Extract_version 0.30
+# could be 1.54
Patch102: perl-update-Archive-Tar.patch
-%define Archive_Tar_version 1.46
+# could be 3.43->3.48
Patch103: perl-update-CGI.patch
-%define CGI_version 3.43
-Patch104: perl-update-ExtUtils-CBuilder.patch
-%define ExtUtils_CBuilder_version 0.24
+# could be 0.22
Patch105: perl-update-File-Fetch.patch
-%define File_Fetch_version 0.18
-Patch106: perl-update-File-Path.patch
-%define File_Path_version 2.07
Patch107: perl-update-File-Temp.patch
-%define File_Temp_version 0.21
+# could be 0.54
Patch108: perl-update-IPC-Cmd.patch
-%define IPC_Cmd_version 0.42
-Patch109: perl-update-Module-Build.patch
-%define Module_Build_real_version 0.32
-# For Module-Build-0.x, the second component has to have four digits.
-%define Module_Build_rpm_version 0.3200
+# could be 2.23
Patch110: perl-update-Module-CoreList.patch
-%define Module_CoreList_version 2.17
+# could be 0.34
Patch111: perl-update-Module-Load-Conditional.patch
-%define Module_Load_Conditional_version 0.30
+# could be 3.10
Patch112: perl-update-Pod-Simple.patch
-%define Pod_Simple_version 3.07
Patch113: perl-update-Sys-Syslog.patch
%define Sys_Syslog_version 0.27
Patch114: perl-update-Test-Harness.patch
-%define Test_Harness_version 3.16
+# could be 0.94
Patch115: perl-update-Test-Simple.patch
-%define Test_Simple_version 0.92
Patch116: perl-update-Time-HiRes.patch
%define Time_HiRes_version 1.9719
Patch117: perl-update-Digest-SHA.patch
-%define Digest_SHA_version 5.47
# includes Fatal.pm
Patch118: perl-update-autodie.patch
%define autodie_version 1.999
# cpan has it under PathTools-3.30
+# could be 3.31
Patch119: perl-update-FileSpec.patch
%define File_Spec_version 3.30
+# FIXME should be 2.023, to preserve upgrade path
Patch120: perl-update-Compress-Raw-Zlib.patch
-%define Compress_Raw_Zlib_version 2.023
+%define Compress_Raw_Zlib_version 2.020
+# could be 1.22
Patch121: perl-update-Scalar-List-Utils.patch
%define Scalar_List_Utils 1.21
Patch122: perl-update-Module-Pluggable.patch
-%define Module_Pluggable_version 3.90
-# Also fixes segfault when objects are reblessed (rt#33242, rhbz#459918)
-Patch123: perl-update-Storable.patch
-%define Storable_version 2.21
+
+# could be 2.023
Patch124: perl-update-IO-Compress-Base.patch
-%define IO_Compress_Base_version 2.015
+%define IO_Compress_Base_version 2.020
+# could be 2.023
Patch125: perl-update-IO-Compress-Zlib.patch
-%define IO_Compress_Zlib_version 2.015
+%define IO_Compress_Zlib_version 2.020
+#... also update version number of Compress::Zlib
+
+# and also ExtUtils-ParseXS 2.2002 -> 2.21
+
-# Fedora uses links instead of lynx
-# patches File-Fetch and CPAN
-Patch201: perl-5.10.0-links.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: tcsh, dos2unix, man, groff
@@ -270,6 +169,8 @@ Provides: perl(VMS::Filespec)
Provides: perl(VMS::Stdio)
# Compat provides
+Provides: perl(:MODULE_COMPAT_5.10.1)
+# during the transition period, provide also this:
Provides: perl(:MODULE_COMPAT_5.10.0)
# Threading provides
@@ -440,7 +341,7 @@ Summary: A module providing Perl
Group: Development/Libraries
License: GPL+ or Artistic
Epoch: 0
-Version: 2.008
+Version: 2.020
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
%description Compress-Zlib
@@ -458,7 +359,7 @@ Summary: Query, download and buil
Group: Development/Languages
License: GPL+ or Artistic
Epoch: 0
-Version: 1.9205
+Version: 1.9402
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
Provides: cpan = %{version}
@@ -471,7 +372,7 @@ Summary: API & CLI access to the
Group: Development/Libraries
License: GPL+ or Artistic
Epoch: 0
-Version: 0.84
+Version: 0.88
Requires: perl(Module::Pluggable) >= 2.4
Requires: perl(Module::CoreList)
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
@@ -534,8 +435,8 @@ Summary: Create a module Makefile
Group: Development/Languages
License: GPL+ or Artistic
Epoch: 0
-# It's really 6.36_01, but we drop the _01.
-Version: 6.36
+# It's really 6.55_02, but we drop the _02.
+Version: 6.55
Requires: perl-devel
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
Requires: perl(Test::Harness)
@@ -550,8 +451,8 @@ Group: Development/Libraries
License: GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch: 1
-# It's really 2.18_02, but we drop the _02.
-Version: 2.18
+# It's really 2.2002, but we drop the 02.
+Version: 2.20
Requires: perl-devel
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
@@ -609,7 +510,7 @@ Group: Development/Libraries
License: GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch: 1
-Version: 1.07
+Version: 1.09
Requires: perl(Compress::Zlib)
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
@@ -655,7 +556,7 @@ Group: Development/Libraries
License: GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch: 1
-Version: 0.01
+Version: 0.02
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
# Add a versioned provides, since we pull the unversioned one out.
Provides: perl(Log::Message::Handlers) = %{version}
@@ -727,7 +628,7 @@ Group: Development/Libraries
License: GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch: 1
-Version: 0.12
+Version: 0.16
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
%description Module-Load
@@ -755,7 +656,7 @@ Group: Development/Libraries
License: GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch: 1
-Version: 0.01
+Version: 0.02
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
%description Module-Loaded
@@ -787,7 +688,7 @@ Group: Development/Libraries
License: GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch: 1
-Version: 0.32
+Version: 0.34
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
%description Object-Accessor
@@ -802,7 +703,7 @@ Group: Development/Libraries
License: GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch: 1
-Version: 0.01
+Version: 0.02
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
%description Package-Constants
@@ -859,7 +760,7 @@ Summary: Term::ReadLine UI made e
Group: Development/Libraries
License: GPL+ or Artistic
Epoch: 0
-Version: 0.18
+Version: 0.20
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
Requires: perl(Log::Message::Simple)
@@ -900,7 +801,7 @@ Summary: Time objects from localt
Group: Development/Libraries
License: GPL+ or Artistic
Epoch: 0
-Version: 1.12
+Version: 1.15
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
%description Time-Piece
@@ -916,7 +817,7 @@ Group: Development/Libraries
License: GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch: 3
-Version: 0.74
+Version: 0.77
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
%description version
@@ -970,84 +871,45 @@ upstream tarball from perl.org.
%patch7 -p1
%patch8 -p1
%patch10 -p1
-%patch11 -p1
-%patch15 -p1
-%patch16 -p1
-%patch20 -p1
-%patch26 -p1
-%patch28 -p1
-%patch29 -p1
-%patch30 -p1
-%patch31 -p1
-%patch33 -p1
-%patch34 -p1
%patch35 -p1
-%patch36 -p1
-%patch37 -p1
-### Debian patches ###
-%patch40 -p1
-%patch41 -p1
-%patch42 -p1
-%patch43 -p1
-%patch44 -p1
-%patch45 -p1
-%patch46 -p1
-%patch47 -p1
-%patch48 -p1
-%patch49 -p1
-%patch50 -p1
-%patch51 -p1
-%patch52 -p1
-%patch53 -p1
-%patch54 -p1
-%patch55 -p1
-%patch56 -p1
-%patch57 -p1
%patch58 -p1
-%patch59 -p1
-%patch60 -p1
%patch61 -p1
+%patch62 -p1
-%patch100 -p1
-%patch101 -p1
-%patch102 -p1
-%patch103 -p1
+#patch100 -p1
+#patch101 -p1
+#patch102 -p1
+#patch103 -p1
%patch104 -p1
-%patch105 -p1
+#patch105 -p1
%patch106 -p1
-%patch107 -p1
-%patch108 -p1
+#patch107 -p1
+#patch108 -p1
%patch109 -p1
-%patch110 -p1
-%patch111 -p1
-%patch112 -p1
-%patch113 -p1
-%patch114 -p1
-%patch115 -p1
-%patch116 -p1
-%patch117 -p1
-%patch118 -p1
-%patch119 -p1
-%patch120 -p1
-%patch121 -p1
-%patch122 -p1
-# 0-byte files and patch don't seem to agree
-mkdir t/Module_Pluggable/lib/Zot/
-touch t/Module_Pluggable/lib/Zot/.Zork.pm
-%patch123 -p1
-%patch124 -p1
-%patch125 -p1
-
-
-%patch201 -p1
+#patch110 -p1
+#patch111 -p1
+#patch112 -p1
+#patch113 -p1
+#patch114 -p1
+#patch115 -p1
+#patch116 -p1
+#patch117 -p1
+#patch118 -p1
+#patch119 -p1
+#patch120 -p1
+#patch121 -p1
+#patch122 -p1
+#patch123 -p1
+#patch124 -p1
+#patch125 -p1
#
# Candidates for doc recoding (need case by case review):
# find . -name "*.pod" -o -name "README*" -o -name "*.pm" | xargs file -i | grep charset= | grep -v '\(us-ascii\|utf-8\)'
recode()
{
- iconv -f "$2" -t utf-8 < "$1" > "${1}_"
+ iconv -f "${2:-iso-8859-1}" -t utf-8 < "$1" > "${1}_"
touch -r "$1" "${1}_"
mv -f "${1}_" "$1"
}
@@ -1055,17 +917,13 @@ recode README.cn euc-cn
recode README.jp euc-jp
recode README.ko euc-kr
recode README.tw big5
-recode pod/perlebcdic.pod iso-8859-1
-recode pod/perlhack.pod iso-8859-1
-recode pod/perlhist.pod iso-8859-1
-recode pod/perlothrtut.pod iso-8859-1
-recode pod/perlthrtut.pod iso-8859-1
-recode lib/Unicode/Collate.pm iso-8859-1
-for i in Changes*; do
- recode $i iso-8859-1
-done
-recode AUTHORS iso-8859-1
-
+recode pod/perlebcdic.pod
+recode pod/perlhack.pod
+recode pod/perlhist.pod
+recode pod/perlothrtut.pod
+recode pod/perlthrtut.pod
+recode lib/Unicode/Collate.pm
+recode AUTHORS
find . -name \*.orig -exec rm -fv {} \;
@@ -1091,9 +949,10 @@ EOF
chmod +x %{__perl_provides}
# Configure Compress::Zlib to use system zlib
-sed -i "s|BUILD_ZLIB = True|BUILD_ZLIB = False|" ext/Compress/Raw/Zlib/config.in
-sed -i "s|INCLUDE = ./zlib-src|INCLUDE = %{_includedir}|" ext/Compress/Raw/Zlib/config.in
-sed -i "s|LIB = ./zlib-src|LIB = %{_libdir}|" ext/Compress/Raw/Zlib/config.in
+sed -i 's|BUILD_ZLIB = True|BUILD_ZLIB = False|
+ s|INCLUDE = ./zlib-src|INCLUDE = %{_includedir}|
+ s|LIB = ./zlib-src|LIB = %{_libdir}|' \
+ ext/Compress-Raw-Zlib/config.in
%build
echo "RPM Build arch: %{_arch}"
@@ -1101,7 +960,19 @@ echo "RPM Build arch: %{_arch}"
# use "lib", not %{_lib}, for privlib, sitelib, and vendorlib
# To build production version, we would need -DDEBUGGING=-g
+# transition period:
+%define old_sitearch %{_prefix}/local/%{_lib}/perl5/site_perl/5.10.0/%{perl_archname}
+%define old_sitelib %{_prefix}/local/lib/perl5/site_perl/5.10.0
+%define old_vendorarch %{_libdir}/perl5/vendor_perl/5.10.0/%{perl_archname}
+# for a reason that is not clear, the version component got stripped here:
+%define old_vendorlib %{_prefix}/lib/perl5/vendor_perl
+# No need to add old privdir and archdir to otherlibdirs.
+
+%define privlib %{_prefix}/share/perl5
+%define archlib %{_libdir}/perl5
+
/bin/sh Configure -des -Doptimize="$RPM_OPT_FLAGS" \
+ -DDEBUGGING=-g \
-Accflags="-DPERL_USE_SAFE_PUTENV" \
-Dversion=%{perl_version} \
-Dmyhostname=localhost \
@@ -1111,13 +982,23 @@ echo "RPM Build arch: %{_arch}"
-Dprefix=%{_prefix} \
-Dvendorprefix=%{_prefix} \
-Dsiteprefix=%{_prefix}/local \
+ -Dsitelib="%{_prefix}/local/share/perl5" \
+ -Dsitearch="%{_prefix}/local/%{_lib}/perl5" \
+ -Dprivlib="%{privlib}" \
+ -Dvendorlib="%{privlib}" \
+ -Darchlib="%{archlib}" \
+ -Dvendorarch="%{archlib}" \
+%if 0
-Dprivlib="%{_prefix}/lib/perl5/%{perl_version}" \
-Dsitelib="%{_prefix}/local/lib/perl5/site_perl/%{perl_version}" \
-Dvendorlib="%{_prefix}/lib/perl5/vendor_perl/%{perl_version}" \
-Darchlib="%{_libdir}/perl5/%{perl_version}/%{perl_archname}" \
-Dsitearch="%{_prefix}/local/%{_lib}/perl5/site_perl/%{perl_version}/%{perl_archname}" \
-Dvendorarch="%{_libdir}/perl5/vendor_perl/%{perl_version}/%{perl_archname}" \
- -Dinc_version_list=none \
+%endif
+%if 1
+ -Dinc_version_list="5.10.0" \
+%endif
-Darchname=%{perl_archname} \
%ifarch %{multilib_64_archs}
-Dlibpth="/usr/local/lib64 /lib64 %{_prefix}/lib64" \
@@ -1146,7 +1027,11 @@ echo "RPM Build arch: %{_arch}"
-Ud_endprotoent_r_proto -Ud_setprotoent_r_proto \
-Ud_endservent_r_proto -Ud_setservent_r_proto \
-Dscriptdir='%{_bindir}' \
- -Dotherlibdirs=/usr/lib/perl5/site_perl
+ -Dotherlibdirs="%{old_sitearch}:%{old_sitelib}:%{old_vendorarch}:%{old_vendorlib}:/usr/lib/perl5/site_perl"
+
+# this is promised to stay forever:
+# -Dotherlibdirs=%{prefix}/lib/perl5/site_perl
+
%ifarch sparc64
make
@@ -1158,49 +1043,34 @@ make %{?_smp_mflags}
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
-%define new_perl_lib $RPM_BUILD_ROOT%{_libdir}/perl5/%{version}
-%define comp_perl_lib $RPM_BUILD_ROOT%{_prefix}/lib/perl5/%{version}
-%define new_arch_lib $RPM_BUILD_ROOT%{_libdir}/perl5/%{version}/%{perl_archname}
-%define new_vendor_lib $RPM_BUILD_ROOT%{_libdir}/perl5/vendor_perl/%{version}
-%define comp_vendor_lib $RPM_BUILD_ROOT%{_prefix}/lib/perl5/vendor_perl/%{version}
-%define new_perl_flags LD_PRELOAD=%{new_arch_lib}/CORE/libperl.so LD_LIBRARY_PATH=%{new_arch_lib}/CORE PERL5LIB=%{new_perl_lib}:%{comp_perl_lib}
-%define new_perl %{new_perl_flags} $RPM_BUILD_ROOT%{_bindir}/perl
+%define build_archlib $RPM_BUILD_ROOT%{archlib}
+%define build_privlib $RPM_BUILD_ROOT%{privlib}
+%define build_bindir $RPM_BUILD_ROOT%{_bindir}
+%define new_perl LD_PRELOAD="%{build_archlib}/CORE/libperl.so" \\\
+ LD_LIBRARY_PATH="%{build_archlib}/CORE" \\\
+ PERL5LIB="%{build_archlib}:%{build_privlib}" \\\
+ %{build_bindir}/perl
+
+# perl doesn't create the auto subdirectory, but modules put things in it,
+# so we need to own it.
+mkdir -p -m 755 %{build_archlib}/auto
-# perl doesn't create this directory, but modules put things in it, so we need to own it.
-mkdir -p -m 755 %{new_vendor_lib}/%{perl_archname}/auto
+install -p -m 755 utils/pl2pm %{build_bindir}/pl2pm
-%ifarch %{multilib_64_archs}
-%ifarch x86_64
-%define arch32 i386
-%endif
-%ifarch s390x
-%define arch32 s390
-%endif
-%ifarch ppc64
-%define arch32 ppc
-%endif
-%ifarch sparc64
-%define arch32 sparc
-%endif
-mkdir -p -m 755 %{comp_perl_lib} %{comp_vendor_lib}{,/%{arch32}-%{_os}%{perl_arch_stem}/auto}
-%endif
-
-install -p -m 755 utils/pl2pm ${RPM_BUILD_ROOT}%{_bindir}/pl2pm
-
-for i in asm/termios.h syscall.h syslimits.h syslog.h sys/ioctl.h sys/socket.h sys/time.h wait.h
+for i in asm/termios.h syscall.h syslimits.h syslog.h \
+ sys/ioctl.h sys/socket.h sys/time.h wait.h
do
- %{new_perl} $RPM_BUILD_ROOT%{_bindir}/h2ph -a -d %{new_arch_lib} $i || /bin/true
+ %{new_perl} %{build_bindir}/h2ph -a -d %{build_archlib} $i || true
done
#
# libnet configuration file
#
-install -p -m 644 %{SOURCE12} %{comp_perl_lib}/Net/libnet.cfg
+install -p -m 644 %{SOURCE12} %{build_privlib}/Net/libnet.cfg
#
# perl RPM macros
#
-
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/rpm
install -p -m 644 %{SOURCE13} ${RPM_BUILD_ROOT}%{_sysconfdir}/rpm/
@@ -1208,47 +1078,40 @@ install -p -m 644 %{SOURCE13} ${RPM_BUIL
# Core modules removal
#
find $RPM_BUILD_ROOT -name '*NDBM*' | xargs rm -rfv
-
find $RPM_BUILD_ROOT -type f -name '*.bs' -empty | xargs rm -f
-# Install sample cgi scripts (this used to happen automatically?)
-mkdir -p %{comp_perl_lib}/CGI/eg/
-cp -a lib/CGI/eg/* %{comp_perl_lib}/CGI/eg/
-
-# Cleanup binary paths and make cgi files executable
-pushd %{comp_perl_lib}/CGI/eg/
- for i in *.cgi make_links.pl RunMeFirst ; do
- sed -i 's|%{_prefix}/local/bin/perl|%{_bindir}/perl|g' $i
- chmod +x $i
- done
+# Install sample cgi scripts (this used to happen automatically?),
+# cleanup binary paths and make cgi files executable
+cgidir=%{build_privlib}/CGI/eg/
+mkdir -p $cgidir
+cp -a lib/CGI/eg/* $cgidir
+pushd $cgidir
+ cgifiles='*.cgi make_links.pl RunMeFirst'
+ sed -i 's|/usr/local/bin/perl|%{_bindir}/perl|g' $cgifiles
+ chmod +x $cgifiles
popd
-# miniperl? As an interpreter? How odd.
-sed -i 's|./miniperl|%{_bindir}/perl|' %{comp_perl_lib}/ExtUtils/xsubpp
-chmod +x %{comp_perl_lib}/ExtUtils/xsubpp
+chmod -R u+w $RPM_BUILD_ROOT/*
+
+# miniperl? As an interpreter? How odd. Anyway, a symlink does it:
+rm %{build_privlib}/ExtUtils/xsubpp
+ln -s ../../../bin/xsubpp %{build_privlib}/ExtUtils/
# Don't need the .packlist
-rm -f %{new_arch_lib}/.packlist
+rm %{build_archlib}/.packlist
# Fix some manpages to be UTF-8
pushd $RPM_BUILD_ROOT%{_mandir}/man1/
for i in perl588delta.1 perldelta.1 ; do
iconv -f MS-ANSI -t UTF-8 $i --output new-$i
- rm -rf $i
+ rm $i
mv new-$i $i
done
popd
-chmod -R u+w $RPM_BUILD_ROOT/*
-
-# Compress Changes* to save space
-bzip2 -9 Changes*
-echo "The Changes* files were moved to %{_docdir}/%{name}-devel*" \
- > Changes-moved-to-perl-devel
-
# Local patch tracking
-cd $RPM_BUILD_ROOT%{_libdir}/perl5/%{perl_version}/%{perl_archname}/CORE/
-perl -x patchlevel.h \
+pushd %{build_archlib}/CORE/
+%{new_perl} -x patchlevel.h \
'Fedora Patch1: Permit suidperl to install as nonroot' \
'Fedora Patch2: Removes date check, Fedora/RHEL specific' \
%ifnarch sparc64 \
@@ -1261,42 +1124,15 @@ perl -x patchlevel.h \
'Fedora Patch7: USE_MM_LD_RUN_PATH' \
'Fedora Patch8: Skip hostname tests, due to builders not being network capable' \
'Fedora Patch10: Dont run one io test due to random builder failures' \
- '32891 fix big slowdown in 5.10 @_ parameter passing' \
- 'Fedora Patch15: Adopt upstream commit for assertion' \
- 'Fedora Patch16: Access permission - rt49003' \
- 'Fedora Patch20: pos function handle unicode correct' \
- 'Fedora Patch26: Fix crash when localizing a symtab entry - rt52740' \
- '33640 Integrate Changes 33399, 33621, 33622, 33623, 33624' \
- '33881 Integrate Changes 33825, 33826, 33829' \
- '33896 Eliminate POSIX::int_macro_int, and all the complex AUTOLOAD fandango' \
- '33897 Replaced the WEXITSTATUS, WIFEXITED, WIFSIGNALED, WIFSTOPPED, WSTOPSIG' \
- '54934 Change 34025 refcount of the globs generated by PerlIO::via balanced' \
- '34507 Fix memory leak in single-char character class optimization' \
'Fedora Patch35: Reorder @INC, based on b9ba2fadb18b54e35e5de54f945111a56cbcb249' \
- 'Fedora Patch36: Fix from Archive::Extract maintainer to only look at stdout from tar' \
- 'Fedora Patch37: Do not distort lib/CGI/t/util-58.t' \
- '32727 Fix issue with (nested) definition lists in lib/Pod/Html.pm' \
- '33287 Fix NULLOK items' \
- '33554 Fix a typo in the predefined common protocols to make _udp_ resolve without netbase' \
- '33388 Fix a segmentation fault with debugperl -Dm' \
- '33835 Allow the quote mark delimiter also for those #include directives chased with h2ph -a.' \
- '32910 Disable the v-string in use/require is non-portable warning.' \
- '33807 Fix a segmentation fault occurring in the mod_perl2 test suite.' \
- '33370 Fix the PerlIO_teardown prototype to suppress a compiler warning.' \
- 'Fedora Patch48: Remove numeric overloading of Getopt::Long callback functions.' \
- '33821 Fix Math::BigFloat::sqrt() breaking with too many digits.' \
- '33937 Fix memory corruption with in-place sorting' \
- '33732 Revert an incorrect substitution optimization introduced in 5.10.0' \
- '33265 Fix Unknown error messages with attribute.pm.' \
- '33749 Stop t/op/fork.t relying on rand()' \
- '34506 Fix memory leak with qr//' \
- 'Fedora Patch55: File::Path::rmtree no longer allows creating of setuid files.' \
- 'Fedora Patch56: Fix $? when dumping core' \
- '34209 Fix a memory leak with Scalar::Util::weaken()' \
- 'fix RT 39060, errno incorrectly set in perlio' \
- 'Fedora Patch59: h2ph: generated *.ph files no longer produce warnings when processed' \
- 'Fedora Patch60: remove PREREQ_FATAL from Makefile.PLs processed by miniperl' \
+ 'Fedora Patch58: fix RT 39060, errno incorrectly set in perlio' \
'Fedora Patch61: much better swap logic to support reentrancy and fix assert failure' \
+ 'Fedora Patch62: backward compatibility for the trasition' \
+ 'Fedora Patch104: Update ExtUtils::CBuilder to %{ExtUtils_CBuilder_version}' \
+ 'Fedora Patch106: Update File::Path to %{File_Path_version}' \
+ 'Fedora Patch109: Update Module::Build to %{Module_Build_version}' \
+
+: \
'Fedora Patch100: Update module constant to %{constant_version}' \
'Fedora Patch101: Update Archive::Extract to %{Archive_Extract_version}' \
'Fedora Patch102: Update Archive::Tar to %{Archive_Tar_version}' \
@@ -1323,10 +1159,14 @@ perl -x patchlevel.h \
'Fedora Patch123: Update Storable to %{Storable_version}' \
'Fedora Patch124: Update IO::Compress::Base to %{IO_Compress_Base_version}' \
'Fedora Patch125: Update IO::Compress::Zlib to %{IO_Compress_Zlib_version}' \
- 'Fedora Patch201: Fedora uses links instead of lynx' \
%{nil}
rm patchlevel.bak
+popd
+
+#FIXME: temporary compatibility hack: for perl(:MODULE_COMPAT_5.10.0)
+mkdir -p %{_libdir}/perl5/5.10.0/%{perl_archname}
+ln -s ../../CORE %{_libdir}/perl5/5.10.0/%{perl_archname}/CORE
%clean
rm -rf $RPM_BUILD_ROOT
@@ -1345,30 +1185,27 @@ TMPDIR="$PWD/tmp" make test
%files
%defattr(-,root,root,-)
-%doc Artistic AUTHORS Copying README
-%doc Changes-moved-to-perl-devel
+%doc Artistic AUTHORS Copying README Changes
%{_mandir}/man1/*.1*
%{_mandir}/man3/*.3*
%{_bindir}/*
-%{_libdir}/perl5/
-%ifarch %{multilib_64_archs}
-%{_prefix}/lib/perl5/
-%endif
+%{privlib}
+%{archlib}
# libs
-%exclude %{_libdir}/perl5/%{perl_version}/%{perl_archname}/CORE/libperl.so
+%exclude %{archlib}/CORE/libperl.so
# devel
%exclude %{_bindir}/enc2xs
%exclude %{_mandir}/man1/enc2xs*
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Encode/
+%exclude %{privlib}/Encode/
%exclude %{_bindir}/h2xs
%exclude %{_mandir}/man1/h2xs*
%exclude %{_bindir}/libnetcfg
%exclude %{_mandir}/man1/libnetcfg*
%exclude %{_bindir}/perlivp
%exclude %{_mandir}/man1/perlivp*
-%exclude %{_libdir}/perl5/%{perl_version}/%{perl_archname}/CORE/*.h
+%exclude %{archlib}/CORE/*.h
%exclude %{_bindir}/xsubpp
%exclude %{_mandir}/man1/xsubpp*
@@ -1377,22 +1214,22 @@ TMPDIR="$PWD/tmp" make test
%exclude %{_bindir}/sperl%{perl_version}
# Archive-Extract
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Archive/Extract.pm
+%exclude %{privlib}/Archive/Extract.pm
%exclude %{_mandir}/man3/Archive::Extract.3*
# Archive-Tar
%exclude %{_bindir}/ptar
%exclude %{_bindir}/ptardiff
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Archive/Tar/
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Archive/Tar.pm
+%exclude %{privlib}/Archive/Tar/
+%exclude %{privlib}/Archive/Tar.pm
%exclude %{_mandir}/man1/ptar.1*
%exclude %{_mandir}/man1/ptardiff.1*
%exclude %{_mandir}/man3/Archive::Tar*
# CPAN
%exclude %{_bindir}/cpan
-%exclude %{_prefix}/lib/perl5/%{perl_version}/CPAN/
-%exclude %{_prefix}/lib/perl5/%{perl_version}/CPAN.pm
+%exclude %{privlib}/CPAN/
+%exclude %{privlib}/CPAN.pm
%exclude %{_mandir}/man1/cpan.1*
%exclude %{_mandir}/man3/CPAN.*
%exclude %{_mandir}/man3/CPAN:*
@@ -1401,57 +1238,57 @@ TMPDIR="$PWD/tmp" make test
%exclude %{_bindir}/cpan2dist
%exclude %{_bindir}/cpanp
%exclude %{_bindir}/cpanp-run-perl
-%exclude %{_prefix}/lib/perl5/%{perl_version}/CPANPLUS/
-%exclude %{_prefix}/lib/perl5/%{perl_version}/CPANPLUS.pm
+%exclude %{privlib}/CPANPLUS/
+%exclude %{privlib}/CPANPLUS.pm
%exclude %{_mandir}/man1/cpan2dist.1*
%exclude %{_mandir}/man1/cpanp.1*
%exclude %{_mandir}/man3/CPANPLUS*
# Compress::Raw::Zlib
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/Compress
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/Compress/Raw/
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/auto/Compress
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/auto/Compress/Raw/
+%exclude %{archlib}/Compress
+%exclude %{archlib}/Compress/Raw/
+%exclude %{archlib}/auto/Compress
+%exclude %{archlib}/auto/Compress/Raw/
%exclude %{_mandir}/man3/Compress::Raw::Zlib*
# Compress::Zlib
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/Compress/Zlib.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/auto/Compress/Zlib/
+%exclude %{archlib}/Compress/Zlib.pm
+%exclude %{archlib}/auto/Compress/Zlib/
%exclude %{_mandir}/man3/Compress::Zlib*
# Digest::SHA
%exclude %{_bindir}/shasum
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/Digest/SHA.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/auto/Digest/SHA/
+%exclude %{archlib}/Digest/SHA.pm
+%exclude %{archlib}/auto/Digest/SHA/
%exclude %{_mandir}/man1/shasum.1*
%exclude %{_mandir}/man3/Digest::SHA.3*
# ExtUtils::CBuilder
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/CBuilder/
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/CBuilder.pm
+%exclude %{privlib}/ExtUtils/CBuilder/
+%exclude %{privlib}/ExtUtils/CBuilder.pm
%exclude %{_mandir}/man3/ExtUtils::CBuilder*
# ExtUtils::Embed
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Embed.pm
+%exclude %{privlib}/ExtUtils/Embed.pm
%exclude %{_mandir}/man3/ExtUtils::Embed*
# ExtUtils::MakeMaker
%exclude %{_bindir}/instmodsh
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Command/
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Install.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Installed.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Liblist/
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Liblist.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/MakeMaker/
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/MakeMaker.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/MANIFEST.SKIP
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/MM*.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/MY.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Manifest.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Mkbootstrap.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Mksymlists.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Packlist.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/testlib.pm
+%exclude %{privlib}/ExtUtils/Command/
+%exclude %{privlib}/ExtUtils/Install.pm
+%exclude %{privlib}/ExtUtils/Installed.pm
+%exclude %{privlib}/ExtUtils/Liblist/
+%exclude %{privlib}/ExtUtils/Liblist.pm
+%exclude %{privlib}/ExtUtils/MakeMaker/
+%exclude %{privlib}/ExtUtils/MakeMaker.pm
+%exclude %{privlib}/ExtUtils/MANIFEST.SKIP
+%exclude %{privlib}/ExtUtils/MM*.pm
+%exclude %{privlib}/ExtUtils/MY.pm
+%exclude %{privlib}/ExtUtils/Manifest.pm
+%exclude %{privlib}/ExtUtils/Mkbootstrap.pm
+%exclude %{privlib}/ExtUtils/Mksymlists.pm
+%exclude %{privlib}/ExtUtils/Packlist.pm
+%exclude %{privlib}/ExtUtils/testlib.pm
%exclude %{_mandir}/man1/instmodsh.1*
%exclude %{_mandir}/man3/ExtUtils::Command::MM*
%exclude %{_mandir}/man3/ExtUtils::Install.3*
@@ -1467,40 +1304,40 @@ TMPDIR="$PWD/tmp" make test
%exclude %{_mandir}/man3/ExtUtils::testlib.3*
# ExtUtils::ParseXS
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/ParseXS.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/ExtUtils/xsubpp
+%exclude %{privlib}/ExtUtils/ParseXS.pm
+%exclude %{privlib}/ExtUtils/xsubpp
%exclude %{_mandir}/man3/ExtUtils::ParseXS.3*
# File::Fetch
-%exclude %{_prefix}/lib/perl5/%{perl_version}/File/Fetch.pm
+%exclude %{privlib}/File/Fetch.pm
%exclude %{_mandir}/man3/File::Fetch.3*
# IO::Compress::Base
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/File/GlobMapper.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Base/
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Base.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/AnyUncompress.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/Base.pm
+%exclude %{archlib}/File/GlobMapper.pm
+%exclude %{archlib}/IO/Compress/Base/
+%exclude %{archlib}/IO/Compress/Base.pm
+%exclude %{archlib}/IO/Uncompress/AnyUncompress.pm
+%exclude %{archlib}/IO/Uncompress/Base.pm
%exclude %{_mandir}/man3/File::GlobMapper.*
%exclude %{_mandir}/man3/IO::Compress::Base.*
%exclude %{_mandir}/man3/IO::Uncompress::AnyUncompress.*
%exclude %{_mandir}/man3/IO::Uncompress::Base.*
# IO::Compress::Zlib
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Adapter/
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Deflate.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Gzip/
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Gzip.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/RawDeflate.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Zip/
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Zip.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Zlib/
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/Adapter/
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/AnyInflate.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/Gunzip.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/Inflate.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/RawInflate.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/Unzip.pm
+%exclude %{archlib}/IO/Compress/Adapter/
+%exclude %{archlib}/IO/Compress/Deflate.pm
+%exclude %{archlib}/IO/Compress/Gzip/
+%exclude %{archlib}/IO/Compress/Gzip.pm
+%exclude %{archlib}/IO/Compress/RawDeflate.pm
+%exclude %{archlib}/IO/Compress/Zip/
+%exclude %{archlib}/IO/Compress/Zip.pm
+%exclude %{archlib}/IO/Compress/Zlib/
+%exclude %{archlib}/IO/Uncompress/Adapter/
+%exclude %{archlib}/IO/Uncompress/AnyInflate.pm
+%exclude %{archlib}/IO/Uncompress/Gunzip.pm
+%exclude %{archlib}/IO/Uncompress/Inflate.pm
+%exclude %{archlib}/IO/Uncompress/RawInflate.pm
+%exclude %{archlib}/IO/Uncompress/Unzip.pm
%exclude %{_mandir}/man3/IO::Compress::Deflate*
%exclude %{_mandir}/man3/IO::Compress::Gzip*
%exclude %{_mandir}/man3/IO::Compress::RawDeflate*
@@ -1512,140 +1349,138 @@ TMPDIR="$PWD/tmp" make test
%exclude %{_mandir}/man3/IO::Uncompress::Unzip*
# IO::Zlib
-%exclude %{_prefix}/lib/perl5/%{perl_version}/IO/Zlib.pm
+%exclude %{privlib}/IO/Zlib.pm
%exclude %{_mandir}/man3/IO::Zlib.*
# IPC::Cmd
-%exclude %{_prefix}/lib/perl5/%{perl_version}/IPC/Cmd.pm
+%exclude %{privlib}/IPC/Cmd.pm
%exclude %{_mandir}/man3/IPC::Cmd.3*
# Locale::Maketext::Simple
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Locale/Maketext/Simple.pm
+%exclude %{privlib}/Locale/Maketext/Simple.pm
%exclude %{_mandir}/man3/Locale::Maketext::Simple.*
# Log::Message
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Log/Message.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Log/Message/Config.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Log/Message/Handlers.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Log/Message/Item.pm
+%exclude %{privlib}/Log/Message.pm
+%exclude %{privlib}/Log/Message/Config.pm
+%exclude %{privlib}/Log/Message/Handlers.pm
+%exclude %{privlib}/Log/Message/Item.pm
%exclude %{_mandir}/man3/Log::Message.3*
%exclude %{_mandir}/man3/Log::Message::Config.3*
%exclude %{_mandir}/man3/Log::Message::Handlers.3*
%exclude %{_mandir}/man3/Log::Message::Item.3*
# Log::Message::Simple
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Log/Message/Simple.pm
+%exclude %{privlib}/Log/Message/Simple.pm
%exclude %{_mandir}/man3/Log::Message::Simple.3*
# Module::Build
%exclude %{_bindir}/config_data
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Module/Build/
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Module/Build.pm
+%exclude %{privlib}/Module/Build/
+%exclude %{privlib}/Module/Build.pm
%exclude %{_mandir}/man1/config_data.1*
%exclude %{_mandir}/man3/Module::Build*
# Module-CoreList
%exclude %{_bindir}/corelist
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Module/CoreList.pm
+%exclude %{privlib}/Module/CoreList.pm
%exclude %{_mandir}/man1/corelist*
%exclude %{_mandir}/man3/Module::CoreList*
# Module-Load
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Module/Load.pm
+%exclude %{privlib}/Module/Load.pm
%exclude %{_mandir}/man3/Module::Load.*
# Module-Load-Conditional
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Module/Load/
+%exclude %{privlib}/Module/Load/
%exclude %{_mandir}/man3/Module::Load::Conditional*
# Module-Loaded
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Module/Loaded.pm
+%exclude %{privlib}/Module/Loaded.pm
%exclude %{_mandir}/man3/Module::Loaded*
# Module-Pluggable
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Devel/InnerPackage.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Module/Pluggable/
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Module/Pluggable.pm
+%exclude %{privlib}/Devel/InnerPackage.pm
+%exclude %{privlib}/Module/Pluggable/
+%exclude %{privlib}/Module/Pluggable.pm
%exclude %{_mandir}/man3/Devel::InnerPackage*
%exclude %{_mandir}/man3/Module::Pluggable*
# Object-Accessor
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Object/
+%exclude %{privlib}/Object/
%exclude %{_mandir}/man3/Object::Accessor*
# Package-Constants
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Package/
+%exclude %{privlib}/Package/
%exclude %{_mandir}/man3/Package::Constants*
# Params-Check
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Params/
+%exclude %{privlib}/Params/
%exclude %{_mandir}/man3/Params::Check*
# Pod-Escapes
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Pod/Escapes.pm
+%exclude %{privlib}/Pod/Escapes.pm
%exclude %{_mandir}/man3/Pod::Escapes.*
# Pod-Simple
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Pod/Simple/
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Pod/Simple.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Pod/Simple.pod
+%exclude %{privlib}/Pod/Simple/
+%exclude %{privlib}/Pod/Simple.pm
+%exclude %{privlib}/Pod/Simple.pod
%exclude %{_mandir}/man3/Pod::Simple*
# Term-UI
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Term/UI.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Term/UI/
+%exclude %{privlib}/Term/UI.pm
+%exclude %{privlib}/Term/UI/
%exclude %{_mandir}/man3/Term::UI*
# Test::Harness
%exclude %{_bindir}/prove
-%exclude %{_prefix}/lib/perl5/%{perl_version}/App*
-%exclude %{_prefix}/lib/perl5/%{perl_version}/TAP*
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Test/Harness*
+%exclude %{privlib}/App*
+%exclude %{privlib}/TAP*
+%exclude %{privlib}/Test/Harness*
%exclude %{_mandir}/man1/prove.1*
%exclude %{_mandir}/man3/App*
%exclude %{_mandir}/man3/TAP*
%exclude %{_mandir}/man3/Test::Harness*
# Test::Simple
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Test/More*
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Test/Builder*
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Test/Simple*
-%exclude %{_prefix}/lib/perl5/%{perl_version}/Test/Tutorial*
+%exclude %{privlib}/Test/More*
+%exclude %{privlib}/Test/Builder*
+%exclude %{privlib}/Test/Simple*
+%exclude %{privlib}/Test/Tutorial*
%exclude %{_mandir}/man3/Test::More*
%exclude %{_mandir}/man3/Test::Builder*
%exclude %{_mandir}/man3/Test::Simple*
%exclude %{_mandir}/man3/Test::Tutorial*
# Time::Piece
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/Time/Piece.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/Time/Seconds.pm
-%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/auto/Time/Piece/
+%exclude %{archlib}/Time/Piece.pm
+%exclude %{archlib}/Time/Seconds.pm
+%exclude %{archlib}/auto/Time/Piece/
%exclude %{_mandir}/man3/Time::Piece.3*
%exclude %{_mandir}/man3/Time::Seconds.3*
# version
-%exclude %{_prefix}/lib/perl5/%{perl_version}/version.pm
-%exclude %{_prefix}/lib/perl5/%{perl_version}/version.pod
+%exclude %{privlib}/version.pm
+%exclude %{privlib}/version.pod
%exclude %{_mandir}/man3/version.*
%files libs
%defattr(-,root,root)
-%{_libdir}/perl5/%{perl_version}/%{perl_archname}/CORE/libperl.so
+%{archlib}/CORE/libperl.so
%files devel
%defattr(-,root,root,-)
-# the following includes the file "Changes" -- it's compressed
-%doc Changes*.*
%{_bindir}/enc2xs
%{_mandir}/man1/enc2xs*
-%{_prefix}/lib/perl5/%{perl_version}/Encode/
+%{privlib}/Encode/
%{_bindir}/h2xs
%{_mandir}/man1/h2xs*
%{_bindir}/libnetcfg
%{_mandir}/man1/libnetcfg*
%{_bindir}/perlivp
%{_mandir}/man1/perlivp*
-%{_libdir}/perl5/%{perl_version}/%{perl_archname}/CORE/*.h
+%{archlib}/CORE/*.h
%{_bindir}/xsubpp
%{_mandir}/man1/xsubpp*
%{_sysconfdir}/rpm/macros.perl
@@ -1657,38 +1492,38 @@ TMPDIR="$PWD/tmp" make test
%files Archive-Extract
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Archive/Extract.pm
+%{privlib}/Archive/Extract.pm
%{_mandir}/man3/Archive::Extract.3*
%files Archive-Tar
%defattr(-,root,root,-)
%{_bindir}/ptar
%{_bindir}/ptardiff
-%{_prefix}/lib/perl5/%{perl_version}/Archive/Tar/
-%{_prefix}/lib/perl5/%{perl_version}/Archive/Tar.pm
+%{privlib}/Archive/Tar/
+%{privlib}/Archive/Tar.pm
%{_mandir}/man1/ptar.1*
%{_mandir}/man1/ptardiff.1*
%{_mandir}/man3/Archive::Tar*
%files Compress-Raw-Zlib
%defattr(-,root,root,-)
-%dir %{_libdir}/perl5/%{version}/%{perl_archname}/Compress
-%{_libdir}/perl5/%{version}/%{perl_archname}/Compress/Raw/
-%dir %{_libdir}/perl5/%{version}/%{perl_archname}/auto/Compress/
-%{_libdir}/perl5/%{version}/%{perl_archname}/auto/Compress/Raw/
+%dir %{archlib}/Compress
+%{archlib}/Compress/Raw/
+%dir %{archlib}/auto/Compress/
+%{archlib}/auto/Compress/Raw/
%{_mandir}/man3/Compress::Raw::Zlib*
%files Compress-Zlib
%defattr(-,root,root,-)
-%{_libdir}/perl5/%{version}/%{perl_archname}/Compress/Zlib.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/auto/Compress/Zlib/
+%{archlib}/Compress/Zlib.pm
+%{archlib}/auto/Compress/Zlib/
%{_mandir}/man3/Compress::Zlib*
%files CPAN
%defattr(-,root,root,-)
%{_bindir}/cpan
-%{_prefix}/lib/perl5/%{perl_version}/CPAN/
-%{_prefix}/lib/perl5/%{perl_version}/CPAN.pm
+%{privlib}/CPAN/
+%{privlib}/CPAN.pm
%{_mandir}/man1/cpan.1*
%{_mandir}/man3/CPAN.*
%{_mandir}/man3/CPAN:*
@@ -1698,8 +1533,8 @@ TMPDIR="$PWD/tmp" make test
%{_bindir}/cpan2dist
%{_bindir}/cpanp
%{_bindir}/cpanp-run-perl
-%{_prefix}/lib/perl5/%{perl_version}/CPANPLUS/
-%{_prefix}/lib/perl5/%{perl_version}/CPANPLUS.pm
+%{privlib}/CPANPLUS/
+%{privlib}/CPANPLUS.pm
%{_mandir}/man1/cpan2dist.1*
%{_mandir}/man1/cpanp.1*
%{_mandir}/man3/CPANPLUS*
@@ -1707,41 +1542,41 @@ TMPDIR="$PWD/tmp" make test
%files Digest-SHA
%defattr(-,root,root,-)
%{_bindir}/shasum
-%dir %{_libdir}/perl5/%{version}/%{perl_archname}/Digest/
-%{_libdir}/perl5/%{version}/%{perl_archname}/Digest/SHA.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/auto/Digest/SHA/
+%dir %{archlib}/Digest/
+%{archlib}/Digest/SHA.pm
+%{archlib}/auto/Digest/SHA/
%{_mandir}/man1/shasum.1*
%{_mandir}/man3/Digest::SHA.3*
%files ExtUtils-CBuilder
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/CBuilder/
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/CBuilder.pm
+%{privlib}/ExtUtils/CBuilder/
+%{privlib}/ExtUtils/CBuilder.pm
%{_mandir}/man3/ExtUtils::CBuilder*
%files ExtUtils-Embed
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Embed.pm
+%{privlib}/ExtUtils/Embed.pm
%{_mandir}/man3/ExtUtils::Embed*
%files ExtUtils-MakeMaker
%defattr(-,root,root,-)
%{_bindir}/instmodsh
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Command/
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Install.pm
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Installed.pm
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Liblist/
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Liblist.pm
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/MakeMaker/
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/MakeMaker.pm
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/MANIFEST.SKIP
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/MM*.pm
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/MY.pm
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Manifest.pm
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Mkbootstrap.pm
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Mksymlists.pm
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/Packlist.pm
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/testlib.pm
+%{privlib}/ExtUtils/Command/
+%{privlib}/ExtUtils/Install.pm
+%{privlib}/ExtUtils/Installed.pm
+%{privlib}/ExtUtils/Liblist/
+%{privlib}/ExtUtils/Liblist.pm
+%{privlib}/ExtUtils/MakeMaker/
+%{privlib}/ExtUtils/MakeMaker.pm
+%{privlib}/ExtUtils/MANIFEST.SKIP
+%{privlib}/ExtUtils/MM*.pm
+%{privlib}/ExtUtils/MY.pm
+%{privlib}/ExtUtils/Manifest.pm
+%{privlib}/ExtUtils/Mkbootstrap.pm
+%{privlib}/ExtUtils/Mksymlists.pm
+%{privlib}/ExtUtils/Packlist.pm
+%{privlib}/ExtUtils/testlib.pm
%{_mandir}/man1/instmodsh.1*
%{_mandir}/man3/ExtUtils::Command::MM*
%{_mandir}/man3/ExtUtils::Install.3*
@@ -1758,22 +1593,22 @@ TMPDIR="$PWD/tmp" make test
%files ExtUtils-ParseXS
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/ParseXS.pm
-%{_prefix}/lib/perl5/%{perl_version}/ExtUtils/xsubpp
+%{privlib}/ExtUtils/ParseXS.pm
+%{privlib}/ExtUtils/xsubpp
%{_mandir}/man3/ExtUtils::ParseXS.3*
%files File-Fetch
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/File/Fetch.pm
+%{privlib}/File/Fetch.pm
%{_mandir}/man3/File::Fetch.3*
%files IO-Compress-Base
%defattr(-,root,root,-)
-%{_libdir}/perl5/%{version}/%{perl_archname}/File/GlobMapper.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Base/
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Base.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/AnyUncompress.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/Base.pm
+%{archlib}/File/GlobMapper.pm
+%{archlib}/IO/Compress/Base/
+%{archlib}/IO/Compress/Base.pm
+%{archlib}/IO/Uncompress/AnyUncompress.pm
+%{archlib}/IO/Uncompress/Base.pm
%{_mandir}/man3/File::GlobMapper.*
%{_mandir}/man3/IO::Compress::Base.*
%{_mandir}/man3/IO::Uncompress::AnyUncompress.*
@@ -1781,20 +1616,20 @@ TMPDIR="$PWD/tmp" make test
%files IO-Compress-Zlib
%defattr(-,root,root,-)
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Adapter/
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Deflate.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Gzip/
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Gzip.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/RawDeflate.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Zip/
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Zip.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Compress/Zlib/
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/Adapter/
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/AnyInflate.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/Gunzip.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/Inflate.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/RawInflate.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/IO/Uncompress/Unzip.pm
+%{archlib}/IO/Compress/Adapter/
+%{archlib}/IO/Compress/Deflate.pm
+%{archlib}/IO/Compress/Gzip/
+%{archlib}/IO/Compress/Gzip.pm
+%{archlib}/IO/Compress/RawDeflate.pm
+%{archlib}/IO/Compress/Zip/
+%{archlib}/IO/Compress/Zip.pm
+%{archlib}/IO/Compress/Zlib/
+%{archlib}/IO/Uncompress/Adapter/
+%{archlib}/IO/Uncompress/AnyInflate.pm
+%{archlib}/IO/Uncompress/Gunzip.pm
+%{archlib}/IO/Uncompress/Inflate.pm
+%{archlib}/IO/Uncompress/RawInflate.pm
+%{archlib}/IO/Uncompress/Unzip.pm
%{_mandir}/man3/IO::Compress::Deflate*
%{_mandir}/man3/IO::Compress::Gzip*
%{_mandir}/man3/IO::Compress::RawDeflate*
@@ -1807,25 +1642,25 @@ TMPDIR="$PWD/tmp" make test
%files IO-Zlib
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/IO/Zlib.pm
+%{privlib}/IO/Zlib.pm
%{_mandir}/man3/IO::Zlib.*
%files IPC-Cmd
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/IPC/Cmd.pm
+%{privlib}/IPC/Cmd.pm
%{_mandir}/man3/IPC::Cmd.3*
%files Locale-Maketext-Simple
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Locale/Maketext/Simple.pm
+%{privlib}/Locale/Maketext/Simple.pm
%{_mandir}/man3/Locale::Maketext::Simple.*
%files Log-Message
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Log/Message.pm
-%{_prefix}/lib/perl5/%{perl_version}/Log/Message/Config.pm
-%{_prefix}/lib/perl5/%{perl_version}/Log/Message/Handlers.pm
-%{_prefix}/lib/perl5/%{perl_version}/Log/Message/Item.pm
+%{privlib}/Log/Message.pm
+%{privlib}/Log/Message/Config.pm
+%{privlib}/Log/Message/Handlers.pm
+%{privlib}/Log/Message/Item.pm
%{_mandir}/man3/Log::Message.3*
%{_mandir}/man3/Log::Message::Config.3*
%{_mandir}/man3/Log::Message::Handlers.3*
@@ -1833,87 +1668,87 @@ TMPDIR="$PWD/tmp" make test
%files Log-Message-Simple
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Log/Message/Simple.pm
+%{privlib}/Log/Message/Simple.pm
%{_mandir}/man3/Log::Message::Simple.3*
%files Module-Build
%defattr(-,root,root,-)
%{_bindir}/config_data
-%{_prefix}/lib/perl5/%{perl_version}/Module/Build/
-%{_prefix}/lib/perl5/%{perl_version}/Module/Build.pm
+%{privlib}/Module/Build/
+%{privlib}/Module/Build.pm
%{_mandir}/man1/config_data.1*
%{_mandir}/man3/Module::Build*
%files Module-CoreList
%defattr(-,root,root,-)
%{_bindir}/corelist
-%{_prefix}/lib/perl5/%{perl_version}/Module/CoreList.pm
+%{privlib}/Module/CoreList.pm
%{_mandir}/man1/corelist*
%{_mandir}/man3/Module::CoreList*
%files Module-Load
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Module/Load.pm
+%{privlib}/Module/Load.pm
%{_mandir}/man3/Module::Load.*
%files Module-Load-Conditional
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Module/Load/
+%{privlib}/Module/Load/
%{_mandir}/man3/Module::Load::Conditional*
%files Module-Loaded
%defattr(-,root,root,-)
-%dir %{_prefix}/lib/perl5/%{perl_version}/Module/
-%{_prefix}/lib/perl5/%{perl_version}/Module/Loaded.pm
+%dir %{privlib}/Module/
+%{privlib}/Module/Loaded.pm
%{_mandir}/man3/Module::Loaded*
%files Module-Pluggable
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Devel/InnerPackage.pm
-%{_prefix}/lib/perl5/%{perl_version}/Module/Pluggable/
-%{_prefix}/lib/perl5/%{perl_version}/Module/Pluggable.pm
+%{privlib}/Devel/InnerPackage.pm
+%{privlib}/Module/Pluggable/
+%{privlib}/Module/Pluggable.pm
%{_mandir}/man3/Devel::InnerPackage*
%{_mandir}/man3/Module::Pluggable*
%files Object-Accessor
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Object/
+%{privlib}/Object/
%{_mandir}/man3/Object::Accessor*
%files Package-Constants
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Package/
+%{privlib}/Package/
%{_mandir}/man3/Package::Constants*
%files Params-Check
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Params/
+%{privlib}/Params/
%{_mandir}/man3/Params::Check*
%files Pod-Escapes
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Pod/Escapes.pm
+%{privlib}/Pod/Escapes.pm
%{_mandir}/man3/Pod::Escapes.*
%files Pod-Simple
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Pod/Simple/
-%{_prefix}/lib/perl5/%{perl_version}/Pod/Simple.pm
-%{_prefix}/lib/perl5/%{perl_version}/Pod/Simple.pod
+%{privlib}/Pod/Simple/
+%{privlib}/Pod/Simple.pm
+%{privlib}/Pod/Simple.pod
%{_mandir}/man3/Pod::Simple*
%files Term-UI
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Term/UI/
-%{_prefix}/lib/perl5/%{perl_version}/Term/UI.pm
+%{privlib}/Term/UI/
+%{privlib}/Term/UI.pm
%{_mandir}/man3/Term::UI*
%files Test-Harness
%defattr(-,root,root,-)
%{_bindir}/prove
-%{_prefix}/lib/perl5/%{perl_version}/App*
-%{_prefix}/lib/perl5/%{perl_version}/TAP*
-%{_prefix}/lib/perl5/%{perl_version}/Test/Harness*
+%{privlib}/App*
+%{privlib}/TAP*
+%{privlib}/Test/Harness*
%{_mandir}/man1/prove.1*
%{_mandir}/man3/App*
%{_mandir}/man3/TAP*
@@ -1921,10 +1756,10 @@ TMPDIR="$PWD/tmp" make test
%files Test-Simple
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/Test/More*
-%{_prefix}/lib/perl5/%{perl_version}/Test/Builder*
-%{_prefix}/lib/perl5/%{perl_version}/Test/Simple*
-%{_prefix}/lib/perl5/%{perl_version}/Test/Tutorial*
+%{privlib}/Test/More*
+%{privlib}/Test/Builder*
+%{privlib}/Test/Simple*
+%{privlib}/Test/Tutorial*
%{_mandir}/man3/Test::More*
%{_mandir}/man3/Test::Builder*
%{_mandir}/man3/Test::Simple*
@@ -1932,16 +1767,16 @@ TMPDIR="$PWD/tmp" make test
%files Time-Piece
%defattr(-,root,root,-)
-%{_libdir}/perl5/%{version}/%{perl_archname}/Time/Piece.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/Time/Seconds.pm
-%{_libdir}/perl5/%{version}/%{perl_archname}/auto/Time/Piece/
+%{archlib}/Time/Piece.pm
+%{archlib}/Time/Seconds.pm
+%{archlib}/auto/Time/Piece/
%{_mandir}/man3/Time::Piece.3*
%{_mandir}/man3/Time::Seconds.3*
%files version
%defattr(-,root,root,-)
-%{_prefix}/lib/perl5/%{perl_version}/version.pm
-%{_prefix}/lib/perl5/%{perl_version}/version.pod
+%{privlib}/version.pm
+%{privlib}/version.pod
%{_mandir}/man3/version.*
%files core
@@ -1949,6 +1784,18 @@ TMPDIR="$PWD/tmp" make test
# Old changelog entries are preserved in CVS.
%changelog
+* Wed Dec 2 2009 Stepan Kasal <skasal at redhat.com> - 4:5.10.1-100
+- new upstream version
+- release number must be high, because of stale version numbers of some
+ of the subpackages
+- drop upstreamed patches
+- update the versions of bundled modules
+- shorten the paths in @INC
+- build without DEBUGGING
+- implement compatibility measures for the above two changes, for a short
+ transition period
+- provide perl(:MODULE_COMPAT_5.10.0), for that transition period only
+
* Tue Dec 1 2009 Stepan Kasal <skasal at redhat.com> - 4:5.10.0-87
- fix patch-update-Compress-Raw-Zlib.patch (did not patch Zlib.pm)
- update Compress::Raw::Zlib to 2.023
--- 02_fix_pod2html_dl DELETED ---
--- 07_fix_nullok DELETED ---
--- 08_fix_udp_typo DELETED ---
--- 09_fix_memory_debugging DELETED ---
--- 10_fix_h2ph_include_quote DELETED ---
--- 11_disable_vstring_warning DELETED ---
--- 15_fix_local_symtab DELETED ---
--- 16_fix_perlio_teardown_prototype DELETED ---
--- 17_fix_getopt_long_callback DELETED ---
--- 18_fix_bigint_floats DELETED ---
--- 25_fix_cgi_tempdir DELETED ---
--- 27_fix_sys_syslog_timeout DELETED ---
--- 28_fix_inplace_sort DELETED ---
--- 30_fix_freetmps DELETED ---
--- 31_fix_attributes_unknown_error DELETED ---
--- 32891.patch DELETED ---
--- 32_fix_fork_rand DELETED ---
--- 34_fix_qr-memory-leak-2 DELETED ---
--- 36_fix_file_temp_cleanup DELETED ---
--- 37_fix_coredump_indicator DELETED ---
--- 38_fix_weaken_memleak DELETED ---
--- perl-5.10.0-Archive-Extract-onlystdout.patch DELETED ---
--- perl-5.10.0-Change33640.patch DELETED ---
--- perl-5.10.0-Change33881.patch DELETED ---
--- perl-5.10.0-Change33896.patch DELETED ---
--- perl-5.10.0-Change33897.patch DELETED ---
--- perl-5.10.0-Change34507.patch DELETED ---
--- perl-5.10.0-PerlIO-via-change34025.patch DELETED ---
--- perl-5.10.0-USE_MM_LD_RUN_PATH.patch DELETED ---
--- perl-5.10.0-accessXOK.patch DELETED ---
--- perl-5.10.0-bz448392.patch DELETED ---
--- perl-5.10.0-fix_file_path_rmtree_setuid.patch DELETED ---
--- perl-5.10.0-much-better-swap-logic.patch DELETED ---
--- perl-5.10.0-perlbug-tag.patch DELETED ---
--- perl-5.10.0-pos.patch DELETED ---
--- perl-5.10.0-stlocal.patch DELETED ---
--- perl-5.8.0-root.patch DELETED ---
--- perl-CGI-t-util-58.patch DELETED ---
--- perl-bz509676.patch DELETED ---
--- perl-skip-prereq.patch DELETED ---
- Previous message (by thread): rpms/svnkit/devel svnkit-1.3.2-dependencies.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 sources, 1.6, 1.7 svnkit.spec, 1.13, 1.14 svnkit-1.2.2-dependencies.patch, 1.1, NONE
- Next message (by thread): rpms/man-pages/F-12 man-pages-3.22-sched_setaffinity.patch, 1.1, 1.2 man-pages.spec, 1.123, 1.124
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list