RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Olivier Thauvin
Root: /v/rpm/cvs Email: nanardon@rpm5.org
Module: rpm Date: 27-Jul-2007 23:18:16
Branch: HEAD Handle: 2007072722181501
Modified files:
rpm configure.ac
rpm/perl Makefile.PL Makefile.PL.in Makefile.am
Log:
make autoconf/Makemaker working again for perl subdir when using
--with-perl
Summary:
Revision Changes Path
2.225 +2 -7 rpm/configure.ac
1.24 +9 -51 rpm/perl/Makefile.PL
1.3 +5 -7 rpm/perl/Makefile.PL.in
1.3 +16 -10 rpm/perl/Makefile.am
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/configure.ac
============================================================================
$ cvs diff -u -r2.224 -r2.225 configure.ac
--- rpm/configure.ac 26 Jul 2007 08:10:31 -0000 2.224
+++ rpm/configure.ac 27 Jul 2007 21:18:15 -0000 2.225
@@ -702,6 +702,8 @@
if test ".$withval" != .no; then
WITH_PERL_SUBDIR=perl
WITH_PERL_SUBPACKAGE=1
+ AC_CONFIG_FILES([perl/Makefile.PL])
+ AC_CONFIG_FILES([perl/Makefile])
fi
])
AC_SUBST(WITH_PERL_SUBDIR)
@@ -1283,13 +1285,6 @@
rpmconstant/Makefile
])
-dnl # explicit list of commands to execute
-AC_CONFIG_COMMANDS([default], [
- if test "$.with_perl" = .yes && test -d ${srcdir}/perl; then
- ( cd ${srcdir}/perl && perl Makefile.PL )
- fi
-],[])
-
dnl # final step: generate output
AC_OUTPUT
@@ .
patch -p0 <<'@@ .'
Index: rpm/perl/Makefile.PL
============================================================================
$ cvs diff -u -r1.23 -r1.24 Makefile.PL
--- rpm/perl/Makefile.PL 25 May 2007 17:36:08 -0000 1.23
+++ rpm/perl/Makefile.PL 27 Jul 2007 21:18:16 -0000 1.24
@@ -2,56 +2,14 @@
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
-my $libs, @defines, @incs;
-
-if (-e '../system.h') {
- $libs = "-L../lib/ -lrpm";
- push @incs, '-I../lib';
- push @incs, '-I../rpmdb';
- push @incs, '-I../rpmio';
- push @incs, '-I../popt';
- push @defines, '-DRPM_RPM41';
- $optimize = "-O2";
-} else {
- my $extra_libs = $ENV{EXTRALIBS};
- $libs = "$extra_libs -lrpm -lrpmdb -lrpmio -lpopt";
- push @incs, '-I/usr/include/rpm';
-
- # try to be smart about which shared libs we should load.
- # use the .la file. probably libtool only.
-
- my $filename = '/usr/lib/librpm.la';
- $filename = '/usr/lib64/librpm.la' unless -e $filename;
-
- if (open FH, "<$filename") {
- my ($line, @rest) = grep { /^dependency_libs=/ } <FH>;
- if ($line and not @rest) {
- if ($line =~ /^dependency_libs='(.*)'$/) {
- my $l = $1;
- my @l = split /\s+/, $l;
- @l = grep { /^-l/ } @l;
- $libs = "$libs -lrpm @l";
- }
- }
- }
-
- # detect which rpm is running. ugly but necessary... for now.
- if (-e '/usr/include/rpm/rpmts.h') {
- push @defines, '-DRPM_RPM41';
- }
- else {
- push @defines, '-DRPM_RPM40';
- }
- $optimize = "-g";
-}
-
WriteMakefile(
- 'NAME' => 'RPM',
- 'VERSION_FROM' => 'RPM.pm', # finds $VERSION
- 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
- 'LIBS' => [ $libs ], # e.g., '-lm'
- 'DEFINE' => join(" ", @defines), # e.g., '-DHAVE_SOMETHING'
- 'INC' => join(" ", @incs), # e.g., '-I/usr/include/other'
- 'TYPEMAPS' => [ 'typemap' ],
- 'OPTIMIZE' => $optimize
+ 'NAME' => 'RPM',
+ 'OBJECT' => 'RPM.o',
+ 'VERSION_FROM' => 'RPM.pm', # finds $VERSION
+ 'MAKEFILE'=> 'Makefile.perl',
+ 'LIBS' => ['-lpopt -lneon -lbeecrypt -lpthread -lneon '], # e.g., '-lm'
+ 'CCFLAGS' => '-g -O2 -D_GNU_SOURCE -D_REENTRANT ',
+ 'OPTIMIZE'=> '-g',
+ 'INC' => join(' ', map { '-I../'. $_ } qw(build lib popt rpmdb rpmio)),
);
+
@@ .
patch -p0 <<'@@ .'
Index: rpm/perl/Makefile.PL.in
============================================================================
$ cvs diff -u -r1.2 -r1.3 Makefile.PL.in
--- rpm/perl/Makefile.PL.in 24 Jun 2007 18:12:31 -0000 1.2
+++ rpm/perl/Makefile.PL.in 27 Jul 2007 21:18:16 -0000 1.3
@@ -3,15 +3,13 @@
# the contents of the Makefile that is written.
WriteMakefile(
- 'NAME' => 'rpm',
- 'OBJECT' => 'rpm.o constant.o',
- 'VERSION_FROM' => 'rpm.pm', # finds $VERSION
- 'MAKEFILE'=> 'PMakefile',
+ 'NAME' => 'RPM',
+ 'OBJECT' => 'RPM.o',
+ 'VERSION_FROM' => 'RPM.pm', # finds $VERSION
+ 'MAKEFILE'=> 'Makefile.perl',
'LIBS' => ['@LIBS@'], # e.g., '-lm'
'CCFLAGS' => '@CFLAGS@',
'OPTIMIZE'=> '-g',
- 'DEFINE' => '-Dbool=char -DHAS_BOOL',
- 'INC' => '-I../build -I../lib -I../popt -I/usr/include/rpm',
- 'depend' => { 'rpm.c' => 'transaction.xs header.xs db.xs' },
+ 'INC' => join(' ', map { '-I@top_srcdir@/'. $_ } qw(build lib popt rpmdb rpmio)),
);
@@ .
patch -p0 <<'@@ .'
Index: rpm/perl/Makefile.am
============================================================================
$ cvs diff -u -r1.2 -r1.3 Makefile.am
--- rpm/perl/Makefile.am 5 Jul 2007 06:01:43 -0000 1.2
+++ rpm/perl/Makefile.am 27 Jul 2007 21:18:16 -0000 1.3
@@ -2,15 +2,21 @@
AUTOMAKE_OPTIONS = 1.4 foreign
-EXTRA_DIST = \
- db.xs header.xs junk.xs rpm.xs transaction.xs
+EXTRA_DIST =
-configdir = ${prefix}/lib/rpm
-config_SCRIPTS = \
- db.xs header.xs junk.xs rpm.xs transaction.xs
+noinst_DATA = .made_mod
-all install clean: PMakefile
- make -f $< $@
-
-PMakefile: Makefile.PL
- perl Makefile.PL
+.made_mod: Makefile.perl
+ $(MAKE) -fMakefile.perl
+ touch $@
+
+Makefile.perl: Makefile.PL
+ $(PERL) $< MAKEFILE=$@
+
+install-data-local:
+ $(MAKE) -fMakefile.perl PREFIX=$(prefix) install
+
+CLEANFILES = *~
+clean-local:
+ if test -f Makefile.perl; them $(MAKE) -fMakefile.perl realclean; fi
+ rm -f Makefile.perl Makefile.perl.old
@@ .
Received on Fri Jul 27 23:18:16 2007