SHA256
1
0
forked from pool/perl

- fix constant print issue [bnc#621856]

- fix h2ph so that _h2ph_pre.ph doesn't lead to warnings
- do not add vendorlib/auto to filelist [bnc#624628]

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=41
This commit is contained in:
Michael Schröder 2010-07-29 07:46:22 +00:00 committed by Git OBS Bridge
parent 1b27e044bf
commit 2258119af3
5 changed files with 84 additions and 1 deletions

View File

@ -77,7 +77,10 @@ done\
\
# build filelist\
for i in ${all_dir[@]}; do\
# do not add "%dir %{perl_vendorarch}/auto", included in perl package\
# do not add "dir {perl_vendorlib/arch}/auto", included in perl package\
if [ "${i}" = "auto" ]; then\
continue\
fi\
if [ "%{perl_vendorlib}/${i}" = "%{perl_vendorarch}/auto" ]; then\
continue\
else\

20
perl-constprint.diff Normal file
View File

@ -0,0 +1,20 @@
--- ./gv.c.orig 2010-05-13 22:01:07.000000000 +0000
+++ ./gv.c 2010-07-28 09:57:06.000000000 +0000
@@ -250,8 +250,16 @@ Perl_gv_init(pTHX_ GV *gv, HV *stash, co
if (doproto) { /* Replicate part of newSUB here. */
ENTER;
if (has_constant) {
+ char *name0 = NULL;
+ if (name[len]) {
+ /* newCONSTSUB doesn't take a len arg, so make sure w
+ * give it a \0-terminated string */
+ name0 = savepvn(name, len);
+ }
/* newCONSTSUB takes ownership of the reference from us. */
- GvCV(gv) = newCONSTSUB(stash, name, has_constant);
+ GvCV(gv) = newCONSTSUB(stash, (name0 ? name0 : name), has_constant);
+ if (name0)
+ Safefree(name0);
/* If this reference was a copy of another, then the subroutine
must have been "imported", by a Perl space assignment to a GV
from a reference to CV. */

49
perl-h2ph.diff Normal file
View File

@ -0,0 +1,49 @@
--- ./utils/h2ph.PL.orig
+++ ./utils/h2ph.PL
@@ -401,7 +401,10 @@ if ($opt_e && (scalar(keys %bad_file) > 0)) {
exit $Exit;
sub expr {
- $new = '"(assembly code)"' and return if /\b__asm__\b/; # freak out.
+ if (/\b__asm__\b/) { # freak out
+ $new = '"(assembly code)"';
+ return
+ }
my $joined_args;
if(keys(%curargs)) {
$joined_args = join('|', keys(%curargs));
@@ -798,7 +801,16 @@ sub build_preamble_if_necessary
# parenthesized value: d=(v)
$define{$_} = $1;
}
- if ($define{$_} =~ /^([+-]?(\d+)?\.\d+([eE][+-]?\d+)?)[FL]?$/) {
+ if (/^(\w+)\((\w)\)$/) {
+ my($macro, $arg) = ($1, $2);
+ my $def = $define{$_};
+ $def =~ s/$arg/\$\{$arg\}/g;
+ print PREAMBLE <<DEFINE;
+unless (defined &$macro) { sub $macro(\$) { my (\$$arg) = \@_; \"$def\" } }
+
+DEFINE
+ } elsif
+ ($define{$_} =~ /^([+-]?(\d+)?\.\d+([eE][+-]?\d+)?)[FL]?$/) {
# float:
print PREAMBLE
"unless (defined &$_) { sub $_() { $1 } }\n\n";
@@ -807,8 +819,14 @@ sub build_preamble_if_necessary
print PREAMBLE
"unless (defined &$_) { sub $_() { $1 } }\n\n";
} elsif ($define{$_} =~ /^\w+$/) {
- print PREAMBLE
- "unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";
+ my $def = $define{$_};
+ if ($isatype{$def}) {
+ print PREAMBLE
+ "unless (defined &$_) { sub $_() { \"$def\" } }\n\n";
+ } else {
+ print PREAMBLE
+ "unless (defined &$_) { sub $_() { &$def } }\n\n";
+ }
} else {
print PREAMBLE
"unless (defined &$_) { sub $_() { \"",

View File

@ -1,4 +1,11 @@
-------------------------------------------------------------------
Wed Jul 28 11:45:46 CEST 2010 - mls@suse.de
- fix constant print issue [bnc#621856]
- fix h2ph so that _h2ph_pre.ph doesn't lead to warnings
- do not add vendorlib/auto to filelist [bnc#624628]
------------------------------------------------------------------
Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de
- use %_smp_mflags

View File

@ -40,6 +40,8 @@ Patch4: perl-nroff.diff
Patch5: perl-netcmdutf8.diff
Patch6: perl-autodie-flock.diff
Patch7: perl-Fatal.diff
Patch8: perl-constprint.diff
Patch9: perl-h2ph.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: perl-base = %version
#PreReq: %fillup_prereq
@ -154,6 +156,8 @@ cp -p %{S:3} .
%patch6
%patch7
%endif
%patch8
%patch9
%build
cp -a lib savelib