diff options
author | 2010-04-22 22:32:13 +0200 | |
---|---|---|
committer | 2010-04-22 22:32:13 +0200 | |
commit | 6dfdd10d9bb9a86b69447eab2398ec0630fec57f (patch) | |
tree | 5387925d297c705a7538d8353a9b5eeef0b694ba | |
parent | Add net-p2p/kmldonkey (diff) | |
download | sochotnicky-6dfdd10d9bb9a86b69447eab2398ec0630fec57f.tar.gz sochotnicky-6dfdd10d9bb9a86b69447eab2398ec0630fec57f.tar.bz2 sochotnicky-6dfdd10d9bb9a86b69447eab2398ec0630fec57f.zip |
Added app-arch/rpm
-rw-r--r-- | app-arch/rpm/Manifest | 18 | ||||
-rw-r--r-- | app-arch/rpm/files/rpm-4.4.6-autotools.patch | 22 | ||||
-rw-r--r-- | app-arch/rpm/files/rpm-4.4.6-buffer-overflow.patch | 95 | ||||
-rw-r--r-- | app-arch/rpm/files/rpm-4.4.6-neon-0.28.patch | 63 | ||||
-rw-r--r-- | app-arch/rpm/files/rpm-4.4.6-qa-fix-undefined.patch | 21 | ||||
-rw-r--r-- | app-arch/rpm/files/rpm-4.4.6-stupidness.patch | 164 | ||||
-rw-r--r-- | app-arch/rpm/files/rpm-4.4.6-with-sqlite.patch | 20 | ||||
-rw-r--r-- | app-arch/rpm/files/rpm-4.4.7-qa-fix-undefined.patch | 33 | ||||
-rw-r--r-- | app-arch/rpm/files/rpm-4.4.7-qa-implicit-function-to-pointer.patch | 14 | ||||
-rw-r--r-- | app-arch/rpm/files/rpm-4.4.7-stupidness.patch | 171 | ||||
-rw-r--r-- | app-arch/rpm/metadata.xml | 12 | ||||
-rw-r--r-- | app-arch/rpm/rpm-4.4.6-r6.ebuild | 107 | ||||
-rw-r--r-- | app-arch/rpm/rpm-4.4.6-r7.ebuild | 107 | ||||
-rw-r--r-- | app-arch/rpm/rpm-4.4.7-r4.ebuild | 104 | ||||
-rw-r--r-- | app-arch/rpm/rpm-5.1.6.ebuild | 110 |
15 files changed, 1061 insertions, 0 deletions
diff --git a/app-arch/rpm/Manifest b/app-arch/rpm/Manifest new file mode 100644 index 0000000..f7d39ac --- /dev/null +++ b/app-arch/rpm/Manifest @@ -0,0 +1,18 @@ +AUX rpm-4.4.6-autotools.patch 660 RMD160 63155d3737ffdf9927b1763ddf068c5964e168c9 SHA1 70dd2346df0e5d95ec4a06587485381b48d52b81 SHA256 dd4828899e760358b702d0c2ca75e781619f7b65140cf2cc5600ea687a085569 +AUX rpm-4.4.6-buffer-overflow.patch 1952 RMD160 468c71731ec6893de165b4e1047f85f5b240f2f7 SHA1 dc41417f4064eb9476de9ef51e616042e55e5f73 SHA256 6ae715632dabd6cc6c24a92312ac22c1bd57235ff2f027f68943df68dcfc957b +AUX rpm-4.4.6-neon-0.28.patch 2393 RMD160 7cc24ef31e46682bffa57721e18299c4a9b74637 SHA1 14dd947d44150caa89b58991ed7dbdd358152c3e SHA256 e7b9c177a4ff8027f731ae54b2d6a836ea7be3e6eca92b704dbe30b33b8166c4 +AUX rpm-4.4.6-qa-fix-undefined.patch 553 RMD160 647b19a10c86850873d65b5a65c2530d5a44ed54 SHA1 75e1bb924ed57f3b0ef7776551c3d782a9121904 SHA256 1c72bb60b4c9af6b0c366debe7276f948308e777ff6fef090bb778d9bc724a06 +AUX rpm-4.4.6-stupidness.patch 4992 RMD160 d8f0e831599a72e6224e19a568fffadd999ebc4a SHA1 317f19c9f181ca2cd40d832536c458884bb5b279 SHA256 84af6ddab50982e15df90d2c7895ecd0f0b568caa6cd0af57ce33e1af784b4a7 +AUX rpm-4.4.6-with-sqlite.patch 517 RMD160 0af724f63b528aabd05f4bcf2d4c4830ebdf98d2 SHA1 0a22207c6bd4114aef4cc9cdca840e996fcf0297 SHA256 c84020fd6402c4d9bfddb554f251b4ac13c6ca151689070a7471e66c8f7bb6ac +AUX rpm-4.4.7-qa-fix-undefined.patch 776 RMD160 895ab185d15c94890ed8f2a34bf4f6b54c8bfb61 SHA1 d16d4a491625d304e96ba85fda982011c9d6d946 SHA256 87a444e00328cd6d78391acdf58ac3ab57fa161241c944df173ac14b2cb025a4 +AUX rpm-4.4.7-qa-implicit-function-to-pointer.patch 604 RMD160 f87086379c28fa878c94dbcd6855af82ee852caf SHA1 61079e3109a41c639015f312603ea43ae49a5bb7 SHA256 a8f12898b8ddba5d7dcc70c1128a2b27dd729c7fe2247450cca068bfa68f1d65 +AUX rpm-4.4.7-stupidness.patch 5268 RMD160 631f1bf3dc4553e27dec4a901fa84e17ffc7c7c9 SHA1 e957a9a549fa1ec52b449b1e8fc3ea14af7b7a09 SHA256 e563657e648e9b5ecfc0a653d7515f93db7785ec6867c81591663213965c0850 +DIST rpm-4.4.6.tar.gz 17157249 RMD160 6b433d20a63fb2542244ae62eff0a8b5fe290439 SHA1 33221f95189671d1a083b4f140bcf9a88ecd4374 SHA256 1e1da50af2b9dfe34c79315eae7520e7e57087671e17ce26107d779ae2b0b595 +DIST rpm-4.4.7.tar.gz 14125623 RMD160 9002eb0fe1d680d8bff447d6918f9726c9a4e34c SHA1 b119fb0f10fd5e2eb330ba547b6a89e40f3c0e68 SHA256 18fde4195e4ac21a4290327336948f8c4fc58a680395edbb5f2f31bae67b18b5 +DIST rpm-5.1.6.tar.gz 8305612 RMD160 88645f4a7c2e25fffaa5628d267e86eaac137b35 SHA1 3ab7d1edf333102c748c22e9144ab90d9719ab0b SHA256 82ee1a737bd77ddd90b0fe1e9a2f478c46033e451fac3881d00ab9e166951799 +EBUILD rpm-4.4.6-r6.ebuild 3114 RMD160 cbc807cb63ae226264ccb9c510e8bcb5d3b03a9e SHA1 5e84cf6271557816c7413d1c08a866ab2deece27 SHA256 6202075986b80ce56b95001968fe4182bc9c4b149d0df453791c2bc88efcdbd6 +EBUILD rpm-4.4.6-r7.ebuild 3111 RMD160 4bffce5bc3f5e29d158d46790f1813d48d08b5e4 SHA1 ccd0974e2c459fee6a67d13bf40d1ba1bcf771df SHA256 15e3afd2d141e7a9cb1b6e968d6ed3c7331ca206f04e2eea89224178b10f7b0d +EBUILD rpm-4.4.7-r4.ebuild 3083 RMD160 c5c835de374335f3cd2847aaf1a72d07e1fba37a SHA1 b183ebe5f6ffa6979045b2f406772a76de13cc43 SHA256 f0204575b60ef2e97963d1951f43869e4c7814a99b64ac1980453ead7e737022 +EBUILD rpm-5.1.6.ebuild 2946 RMD160 ceba21a3805e60ac63e12046eeaa58d4961f21a6 SHA1 e9d8c000729f4fca443904a9859864a13546acfe SHA256 c5dfd0023beffbedd16248aa27a439bc53ff22abc9f89d804480a0fe6b5a372f +MISC ChangeLog 16558 RMD160 b3d1f118984964ed771dbec55dec4c651771c830 SHA1 cf4c5051ad64905de8aba72b82996cb4c6ba90e5 SHA256 4bae13360038a5f3a4f5939477af6a9835f8d899370500caa61936f88d1542bf +MISC metadata.xml 396 RMD160 5370081b5c621536cf1043f44c0b6d45051dc895 SHA1 b5dbf8427940398fef39ed6ecf44fc40ab79a261 SHA256 c202b9189a05829f811129efd19db92cdc3ea04161472e4bb1011be344b4935d diff --git a/app-arch/rpm/files/rpm-4.4.6-autotools.patch b/app-arch/rpm/files/rpm-4.4.6-autotools.patch new file mode 100644 index 0000000..55fced3 --- /dev/null +++ b/app-arch/rpm/files/rpm-4.4.6-autotools.patch @@ -0,0 +1,22 @@ +fixup autotool warning: + +configure.ac:661: warning: AC_COMPILE_IFELSE was called before AC_GNU_SOURCE +autoconf/specific.m4:335: AC_GNU_SOURCE is expanded from... +aclocal.m4:8669: gl_LOCK_BODY is expanded from... +aclocal.m4:8463: gl_LOCK is expanded from... +aclocal.m4:609: gt_INTL_SUBDIR_CORE is expanded from... +aclocal.m4:511: AM_INTL_SUBDIR is expanded from... +aclocal.m4:387: AM_GNU_GETTEXT is expanded from... +configure.ac:661: the top level +configure.ac:661: warning: AC_RUN_IFELSE was called before AC_GNU_SOURCE + +--- configure.ac ++++ configure.ac +@@ -57,6 +57,7 @@ + AC_PROG_MAKE_SET + dnl AC_PROG_RANLIB + AC_PROG_YACC ++AC_GNU_SOURCE + + AC_AIX + AC_MINIX diff --git a/app-arch/rpm/files/rpm-4.4.6-buffer-overflow.patch b/app-arch/rpm/files/rpm-4.4.6-buffer-overflow.patch new file mode 100644 index 0000000..d543958 --- /dev/null +++ b/app-arch/rpm/files/rpm-4.4.6-buffer-overflow.patch @@ -0,0 +1,95 @@ +Index: lib/query.c +=================================================================== +RCS file: /cvs/devel/rpm/lib/query.c,v +retrieving revision 2.173.2.15 +retrieving revision 2.173.2.16 +diff -a -u -r2.173.2.15 -r2.173.2.16 +--- lib/query.c 8 Oct 2006 21:41:45 -0000 2.173.2.15 ++++ lib/query.c 30 Oct 2006 02:50:53 -0000 2.173.2.16 +@@ -124,6 +124,28 @@ + return str; + } + ++/** ++ */ ++static void flushBuffer(char ** tp, char ** tep, int nonewline) ++ /*@ modifies *tp, *tep @*/ ++{ ++ char *t, *te; ++ ++ t = *tp; ++ te = *tep; ++ if (te > t) { ++ if (!nonewline) { ++ *te++ = '\n'; ++ *te = '\0'; ++ } ++ rpmMessage(RPMMESS_NORMAL, "%s", t); ++ te = t; ++ *t = '\0'; ++ } ++ *tp = t; ++ *tep = te; ++} ++ + int showQueryPackage(QVA_t qva, rpmts ts, Header h) + { + int scareMem = 0; +@@ -131,7 +153,6 @@ + char * t, * te; + char * prefix = NULL; + int rc = 0; /* XXX FIXME: need real return code */ +- int nonewline = 0; + int i; + + te = t = xmalloc(BUFSIZ); +@@ -141,7 +162,6 @@ + + if (qva->qva_queryFormat != NULL) { + const char * str = queryHeader(h, qva->qva_queryFormat); +- nonewline = 1; + /*@-branchstate@*/ + if (str) { + size_t tb = (te - t); +@@ -157,6 +177,7 @@ + /*@=usereleased@*/ + /*@=boundswrite@*/ + str = _free(str); ++ flushBuffer(&t, &te, 1); + } + /*@=branchstate@*/ + } +@@ -312,31 +333,13 @@ + _("package has neither file owner or id lists\n")); + } + } +-/*@-branchstate@*/ +- if (te > t) { +-/*@-boundswrite@*/ +- *te++ = '\n'; +- *te = '\0'; +- rpmMessage(RPMMESS_NORMAL, "%s", t); +- te = t; +- *t = '\0'; +-/*@=boundswrite@*/ +- } +-/*@=branchstate@*/ ++ flushBuffer(&t, &te, 0); + } + + rc = 0; + + exit: +- if (te > t) { +- if (!nonewline) { +-/*@-boundswrite@*/ +- *te++ = '\n'; +- *te = '\0'; +-/*@=boundswrite@*/ +- } +- rpmMessage(RPMMESS_NORMAL, "%s", t); +- } ++ flushBuffer(&t, &te, 0); + t = _free(t); + + fi = rpmfiFree(fi); diff --git a/app-arch/rpm/files/rpm-4.4.6-neon-0.28.patch b/app-arch/rpm/files/rpm-4.4.6-neon-0.28.patch new file mode 100644 index 0000000..2218205 --- /dev/null +++ b/app-arch/rpm/files/rpm-4.4.6-neon-0.28.patch @@ -0,0 +1,63 @@ +Update to neon 0.28 API, by Honza Machacek <Hloupy.Honza@centrum.cz> bug #214799. + +diff -Naur tmp-old/rpmio/rpmdav.c tmp-new/rpmio/rpmdav.c +--- rpmio/rpmdav.c 2008-03-28 04:40:52.000000000 +0000 ++++ rpmio/rpmdav.c 2008-03-28 05:19:50.000000000 +0000 +@@ -103,7 +103,7 @@ + } + + static void davNotify(void * userdata, +- ne_conn_status connstatus, const char * info) ++ ne_session_status sessionstatus, const char * info) + /*@*/ + { + urlinfo u = userdata; +@@ -124,18 +124,20 @@ + + #ifdef REFERENCE + typedef enum { +- ne_conn_namelookup, /* lookup up hostname (info = hostname) */ +- ne_conn_connecting, /* connecting to host (info = hostname) */ +- ne_conn_connected, /* connected to host (info = hostname) */ +- ne_conn_secure /* connection now secure (info = crypto level) */ +-} ne_conn_status; ++ ne_status_lookup = 0, /* looking up hostname */ ++ ne_status_connecting, /* connecting to host */ ++ ne_status_connected, /* connected to host */ ++ ne_status_sending, /* sending a request body */ ++ ne_status_recving, /* receiving a response body */ ++ ne_status_disconnected /* disconnected from host */ ++} ne_session_status; + #endif + +- u->connstatus = connstatus; ++ u->sessionstatus = sessionstatus; + + /*@-boundsread@*/ + if (_dav_debug < 0) +-fprintf(stderr, "*** davNotify(%p,%d,%p) sess %p u %p %s\n", userdata, connstatus, info, sess, u, connstates[ (connstatus < 4 ? connstatus : 4)]); ++fprintf(stderr, "*** davNotify(%p,%d,%p) sess %p u %p %s\n", userdata, sessionstatus, info, sess, u, connstates[ (sessionstatus < 5 ? sessionstatus : 5)]); + /*@=boundsread@*/ + + } +@@ -350,7 +352,7 @@ + #endif + + ne_set_progress(u->sess, davProgress, u); +- ne_set_status(u->sess, davNotify, u); ++ ne_set_notifier(u->sess, davNotify, u); + + ne_set_persist(u->sess, 1); + ne_set_read_timeout(u->sess, httpTimeoutSecs); +diff -Naur tmp-old/rpmio/rpmurl.h tmp-new/rpmio/rpmurl.h +--- rpmio/rpmurl.h 2008-03-28 04:55:02.000000000 +0000 ++++ rpmio/rpmurl.h 2008-03-28 04:56:09.000000000 +0000 +@@ -60,7 +60,7 @@ + void * sess; /*!< neon: ne_session ptr */ + off_t current; /*!< neon: current body offset. */ + off_t total; /*!< neon: total body length. */ +- int connstatus; /*!< neon: connection status. */ ++ int sessionstatus; /*!< neon: session status. */ + #ifdef REFERENCE + typedef enum { + ne_conn_namelookup, /* lookup up hostname (info = hostname) */ diff --git a/app-arch/rpm/files/rpm-4.4.6-qa-fix-undefined.patch b/app-arch/rpm/files/rpm-4.4.6-qa-fix-undefined.patch new file mode 100644 index 0000000..25537d1 --- /dev/null +++ b/app-arch/rpm/files/rpm-4.4.6-qa-fix-undefined.patch @@ -0,0 +1,21 @@ +--- rpm-4.4.6/rpmio/url.c.orig 2007-01-20 16:29:35.471962977 +0100 ++++ rpm-4.4.6/rpmio/url.c 2007-01-20 16:30:34.438967191 +0100 +@@ -28,6 +28,8 @@ + #define IPPORT_PGPKEYSERVER 11371 + #endif + ++#include <neon/ne_session.h> ++ + /** + */ + /*@unchecked@*/ + +--- rpm-4.4.6/lib/rpmfi.c.orig 2007-01-20 18:11:30.186124993 +0100 ++++ rpm-4.4.6/lib/rpmfi.c 2007-01-20 18:13:26.938313715 +0100 +@@ -24,6 +24,7 @@ + + #include "misc.h" /* XXX stripTrailingChar */ + #include "rpmmacro.h" /* XXX rpmCleanPath */ ++#include "legacy.h" /* XXX dodigest */ + + #include "debug.h" diff --git a/app-arch/rpm/files/rpm-4.4.6-stupidness.patch b/app-arch/rpm/files/rpm-4.4.6-stupidness.patch new file mode 100644 index 0000000..644c12f --- /dev/null +++ b/app-arch/rpm/files/rpm-4.4.6-stupidness.patch @@ -0,0 +1,164 @@ +Try and disable over-engineering in the rpm build system. + +--- rpm-4.4.6/build/Makefile.am ++++ rpm-4.4.6/build/Makefile.am +@@ -24,10 +24,7 @@ + pkginc_HEADERS = rpmbuild.h rpmfc.h rpmfile.h rpmspec.h + noinst_HEADERS = buildio.h + +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) +- +-usrlibdir = $(libdir)@MARK64@ +-usrlib_LTLIBRARIES = librpmbuild.la ++lib_LTLIBRARIES = librpmbuild.la + librpmbuild_la_SOURCES = \ + build.c expression.c files.c misc.c names.c pack.c \ + parseBuildInstallClean.c parseChangelog.c parseDescription.c \ +--- rpm-4.4.6/configure.ac ++++ rpm-4.4.6/configure.ac +@@ -117,7 +117,7 @@ + dnl + with_selinuxval=no + AC_MSG_CHECKING(flag used by libtool to link rpm) +-if test X"$GCC" = Xyes ; then ++if false ; then + case "$target" in + *-*-linux*) LDFLAGS_STATIC="-all-static" + with_selinuxval=yes ;; +@@ -160,14 +160,6 @@ + dnl XXX Test for libpthread.a that is NPTL aware (static link only). + dnl + LDFLAGS_NPTL= +-if test -f /usr/lib/nptl/libpthread.a ; then +- LDFLAGS_NPTL="-L/usr/lib/nptl" +-# INCPATH="$INCPATH -I/usr/include/nptl" +-fi +-if test -f /usr/lib64/nptl/libpthread.a ; then +- LDFLAGS_NPTL="-L/usr/lib64/nptl" +-# INCPATH="$INCPATH -I/usr/include/nptl" +-fi + AC_SUBST(LDFLAGS_NPTL) + + dnl +@@ -1289,9 +1281,7 @@ + + dnl XXX Choose /usr/lib or /usr/lib64 for library installs. + MARK64= +-case "${target_cpu}" in +-x86_64*|ppc64*|powerpc64*|sparc64*|s390x*) MARK64=64 ;; +-esac ++MARK64=ALL-SCREWED-UP + AC_SUBST(MARK64) + + # For some systems we know that we have ld_version scripts. +@@ -1368,13 +1358,16 @@ + else + usrprefix=$prefix + fi ++ ++test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ++ + LOCALEDIR="`echo ${usrprefix}/share/locale`" + AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR", + [Full path to rpm locale directory (usually /usr/share/locale)]) + AC_SUBST(LOCALEDIR) + LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`" + AC_SUBST(LIBDIR) +-RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`" ++RPMCONFIGDIR="`eval eval echo ${libdir}/rpm`" + AC_DEFINE_UNQUOTED(RPMCONFIGDIR, "$RPMCONFIGDIR", + [Full path to rpm global configuration directory (usually /usr/lib/rpm)]) + AC_SUBST(RPMCONFIGDIR) +--- rpm-4.4.6/lib/Makefile.am ++++ rpm-4.4.6/lib/Makefile.am +@@ -29,10 +29,7 @@ + mylibs = librpm.la + LIBS = + +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) +- +-usrlibdir = $(libdir)@MARK64@ +-usrlib_LTLIBRARIES = librpm.la ++lib_LTLIBRARIES = librpm.la + librpm_la_SOURCES = \ + cpio.c depends.c formats.c fs.c fsm.c getdate.c \ + manifest.c misc.c package.c \ +--- rpm-4.4.6/python/Makefile.am ++++ rpm-4.4.6/python/Makefile.am +@@ -4,8 +4,8 @@ + + LINT = splint + +-pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@ +-pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@ ++pylibdir = $(libdir)/python@WITH_PYTHON_VERSION@ ++pyincdir = $(includedir)/python@WITH_PYTHON_VERSION@ + + SUBDIRS = rpm + +--- rpm-4.4.6/python/rpm/Makefile.am ++++ rpm-4.4.6/python/rpm/Makefile.am +@@ -4,8 +4,8 @@ + + PYVER = @WITH_PYTHON_VERSION@ + +-pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@ +-pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@ ++pylibdir = $(libdir)/python@WITH_PYTHON_VERSION@ ++pyincdir = $(includedir)/python@WITH_PYTHON_VERSION@ + + EXTRA_DIST = \ + __init__.py +--- rpm-4.4.6/rpmdb/Makefile.am ++++ rpm-4.4.6/rpmdb/Makefile.am +@@ -41,11 +41,7 @@ + # XXX watchout, ../db3/libdb.la created by this Makefile may surprise + libdb_la = $(top_builddir)/$(WITH_DB_SUBDIR)/libdb.la + +-# XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) +- +-usrlibdir = $(libdir)@MARK64@ +-usrlib_LTLIBRARIES = librpmdb.la ++lib_LTLIBRARIES = librpmdb.la + librpmdb_la_SOURCES = \ + dbconfig.c fprint.c \ + hdrNVR.c header.c header_internal.c legacy.c merge.c \ +--- rpm-4.4.6/rpmio/Makefile.am ++++ rpm-4.4.6/rpmio/Makefile.am +@@ -26,10 +26,7 @@ + + BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECTYPT_SUBDIR@/listobjs) + +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) +- +-usrlibdir = $(libdir)@MARK64@ +-usrlib_LTLIBRARIES = librpmio.la ++lib_LTLIBRARIES = librpmio.la + librpmio_la_SOURCES = \ + argv.c digest.c fts.c macro.c rmd128.c rmd160.c rpmdav.c \ + rpmhook.c rpmio.c rpmlog.c rpmlua.c rpmmalloc.c \ +--- rpm-4.4.6/scripts/Makefile.am ++++ rpm-4.4.6/scripts/Makefile.am +@@ -25,7 +25,7 @@ + + all: + +-configdir = ${prefix}/lib/rpm ++configdir = $(libdir)/rpm + config_SCRIPTS = \ + brp-compress brp-python-bytecompile brp-java-gcjcompile brp-redhat \ + brp-strip brp-strip-comment-note brp-nobuildrootpath \ +--- rpm-4.4.6/tools/Makefile.am ++++ rpm-4.4.6/tools/Makefile.am +@@ -49,10 +49,6 @@ + #rpmdeps_LDFLAGS = $(staticLDFLAGS) + rpmdeps_LDADD = $(top_builddir)/build/librpmbuild.la + +-rpmfile.c: $(top_srcdir)/file/src/file.c +- rm -f $@ +- ln -s $< $@ +- + rpmfile_SOURCES = rpmfile.c + rpmfile_CFLAGS = -DMAGIC='"$(MAGIC)"' $(INCLUDES) + rpmfile_LDADD = $(top_builddir)/rpmio/librpmio.la diff --git a/app-arch/rpm/files/rpm-4.4.6-with-sqlite.patch b/app-arch/rpm/files/rpm-4.4.6-with-sqlite.patch new file mode 100644 index 0000000..f42e17e --- /dev/null +++ b/app-arch/rpm/files/rpm-4.4.6-with-sqlite.patch @@ -0,0 +1,20 @@ +--- configure.ac ++++ configure.ac +@@ -625,6 +625,9 @@ + WITH_SQLITE3_INCLUDE= + WITH_SQLITE3_LIB= + ++withval=yes ++AC_ARG_WITH(sqlite, [ --with-sqlite use sqlite database library ]) ++if test "$withval" != no; then + AC_CHECK_HEADER([sqlite3.h], [ + AC_CHECK_LIB(sqlite3, sqlite3_open, [ + AC_DEFINE(HAVE_SQLITE3_H, 1, [Define if you have the <sqlite3.h> header file]) +@@ -642,6 +645,7 @@ + DBLIBSRCS="$DBLIBSRCS sqlite.c" + fi + ]) ++fi + + AC_SUBST(WITH_SQLITE3_SUBDIR) + AC_SUBST(WITH_SQLITE3_INCLUDE) diff --git a/app-arch/rpm/files/rpm-4.4.7-qa-fix-undefined.patch b/app-arch/rpm/files/rpm-4.4.7-qa-fix-undefined.patch new file mode 100644 index 0000000..a5627eb --- /dev/null +++ b/app-arch/rpm/files/rpm-4.4.7-qa-fix-undefined.patch @@ -0,0 +1,33 @@ +--- rpmio/url.c.orig 2007-01-20 16:29:35.471962977 +0100 ++++ rpmio/url.c 2007-01-20 16:30:34.438967191 +0100 +@@ -28,6 +28,8 @@ + #define IPPORT_PGPKEYSERVER 11371 + #endif + ++#include <neon/ne_session.h> ++ + /** + */ + /*@unchecked@*/ + +--- lib/rpmrc.c.orig 2007-01-20 16:40:21.922342919 +0100 ++++ lib/rpmrc.c 2007-01-20 16:42:11.185674112 +0100 +@@ -13,7 +13,7 @@ + #else + #define __power_pc() 0 + #endif +- ++#include <rpmio_internal.h> + #include <rpmcli.h> + #include <rpmmacro.h> + #include <rpmlua.h> + +--- lib/rpmfi.c.orig 2007-01-20 18:11:30.186124993 +0100 ++++ lib/rpmfi.c 2007-01-20 18:13:26.938313715 +0100 +@@ -24,6 +24,7 @@ + + #include "misc.h" /* XXX stripTrailingChar */ + #include "rpmmacro.h" /* XXX rpmCleanPath */ ++#include "legacy.h" /* XXX dodigest */ + + #include "debug.h" diff --git a/app-arch/rpm/files/rpm-4.4.7-qa-implicit-function-to-pointer.patch b/app-arch/rpm/files/rpm-4.4.7-qa-implicit-function-to-pointer.patch new file mode 100644 index 0000000..96f7afb --- /dev/null +++ b/app-arch/rpm/files/rpm-4.4.7-qa-implicit-function-to-pointer.patch @@ -0,0 +1,14 @@ +Fix QA Notice: Function `dbiFreeIndexSet' implicitly converted to pointer at transaction.c:2086 +that will almost certainly crash on 64bit architectures. +Patch provided by Jeff Johnson <n3npq.jbj@gmail.com> on Rpm-devel list. +--- rpm-4.4.7/lib/transaction.c.orig 2007-01-20 15:44:30.275657635 +0100 ++++ rpm-4.4.7/lib/transaction.c 2007-01-20 15:45:09.818625107 +0100 +@@ -2083,7 +2083,7 @@ + shared->isRemoved = (knownBad == ro); + shared++; + } +- matches[i] = dbiFreeIndexSet(matches[i]); ++ (void) dbiFreeIndexSet(matches[i]); + } + numShared = shared - sharedList; + shared->otherPkg = -1; diff --git a/app-arch/rpm/files/rpm-4.4.7-stupidness.patch b/app-arch/rpm/files/rpm-4.4.7-stupidness.patch new file mode 100644 index 0000000..8812a7b --- /dev/null +++ b/app-arch/rpm/files/rpm-4.4.7-stupidness.patch @@ -0,0 +1,171 @@ +Try and disable over-engineering in the rpm build system. + +--- rpm-4.4.7/build/Makefile.am ++++ rpm-4.4.7/build/Makefile.am +@@ -24,10 +24,7 @@ + pkginc_HEADERS = rpmbuild.h rpmfc.h rpmfile.h rpmspec.h + noinst_HEADERS = buildio.h + +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) +- +-usrlibdir = $(libdir)@MARK64@ +-usrlib_LTLIBRARIES = librpmbuild.la ++lib_LTLIBRARIES = librpmbuild.la + librpmbuild_la_SOURCES = \ + build.c expression.c files.c misc.c names.c pack.c \ + parseBuildInstallClean.c parseChangelog.c parseDescription.c \ +--- rpm-4.4.7/configure.ac ++++ rpm-4.4.7/configure.ac +@@ -117,7 +117,9 @@ + dnl + with_selinuxval=no + AC_MSG_CHECKING(flag used by libtool to link rpm) +-if test X"$GCC" = Xyes ; then ++# We do not want static linking ++#if test X"$GCC" = Xyes ; then ++if false ; then + case "$target" in + *-*-linux*) LDFLAGS_STATIC="-all-static" + with_selinuxval=yes ;; +@@ -160,14 +162,15 @@ + dnl XXX Test for libpthread.a that is NPTL aware (static link only). + dnl + LDFLAGS_NPTL= +-if test -f /usr/lib/nptl/libpthread.a ; then +- LDFLAGS_NPTL="-L/usr/lib/nptl" ++# Also do not need static linking ++#if test -f /usr/lib/nptl/libpthread.a ; then ++# LDFLAGS_NPTL="-L/usr/lib/nptl" + # INCPATH="$INCPATH -I/usr/include/nptl" +-fi +-if test -f /usr/lib64/nptl/libpthread.a ; then +- LDFLAGS_NPTL="-L/usr/lib64/nptl" ++#fi ++#if test -f /usr/lib64/nptl/libpthread.a ; then ++# LDFLAGS_NPTL="-L/usr/lib64/nptl" + # INCPATH="$INCPATH -I/usr/include/nptl" +-fi ++#fi + AC_SUBST(LDFLAGS_NPTL) + + dnl +@@ -1306,6 +1309,8 @@ + case "${target_cpu}" in + x86_64*|ppc64*|powerpc64*|sparc64*|s390x*) MARK64=64 ;; + esac ++# We don't want this magic as portage handles it ++MARK64=ALL-SCREWED-UP + AC_SUBST(MARK64) + + # For some systems we know that we have ld_version scripts. +@@ -1388,13 +1384,16 @@ + else + usrprefix=$prefix + fi ++ ++test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ++ + LOCALEDIR="`echo ${usrprefix}/share/locale`" + AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR", + [Full path to rpm locale directory (usually /usr/share/locale)]) + AC_SUBST(LOCALEDIR) + LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`" + AC_SUBST(LIBDIR) +-RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`" ++RPMCONFIGDIR="`eval echo ${libdir}/rpm`" + AC_DEFINE_UNQUOTED(RPMCONFIGDIR, "$RPMCONFIGDIR", + [Full path to rpm global configuration directory (usually /usr/lib/rpm)]) + AC_SUBST(RPMCONFIGDIR) +--- rpm-4.4.7/lib/Makefile.am ++++ rpm-4.4.7/lib/Makefile.am +@@ -29,10 +29,7 @@ + mylibs = librpm.la + LIBS = + +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) +- +-usrlibdir = $(libdir)@MARK64@ +-usrlib_LTLIBRARIES = librpm.la ++lib_LTLIBRARIES = librpm.la + librpm_la_SOURCES = \ + cpio.c depends.c formats.c fs.c fsm.c getdate.c \ + manifest.c misc.c package.c \ +--- rpm-4.4.7/python/Makefile.am ++++ rpm-4.4.7/python/Makefile.am +@@ -4,8 +4,8 @@ + + LINT = splint + +-pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@ +-pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@ ++pylibdir = $(libdir)/python@WITH_PYTHON_VERSION@ ++pyincdir = $(includedir)/python@WITH_PYTHON_VERSION@ + + SUBDIRS = rpm + +--- rpm-4.4.7/python/rpm/Makefile.am ++++ rpm-4.4.7/python/rpm/Makefile.am +@@ -4,8 +4,8 @@ + + PYVER = @WITH_PYTHON_VERSION@ + +-pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@ +-pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@ ++pylibdir = $(libdir)/python@WITH_PYTHON_VERSION@ ++pyincdir = $(includedir)/python@WITH_PYTHON_VERSION@ + + EXTRA_DIST = \ + __init__.py +--- rpm-4.4.7/rpmdb/Makefile.am ++++ rpm-4.4.7/rpmdb/Makefile.am +@@ -41,11 +41,7 @@ + # XXX watchout, ../db3/libdb.la created by this Makefile may surprise + libdb_la = $(top_builddir)/$(WITH_DB_SUBDIR)/libdb.la + +-# XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) +- +-usrlibdir = $(libdir)@MARK64@ +-usrlib_LTLIBRARIES = librpmdb.la ++lib_LTLIBRARIES = librpmdb.la + librpmdb_la_SOURCES = \ + dbconfig.c fprint.c \ + hdrNVR.c header.c header_internal.c legacy.c merge.c \ +--- rpm-4.4.7/rpmio/Makefile.am ++++ rpm-4.4.7/rpmio/Makefile.am +@@ -28,10 +28,7 @@ + + BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECTYPT_SUBDIR@/listobjs) + +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) +- +-usrlibdir = $(libdir)@MARK64@ +-usrlib_LTLIBRARIES = librpmio.la ++lib_LTLIBRARIES = librpmio.la + librpmio_la_SOURCES = \ + argv.c digest.c fts.c macro.c md2.c md4.c rmd128.c rmd160.c tiger.c \ + rpmdav.c rpmhook.c rpmio.c rpmlog.c rpmlua.c rpmmalloc.c \ +--- rpm-4.4.7/scripts/Makefile.am ++++ rpm-4.4.7/scripts/Makefile.am +@@ -24,7 +24,7 @@ + + all: + +-configdir = ${prefix}/lib/rpm ++configdir = $(libdir)/rpm + config_SCRIPTS = \ + brp-compress brp-python-bytecompile brp-java-gcjcompile brp-redhat \ + brp-strip brp-strip-comment-note brp-nobuildrootpath \ +--- rpm-4.4.7/tools/Makefile.am ++++ rpm-4.4.7/tools/Makefile.am +@@ -54,10 +54,6 @@ + #rpmdeps_LDFLAGS = $(staticLDFLAGS) + rpmdeps_LDADD = $(top_builddir)/build/librpmbuild.la + +-rpmfile.c: $(top_srcdir)/file/src/file.c +- rm -f $@ +- ln -s $< $@ +- + rpmfile_SOURCES = rpmfile.c + rpmfile_CFLAGS = -DMAGIC='"$(MAGIC)"' $(INCLUDES) + rpmfile_LDADD = $(top_builddir)/rpmio/librpmio.la diff --git a/app-arch/rpm/metadata.xml b/app-arch/rpm/metadata.xml new file mode 100644 index 0000000..fe5be6a --- /dev/null +++ b/app-arch/rpm/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>maintainer-needed@gentoo.org</email> +</maintainer> +<use> + <flag name='magic'>Add magic file support (<pkg>sys-apps/file</pkg>)</flag> + <flag name='neon'>Include support for <pkg>net-misc/neon</pkg></flag> +</use> +</pkgmetadata> diff --git a/app-arch/rpm/rpm-4.4.6-r6.ebuild b/app-arch/rpm/rpm-4.4.6-r6.ebuild new file mode 100644 index 0000000..2f09e97 --- /dev/null +++ b/app-arch/rpm/rpm-4.4.6-r6.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/rpm-4.4.6-r6.ebuild,v 1.11 2010/04/04 21:48:31 arfrever Exp $ + +inherit eutils autotools distutils perl-module flag-o-matic + +DESCRIPTION="Red Hat Package Management Utils" +HOMEPAGE="http://www.rpm.org/" +SRC_URI="http://wraptastic.org/pub/rpm-4.4.x/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86" +IUSE="nls python perl doc sqlite" + +RDEPEND=">=sys-libs/db-4 + >=sys-libs/zlib-1.1.3 + >=app-arch/bzip2-1.0.1 + >=dev-libs/popt-1.7 + >=app-crypt/gnupg-1.2 + dev-libs/elfutils + virtual/libintl + >=dev-libs/beecrypt-3.1.0-r1 + python? ( >=dev-lang/python-2.2 ) + perl? ( >=dev-lang/perl-5.8.8 ) + nls? ( virtual/libintl ) + sqlite? ( >=dev-db/sqlite-3.3.5 ) + >=net-misc/neon-0.28" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext ) + doc? ( app-doc/doxygen )" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-with-sqlite.patch + epatch "${FILESDIR}"/${P}-stupidness.patch + epatch "${FILESDIR}"/${P}-autotools.patch + epatch "${FILESDIR}"/${P}-buffer-overflow.patch + epatch "${FILESDIR}"/${P}-qa-fix-undefined.patch + # bug 214799 + epatch "${FILESDIR}"/${P}-neon-0.28.patch + + # rpm uses AM_GNU_GETTEXT() but fails to actually + # include any of the required gettext files + cp /usr/share/gettext/config.rpath . || die + + # 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 + + sed -i -e "s:intl ::" Makefile.am + sed -i -e "s:intl/Makefile ::" configure.ac + AT_NO_RECURSIVE="yes" eautoreconf + # TODO Get rid of internal copies of lua, db and db3 +} + +src_compile() { + # Until strict aliasing is porperly fixed... + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + econf \ + --enable-posixmutexes \ + --without-javaglue \ + --without-selinux \ + $(use_with python python $(python_get_version)) \ + $(use_with doc apidocs) \ + $(use_with perl) \ + $(use_with sqlite) \ + $(use_enable nls) \ + || die "econf failed" + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" INSTALLDIRS=vendor install || die "emake install failed" + + mv "${D}"/bin/rpm "${D}"/usr/bin + rmdir "${D}"/bin + + use nls || rm -rf "${D}"/usr/share/man/?? + + keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD} + + dodoc CHANGES CREDITS GROUPS README* RPM* + use doc && dohtml -r apidocs/html/* + + # Fix perllocal.pod file collision + use perl && fixlocalpod + + for magic_file in "magic.mime.mgc" "magic.mgc" "magic.mime" "magic"; do + dosym /usr/share/misc/file/${magic_file} /usr/lib/rpm/${magic_file} + done +} + +pkg_postinst() { + 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 + + distutils_pkg_postinst +} diff --git a/app-arch/rpm/rpm-4.4.6-r7.ebuild b/app-arch/rpm/rpm-4.4.6-r7.ebuild new file mode 100644 index 0000000..55287e9 --- /dev/null +++ b/app-arch/rpm/rpm-4.4.6-r7.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/rpm-4.4.6-r7.ebuild,v 1.1 2010/04/15 10:26:11 deathwing00 Exp $ + +inherit eutils autotools distutils perl-module flag-o-matic + +DESCRIPTION="Red Hat Package Management Utils" +HOMEPAGE="http://www.rpm.org/" +SRC_URI="http://wraptastic.org/pub/rpm-4.4.x/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86" +IUSE="nls python perl doc sqlite" + +RDEPEND=">=sys-libs/db-4 + >=sys-libs/zlib-1.1.3 + >=app-arch/bzip2-1.0.1 + >=dev-libs/popt-1.7 + >=app-crypt/gnupg-1.2 + dev-libs/elfutils + virtual/libintl + >=dev-libs/beecrypt-3.1.0-r1 + python? ( >=dev-lang/python-2.2 ) + perl? ( >=dev-lang/perl-5.8.8 ) + nls? ( virtual/libintl ) + sqlite? ( >=dev-db/sqlite-3.3.5 ) + >=net-misc/neon-0.28" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext ) + doc? ( app-doc/doxygen )" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-with-sqlite.patch + epatch "${FILESDIR}"/${P}-stupidness.patch + epatch "${FILESDIR}"/${P}-autotools.patch + epatch "${FILESDIR}"/${P}-buffer-overflow.patch + epatch "${FILESDIR}"/${P}-qa-fix-undefined.patch + # bug 214799 + epatch "${FILESDIR}"/${P}-neon-0.28.patch + + # rpm uses AM_GNU_GETTEXT() but fails to actually + # include any of the required gettext files + cp /usr/share/gettext/config.rpath . || die + + # 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 + + sed -i -e "s:intl ::" Makefile.am + sed -i -e "s:intl/Makefile ::" configure.ac + AT_NO_RECURSIVE="yes" eautoreconf + # TODO Get rid of internal copies of lua, db and db3 +} + +src_compile() { + # Until strict aliasing is porperly fixed... + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + econf \ + --enable-posixmutexes \ + --without-javaglue \ + --without-selinux \ + $(use_with python python $(python_get_version)) \ + $(use_with doc apidocs) \ + $(use_with perl) \ + $(use_with sqlite) \ + $(use_enable nls) \ + || die "econf failed" + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" INSTALLDIRS=vendor install || die "emake install failed" + + mv "${D}"/bin/rpm "${D}"/usr/bin + rmdir "${D}"/bin + + use nls || rm -rf "${D}"/usr/share/man/?? + + keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD} + + dodoc CHANGES CREDITS GROUPS README* RPM* + use doc && dohtml -r apidocs/html/* + + # Fix perllocal.pod file collision + use perl && fixlocalpod + + for magic_file in "magic.mime.mgc" "magic.mgc" "magic.mime" "magic"; do + dosym /usr/share/misc/${magic_file} /usr/lib/rpm/${magic_file} + done +} + +pkg_postinst() { + 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 + + distutils_pkg_postinst +} diff --git a/app-arch/rpm/rpm-4.4.7-r4.ebuild b/app-arch/rpm/rpm-4.4.7-r4.ebuild new file mode 100644 index 0000000..1c26d32 --- /dev/null +++ b/app-arch/rpm/rpm-4.4.7-r4.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2010 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-r4.ebuild,v 1.4 2010/04/04 21:48:31 arfrever Exp $ + +inherit eutils autotools distutils perl-module flag-o-matic + +DESCRIPTION="Red Hat Package Management Utils" +HOMEPAGE="http://www.rpm.org/" +SRC_URI="http://wraptastic.org/pub/rpm-4.4.x/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="nls python perl doc sqlite" + +RDEPEND="=sys-libs/db-3.2* + >=sys-libs/zlib-1.2.3-r1 + >=app-arch/bzip2-1.0.1 + >=dev-libs/popt-1.7 + >=app-crypt/gnupg-1.2 + dev-libs/elfutils + virtual/libintl + >=dev-libs/beecrypt-3.1.0-r1 + python? ( >=dev-lang/python-2.2 ) + perl? ( >=dev-lang/perl-5.8.8 ) + nls? ( virtual/libintl ) + sqlite? ( >=dev-db/sqlite-3.3.5 ) + >=net-misc/neon-0.28" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext ) + doc? ( app-doc/doxygen )" + +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 "${FILESDIR}"/${P}-qa-implicit-function-to-pointer.patch + epatch "${FILESDIR}"/${P}-qa-fix-undefined.patch + # bug 214799 + epatch "${FILESDIR}"/${PN}-4.4.6-neon-0.28.patch + + # rpm uses AM_GNU_GETTEXT() but fails to actually + # include any of the required gettext files + cp /usr/share/gettext/config.rpath . || die + + # 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 + + sed -i -e "s:intl ::" Makefile.am + sed -i -e "s:intl/Makefile ::" configure.ac + AT_NO_RECURSIVE="yes" eautoreconf + # TODO Get rid of internal copies of lua, db and db3 +} + +src_compile() { + # Until strict aliasing is porperly fixed... + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + econf \ + --enable-posixmutexes \ + --without-javaglue \ + --without-selinux \ + $(use_with python python $(python_get_version)) \ + $(use_with doc apidocs) \ + $(use_with perl) \ + $(use_with sqlite) \ + $(use_enable nls) \ + || die "econf failed" + emake -j1 || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" INSTALLDIRS=vendor install || die "emake install failed" + + mv "${D}"/bin/rpm "${D}"/usr/bin + rmdir "${D}"/bin + + use nls || rm -rf "${D}"/usr/share/man/?? + + keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD} + + dodoc CHANGES CREDITS GROUPS README* RPM* + use doc && dohtml -r apidocs/html/* + + # Fix perllocal.pod file collision + use perl && fixlocalpod +} + +pkg_postinst() { + 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 + + distutils_pkg_postinst +} diff --git a/app-arch/rpm/rpm-5.1.6.ebuild b/app-arch/rpm/rpm-5.1.6.ebuild new file mode 100644 index 0000000..6fcbdf0 --- /dev/null +++ b/app-arch/rpm/rpm-5.1.6.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/rpm-5.1.6.ebuild,v 1.5 2010/04/04 21:48:31 arfrever Exp $ + +inherit eutils multilib distutils python + +MY_P=${P/_alpha/a} +MY_P=${P/_beta/b} + +DESCRIPTION="RPM Package Manager" +HOMEPAGE="http://rpm5.org/" +SRC_URI="http://rpm5.org/files/rpm/rpm-5.1/${MY_P}.tar.gz" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="berkdb bzip2 doc lua magic neon nls pcre perl python selinux sqlite" + +# dmalloc? ( dev-libs/dmalloc ) +# efence? ( dev-util/efence ) +# keyutils? ( sys-apps/keyutils ) +# xar? ( app-arch/xar ) +RDEPEND="dev-libs/beecrypt + dev-libs/popt + berkdb? ( sys-libs/db ) + bzip2? ( app-arch/bzip2 ) + lua? ( dev-lang/lua ) + neon? ( net-misc/neon ) + pcre? ( dev-libs/libpcre ) + perl? ( dev-lang/perl ) + python? ( dev-lang/python ) + selinux? ( sys-libs/libselinux ) + sqlite? ( dev-db/sqlite )" +# comes bundled with modified zlib +# >=sys-libs/zlib-1.2.3-r1 +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + nls? ( sys-devel/gettext )" + +S=${WORKDIR}/${MY_P} + +pkg_setup () { + ewarn "If you are upgrading from an rpm version of 5.0.0 or lower, " + ewarn "your database will not be updated. Please back up your rpm " + ewarn "database, and run: " + ewarn " rpm --initdb" +} + +src_unpack() { + unpack ${A} + cd "${S}" + rm -rf file xar #db + sed -i \ + -e '/^pkgconfigdir/s:=.*:=$(libdir)/pkgconfig:' \ + scripts/Makefile.in || die +} + +src_compile() { +# $(use_with dmalloc) \ +# $(use_with efence) \ +# $(use_with keyutils) \ +# $(use_with xar) \ + # --with-libelf + econf \ + $(use_with berkdb db) \ + $(use_with bzip2) \ + $(use_with doc apidocs) \ + $(use_with magic file) \ + $(use_with lua) \ + $(use_with neon) \ + $(use_with nls) \ + $(use_with pcre) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with selinux) \ + $(use_with sqlite) \ + $(use berkdb || use sqlite || echo --with-db) \ + --with-path-lib="/usr/$(get_libdir)/rpm" \ + --with-python-lib-dir="$(python_get_libdir)" \ + || die "econf failed" + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" INSTALLDIRS=vendor install || die "emake install failed" + dodoc CHANGES CREDITS NEWS README TODO +} + +pkg_preinst() { + enewgroup rpm 37 + enewuser rpm 37 /bin/sh /var/lib/rpm rpm +} + +pkg_postinst() { + chown -R rpm:rpm "${ROOT}"/usr/$(get_libdir)/rpm + chown -R rpm:rpm "${ROOT}"/var/lib/rpm + chown rpm:rpm "${ROOT}"/usr/bin/rpm{,2cpio,build,constant} + if [[ ${ROOT} == "/" ]] ; then + 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 + fi + chown rpm:rpm "${ROOT}"/var/lib/rpm/* + + distutils_pkg_postinst +} |