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
commit3a33bb5dab0b81dc630e26f5dc9592fce05a7eb9 (patch)
tree0221910cc4ca421682cd3ce095aae8f64b494411 /app-arch
parentBump to 3.5.6 (prerelease). (diff)
downloadgentoo-2-3a33bb5dab0b81dc630e26f5dc9592fce05a7eb9.tar.gz
gentoo-2-3a33bb5dab0b81dc630e26f5dc9592fce05a7eb9.tar.bz2
gentoo-2-3a33bb5dab0b81dc630e26f5dc9592fce05a7eb9.zip
New ebuild with a lot of fixes and enhancements from Peter S. Mazinger <ps.m@gmx.net>. Many thanks for your help Peter!
(Portage version: 2.1.2)
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/rpm/ChangeLog14
-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
6 files changed, 949 insertions, 2 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/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
+}