summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro Bonazzola <sanchan@gentoo.org>2007-01-16 22:10:59 +0000
committerSandro Bonazzola <sanchan@gentoo.org>2007-01-16 22:10:59 +0000
commit9c16f0524a9d907692cd5fef0dc4bd5db4079fd2 (patch)
treed85dd2dad296e54590420179f1803613a0f4a7b1 /app-arch/rpm
parentBump to 3.5.6 (prerelease). (diff)
downloadhistorical-9c16f0524a9d907692cd5fef0dc4bd5db4079fd2.tar.gz
historical-9c16f0524a9d907692cd5fef0dc4bd5db4079fd2.tar.bz2
historical-9c16f0524a9d907692cd5fef0dc4bd5db4079fd2.zip
New ebuild with a lot of fixes and enhancements from Peter S. Mazinger <ps.m@gmx.net>. Many thanks for your help Peter!
Package-Manager: portage-2.1.2
Diffstat (limited to 'app-arch/rpm')
-rw-r--r--app-arch/rpm/ChangeLog14
-rw-r--r--app-arch/rpm/Manifest38
-rw-r--r--app-arch/rpm/files/digest-rpm-4.4.7-r26
-rw-r--r--app-arch/rpm/files/rpm-4.0.4-gentoo-uclibc.patch50
-rw-r--r--app-arch/rpm/files/rpm-4.0.4-sandbox.patch20
-rw-r--r--app-arch/rpm/files/rpm-4.4.7-config.rpath.patch617
-rw-r--r--app-arch/rpm/rpm-4.4.7-r2.ebuild244
7 files changed, 973 insertions, 16 deletions
diff --git a/app-arch/rpm/ChangeLog b/app-arch/rpm/ChangeLog
index d01a4e251b94..2f48da7aa9bf 100644
--- a/app-arch/rpm/ChangeLog
+++ b/app-arch/rpm/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for app-arch/rpm
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/ChangeLog,v 1.77 2006/11/06 21:11:24 sanchan Exp $
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/ChangeLog,v 1.78 2007/01/16 22:10:59 sanchan Exp $
+
+ 16 Jan 2007; Sandro Bonazzola <sanchan@gentoo.org>
+
+*rpm-4.4.7-r2 (16 Jan 2007)
+
+ 16 Jan 2007; Sandro Bonazzola <sanchan@gentoo.org>
+ +files/rpm-4.0.4-gentoo-uclibc.patch, +files/rpm-4.0.4-sandbox.patch,
+ +files/rpm-4.4.7-config.rpath.patch, +rpm-4.4.7-r2.ebuild:
+ New ebuild with a lot of fixes and enhancements from Peter S. Mazinger
+ <ps.m@gmx.net>. Many thanks for your help Peter!
*rpm-4.4.7-r1 (06 Nov 2006)
*rpm-4.4.6-r3 (06 Nov 2006)
diff --git a/app-arch/rpm/Manifest b/app-arch/rpm/Manifest
index ec83dc4da22b..ecbc3d26de2a 100644
--- a/app-arch/rpm/Manifest
+++ b/app-arch/rpm/Manifest
@@ -1,6 +1,11 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
+AUX rpm-4.0.4-gentoo-uclibc.patch 1418 RMD160 b2b89f401c6f6f3d275e4666312555a3ad6ffbeb SHA1 673ea952b741a140f9f20a24282589ef4f2a1198 SHA256 8671a390a1e1673e0415f8a4da96d0b8234d870d02d4e28b28d735dc35e49cf7
+MD5 b367caa0d4230b567bdd63eeb430e67f files/rpm-4.0.4-gentoo-uclibc.patch 1418
+RMD160 b2b89f401c6f6f3d275e4666312555a3ad6ffbeb files/rpm-4.0.4-gentoo-uclibc.patch 1418
+SHA256 8671a390a1e1673e0415f8a4da96d0b8234d870d02d4e28b28d735dc35e49cf7 files/rpm-4.0.4-gentoo-uclibc.patch 1418
+AUX rpm-4.0.4-sandbox.patch 938 RMD160 95dad47ac3b18213a271657db643ca3188c2d208 SHA1 96ae471af884a0b4abbe6cbdcc55b62e58683bd6 SHA256 d10e4674993bbfd3294837639a3cfbd2cda443fad3486ef15ee695c2f0f80651
+MD5 cbdc43e58b4dcb27bd8b81eb74d1ce46 files/rpm-4.0.4-sandbox.patch 938
+RMD160 95dad47ac3b18213a271657db643ca3188c2d208 files/rpm-4.0.4-sandbox.patch 938
+SHA256 d10e4674993bbfd3294837639a3cfbd2cda443fad3486ef15ee695c2f0f80651 files/rpm-4.0.4-sandbox.patch 938
AUX rpm-4.4.6-autotools.patch 660 RMD160 63155d3737ffdf9927b1763ddf068c5964e168c9 SHA1 70dd2346df0e5d95ec4a06587485381b48d52b81 SHA256 dd4828899e760358b702d0c2ca75e781619f7b65140cf2cc5600ea687a085569
MD5 3393c6bd76f8f86a8266a4fd3c6ef1c5 files/rpm-4.4.6-autotools.patch 660
RMD160 63155d3737ffdf9927b1763ddf068c5964e168c9 files/rpm-4.4.6-autotools.patch 660
@@ -17,11 +22,16 @@ AUX rpm-4.4.6-with-sqlite.patch 517 RMD160 0af724f63b528aabd05f4bcf2d4c4830ebdf9
MD5 a85e4f904c31d1657b9ee05a0b967305 files/rpm-4.4.6-with-sqlite.patch 517
RMD160 0af724f63b528aabd05f4bcf2d4c4830ebdf98d2 files/rpm-4.4.6-with-sqlite.patch 517
SHA256 c84020fd6402c4d9bfddb554f251b4ac13c6ca151689070a7471e66c8f7bb6ac files/rpm-4.4.6-with-sqlite.patch 517
+AUX rpm-4.4.7-config.rpath.patch 16976 RMD160 cf2d7d781707cd8258eceec61b0fcecb93dcb9d2 SHA1 dbcfefe3c60ac53266e4b31806d9c41a26f4609d SHA256 13d1352f17676d0199c868192adae8d74ff2c59c9978ec5d6acf9a7d4bb5f73b
+MD5 9f78ce7b8993007d14cec24b341873d1 files/rpm-4.4.7-config.rpath.patch 16976
+RMD160 cf2d7d781707cd8258eceec61b0fcecb93dcb9d2 files/rpm-4.4.7-config.rpath.patch 16976
+SHA256 13d1352f17676d0199c868192adae8d74ff2c59c9978ec5d6acf9a7d4bb5f73b files/rpm-4.4.7-config.rpath.patch 16976
AUX rpm-4.4.7-stupidness.patch 5268 RMD160 631f1bf3dc4553e27dec4a901fa84e17ffc7c7c9 SHA1 e957a9a549fa1ec52b449b1e8fc3ea14af7b7a09 SHA256 e563657e648e9b5ecfc0a653d7515f93db7785ec6867c81591663213965c0850
MD5 55bd72d42827a85e9a4d76e2478ab576 files/rpm-4.4.7-stupidness.patch 5268
RMD160 631f1bf3dc4553e27dec4a901fa84e17ffc7c7c9 files/rpm-4.4.7-stupidness.patch 5268
SHA256 e563657e648e9b5ecfc0a653d7515f93db7785ec6867c81591663213965c0850 files/rpm-4.4.7-stupidness.patch 5268
DIST rpm-4.4.6.tar.gz 17157249 RMD160 6b433d20a63fb2542244ae62eff0a8b5fe290439 SHA1 33221f95189671d1a083b4f140bcf9a88ecd4374 SHA256 1e1da50af2b9dfe34c79315eae7520e7e57087671e17ce26107d779ae2b0b595
+DIST rpm-4.4.7-patches-1.tar.gz 48537 RMD160 9baaf952fa105bc2a51241eac89ff28ffd2378a0 SHA1 4ee1557645e33cfaa222ce4246c06c279300b93e SHA256 1444dc2eb7c07953bd5e0857d6d9db3817a692308729288d3acd84910abdb4a4
DIST rpm-4.4.7.tar.gz 14125623 RMD160 9002eb0fe1d680d8bff447d6918f9726c9a4e34c SHA1 b119fb0f10fd5e2eb330ba547b6a89e40f3c0e68 SHA256 18fde4195e4ac21a4290327336948f8c4fc58a680395edbb5f2f31bae67b18b5
EBUILD rpm-4.4.6-r3.ebuild 2775 RMD160 4f5c139299f125900ff56da72e806b789094b361 SHA1 2421c3afeeb2b41825ce1e7aa9f42b31ff649a2d SHA256 fef54145ba4404f3d90d1dc587f563b0305e14bc5f822434e6df07a166c8674e
MD5 9d90b8e68cea479b87a0b1f2802fc5ed rpm-4.4.6-r3.ebuild 2775
@@ -31,10 +41,14 @@ EBUILD rpm-4.4.7-r1.ebuild 2794 RMD160 25e8dbf913b1a13eb75696753982238358151535
MD5 06fa13c03cc0b5c6a161ad49d2dfca4e rpm-4.4.7-r1.ebuild 2794
RMD160 25e8dbf913b1a13eb75696753982238358151535 rpm-4.4.7-r1.ebuild 2794
SHA256 f6645d8b478ecbfb44b2bbc704f0c03bc255865a9c1f15c3b2bd130b4c70cce9 rpm-4.4.7-r1.ebuild 2794
-MISC ChangeLog 11218 RMD160 871e1da0ff827d3e8f4dfdd2291d0075544a4996 SHA1 fa17cfc1015428906a55aafbcafea97c6cdab9e0 SHA256 338c75f020288bd881b78d4fbac1c5120fd87d89ee1d5936018992f210750ed2
-MD5 1e93051c8fb2bf204b7c94bc28f0ce5f ChangeLog 11218
-RMD160 871e1da0ff827d3e8f4dfdd2291d0075544a4996 ChangeLog 11218
-SHA256 338c75f020288bd881b78d4fbac1c5120fd87d89ee1d5936018992f210750ed2 ChangeLog 11218
+EBUILD rpm-4.4.7-r2.ebuild 7603 RMD160 f27a3c101f0de9b9b037964bd413382b18ac6b98 SHA1 da2169debe817d06a972f450806934aef9478ec5 SHA256 bb6197c4210a1f5eab09de92c750af265db77bc0dc846800c39fe2d4ba27987a
+MD5 37ef1ac344845310e07b45c1494dfb40 rpm-4.4.7-r2.ebuild 7603
+RMD160 f27a3c101f0de9b9b037964bd413382b18ac6b98 rpm-4.4.7-r2.ebuild 7603
+SHA256 bb6197c4210a1f5eab09de92c750af265db77bc0dc846800c39fe2d4ba27987a rpm-4.4.7-r2.ebuild 7603
+MISC ChangeLog 11612 RMD160 286ed489bb35ba0e92c537fa335bab550744e979 SHA1 78ed1d2f7c63676c256c1bf637c650935786e61f SHA256 0742f2d8868ba8405e56a9ef68925005c3e135d8aa948d37b73258176bca53ee
+MD5 bb33ddde8a1a754304e28ccca11c26f8 ChangeLog 11612
+RMD160 286ed489bb35ba0e92c537fa335bab550744e979 ChangeLog 11612
+SHA256 0742f2d8868ba8405e56a9ef68925005c3e135d8aa948d37b73258176bca53ee ChangeLog 11612
MISC metadata.xml 221 RMD160 57859b0d6c681ad2aa7db0d58348892219149231 SHA1 37657578addb8fd633479dd88dc6f8011ac55080 SHA256 01f54e470bf605b606876efa6e6bfd634a2f964909f3920b0994fe2b21c3b731
MD5 305207dd9314b4b02a0becf597cf875f metadata.xml 221
RMD160 57859b0d6c681ad2aa7db0d58348892219149231 metadata.xml 221
@@ -45,10 +59,6 @@ SHA256 1a9d97d24a7c07cfd808a471e9fd22ced0813b41a109f6716b1d216fc828ecce files/di
MD5 1bb4771bd008ae0ecf2541173a600056 files/digest-rpm-4.4.7-r1 235
RMD160 5738523442bad1419926794367ffc30a16b59140 files/digest-rpm-4.4.7-r1 235
SHA256 1bf6cb96963acf3da6ad4a4b2e8166f0b426c0e396cdfe4428b2386d1fcad697 files/digest-rpm-4.4.7-r1 235
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.5 (GNU/Linux)
-
-iD8DBQFFT6PwwmS/YhfgUiURAjwFAJ0dYPWqJsUyU2jJxn0zOvKZWkSHnACgmGSr
-m8h2Q2RZLi80TEbsWWTMFh0=
-=RlPD
------END PGP SIGNATURE-----
+MD5 18dfcdb4d8f4adc13946e28c5de86030 files/digest-rpm-4.4.7-r2 491
+RMD160 48986918cca3c8ec1cb91467da3b7f5a28a39ff4 files/digest-rpm-4.4.7-r2 491
+SHA256 478cc2c4a2e93efbe0b1902f3f5591fa78d2d64f20ad7586346685275313bd5a files/digest-rpm-4.4.7-r2 491
diff --git a/app-arch/rpm/files/digest-rpm-4.4.7-r2 b/app-arch/rpm/files/digest-rpm-4.4.7-r2
new file mode 100644
index 000000000000..2739a8ed4c19
--- /dev/null
+++ b/app-arch/rpm/files/digest-rpm-4.4.7-r2
@@ -0,0 +1,6 @@
+MD5 3df07424eb50a8dc9f174acd649746af rpm-4.4.7-patches-1.tar.gz 48537
+RMD160 9baaf952fa105bc2a51241eac89ff28ffd2378a0 rpm-4.4.7-patches-1.tar.gz 48537
+SHA256 1444dc2eb7c07953bd5e0857d6d9db3817a692308729288d3acd84910abdb4a4 rpm-4.4.7-patches-1.tar.gz 48537
+MD5 d012c81b5169f7377ea4a36607e1445e rpm-4.4.7.tar.gz 14125623
+RMD160 9002eb0fe1d680d8bff447d6918f9726c9a4e34c rpm-4.4.7.tar.gz 14125623
+SHA256 18fde4195e4ac21a4290327336948f8c4fc58a680395edbb5f2f31bae67b18b5 rpm-4.4.7.tar.gz 14125623
diff --git a/app-arch/rpm/files/rpm-4.0.4-gentoo-uclibc.patch b/app-arch/rpm/files/rpm-4.0.4-gentoo-uclibc.patch
new file mode 100644
index 000000000000..4b94d1224a6d
--- /dev/null
+++ b/app-arch/rpm/files/rpm-4.0.4-gentoo-uclibc.patch
@@ -0,0 +1,50 @@
+--- rpm-4.0.4/installplatform.uclibc~ Wed Dec 1 18:17:32 2004
++++ rpm-4.0.4/installplatform Wed Dec 1 18:27:13 2004
+@@ -92,6 +92,12 @@
+ ;;
+ esac
+
++ case $OS in
++ *uclibc)
++ UCLIBCSED='-e s,^@uclibc@,,'
++ ;;
++ esac
++
+ cat $PLATFORM \
+ | sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \
+ -e "s,@RPMRC_ARCH@,$base_arch," \
+@@ -102,6 +108,7 @@
+ -e '/FLAGS:-/!s,\${,%{_,' \
+ $MULTILIBSED \
+ $VENDORSED \
++ $UCLIBCSED \
+ | grep -v '^@' \
+ > ${PPD}/macros
+
+--- rpm-4.0.4/platform.in.uclibc~ Wed Dec 1 18:27:24 2004
++++ rpm-4.0.4/platform.in Wed Dec 1 18:34:19 2004
+@@ -310,3 +310,24 @@
+ @gentoo@ --mandir=%{_mandir} \\\
+ @gentoo@ --infodir=%{_infodir}
+ #
++@uclibc@# uClibc specific settings
++@uclibc@#
++@uclibc@# busybox settings
++@uclibc@%__chown_Rhf %{__chown} -Rh
++@uclibc@%__chgrp_Rhf %{__chgrp} -R
++@uclibc@%_fixperms %{__chmod} -R a+rX,g-w,o-w
++@uclibc@
++@uclibc@# overwrite usage of getconf (only in glibc)
++@uclibc@%_smp_mflags %(echo "-j2")
++@uclibc@#%_vendor uclibc
++@uclibc@#%_os linux
++@uclibc@#%_host %{_arch}-%{_host_os}
++@uclibc@#%_host_os linux-uclibc
++@uclibc@%_gnu -uclibc
++@uclibc@#%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
++@uclibc@
++@uclibc@%_excludedocs 1
++@uclibc@
++@uclibc@#%_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}uc.%%{ARCH}.rpm
++@uclibc@#%_repackage_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}uc.%%{ARCH}.rpm
++@uclibc@
diff --git a/app-arch/rpm/files/rpm-4.0.4-sandbox.patch b/app-arch/rpm/files/rpm-4.0.4-sandbox.patch
new file mode 100644
index 000000000000..76795451c3a8
--- /dev/null
+++ b/app-arch/rpm/files/rpm-4.0.4-sandbox.patch
@@ -0,0 +1,20 @@
+--- rpm-4.0.4/autodeps/linux.req.mps 2005-06-10 13:44:36 +0200
++++ rpm-4.0.4/autodeps/linux.req 2005-06-10 13:46:24 +0200
+@@ -46,7 +46,7 @@
+ lib64=`if file -L $f 2>/dev/null | \
+ grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
+ ldd $f | awk '/=>/ {
+- if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) {
++ if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/ && $1 !~ /libsandbox.so/) {
+ gsub(/'\''"/,"\\&",$1);
+ printf "%s'$lib64'\n", $1
+ }
+@@ -60,7 +60,7 @@
+ lib64=`if file -L $f 2>/dev/null | \
+ grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
+ ldd $f | awk '/=>/ {
+- if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) {
++ if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/ && $1 !~ /libsandbox.so/) {
+ gsub(/'\''"/,"\\&",$1);
+ printf "%s'$lib64'\n", $1
+ }
diff --git a/app-arch/rpm/files/rpm-4.4.7-config.rpath.patch b/app-arch/rpm/files/rpm-4.4.7-config.rpath.patch
new file mode 100644
index 000000000000..8df0cd6d9c83
--- /dev/null
+++ b/app-arch/rpm/files/rpm-4.4.7-config.rpath.patch
@@ -0,0 +1,617 @@
+--- /var/tmp/portage/app-arch/rpm-4.4.7-r2/work/rpm-4.4.7/config.rpath 1970-01-01 01:00:00.000000000 +0100
++++ /tmp/rpm-4.4.7.dest/config.rpath 2007-01-15 21:50:24.004178000 +0100
+@@ -0,0 +1,614 @@
++#! /bin/sh
++# Output a system dependent set of variables, describing how to set the
++# run time search path of shared libraries in an executable.
++#
++# Copyright 1996-2006 Free Software Foundation, Inc.
++# Taken from GNU libtool, 2001
++# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
++#
++# This file is free software; the Free Software Foundation gives
++# unlimited permission to copy and/or distribute it, with or without
++# modifications, as long as this notice is preserved.
++#
++# The first argument passed to this file is the canonical host specification,
++# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
++# or
++# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
++# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
++# should be set by the caller.
++#
++# The set of defined variables is at the end of this script.
++
++# Known limitations:
++# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
++# than 256 bytes, otherwise the compiler driver will dump core. The only
++# known workaround is to choose shorter directory names for the build
++# directory and/or the installation directory.
++
++# All known linkers require a `.a' archive for static linking (except MSVC,
++# which needs '.lib').
++libext=a
++shrext=.so
++
++host="$1"
++host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
++host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
++host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
++
++# Code taken from libtool.m4's _LT_CC_BASENAME.
++
++for cc_temp in $CC""; do
++ case $cc_temp in
++ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
++ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
++ \-*) ;;
++ *) break;;
++ esac
++done
++cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
++
++# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
++
++wl=
++if test "$GCC" = yes; then
++ wl='-Wl,'
++else
++ case "$host_os" in
++ aix*)
++ wl='-Wl,'
++ ;;
++ darwin*)
++ case $cc_basename in
++ xlc*)
++ wl='-Wl,'
++ ;;
++ esac
++ ;;
++ mingw* | pw32* | os2*)
++ ;;
++ hpux9* | hpux10* | hpux11*)
++ wl='-Wl,'
++ ;;
++ irix5* | irix6* | nonstopux*)
++ wl='-Wl,'
++ ;;
++ newsos6)
++ ;;
++ linux*)
++ case $cc_basename in
++ icc* | ecc*)
++ wl='-Wl,'
++ ;;
++ pgcc | pgf77 | pgf90)
++ wl='-Wl,'
++ ;;
++ ccc*)
++ wl='-Wl,'
++ ;;
++ como)
++ wl='-lopt='
++ ;;
++ *)
++ case `$CC -V 2>&1 | sed 5q` in
++ *Sun\ C*)
++ wl='-Wl,'
++ ;;
++ esac
++ ;;
++ esac
++ ;;
++ osf3* | osf4* | osf5*)
++ wl='-Wl,'
++ ;;
++ sco3.2v5*)
++ ;;
++ solaris*)
++ wl='-Wl,'
++ ;;
++ sunos4*)
++ wl='-Qoption ld '
++ ;;
++ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
++ wl='-Wl,'
++ ;;
++ sysv4*MP*)
++ ;;
++ unicos*)
++ wl='-Wl,'
++ ;;
++ uts4*)
++ ;;
++ esac
++fi
++
++# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
++
++hardcode_libdir_flag_spec=
++hardcode_libdir_separator=
++hardcode_direct=no
++hardcode_minus_L=no
++
++case "$host_os" in
++ cygwin* | mingw* | pw32*)
++ # FIXME: the MSVC++ port hasn't been tested in a loooong time
++ # When not using gcc, we currently assume that we are using
++ # Microsoft Visual C++.
++ if test "$GCC" != yes; then
++ with_gnu_ld=no
++ fi
++ ;;
++ interix*)
++ # we just hope/assume this is gcc and not c89 (= MSVC++)
++ with_gnu_ld=yes
++ ;;
++ openbsd*)
++ with_gnu_ld=no
++ ;;
++esac
++
++ld_shlibs=yes
++if test "$with_gnu_ld" = yes; then
++ # Set some defaults for GNU ld with shared library support. These
++ # are reset later if shared libraries are not supported. Putting them
++ # here allows them to be overridden if necessary.
++ # Unlike libtool, we use -rpath here, not --rpath, since the documented
++ # option of GNU ld is called -rpath, not --rpath.
++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
++ case "$host_os" in
++ aix3* | aix4* | aix5*)
++ # On AIX/PPC, the GNU linker is very broken
++ if test "$host_cpu" != ia64; then
++ ld_shlibs=no
++ fi
++ ;;
++ amigaos*)
++ hardcode_libdir_flag_spec='-L$libdir'
++ hardcode_minus_L=yes
++ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
++ # that the semantics of dynamic libraries on AmigaOS, at least up
++ # to version 4, is to share data among multiple programs linked
++ # with the same dynamic library. Since this doesn't match the
++ # behavior of shared libraries on other platforms, we cannot use
++ # them.
++ ld_shlibs=no
++ ;;
++ beos*)
++ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
++ :
++ else
++ ld_shlibs=no
++ fi
++ ;;
++ cygwin* | mingw* | pw32*)
++ # hardcode_libdir_flag_spec is actually meaningless, as there is
++ # no search path for DLLs.
++ hardcode_libdir_flag_spec='-L$libdir'
++ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
++ :
++ else
++ ld_shlibs=no
++ fi
++ ;;
++ interix3*)
++ hardcode_direct=no
++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++ ;;
++ linux*)
++ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
++ :
++ else
++ ld_shlibs=no
++ fi
++ ;;
++ netbsd*)
++ ;;
++ solaris*)
++ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
++ ld_shlibs=no
++ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
++ :
++ else
++ ld_shlibs=no
++ fi
++ ;;
++ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
++ case `$LD -v 2>&1` in
++ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
++ ld_shlibs=no
++ ;;
++ *)
++ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
++ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
++ else
++ ld_shlibs=no
++ fi
++ ;;
++ esac
++ ;;
++ sunos4*)
++ hardcode_direct=yes
++ ;;
++ *)
++ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
++ :
++ else
++ ld_shlibs=no
++ fi
++ ;;
++ esac
++ if test "$ld_shlibs" = no; then
++ hardcode_libdir_flag_spec=
++ fi
++else
++ case "$host_os" in
++ aix3*)
++ # Note: this linker hardcodes the directories in LIBPATH if there
++ # are no directories specified by -L.
++ hardcode_minus_L=yes
++ if test "$GCC" = yes; then
++ # Neither direct hardcoding nor static linking is supported with a
++ # broken collect2.
++ hardcode_direct=unsupported
++ fi
++ ;;
++ aix4* | aix5*)
++ if test "$host_cpu" = ia64; then
++ # On IA64, the linker does run time linking by default, so we don't
++ # have to do anything special.
++ aix_use_runtimelinking=no
++ else
++ aix_use_runtimelinking=no
++ # Test if we are trying to use run time linking or normal
++ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
++ # need to do runtime linking.
++ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
++ for ld_flag in $LDFLAGS; do
++ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
++ aix_use_runtimelinking=yes
++ break
++ fi
++ done
++ ;;
++ esac
++ fi
++ hardcode_direct=yes
++ hardcode_libdir_separator=':'
++ if test "$GCC" = yes; then
++ case $host_os in aix4.[012]|aix4.[012].*)
++ collect2name=`${CC} -print-prog-name=collect2`
++ if test -f "$collect2name" && \
++ strings "$collect2name" | grep resolve_lib_name >/dev/null
++ then
++ # We have reworked collect2
++ hardcode_direct=yes
++ else
++ # We have old collect2
++ hardcode_direct=unsupported
++ hardcode_minus_L=yes
++ hardcode_libdir_flag_spec='-L$libdir'
++ hardcode_libdir_separator=
++ fi
++ ;;
++ esac
++ fi
++ # Begin _LT_AC_SYS_LIBPATH_AIX.
++ echo 'int main () { return 0; }' > conftest.c
++ ${CC} ${LDFLAGS} conftest.c -o conftest
++ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
++}'`
++ if test -z "$aix_libpath"; then
++ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
++}'`
++ fi
++ if test -z "$aix_libpath"; then
++ aix_libpath="/usr/lib:/lib"
++ fi
++ rm -f conftest.c conftest
++ # End _LT_AC_SYS_LIBPATH_AIX.
++ if test "$aix_use_runtimelinking" = yes; then
++ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
++ else
++ if test "$host_cpu" = ia64; then
++ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
++ else
++ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
++ fi
++ fi
++ ;;
++ amigaos*)
++ hardcode_libdir_flag_spec='-L$libdir'
++ hardcode_minus_L=yes
++ # see comment about different semantics on the GNU ld section
++ ld_shlibs=no
++ ;;
++ bsdi[45]*)
++ ;;
++ cygwin* | mingw* | pw32*)
++ # When not using gcc, we currently assume that we are using
++ # Microsoft Visual C++.
++ # hardcode_libdir_flag_spec is actually meaningless, as there is
++ # no search path for DLLs.
++ hardcode_libdir_flag_spec=' '
++ libext=lib
++ ;;
++ darwin* | rhapsody*)
++ hardcode_direct=no
++ if test "$GCC" = yes ; then
++ :
++ else
++ case $cc_basename in
++ xlc*)
++ ;;
++ *)
++ ld_shlibs=no
++ ;;
++ esac
++ fi
++ ;;
++ dgux*)
++ hardcode_libdir_flag_spec='-L$libdir'
++ ;;
++ freebsd1*)
++ ld_shlibs=no
++ ;;
++ freebsd2.2*)
++ hardcode_libdir_flag_spec='-R$libdir'
++ hardcode_direct=yes
++ ;;
++ freebsd2*)
++ hardcode_direct=yes
++ hardcode_minus_L=yes
++ ;;
++ freebsd* | kfreebsd*-gnu | dragonfly*)
++ hardcode_libdir_flag_spec='-R$libdir'
++ hardcode_direct=yes
++ ;;
++ hpux9*)
++ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
++ hardcode_libdir_separator=:
++ hardcode_direct=yes
++ # hardcode_minus_L: Not really in the search PATH,
++ # but as the default location of the library.
++ hardcode_minus_L=yes
++ ;;
++ hpux10*)
++ if test "$with_gnu_ld" = no; then
++ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
++ hardcode_libdir_separator=:
++ hardcode_direct=yes
++ # hardcode_minus_L: Not really in the search PATH,
++ # but as the default location of the library.
++ hardcode_minus_L=yes
++ fi
++ ;;
++ hpux11*)
++ if test "$with_gnu_ld" = no; then
++ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
++ hardcode_libdir_separator=:
++ case $host_cpu in
++ hppa*64*|ia64*)
++ hardcode_direct=no
++ ;;
++ *)
++ hardcode_direct=yes
++ # hardcode_minus_L: Not really in the search PATH,
++ # but as the default location of the library.
++ hardcode_minus_L=yes
++ ;;
++ esac
++ fi
++ ;;
++ irix5* | irix6* | nonstopux*)
++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
++ hardcode_libdir_separator=:
++ ;;
++ netbsd*)
++ hardcode_libdir_flag_spec='-R$libdir'
++ hardcode_direct=yes
++ ;;
++ newsos6)
++ hardcode_direct=yes
++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
++ hardcode_libdir_separator=:
++ ;;
++ openbsd*)
++ hardcode_direct=yes
++ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++ else
++ case "$host_os" in
++ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
++ hardcode_libdir_flag_spec='-R$libdir'
++ ;;
++ *)
++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++ ;;
++ esac
++ fi
++ ;;
++ os2*)
++ hardcode_libdir_flag_spec='-L$libdir'
++ hardcode_minus_L=yes
++ ;;
++ osf3*)
++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
++ hardcode_libdir_separator=:
++ ;;
++ osf4* | osf5*)
++ if test "$GCC" = yes; then
++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
++ else
++ # Both cc and cxx compiler support -rpath directly
++ hardcode_libdir_flag_spec='-rpath $libdir'
++ fi
++ hardcode_libdir_separator=:
++ ;;
++ solaris*)
++ hardcode_libdir_flag_spec='-R$libdir'
++ ;;
++ sunos4*)
++ hardcode_libdir_flag_spec='-L$libdir'
++ hardcode_direct=yes
++ hardcode_minus_L=yes
++ ;;
++ sysv4)
++ case $host_vendor in
++ sni)
++ hardcode_direct=yes # is this really true???
++ ;;
++ siemens)
++ hardcode_direct=no
++ ;;
++ motorola)
++ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
++ ;;
++ esac
++ ;;
++ sysv4.3*)
++ ;;
++ sysv4*MP*)
++ if test -d /usr/nec; then
++ ld_shlibs=yes
++ fi
++ ;;
++ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
++ ;;
++ sysv5* | sco3.2v5* | sco5v6*)
++ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
++ hardcode_libdir_separator=':'
++ ;;
++ uts4*)
++ hardcode_libdir_flag_spec='-L$libdir'
++ ;;
++ *)
++ ld_shlibs=no
++ ;;
++ esac
++fi
++
++# Check dynamic linker characteristics
++# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
++libname_spec='lib$name'
++case "$host_os" in
++ aix3*)
++ ;;
++ aix4* | aix5*)
++ ;;
++ amigaos*)
++ ;;
++ beos*)
++ ;;
++ bsdi[45]*)
++ ;;
++ cygwin* | mingw* | pw32*)
++ shrext=.dll
++ ;;
++ darwin* | rhapsody*)
++ shrext=.dylib
++ ;;
++ dgux*)
++ ;;
++ freebsd1*)
++ ;;
++ kfreebsd*-gnu)
++ ;;
++ freebsd* | dragonfly*)
++ ;;
++ gnu*)
++ ;;
++ hpux9* | hpux10* | hpux11*)
++ case $host_cpu in
++ ia64*)
++ shrext=.so
++ ;;
++ hppa*64*)
++ shrext=.sl
++ ;;
++ *)
++ shrext=.sl
++ ;;
++ esac
++ ;;
++ interix3*)
++ ;;
++ irix5* | irix6* | nonstopux*)
++ case "$host_os" in
++ irix5* | nonstopux*)
++ libsuff= shlibsuff=
++ ;;
++ *)
++ case $LD in
++ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
++ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
++ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
++ *) libsuff= shlibsuff= ;;
++ esac
++ ;;
++ esac
++ ;;
++ linux*oldld* | linux*aout* | linux*coff*)
++ ;;
++ linux*)
++ ;;
++ knetbsd*-gnu)
++ ;;
++ netbsd*)
++ ;;
++ newsos6)
++ ;;
++ nto-qnx*)
++ ;;
++ openbsd*)
++ ;;
++ os2*)
++ libname_spec='$name'
++ shrext=.dll
++ ;;
++ osf3* | osf4* | osf5*)
++ ;;
++ solaris*)
++ ;;
++ sunos4*)
++ ;;
++ sysv4 | sysv4.3*)
++ ;;
++ sysv4*MP*)
++ ;;
++ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
++ ;;
++ uts4*)
++ ;;
++esac
++
++sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
++escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
++shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
++escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
++
++LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
++
++# How to pass a linker flag through the compiler.
++wl="$escaped_wl"
++
++# Static library suffix (normally "a").
++libext="$libext"
++
++# Shared library suffix (normally "so").
++shlibext="$shlibext"
++
++# Flag to hardcode \$libdir into a binary during linking.
++# This must work even if \$libdir does not exist.
++hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
++
++# Whether we need a single -rpath flag with a separated argument.
++hardcode_libdir_separator="$hardcode_libdir_separator"
++
++# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
++# resulting binary.
++hardcode_direct="$hardcode_direct"
++
++# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
++# resulting binary.
++hardcode_minus_L="$hardcode_minus_L"
++
++EOF
diff --git a/app-arch/rpm/rpm-4.4.7-r2.ebuild b/app-arch/rpm/rpm-4.4.7-r2.ebuild
new file mode 100644
index 000000000000..0d1a0657b7bf
--- /dev/null
+++ b/app-arch/rpm/rpm-4.4.7-r2.ebuild
@@ -0,0 +1,244 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/rpm-4.4.7-r2.ebuild,v 1.1 2007/01/16 22:10:59 sanchan Exp $
+
+WANT_AUTOCONF="latest"
+WANT_AUTOMAKE="latest"
+inherit eutils autotools distutils perl-module gnuconfig toolchain-funcs
+
+DESCRIPTION="Red Hat Package Management Utils"
+HOMEPAGE="http://www.rpm.org/"
+SRC_URI="http://wraptastic.org/pub/rpm-4.4.x/${P}.tar.gz
+ http://dev.gentoo.org/~sanchan/patches/rpm-4.4.7-patches-1.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="berkdb doc elibc_uclibc java lua minimal nls perl python sqlite threads"
+GUID="37"
+
+RDEPEND="berkdb? ( >sys-libs/db-4 )
+ >=sys-libs/zlib-1.2.3-r1
+ >=app-arch/bzip2-1.0.1
+ >=dev-libs/popt-1.7
+ >=app-crypt/gnupg-1.2
+ elibc_glibc? ( dev-libs/elfutils )
+ virtual/libintl
+ >=dev-libs/beecrypt-4.1.2
+ python? ( >=dev-lang/python-2.2 )
+ perl? ( >=dev-lang/perl-5.8.8 )
+ nls? ( sys-devel/gettext )
+ sqlite? ( >=dev-db/sqlite-3.3.5 )
+ net-misc/neon"
+# lua? ( dev-lang/lua )
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ doc? ( app-doc/doxygen )"
+
+pkg_setup() {
+ if ! (use berkdb || use sqlite) ; then
+ ewarn "Haven't chosen any database format, either berkdb or sqlite"
+ ewarn "have to be used!"
+ die
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/rpm-4.4.6-with-sqlite.patch
+ epatch "${FILESDIR}"/rpm-4.4.7-stupidness.patch
+ epatch "${FILESDIR}"/rpm-4.4.6-autotools.patch
+ epatch "${FILESDIR}"/rpm-4.4.6-buffer-overflow.patch
+ epatch "${WORKDIR}"/${P}-openpkg.bugfix.patch
+ epatch "${WORKDIR}"/${P}-openpkg.porting.patch
+ epatch "${WORKDIR}"/${P}-openpkg.feature.patch
+ epatch "${WORKDIR}"/${P}-libintl.patch
+ epatch "${FILESDIR}"/rpm-4.0.4-sandbox.patch
+ epatch "${WORKDIR}"/${P}-zdefs.patch
+ epatch "${WORKDIR}"/${P}-zdefs-x_functions.patch
+ epatch "${WORKDIR}"/${P}-uclibc-nolibio.patch
+ epatch "${WORKDIR}"/${P}-uclibc-no__fxstat64.patch
+ epatch "${WORKDIR}"/${P}-fix-exec_prefix.patch
+
+ epatch "${WORKDIR}"/${P}-no_threads.patch
+ epatch "${WORKDIR}"/${P}-no_threads2.patch
+ epatch "${WORKDIR}"/${P}-with-threads.patch
+
+ epatch "${WORKDIR}"/${P}-gentoo.patch
+ epatch "${WORKDIR}"/${P}-fix-redhat.patch
+ epatch "${FILESDIR}"/rpm-4.0.4-gentoo-uclibc.patch
+
+ epatch "${WORKDIR}"/${P}-external_db.patch
+ epatch "${WORKDIR}"/${P}-external_db2.patch
+ epatch "${WORKDIR}"/${P}-external_db3.patch
+
+ epatch "${WORKDIR}"/${P}-no_lua.patch
+
+ cp autodeps/linux.req autodeps/linux-uclibc.req
+ cp autodeps/linux.prov autodeps/linux-uclibc.prov
+
+ # rpm uses AM_GNU_GETTEXT() but fails to actually
+ # include any of the required gettext files
+ # the gettext files exist only if gettext is installed (not on uClibc)
+ if use nls ; then
+ cp /usr/share/gettext/config.rpath . || die
+ else
+ epatch "${FILESDIR}"/${P}-config.rpath.patch
+ sed -i -e '/AM_GNU_GETTEXT/d' configure.ac
+ sed -i -e '/^SUBDIRS/s:po::' Makefile.am
+ fi
+ if use elibc_uclibc ; then
+ sed -i 's:--enable-rpc:--disable-rpc:' db3/configure
+ sed -i 's:rpmdb_svc rpmdb_stat:rpmdb_stat:' rpmdb/Makefile.am
+ fi
+
+ # the following are additional libraries that might be packaged with
+ # the rpm sources. grep for "test -d" in configure.ac
+ cp file/src/{file,patchlevel}.h tools/
+ rm -rf beecrypt elfutils neon popt sqlite zlib intl file syck tools
+ use lua || rm -rf lua
+ use berkdb && rm -rf db db3
+ #use sqlite && rm -rf db db3
+
+ sed -i -e "s:intl ::" Makefile.am
+ sed -i -e "s:intl/Makefile ::" configure.ac
+ use nls || sed -i -e "s:@INTLLIBS@::" lib/Makefile.am
+ sed -i -e '/lua\/Makefile/d' configure.ac
+ sed -i -e '/syck\/Makefile/d' -e '/syck\/lib\/Makefile/d' configure.ac
+ sed -i -e '/tools\/Makefile/d' configure.ac
+ sed -i -e '/^SUBDIRS/s:tools scripts:scripts:' Makefile.am
+
+ gnuconfig_update
+ AT_NO_RECURSIVE="yes" eautoreconf
+ # TODO: make it work with external lua too
+}
+
+src_compile() {
+ # we use arch-gentoo-linux-{gnu,uclibc} tuple
+ export CHOST="${CHOST//-pc-/-gentoo-}"
+ export CHOST="${CHOST//-unknown-/-gentoo-}"
+
+ local myconf
+ if use threads ; then
+ myconf="--with-threads --enable-posixmutexes"
+ else
+ myconf="--without-threads --disable-posixmutexes --with-mutex=\"UNIX/fcntl\""
+ fi
+ if use minimal ; then
+ # it does not work with berkdb, hash method is missing
+ if use berkdb ; then
+ myconf="${myconf} --disable-cryptography --disable-queue
+ --disable-replication --disable-verify"
+ else
+ myconf="${myconf} --enable-smallbuild"
+ fi
+ fi
+
+
+#$(use_with perl) \
+ python_version
+ econf ${myconf} \
+ --without-javaglue \
+ --without-selinux \
+ --without-syck \
+ $(use_with lua) \
+ $(use_with python python ${PYVER}) \
+ $(use_with doc apidocs) \
+ --without-perl \
+ $(use_with db) \
+ $(use_with sqlite) \
+ $(use_enable nls) \
+ || die "econf failed"
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ mv "${D}"/bin/rpm "${D}"/usr/bin
+ rmdir "${D}"/bin
+
+ use nls || rm -rf "${D}"/usr/share/man/??
+
+ keepdir /etc/rpm
+ keepdir /var/spool/repackage
+ keepdir /var/lib/rpm
+ local dbi
+ for dbi in \
+ Basenames Conflictname Dirnames Group Installtid Name Packages \
+ Providename Provideversion Requirename Requireversion Triggername \
+ Filemd5s Pubkeys Sha1header Sigmd5 Depends \
+ __db.001 __db.002 __db.003 __db.004 __db.006 __db.007 \
+ __db.008 __db.009
+ do
+ touch "${D}"/var/lib/rpm/${dbi}
+ done
+ keepdir /usr/src/gentoo/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
+ keepdir /usr/src/gentoo/RPMS/noarch
+ keepdir /usr/src/gentoo/RPMS/$(tc-arch)
+ local x
+ if [[ $(tc-arch) == "x86" ]] ; then
+ for x in athlon i386 i486 i586 i686 pentium3 pentium4 ; do
+ keepdir /usr/src/gentoo/RPMS/${x}
+ done
+ #else
+ #[[ $(tc-arch) == "ppc64" ]] && keepdir /usr/src/gentoo/RPMS/ppc
+ fi
+
+ dodoc CHANGES CREDITS GROUPS README* RPM*
+ use doc && dohtml -r apidocs/html/*
+
+ # Fix perllocal.pod file collision
+ use perl && fixlocalpod
+
+ # remove development stuff
+ rm -rf "${D}"/usr/include
+ rm -f "${D}"/usr/lib/lib*.*a
+ rm -f "${D}"/usr/lib/rpm/rpmcache
+ rm -f "${D}"/usr/bin/rpmgraph
+ rm -f "${D}"/usr/share/man/man*/rpmcache*
+ rm -f "${D}"/usr/share/man/man*/rpmgraph*
+ # remove unneeded links
+ rm -f "${D}"/usr/bin/rpm?
+ # remove unused utilities/files
+ #rm -f "${D}"/usr/lib/rpm/rpm.{daily,log,xinetd}
+ rm -f "${D}"/usr/lib/rpm/rpm.xinetd
+ [[ $(tc-arch) != "sparc64" ]] && rm -f "${D}"/usr/lib/rpm/*sparc64*
+ use java || rm -f "${D}"/usr/lib/rpm/*java*
+ dodir /etc/logrotate.d
+ mv "${D}"/usr/lib/rpm/rpm.log "${D}"/etc/logrotate.d/rpm
+ dodir /etc/cron.daily
+ mv "${D}"/usr/lib/rpm/rpm.daily "${D}"/etc/cron.daily/rpm
+ # remove unused requirement checks
+ rm -f "${D}"/usr/lib/rpm/{tcl,sql}.*
+ # misc
+ rm -f "${D}"/usr/lib/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi}
+ # disable automatic perl requirements
+ # puts too much info into db
+ chmod 644 "${D}"/usr/lib/rpm/perl.req
+
+ dodir /etc/env.d
+ echo 'CONFIG_PROTECT_MASK="/var/lib/rpm"' > "${D}"/etc/env.d/50rpm
+}
+
+pkg_preinst() {
+ enewgroup ${PN} ${GUID}
+ enewuser ${PN} ${GUID} /bin/bash /var/lib/rpm rpm
+}
+
+pkg_postinst() {
+ chown -R rpm:rpm ${ROOT}/usr/lib/rpm
+ chown -R rpm:rpm ${ROOT}/var/lib/rpm
+ chown rpm:rpm ${ROOT}/usr/bin/rpm{,2cpio,build,db,query,sign,verify}
+ if [[ -f ${ROOT}/var/lib/rpm/Packages ]] ; then
+ einfo "RPM database found... Rebuilding database (may take a while)..."
+ "${ROOT}"/usr/bin/rpm --rebuilddb --root=${ROOT}
+ else
+ einfo "No RPM database found... Creating database..."
+ "${ROOT}"/usr/bin/rpm --initdb --root=${ROOT}
+ fi
+ chown rpm:rpm ${ROOT}/var/lib/rpm/*
+
+ distutils_pkg_postinst
+}