From be117f5d783d1a4c8970e780e2a0fe321ea86818 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 26 Jun 2012 18:14:37 +0000 Subject: perl_checker cleanups, thus fixing --rpmversion (broken for 6+ years...) (broken since commit introduced in r51 on 2005-12-14 by nanardon, aka it never worked... git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@227 971eb68f-4bfb-0310-8326-d2484c010a4c --- RPM4/Makefile.PL | 2 +- RPM4/NEWS | 1 + RPM4/src/Makefile.PL | 19 ++++++++++--------- 3 files changed, 12 insertions(+), 10 deletions(-) (limited to 'RPM4') diff --git a/RPM4/Makefile.PL b/RPM4/Makefile.PL index ae25c32..0aad8cb 100644 --- a/RPM4/Makefile.PL +++ b/RPM4/Makefile.PL @@ -11,7 +11,7 @@ $rpm_version ge 4.8.0 Unable to build RPM4 with too old (or undetected) rpm version $rpm_version BARF -sub MY::postamble { +sub MY::postamble() { < \$rpmv, 'rebuildh' => \my $rebh, @@ -23,10 +24,10 @@ foreach (qw( $rpmheaderlocation or die "Can't find rpmheader location"; -my $rpmv ||= (`rpm --version` =~ /([\d\.]+)/)[0]; -open($FH, "> rpmversion.h") or die "Can't open rpmversion.h"; +$rpmv ||= (`rpm --version` =~ /([\d\.]+)/)[0]; +open(my $FH, "> rpmversion.h") or die "Can't open rpmversion.h"; print $FH "/* File generated by Mafile.PL\n"; -print $FH ' * $Id$' ."\n"; +print $FH ' * $Id$' . "\n"; print $FH " */\n\n"; print $FH "#ifndef RPMVERSION_H\n#define RPMVERSION_H\n\n"; foreach (qw( @@ -37,14 +38,14 @@ foreach (qw( 4.9.1.1 4.9.1.2 )) { - $v = $_; + my $v = $_; $v =~ s/\./_/g; print $FH "#define RPM$v\n"; $rpmv =~ /^\Q$_/ and last; } print $FH "\n#endif\n"; close($FH); -if ($rebh) { exit 0 }; +exit 0 if $rebh; my @rpmconstantfiles = qw( rpmconstant.c @@ -58,7 +59,7 @@ my ($obj, $ldd, $fl) = ('', '-lrpmconstant', '-DHAVE_RPMCONSTANT') : ('rpmconstant.o rpmconstant_internal.o rpmconstanttbl.o', '', ''); -sub MY::postamble { +sub MY::postamble() { my $first = <