Index: URPM-2.01/Makefile.PL --- URPM-2.01/Makefile.PL.orig 2007-06-19 16:24:46 +0200 +++ URPM-2.01/Makefile.PL 2007-06-22 19:56:56 +0200 @@ -1,58 +1,7 @@ use strict; use ExtUtils::MakeMaker; -# where to find the rpm utility - -my $rpm_path = $ENV{RPM_PATH}; # this overrides - -unless (defined $rpm_path) { - for (qw(/bin/rpm /usr/bin/rpm)) { - if (-x) { - $rpm_path = $_; - last; - } - } -} - -defined $rpm_path or die "Can't find rpm on this system\n"; - -my $version = `LC_ALL=C $rpm_path --version`; -chomp $version; -$version =~ s/RPM version //; -$version =~ /^(?:4\.[2-9]|[5-9]|\d{2})/ - or die "Unable to build URPM with too old (or undetected) rpm version $version\n"; -print "Found RPM version $version\n"; - -# to generate the ChangeLog depending on the checkout layout -my $commonusername = "../common/"; --d $commonusername or do { - $commonusername = "../../common/"; - -d $commonusername or do { - $commonusername = "../../../common/"; - -d $commonusername or $commonusername = ""; - }; -}; - -sub MY::postamble { - <<"**MM**"; -.PHONY: ChangeLog - -ChangeLog: - LC_ALL=C svn2cl --accum --strip-prefix=soft/rpm/perl-URPM/trunk --authors ${commonusername}username.xml - rm -f *.bak -**MM** -} - -my $ccflags = '-Wall -fno-strict-aliasing'; -if ($version =~ /^4\.(4\.[5-9]$|4\.\d\d|[5-9]\.|\d\d)/) { - $ccflags .= ' -DRPM_CALLBACK_LONGLONG'; -} -if ($version =~ /^4\.4/ && (split(/\./, $version))[2] >= 6) { - $ccflags .= ' -DRPM_446'; -} -if ($version =~ /^4\.4/ && (split(/\./, $version))[2] >= 8) { - $ccflags .= ' -DRPM_448'; -} +my $ccflags = '-fno-strict-aliasing'; WriteMakefile( NAME => 'URPM', @@ -61,8 +10,8 @@ }, CCFLAGS => $ccflags, VERSION_FROM => 'URPM.pm', - LIBS => [ '-lrpm -lrpmio -lrpmdb -lrpmbuild -lpopt -lz' ], - INC => '-I/usr/include/rpm', + LIBS => [ `openpkg rpm-config --ldflags --libs` ], + INC => `openpkg rpm-config --cflags --cppflags`, dist => { COMPRESS => "bzip2", SUFFIX => ".bz2" }, realclean => { FILES => "t/RPMS/noarch/*" }, ); Index: URPM-2.01/URPM.xs --- URPM-2.01/URPM.xs.orig 2007-06-19 16:44:27 +0200 +++ URPM-2.01/URPM.xs 2007-06-22 19:43:44 +0200 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #undef Fflush #undef Mkdir Index: rpmtools-5.3.2/Makefile.PL --- rpmtools-5.3.2/Makefile.PL.orig 2007-06-15 22:53:22 +0200 +++ rpmtools-5.3.2/Makefile.PL 2007-06-22 19:43:44 +0200 @@ -35,8 +35,8 @@ RPMTOOLSVERSION => $rpmtools_version, FROMC => 'parsehdlist rpm2header #rpm-find-leaves', FROMCC => '#gendepslist2 hdlist2names hdlist2files hdlist2prereq hdlist2groups', - LIBRPM => '-lrpm -lrpmio -lrpmdb -lrpmbuild -lz -lbz2 -lpopt', - INCRPM => '-I/usr/include/rpm', + LIBRPM => `openpkg rpm-config --ldflags --libs`, + INCRPM => `openpkg rpm-config --cflags --cppflags`, }, depend => { clean_subdirs => 'cleanc', @@ -49,7 +49,7 @@ C => [], OBJECT => '', CCFLAGS => '-Wall', - OPTIMIZE => '-O3 -fomit-frame-pointer -fno-exceptions -pipe -s -ffast-math -fexpensive-optimizations', + OPTIMIZE => '-O2', INC => '', LIBS => [ '' ], INSTALLDIRS => 'vendor', Index: rpmtools-5.3.2/parsehdlist.c --- rpmtools-5.3.2/parsehdlist.c.orig 2007-06-15 09:24:49 +0200 +++ rpmtools-5.3.2/parsehdlist.c 2007-06-22 19:43:44 +0200 @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include Index: rpmtools-5.3.2/rpm2header.c --- rpmtools-5.3.2/rpm2header.c.orig 2007-06-15 09:24:49 +0200 +++ rpmtools-5.3.2/rpm2header.c 2007-06-22 19:43:44 +0200 @@ -5,7 +5,8 @@ #include #include #include -#include +#include +#include #include #define FILENAME_TAG 1000000 Index: urpmi-4.10.9/Makefile.PL --- urpmi-4.10.9/Makefile.PL.orig 2007-04-24 21:34:36 +0200 +++ urpmi-4.10.9/Makefile.PL 2007-06-22 19:43:44 +0200 @@ -60,6 +60,7 @@ my $po = $with_po ? ' installpo' : ''; my $gui = $with_gui ? ' installgurpmi2' : ''; $inherited =~ s/^install ::/$& installconfigfiles installstatedir$po$gui/gm; + $inherited =~ s/^pure_install ::/$& installconfigfiles installstatedir$po$gui/gm; $inherited; } @@ -110,10 +111,10 @@ install -m 644 inst.list skip.list \$(SYSCONFDIR)/urpmi installstatedir: - install -d \$(LOCALSTATEDIR)/urpmi - install -d \$(DESTDIR)/var/cache/urpmi/partial - install -d \$(DESTDIR)/var/cache/urpmi/headers - install -d \$(DESTDIR)/var/cache/urpmi/rpms + install -d \$(LOCALSTATEDIR)/urpmi/lib + install -d \$(DESTDIR)/\$(PREFIX)/var/urpmi/cache/partial + install -d \$(DESTDIR)/\$(PREFIX)/var/urpmi/cache/headers + install -d \$(DESTDIR)/\$(PREFIX)/var/urpmi/cache/rpms installgurpmi2: pure_install ln -s -f consolehelper \$(DESTINSTALLSCRIPT)/gurpmi2 @@ -155,8 +156,8 @@ INST_MAN5DIR => 'blib/man5', INST_MAN8DIR => 'blib/man8', # We could read those values from rpm macros. - SYSCONFDIR => '$(DESTDIR)/etc', - LOCALSTATEDIR => '$(DESTDIR)/var/lib', + SYSCONFDIR => '$(DESTDIR)$(PREFIX)/etc', + LOCALSTATEDIR => '$(DESTDIR)$(PREFIX)/var', }, EXE_FILES => [ @bin_scripts, @sbin_scripts ], PMLIBDIRS => [ qw(urpm) ], Index: urpmi-4.10.9/urpm/sys.pm --- urpmi-4.10.9/urpm/sys.pm.orig 2007-04-24 21:22:25 +0200 +++ urpmi-4.10.9/urpm/sys.pm 2007-06-22 19:43:44 +0200 @@ -94,7 +94,7 @@ } sub proc_mounts() { - my @l = cat_('/proc/mounts') or warn "Can't read /proc/mounts: $!\n"; + my @l = (-f '/proc/mounts' ? cat_('/proc/mounts') : ()); @l; }