diff options
-rw-r--r-- | meta/classes/package_rpm.bbclass | 25 | ||||
-rw-r--r-- | meta/packages/rpm/files/cross_libpaths.patch | 253 | ||||
-rw-r--r-- | meta/packages/rpm/files/disabledwarf.patch | 21 | ||||
-rw-r--r-- | meta/packages/rpm/files/extcond.patch | 78 | ||||
-rw-r--r-- | meta/packages/rpm/files/external-tools.patch | 108 | ||||
-rw-r--r-- | meta/packages/rpm/files/missingok.patch | 44 | ||||
-rw-r--r-- | meta/packages/rpm/files/tagsbackport.patch | 37 | ||||
-rw-r--r-- | meta/packages/rpm/files/weakdeps.patch | 312 | ||||
-rw-r--r-- | meta/packages/rpm/rpm-native_4.4.2.3.bb | 6 | ||||
-rw-r--r-- | meta/packages/rpm/rpm/remove-compiled-tests.patch | 440 | ||||
-rw-r--r-- | meta/packages/rpm/rpm_4.4.2.3.bb | 117 | ||||
-rw-r--r-- | meta/packages/rpm/rpm_5.1.9.bb | 96 |
12 files changed, 547 insertions, 990 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 4fdab34f67..b829d0d068 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -2,14 +2,14 @@ inherit package | |||
2 | 2 | ||
3 | #IMAGE_PKGTYPE ?= "rpm" | 3 | #IMAGE_PKGTYPE ?= "rpm" |
4 | 4 | ||
5 | RPMBUILD="rpmbuild --short-circuit ${RPMOPTS}" | ||
6 | IMAGE_PKGTYPE ?= "rpm" | 5 | IMAGE_PKGTYPE ?= "rpm" |
7 | 6 | ||
8 | RPMBUILDPATH="${WORKDIR}/rpm" | 7 | RPMBUILDPATH="${WORKDIR}/rpm" |
9 | 8 | ||
10 | RPMOPTS="--rcfile=${WORKDIR}/rpmrc" | 9 | RPMOPTS="" |
11 | RPMOPTS="--rcfile=${WORKDIR}/rpmrc --target ${TARGET_SYS}" | 10 | RPMBUILDOPTS="--target ${TARGET_SYS} --define '_topdir ${RPMBUILDPATH}' --buildroot ${ROOT}" |
12 | RPM="rpm ${RPMOPTS}" | 11 | RPM="${BUILD_ARCH}-${BUILD_OS}-rpm ${RPMOPTS}" |
12 | RPMBUILD="${BUILD_ARCH}-${BUILD_OS}-rpmbuild --short-circuit ${RPMBUILDOPTS}" | ||
13 | 13 | ||
14 | python write_specfile() { | 14 | python write_specfile() { |
15 | version = bb.data.getVar('PV', d, 1) | 15 | version = bb.data.getVar('PV', d, 1) |
@@ -21,7 +21,6 @@ python write_specfile() { | |||
21 | "RPMPV": "Version", | 21 | "RPMPV": "Version", |
22 | "PR": "Release", | 22 | "PR": "Release", |
23 | "DESCRIPTION": "%description", | 23 | "DESCRIPTION": "%description", |
24 | "ROOT": "BuildRoot", | ||
25 | "LICENSE": "License", | 24 | "LICENSE": "License", |
26 | "SECTION": "Group", | 25 | "SECTION": "Group", |
27 | "pkg_postinst": "%post", | 26 | "pkg_postinst": "%post", |
@@ -91,7 +90,9 @@ python write_specfile() { | |||
91 | bb.data.setVar(varname, " ".join(newdeps), d) | 90 | bb.data.setVar(varname, " ".join(newdeps), d) |
92 | 91 | ||
93 | fix_dep_versions('RDEPENDS') | 92 | fix_dep_versions('RDEPENDS') |
94 | fix_dep_versions('RRECOMMENDS') | 93 | |
94 | # Recommends is not supported by rpm at this time | ||
95 | # fix_dep_versions('RRECOMMENDS') | ||
95 | 96 | ||
96 | bb.build.exec_func("mapping_rename_hook", d) | 97 | bb.build.exec_func("mapping_rename_hook", d) |
97 | 98 | ||
@@ -105,7 +106,7 @@ python write_specfile() { | |||
105 | fd.write("%s: %s\n" % (outstring, dep)) | 106 | fd.write("%s: %s\n" % (outstring, dep)) |
106 | 107 | ||
107 | write_dep_field('RDEPENDS', 'Requires') | 108 | write_dep_field('RDEPENDS', 'Requires') |
108 | write_dep_field('RRECOMMENDS', 'Recommends') | 109 | # write_dep_field('RRECOMMENDS', 'Recommends') |
109 | 110 | ||
110 | fd.write("Summary\t: .\n") | 111 | fd.write("Summary\t: .\n") |
111 | 112 | ||
@@ -139,14 +140,10 @@ python write_specfile() { | |||
139 | bb.movefile(rpm, outrpm) | 140 | bb.movefile(rpm, outrpm) |
140 | } | 141 | } |
141 | 142 | ||
142 | |||
143 | rpm_prep() { | 143 | rpm_prep() { |
144 | if [ ! -e ${WORKDIR}/rpmrc ]; then | 144 | if [ ! -e ${WORKDIR}/rpmrc ]; then |
145 | mkdir -p ${RPMBUILDPATH}/{SPECS,RPMS/{i386,i586,i686,noarch,ppc,mips,mipsel,arm},SRPMS,SOURCES,BUILD} | 145 | mkdir -p ${RPMBUILDPATH}/{SPECS,RPMS,SRPMS,SOURCES,BUILD} |
146 | echo 'macrofiles:${STAGING_DIR_NATIVE}/usr/lib/rpm/macros:${WORKDIR}/macros' > ${WORKDIR}/rpmrc | 146 | fi |
147 | echo '%_topdir ${RPMBUILDPATH}' > ${WORKDIR}/macros | ||
148 | echo '%_repackage_dir ${WORKDIR}' >> ${WORKDIR}/macros | ||
149 | fi | ||
150 | } | 147 | } |
151 | 148 | ||
152 | python do_package_rpm () { | 149 | python do_package_rpm () { |
diff --git a/meta/packages/rpm/files/cross_libpaths.patch b/meta/packages/rpm/files/cross_libpaths.patch deleted file mode 100644 index 9e8f7dca82..0000000000 --- a/meta/packages/rpm/files/cross_libpaths.patch +++ /dev/null | |||
@@ -1,253 +0,0 @@ | |||
1 | Index: rpm-4.4.2.3/configure.ac | ||
2 | =================================================================== | ||
3 | --- rpm-4.4.2.3.orig/configure.ac 2008-08-23 16:03:51.000000000 +0100 | ||
4 | +++ rpm-4.4.2.3/configure.ac 2008-08-25 16:26:11.000000000 +0100 | ||
5 | @@ -326,10 +326,8 @@ | ||
6 | |||
7 | localdone= | ||
8 | |||
9 | -dirs=$prefix | ||
10 | if test "$cross_compiling" != "yes"; then | ||
11 | - dirs="$dirs /usr/local" | ||
12 | -fi | ||
13 | +dirs="$prefix /usr/local" | ||
14 | for dir in $dirs | ||
15 | do | ||
16 | case $dir in | ||
17 | @@ -371,6 +369,7 @@ | ||
18 | else | ||
19 | AC_MSG_RESULT(no) | ||
20 | fi | ||
21 | +fi | ||
22 | |||
23 | dnl | ||
24 | dnl Check for features | ||
25 | @@ -473,7 +472,7 @@ | ||
26 | AC_CHECK_HEADER([beecrypt/api.h], [ | ||
27 | AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the <beecrypt/api.h> header file.]) | ||
28 | ]) | ||
29 | - WITH_BEECRYPT_INCLUDE="-I${includedir}/beecrypt" | ||
30 | + WITH_BEECRYPT_INCLUDE="" | ||
31 | WITH_BEECRYPT_LIB="-lbeecrypt" | ||
32 | ]) | ||
33 | ],[ | ||
34 | @@ -506,7 +505,7 @@ | ||
35 | AC_CHECK_LIB(neon, ne_send_request_chunk, [ | ||
36 | AC_DEFINE(HAVE_NEON_NE_SEND_REQUEST_CHUNK, 1, [Define to 1 if you have ne_send_request_chunk() in libneon.]) | ||
37 | ]) | ||
38 | - WITH_NEON_INCLUDE="-I${includedir}/neon" | ||
39 | + WITH_NEON_INCLUDE="" | ||
40 | WITH_NEON_LIB="-lneon" | ||
41 | ]) | ||
42 | ],[ | ||
43 | @@ -857,6 +856,12 @@ | ||
44 | dnl | ||
45 | dnl Auto-detect which python bindings should be built. | ||
46 | dnl | ||
47 | + | ||
48 | +AC_ARG_WITH(python-incdir, [ --with-python-incdir python include directory ]) | ||
49 | +PYTHON_INCDIR=$withval | ||
50 | +AC_ARG_WITH(python-libdir, [ --with-python-libdir python library directory ]) | ||
51 | +PYTHON_LIBDIR=$withval | ||
52 | + | ||
53 | withval=auto | ||
54 | AC_ARG_WITH(python, [ --with-python build rpm python bindings ]) | ||
55 | |||
56 | @@ -934,6 +939,8 @@ | ||
57 | AC_SUBST(WITH_PYTHON_SUBDIR) | ||
58 | AC_SUBST(WITH_PYTHON_SUBPACKAGE) | ||
59 | AC_SUBST(WITH_PYTHON_VERSION) | ||
60 | +AC_SUBST(PYTHON_LIBDIR) | ||
61 | +AC_SUBST(PYTHON_INCDIR) | ||
62 | |||
63 | AC_PATH_PROG(__DOXYGEN, doxygen, no, $PATH) | ||
64 | dnl | ||
65 | Index: rpm-4.4.2.3/rpmio/Makefile.am | ||
66 | =================================================================== | ||
67 | --- rpm-4.4.2.3.orig/rpmio/Makefile.am 2008-04-01 08:28:22.000000000 +0100 | ||
68 | +++ rpm-4.4.2.3/rpmio/Makefile.am 2008-08-23 12:14:12.000000000 +0100 | ||
69 | @@ -26,9 +26,7 @@ | ||
70 | |||
71 | BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECTYPT_SUBDIR@/listobjs) | ||
72 | |||
73 | -LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) | ||
74 | - | ||
75 | -usrlibdir = $(libdir)@MARK64@ | ||
76 | +usrlibdir = $(libdir) | ||
77 | usrlib_LTLIBRARIES = librpmio.la | ||
78 | librpmio_la_SOURCES = \ | ||
79 | argv.c digest.c fts.c macro.c rpmdav.c \ | ||
80 | Index: rpm-4.4.2.3/rpmio/rpmio_internal.h | ||
81 | =================================================================== | ||
82 | --- rpm-4.4.2.3.orig/rpmio/rpmio_internal.h 2008-04-01 08:28:22.000000000 +0100 | ||
83 | +++ rpm-4.4.2.3/rpmio/rpmio_internal.h 2008-08-23 12:07:29.000000000 +0100 | ||
84 | @@ -12,22 +12,22 @@ | ||
85 | #if HAVE_BEECRYPT_API_H | ||
86 | #include <api.h> | ||
87 | #else | ||
88 | -#include <beecrypt.api.h> | ||
89 | +#include <beecrypt/beecrypt.api.h> | ||
90 | #endif | ||
91 | |||
92 | #include <rpmpgp.h> | ||
93 | #include <rpmsw.h> | ||
94 | |||
95 | /* Drag in the beecrypt includes. */ | ||
96 | -#include <beecrypt.h> | ||
97 | -#include <base64.h> | ||
98 | -#include <dsa.h> | ||
99 | -#include <endianness.h> | ||
100 | -#include <md5.h> | ||
101 | -#include <mp.h> | ||
102 | -#include <rsa.h> | ||
103 | -#include <rsapk.h> | ||
104 | -#include <sha1.h> | ||
105 | +#include <beecrypt/beecrypt.h> | ||
106 | +#include <beecrypt/base64.h> | ||
107 | +#include <beecrypt/dsa.h> | ||
108 | +#include <beecrypt/endianness.h> | ||
109 | +#include <beecrypt/md5.h> | ||
110 | +#include <beecrypt/mp.h> | ||
111 | +#include <beecrypt/rsa.h> | ||
112 | +#include <beecrypt/rsapk.h> | ||
113 | +#include <beecrypt/sha1.h> | ||
114 | #if HAVE_BEECRYPT_API_H | ||
115 | #include <sha256.h> | ||
116 | #include <sha384.h> | ||
117 | Index: rpm-4.4.2.3/Makefile.am | ||
118 | =================================================================== | ||
119 | --- rpm-4.4.2.3.orig/Makefile.am 2008-04-01 08:28:21.000000000 +0100 | ||
120 | +++ rpm-4.4.2.3/Makefile.am 2008-08-25 23:09:40.000000000 +0100 | ||
121 | @@ -10,7 +10,7 @@ | ||
122 | po/*.in po/*.po po/rpm.pot \ | ||
123 | rpm.magic rpmpopt-$(VERSION) rpmqv.c | ||
124 | |||
125 | -SUBDIRS = po misc @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ @WITH_MAGIC_SUBDIR@ @WITH_DB_SUBDIR@ @WITH_SQLITE3_SUBDIR@ @WITH_POPT_SUBDIR@ @WITH_BEECRYPT_SUBDIR@ @WITH_NEON_SUBDIR@ lua rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts doc . | ||
126 | +SUBDIRS = po misc @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ @WITH_MAGIC_SUBDIR@ @WITH_DB_SUBDIR@ @WITH_SQLITE3_SUBDIR@ @WITH_POPT_SUBDIR@ @WITH_BEECRYPT_SUBDIR@ @WITH_NEON_SUBDIR@ rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts doc . | ||
127 | |||
128 | INCLUDES = \ | ||
129 | -I$(top_srcdir)/build \ | ||
130 | @@ -93,7 +93,7 @@ | ||
131 | rpm2cpio_LDFLAGS = $(myLDFLAGS) | ||
132 | rpm2cpio_LDADD = $(myLDADD) @LIBMISC@ | ||
133 | |||
134 | -$(PROGRAMS): $(myLDADD) @WITH_APIDOCS_TARGET@ | ||
135 | +$(PROGRAMS): @WITH_APIDOCS_TARGET@ | ||
136 | |||
137 | .PHONY: splint | ||
138 | splint: | ||
139 | Index: rpm-4.4.2.3/rpmdb/Makefile.am | ||
140 | =================================================================== | ||
141 | --- rpm-4.4.2.3.orig/rpmdb/Makefile.am 2008-04-01 08:28:22.000000000 +0100 | ||
142 | +++ rpm-4.4.2.3/rpmdb/Makefile.am 2008-08-23 12:13:18.000000000 +0100 | ||
143 | @@ -41,10 +41,7 @@ | ||
144 | # XXX watchout, ../db3/libdb.la created by this Makefile may surprise | ||
145 | libdb_la = $(top_builddir)/$(WITH_DB_SUBDIR)/libdb.la | ||
146 | |||
147 | -# XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different | ||
148 | -LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) | ||
149 | - | ||
150 | -usrlibdir = $(libdir)@MARK64@ | ||
151 | +usrlibdir = $(libdir) | ||
152 | usrlib_LTLIBRARIES = librpmdb.la | ||
153 | librpmdb_la_SOURCES = \ | ||
154 | dbconfig.c fprint.c \ | ||
155 | Index: rpm-4.4.2.3/lib/Makefile.am | ||
156 | =================================================================== | ||
157 | --- rpm-4.4.2.3.orig/lib/Makefile.am 2008-04-01 08:28:22.000000000 +0100 | ||
158 | +++ rpm-4.4.2.3/lib/Makefile.am 2008-08-23 16:03:51.000000000 +0100 | ||
159 | @@ -29,9 +29,7 @@ | ||
160 | mylibs = librpm.la | ||
161 | LIBS = | ||
162 | |||
163 | -LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) | ||
164 | - | ||
165 | -usrlibdir = $(libdir)@MARK64@ | ||
166 | +usrlibdir = $(libdir) | ||
167 | usrlib_LTLIBRARIES = librpm.la | ||
168 | librpm_la_SOURCES = \ | ||
169 | cpio.c depends.c formats.c fs.c fsm.c getdate.c \ | ||
170 | Index: rpm-4.4.2.3/build/Makefile.am | ||
171 | =================================================================== | ||
172 | --- rpm-4.4.2.3.orig/build/Makefile.am 2008-04-01 08:28:21.000000000 +0100 | ||
173 | +++ rpm-4.4.2.3/build/Makefile.am 2008-08-23 16:03:51.000000000 +0100 | ||
174 | @@ -22,9 +22,7 @@ | ||
175 | pkginc_HEADERS = rpmbuild.h rpmfc.h rpmfile.h rpmspec.h | ||
176 | noinst_HEADERS = buildio.h | ||
177 | |||
178 | -LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) | ||
179 | - | ||
180 | -usrlibdir = $(libdir)@MARK64@ | ||
181 | +usrlibdir = $(libdir) | ||
182 | usrlib_LTLIBRARIES = librpmbuild.la | ||
183 | librpmbuild_la_SOURCES = \ | ||
184 | build.c expression.c files.c misc.c names.c pack.c \ | ||
185 | Index: rpm-4.4.2.3/python/Makefile.am | ||
186 | =================================================================== | ||
187 | --- rpm-4.4.2.3.orig/python/Makefile.am 2008-04-01 08:28:22.000000000 +0100 | ||
188 | +++ rpm-4.4.2.3/python/Makefile.am 2008-08-25 16:26:56.000000000 +0100 | ||
189 | @@ -4,8 +4,8 @@ | ||
190 | |||
191 | LINT = splint | ||
192 | |||
193 | -pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@ | ||
194 | -pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@ | ||
195 | +pylibdir = @PYTHON_LIBDIR@ | ||
196 | +pyincdir = @PYTHON_INCDIR@ | ||
197 | |||
198 | SUBDIRS = rpm | ||
199 | |||
200 | Index: rpm-4.4.2.3/python/rpm/Makefile.am | ||
201 | =================================================================== | ||
202 | --- rpm-4.4.2.3.orig/python/rpm/Makefile.am 2008-04-01 08:28:22.000000000 +0100 | ||
203 | +++ rpm-4.4.2.3/python/rpm/Makefile.am 2008-08-25 16:27:29.000000000 +0100 | ||
204 | @@ -4,8 +4,8 @@ | ||
205 | |||
206 | PYVER = @WITH_PYTHON_VERSION@ | ||
207 | |||
208 | -pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@ | ||
209 | -pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@ | ||
210 | +pylibdir = @PYTHON_LIBDIR@ | ||
211 | +pyincdir = @PYTHON_INCDIR@ | ||
212 | |||
213 | EXTRA_DIST = \ | ||
214 | __init__.py | ||
215 | Index: rpm-4.4.2.3/file/src/Makefile.am | ||
216 | =================================================================== | ||
217 | --- rpm-4.4.2.3.orig/file/src/Makefile.am 2008-08-23 16:06:25.000000000 +0100 | ||
218 | +++ rpm-4.4.2.3/file/src/Makefile.am 2008-08-23 16:06:39.000000000 +0100 | ||
219 | @@ -4,7 +4,7 @@ | ||
220 | EXTRA_DIST = test.c | ||
221 | |||
222 | # XXX Make sure compress.c links internal zlib | ||
223 | -INCLUDES = -I. -I ../../zlib | ||
224 | +INCLUDES = -I. | ||
225 | |||
226 | pkglibdir = @prefix@/lib/rpm | ||
227 | MAGIC = $(pkglibdir)/magic | ||
228 | @@ -26,7 +26,7 @@ | ||
229 | |||
230 | noinst_PROGRAMS = file | ||
231 | file_SOURCES = file.c | ||
232 | -file_LDFLAGS = -L../../zlib # -all-static | ||
233 | +#file_LDFLAGS = -L../../zlib # -all-static | ||
234 | file_LDADD = libmagic.la | ||
235 | |||
236 | listobjs: | ||
237 | Index: rpm-4.4.2.3/file/magic/Makefile.am | ||
238 | =================================================================== | ||
239 | --- rpm-4.4.2.3.orig/file/magic/Makefile.am 2008-08-25 16:14:47.000000000 +0100 | ||
240 | +++ rpm-4.4.2.3/file/magic/Makefile.am 2008-08-25 16:15:02.000000000 +0100 | ||
241 | @@ -18,10 +18,10 @@ | ||
242 | done >> $@ | ||
243 | |||
244 | magic.mgc: magic | ||
245 | - $(top_builddir)/src/file -C -m magic | ||
246 | + file -C -m magic | ||
247 | |||
248 | magic.mime.mgc: magic.mime | ||
249 | - $(top_builddir)/src/file -C -m $(srcdir)/magic.mime | ||
250 | + file -C -m $(srcdir)/magic.mime | ||
251 | |||
252 | magic_FRAGMENTS = \ | ||
253 | Magdir/acorn \ | ||
diff --git a/meta/packages/rpm/files/disabledwarf.patch b/meta/packages/rpm/files/disabledwarf.patch deleted file mode 100644 index 6f09cc5965..0000000000 --- a/meta/packages/rpm/files/disabledwarf.patch +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | Index: rpm-4.4.2.3/configure.ac | ||
2 | =================================================================== | ||
3 | --- rpm-4.4.2.3.orig/configure.ac 2009-11-30 17:23:22.000000000 +0000 | ||
4 | +++ rpm-4.4.2.3/configure.ac 2009-11-30 17:23:52.000000000 +0000 | ||
5 | @@ -448,16 +448,6 @@ | ||
6 | |||
7 | WITH_LIBDWARF_INCLUDE= | ||
8 | WITH_LIBDWARF_DEBUGEDIT= | ||
9 | -AC_CHECK_HEADER([dwarf.h], [ | ||
10 | - AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.]) | ||
11 | - WITH_LIBDWARF_DEBUGEDIT="debugedit" | ||
12 | -],[ | ||
13 | - if test -d elfutils/libdwarf ; then | ||
14 | - AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.]) | ||
15 | - WITH_LIBDWARF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libdwarf" | ||
16 | - WITH_LIBDWARF_DEBUGEDIT="debugedit" | ||
17 | - fi | ||
18 | -]) | ||
19 | AC_SUBST(WITH_LIBDWARF_INCLUDE) | ||
20 | AC_SUBST(WITH_LIBDWARF_DEBUGEDIT) | ||
21 | |||
diff --git a/meta/packages/rpm/files/extcond.patch b/meta/packages/rpm/files/extcond.patch deleted file mode 100644 index 6963b8606c..0000000000 --- a/meta/packages/rpm/files/extcond.patch +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | This patch supports an extension in the condition evaluation. | ||
2 | If the condition is a format and returns an nonempty string, it is | ||
3 | assumed to be true. | ||
4 | This mechanism is used by the weakdeps patch to filter the | ||
5 | "RPMSENSE_STRONG" flag. | ||
6 | |||
7 | --- ./rpmdb/header.c.orig 2005-06-06 23:33:54.000000000 +0000 | ||
8 | +++ ./rpmdb/header.c 2006-03-17 18:08:02.000000000 +0000 | ||
9 | @@ -2980,8 +2980,12 @@ static int parseExpression(headerSprintf | ||
10 | |||
11 | *endPtr = chptr; | ||
12 | |||
13 | + token->u.cond.tag.type = NULL; | ||
14 | + token->u.cond.tag.format = ""; | ||
15 | token->type = PTOK_COND; | ||
16 | |||
17 | + if ((token->u.cond.tag.type = strchr(str, ':')) != 0) | ||
18 | + *token->u.cond.tag.type++ = 0; | ||
19 | (void) findTag(hsa, token, str); | ||
20 | |||
21 | return 0; | ||
22 | @@ -3239,6 +3243,7 @@ static char * singleSprintf(headerSprint | ||
23 | int_32 type; | ||
24 | int_32 count; | ||
25 | sprintfToken spft; | ||
26 | + sprintfTag stag; | ||
27 | int condNumFormats; | ||
28 | size_t need; | ||
29 | |||
30 | @@ -3270,6 +3275,18 @@ static char * singleSprintf(headerSprint | ||
31 | if (token->u.cond.tag.ext || headerIsEntry(hsa->h, token->u.cond.tag.tag)) { | ||
32 | spft = token->u.cond.ifFormat; | ||
33 | condNumFormats = token->u.cond.numIfTokens; | ||
34 | + if (token->u.cond.tag.fmt) { | ||
35 | + /* check if format creates output */ | ||
36 | + size_t vallen = hsa->vallen; | ||
37 | + formatValue(hsa, &token->u.cond.tag, element); | ||
38 | + if (hsa->vallen == vallen) { | ||
39 | + spft = token->u.cond.elseFormat; | ||
40 | + condNumFormats = token->u.cond.numElseTokens; | ||
41 | + } else { | ||
42 | + hsa->vallen = vallen; | ||
43 | + hsa->val[hsa->vallen] = 0; | ||
44 | + } | ||
45 | + } | ||
46 | } else { | ||
47 | spft = token->u.cond.elseFormat; | ||
48 | condNumFormats = token->u.cond.numElseTokens; | ||
49 | @@ -3291,19 +3308,22 @@ static char * singleSprintf(headerSprint | ||
50 | spft = token->u.array.format; | ||
51 | for (i = 0; i < token->u.array.numTokens; i++, spft++) | ||
52 | { | ||
53 | - if (spft->type != PTOK_TAG || | ||
54 | - spft->u.tag.arrayCount || | ||
55 | - spft->u.tag.justOne) continue; | ||
56 | + if (spft->type != PTOK_TAG && spft->type != PTOK_COND) | ||
57 | + continue; | ||
58 | + | ||
59 | + stag = (spft->type == PTOK_COND ? &spft->u.cond.tag : &spft->u.tag); | ||
60 | + if (stag->arrayCount || stag->justOne) | ||
61 | + continue; | ||
62 | |||
63 | - if (spft->u.tag.ext) { | ||
64 | + if (stag->ext) { | ||
65 | /*@-boundswrite@*/ | ||
66 | - if (getExtension(hsa, spft->u.tag.ext, &type, NULL, &count, | ||
67 | - hsa->ec + spft->u.tag.extNum)) | ||
68 | + if (getExtension(hsa, stag->ext, &type, NULL, &count, | ||
69 | + hsa->ec + stag->extNum)) | ||
70 | continue; | ||
71 | /*@=boundswrite@*/ | ||
72 | } else { | ||
73 | /*@-boundswrite@*/ | ||
74 | - if (!headerGetEntry(hsa->h, spft->u.tag.tag, &type, NULL, &count)) | ||
75 | + if (!headerGetEntry(hsa->h, stag->tag, &type, NULL, &count)) | ||
76 | continue; | ||
77 | /*@=boundswrite@*/ | ||
78 | } | ||
diff --git a/meta/packages/rpm/files/external-tools.patch b/meta/packages/rpm/files/external-tools.patch deleted file mode 100644 index 2b2ff701ad..0000000000 --- a/meta/packages/rpm/files/external-tools.patch +++ /dev/null | |||
@@ -1,108 +0,0 @@ | |||
1 | Index: rpm-4.4.2.3/configure.ac | ||
2 | =================================================================== | ||
3 | --- rpm-4.4.2.3.orig/configure.ac 2008-04-01 08:30:14.000000000 +0100 | ||
4 | +++ rpm-4.4.2.3/configure.ac 2008-08-17 10:57:30.000000000 +0100 | ||
5 | @@ -529,7 +529,7 @@ | ||
6 | WITH_MAGIC_INCLUDE= | ||
7 | WITH_MAGIC_LIB= | ||
8 | |||
9 | -if test -d file ; then | ||
10 | +if test -d file ; then | ||
11 | WITH_RPMFILE=rpmfile | ||
12 | WITH_MAGIC_SUBDIR=file | ||
13 | WITH_MAGIC_INCLUDE="-I\${top_srcdir}/${WITH_MAGIC_SUBDIR}/src" | ||
14 | @@ -1307,7 +1307,7 @@ | ||
15 | dnl # XXX Propagate -lucb to popt ... | ||
16 | dnl export LIBS INCPATH CONFIG_SITE | ||
17 | |||
18 | -AC_CONFIG_SUBDIRS(popt file db3) | ||
19 | +AC_CONFIG_SUBDIRS(db/dist file) | ||
20 | |||
21 | AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt | ||
22 | rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile | ||
23 | Index: rpm-4.4.2.3/db/dist/configure.ac | ||
24 | =================================================================== | ||
25 | --- rpm-4.4.2.3.orig/db/dist/configure.ac 2008-04-01 08:28:21.000000000 +0100 | ||
26 | +++ rpm-4.4.2.3/db/dist/configure.ac 2008-08-17 09:54:37.000000000 +0100 | ||
27 | @@ -11,14 +11,6 @@ | ||
28 | AC_CANONICAL_HOST() | ||
29 | AC_ARG_PROGRAM() | ||
30 | |||
31 | -# Don't build in the top-level or dist directories. | ||
32 | -AC_MSG_CHECKING(if building in the top-level or dist directories) | ||
33 | -if [ test -d db_archive -o -f configure.ac ] ; then | ||
34 | - AC_MSG_RESULT(yes) | ||
35 | - AC_MSG_ERROR( | ||
36 | - [Berkeley DB should not be built in the top-level or dist directories.]) | ||
37 | -fi | ||
38 | -AC_MSG_RESULT(no) | ||
39 | |||
40 | # Substitution variables. | ||
41 | AC_SUBST(ADDITIONAL_INCS) | ||
42 | @@ -281,7 +273,7 @@ | ||
43 | AC_PROG_LIBTOOL | ||
44 | |||
45 | SOFLAGS="-rpath \$(libdir)" | ||
46 | -LIBTOOL_PROG="${SHELL} ./libtool" | ||
47 | +LIBTOOL_PROG="${SHELL} ./$host_alias-libtool" | ||
48 | |||
49 | # Set SOSUFFIX and friends | ||
50 | SOSUFFIX_CONFIG | ||
51 | @@ -297,7 +289,7 @@ | ||
52 | MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -avoid-version" | ||
53 | MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK}" | ||
54 | |||
55 | -LIBTOOL="\$(SHELL) ./libtool" | ||
56 | +LIBTOOL="\$(SHELL) ./$host_alias-libtool" | ||
57 | |||
58 | case "$host_os" in | ||
59 | cygwin* | mingw*) | ||
60 | Index: rpm-4.4.2.3/db/dist/aclocal/options.ac | ||
61 | =================================================================== | ||
62 | --- rpm-4.4.2.3.orig/db/dist/aclocal/options.ac 2008-08-17 09:57:49.000000000 +0100 | ||
63 | +++ rpm-4.4.2.3/db/dist/aclocal/options.ac 2008-08-17 09:57:59.000000000 +0100 | ||
64 | @@ -277,10 +277,6 @@ | ||
65 | |||
66 | # Uniquename excludes C++, Java, RPC. | ||
67 | if test "$db_cv_uniquename" = "yes"; then | ||
68 | - if test "$db_cv_rpc" = "yes"; then | ||
69 | - AC_MSG_ERROR( | ||
70 | - [--with-uniquename is not compatible with --enable-rpc]) | ||
71 | - fi | ||
72 | if test "$db_cv_cxx" = "yes"; then | ||
73 | AC_MSG_ERROR( | ||
74 | [--with-uniquename is not compatible with --enable-cxx]) | ||
75 | Index: rpm-4.4.2.3/db/dist/aclocal/rpc.ac | ||
76 | =================================================================== | ||
77 | --- rpm-4.4.2.3.orig/db/dist/aclocal/rpc.ac 2008-08-17 10:46:26.000000000 +0100 | ||
78 | +++ rpm-4.4.2.3/db/dist/aclocal/rpc.ac 2008-08-17 10:46:47.000000000 +0100 | ||
79 | @@ -60,6 +60,7 @@ | ||
80 | -e 's/^}/__dbsrv_timeout(0);}/' \ | ||
81 | -e '}' \ | ||
82 | -e '1,/^#include/s/^#include/#include "db_config.h"\ | ||
83 | +#include "db_int_def.h"\ | ||
84 | &/' > db_server_svc.c | ||
85 | |||
86 | $RPCGEN -c $XDR_FILE | | ||
87 | Index: rpm-4.4.2.3/tools/rpmfile.c | ||
88 | =================================================================== | ||
89 | --- rpm-4.4.2.3.orig/tools/rpmfile.c 2008-08-17 11:01:51.000000000 +0100 | ||
90 | +++ rpm-4.4.2.3/tools/rpmfile.c 2008-08-17 11:03:07.000000000 +0100 | ||
91 | @@ -29,7 +29,7 @@ | ||
92 | * file - find type of a file or files - main program. | ||
93 | */ | ||
94 | |||
95 | -#include "file.h" | ||
96 | +#include "../file/src/file.h" | ||
97 | #include "magic.h" | ||
98 | |||
99 | #include <stdio.h> | ||
100 | @@ -69,7 +69,7 @@ | ||
101 | |||
102 | #include <netinet/in.h> /* for byte swapping */ | ||
103 | |||
104 | -#include "patchlevel.h" | ||
105 | +#include "../file/src/patchlevel.h" | ||
106 | |||
107 | #ifndef lint | ||
108 | FILE_RCSID("@(#)$Id: file.c,v 1.96 2005/03/06 05:58:22 christos Exp $") | ||
diff --git a/meta/packages/rpm/files/missingok.patch b/meta/packages/rpm/files/missingok.patch deleted file mode 100644 index b008c9a02b..0000000000 --- a/meta/packages/rpm/files/missingok.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7. | ||
2 | |||
3 | Index: lib/depends.c | ||
4 | =================================================================== | ||
5 | --- lib/depends.c.orig 2008-04-01 08:28:22.000000000 +0100 | ||
6 | +++ lib/depends.c 2008-09-04 14:09:58.000000000 +0100 | ||
7 | @@ -593,8 +593,13 @@ | ||
8 | /*@=boundsread@*/ | ||
9 | |||
10 | unsatisfied: | ||
11 | - rc = 1; /* dependency is unsatisfied */ | ||
12 | - rpmdsNotify(dep, NULL, rc); | ||
13 | + if (rpmdsFlags(dep) & RPMSENSE_MISSINGOK) { | ||
14 | + rc = 0; /* dependency is unsatisfied, but just a hint. */ | ||
15 | + rpmdsNotify(dep, _("(hint skipped)"), rc); | ||
16 | + } else { | ||
17 | + rc = 1; /* dependency is unsatisfied */ | ||
18 | + rpmdsNotify(dep, NULL, rc); | ||
19 | + } | ||
20 | |||
21 | exit: | ||
22 | /* | ||
23 | @@ -963,6 +968,8 @@ | ||
24 | return "Requires(postun):"; | ||
25 | if (f & RPMSENSE_SCRIPT_VERIFY) | ||
26 | return "Requires(verify):"; | ||
27 | + if (f & RPMSENSE_MISSINGOK) | ||
28 | + return "Requires(hint):"; | ||
29 | if (f & RPMSENSE_FIND_REQUIRES) | ||
30 | return "Requires(auto):"; | ||
31 | return "Requires:"; | ||
32 | Index: lib/rpmlib.h | ||
33 | =================================================================== | ||
34 | --- lib/rpmlib.h.orig 2008-09-03 22:22:43.000000000 +0100 | ||
35 | +++ lib/rpmlib.h 2008-09-04 15:17:17.000000000 +0100 | ||
36 | @@ -562,6 +562,8 @@ | ||
37 | RPMSENSE_SCRIPT_POSTUN | \ | ||
38 | RPMSENSE_SCRIPT_VERIFY | \ | ||
39 | RPMSENSE_FIND_REQUIRES | \ | ||
40 | + RPMSENSE_MISSINGOK | \ | ||
41 | + RPMSENSE_STRONG | \ | ||
42 | RPMSENSE_SCRIPT_PREP | \ | ||
43 | RPMSENSE_SCRIPT_BUILD | \ | ||
44 | RPMSENSE_SCRIPT_INSTALL | \ | ||
diff --git a/meta/packages/rpm/files/tagsbackport.patch b/meta/packages/rpm/files/tagsbackport.patch deleted file mode 100644 index a2a360944c..0000000000 --- a/meta/packages/rpm/files/tagsbackport.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | Backported some new tags and sense values. | ||
2 | |||
3 | Index: lib/rpmlib.h | ||
4 | =================================================================== | ||
5 | --- lib/rpmlib.h.orig 2008-08-26 17:07:12.000000000 +0100 | ||
6 | +++ lib/rpmlib.h 2008-08-26 17:22:21.000000000 +0100 | ||
7 | @@ -447,7 +447,19 @@ | ||
8 | RPMTAG_PRIORITY = 1162, /* i extension placeholder */ | ||
9 | RPMTAG_CVSID = 1163, /* s */ | ||
10 | #define RPMTAG_SVNID RPMTAG_CVSID /* s */ | ||
11 | + RPMTAG_BLINKPKGID = 1164, /* s[] */ | ||
12 | + RPMTAG_BLINKHDRID = 1165, /* s[] */ | ||
13 | + RPMTAG_BLINKNEVRA = 1166, /* s[] */ | ||
14 | + RPMTAG_FLINKPKGID = 1167, /* s[] */ | ||
15 | + RPMTAG_FLINKHDRID = 1168, /* s[] */ | ||
16 | + RPMTAG_FLINKNEVRA = 1169, /* s[] */ | ||
17 | + RPMTAG_PACKAGEORIGIN = 1170, /* s */ | ||
18 | RPMTAG_TRIGGERPREIN = 1171, /*!< internal */ | ||
19 | + RPMTAG_BUILDSUGGESTS = 1172, /*!< internal */ | ||
20 | + RPMTAG_BUILDENHANCES = 1173, /*!< internal */ | ||
21 | + RPMTAG_SCRIPTSTATES = 1174, /*!< i scriptlet exit codes */ | ||
22 | + RPMTAG_SCRIPTMETRICS = 1175, /*!< i scriptlet execution times */ | ||
23 | + RPMTAG_BUILDCPUCLOCK = 1176, /*!< i */ | ||
24 | |||
25 | /*@-enummemuse@*/ | ||
26 | RPMTAG_FIRSTFREE_TAG /*!< internal */ | ||
27 | @@ -531,7 +543,9 @@ | ||
28 | /*@=enummemuse@*/ | ||
29 | RPMSENSE_KEYRING = (1 << 26), | ||
30 | RPMSENSE_STRONG = (1 << 27), | ||
31 | - RPMSENSE_CONFIG = (1 << 28) | ||
32 | + RPMSENSE_CONFIG = (1 << 28), | ||
33 | + RPMSENSE_PROBE = (1 << 29), | ||
34 | + RPMSENSE_PACKAGE = (1 << 30) | ||
35 | } rpmsenseFlags; | ||
36 | |||
37 | #define RPMSENSE_SENSEMASK 15 /* Mask to get senses, ie serial, */ | ||
diff --git a/meta/packages/rpm/files/weakdeps.patch b/meta/packages/rpm/files/weakdeps.patch deleted file mode 100644 index a013b75542..0000000000 --- a/meta/packages/rpm/files/weakdeps.patch +++ /dev/null | |||
@@ -1,312 +0,0 @@ | |||
1 | Taken from OpenSUSE 11 rpm source file - RP 26/8/08 | ||
2 | |||
3 | Add support for weak dependencies: | ||
4 | |||
5 | A) use RPMTAG_SUGGESTS and RPMTAG_ENHANCES to store them. | ||
6 | |||
7 | This is different to upstream, which uses RPMSENSE_MISSINGOK | ||
8 | and RPMTAG_REQUIRES/RPMTAG_PROVIDES instead. I chose different | ||
9 | tags because I wanted to be compatible. The point is that | ||
10 | applications that don't know about the new MISSINGOK semantics | ||
11 | will mis-interpret the provides/requires otherwise, which | ||
12 | I deemed to risky. | ||
13 | |||
14 | B) use RPMSENSE_STRONG to support a "strong" version, "Recommends" | ||
15 | instead of "Suggests" and "Supplements" instead of "Enhances". | ||
16 | |||
17 | Needs extcond.diff for query operations. | ||
18 | |||
19 | Index: build/parsePreamble.c | ||
20 | =================================================================== | ||
21 | --- build/parsePreamble.c.orig 2008-04-01 08:28:21.000000000 +0100 | ||
22 | +++ build/parsePreamble.c 2008-08-26 16:58:09.000000000 +0100 | ||
23 | @@ -129,6 +129,8 @@ | ||
24 | { "post", RPMSENSE_SCRIPT_POST }, | ||
25 | { "rpmlib", RPMSENSE_RPMLIB }, | ||
26 | { "verify", RPMSENSE_SCRIPT_VERIFY }, | ||
27 | + { "hint", RPMSENSE_MISSINGOK }, | ||
28 | + { "strong", RPMSENSE_STRONG }, | ||
29 | { NULL, 0 } | ||
30 | }; | ||
31 | |||
32 | @@ -140,6 +142,8 @@ | ||
33 | { "build", RPMSENSE_SCRIPT_BUILD }, | ||
34 | { "install", RPMSENSE_SCRIPT_INSTALL }, | ||
35 | { "clean", RPMSENSE_SCRIPT_CLEAN }, | ||
36 | + { "hint", RPMSENSE_MISSINGOK }, | ||
37 | + { "strong", RPMSENSE_STRONG }, | ||
38 | { NULL, 0 } | ||
39 | }; | ||
40 | |||
41 | @@ -692,6 +696,18 @@ | ||
42 | if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) | ||
43 | return rc; | ||
44 | break; | ||
45 | + case RPMTAG_SUGGESTSFLAGS: | ||
46 | + case RPMTAG_ENHANCESFLAGS: | ||
47 | + case RPMTAG_BUILDSUGGESTS: | ||
48 | + case RPMTAG_BUILDENHANCES: | ||
49 | + tagflags = RPMSENSE_MISSINGOK; | ||
50 | + if (macro && (!strcmp(macro, "recommends") || !strcmp(macro, "buildrecommends"))) | ||
51 | + tagflags |= RPMSENSE_STRONG; | ||
52 | + if (macro && (!strcmp(macro, "supplements") || !strcmp(macro, "buildsupplements"))) | ||
53 | + tagflags |= RPMSENSE_STRONG; | ||
54 | + if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) | ||
55 | + return rc; | ||
56 | + break; | ||
57 | case RPMTAG_EXCLUDEARCH: | ||
58 | case RPMTAG_EXCLUSIVEARCH: | ||
59 | case RPMTAG_EXCLUDEOS: | ||
60 | @@ -783,6 +799,14 @@ | ||
61 | {RPMTAG_DISTTAG, 0, 0, 0, "disttag"}, | ||
62 | {RPMTAG_CVSID, 0, 0, 0, "cvsid"}, | ||
63 | {RPMTAG_SVNID, 0, 0, 0, "svnid"}, | ||
64 | + {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "recommends"}, | ||
65 | + {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "suggests"}, | ||
66 | + {RPMTAG_ENHANCESFLAGS, 0, 0, 0, "supplements"}, | ||
67 | + {RPMTAG_ENHANCESFLAGS, 0, 0, 0, "enhances"}, | ||
68 | + {RPMTAG_BUILDSUGGESTS, 0, 0, 0, "buildrecommends"}, | ||
69 | + {RPMTAG_BUILDSUGGESTS, 0, 0, 0, "buildsuggests"}, | ||
70 | + {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildsupplements"}, | ||
71 | + {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildenhances"}, | ||
72 | /*@-nullassign@*/ /* LCL: can't add null annotation */ | ||
73 | {0, 0, 0, 0, 0} | ||
74 | /*@=nullassign@*/ | ||
75 | Index: build/parseReqs.c | ||
76 | =================================================================== | ||
77 | --- build/parseReqs.c.orig 2008-04-01 08:28:21.000000000 +0100 | ||
78 | +++ build/parseReqs.c 2008-08-26 16:58:09.000000000 +0100 | ||
79 | @@ -85,6 +85,14 @@ | ||
80 | tagflags |= RPMSENSE_ANY; | ||
81 | h = spec->buildRestrictions; | ||
82 | break; | ||
83 | + case RPMTAG_SUGGESTSFLAGS: | ||
84 | + case RPMTAG_ENHANCESFLAGS: | ||
85 | + h = pkg->header; | ||
86 | + break; | ||
87 | + case RPMTAG_BUILDSUGGESTS: | ||
88 | + case RPMTAG_BUILDENHANCES: | ||
89 | + h = spec->buildRestrictions; | ||
90 | + break; | ||
91 | default: | ||
92 | case RPMTAG_REQUIREFLAGS: | ||
93 | tagflags |= RPMSENSE_ANY; | ||
94 | Index: build/reqprov.c | ||
95 | =================================================================== | ||
96 | --- build/reqprov.c.orig 2008-04-01 08:28:21.000000000 +0100 | ||
97 | +++ build/reqprov.c 2008-08-26 16:58:09.000000000 +0100 | ||
98 | @@ -48,6 +48,16 @@ | ||
99 | flagtag = RPMTAG_TRIGGERFLAGS; | ||
100 | indextag = RPMTAG_TRIGGERINDEX; | ||
101 | extra = Flags & RPMSENSE_TRIGGER; | ||
102 | + } else if (tagN == RPMTAG_SUGGESTSFLAGS || tagN == RPMTAG_BUILDSUGGESTS) { | ||
103 | + nametag = RPMTAG_SUGGESTSNAME; | ||
104 | + versiontag = RPMTAG_SUGGESTSVERSION; | ||
105 | + flagtag = RPMTAG_SUGGESTSFLAGS; | ||
106 | + extra = Flags & _ALL_REQUIRES_MASK; | ||
107 | + } else if (tagN == RPMTAG_ENHANCESFLAGS || tagN == RPMTAG_BUILDENHANCES) { | ||
108 | + nametag = RPMTAG_ENHANCESNAME; | ||
109 | + versiontag = RPMTAG_ENHANCESVERSION; | ||
110 | + flagtag = RPMTAG_ENHANCESFLAGS; | ||
111 | + extra = Flags & _ALL_REQUIRES_MASK; | ||
112 | } else { | ||
113 | nametag = RPMTAG_REQUIRENAME; | ||
114 | versiontag = RPMTAG_REQUIREVERSION; | ||
115 | Index: build/rpmfc.c | ||
116 | =================================================================== | ||
117 | --- build/rpmfc.c.orig 2008-04-01 08:28:21.000000000 +0100 | ||
118 | +++ build/rpmfc.c 2008-08-26 16:58:09.000000000 +0100 | ||
119 | @@ -1385,6 +1385,12 @@ | ||
120 | { "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL }, | ||
121 | RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS, | ||
122 | 0, -1 }, | ||
123 | + { "Enhances", { "%{?__find_enhances}", NULL, NULL, NULL }, | ||
124 | + RPMTAG_ENHANCESNAME, RPMTAG_ENHANCESVERSION, RPMTAG_ENHANCESFLAGS, | ||
125 | + RPMSENSE_STRONG, RPMSENSE_STRONG }, | ||
126 | + { "Supplements", { "%{?__find_supplements}", NULL, NULL, NULL }, | ||
127 | + RPMTAG_ENHANCESNAME, RPMTAG_ENHANCESVERSION, RPMTAG_ENHANCESFLAGS, | ||
128 | + RPMSENSE_STRONG, 0 }, | ||
129 | { NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 } | ||
130 | }; | ||
131 | |||
132 | @@ -1480,6 +1486,14 @@ | ||
133 | failnonzero = 0; | ||
134 | tagflags = RPMSENSE_FIND_REQUIRES; | ||
135 | /*@switchbreak@*/ break; | ||
136 | + case RPMTAG_ENHANCESFLAGS: | ||
137 | + if (!pkg->autoProv) | ||
138 | + continue; | ||
139 | + failnonzero = 0; | ||
140 | + tagflags = RPMSENSE_FIND_REQUIRES | RPMSENSE_MISSINGOK; | ||
141 | + if (strcmp(dm->msg, "Supplements") == 0) | ||
142 | + tagflags |= RPMSENSE_STRONG; | ||
143 | + /*@switchbreak@*/ break; | ||
144 | default: | ||
145 | continue; | ||
146 | /*@notreached@*/ /*@switchbreak@*/ break; | ||
147 | Index: lib/rpmlib.h | ||
148 | =================================================================== | ||
149 | --- lib/rpmlib.h.orig 2008-04-01 08:28:22.000000000 +0100 | ||
150 | +++ lib/rpmlib.h 2008-08-26 17:00:37.000000000 +0100 | ||
151 | @@ -530,7 +530,7 @@ | ||
152 | RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< @todo Implement %triggerprein. */ | ||
153 | /*@=enummemuse@*/ | ||
154 | RPMSENSE_KEYRING = (1 << 26), | ||
155 | - RPMSENSE_PATCHES = (1 << 27), | ||
156 | + RPMSENSE_STRONG = (1 << 27), | ||
157 | RPMSENSE_CONFIG = (1 << 28) | ||
158 | } rpmsenseFlags; | ||
159 | |||
160 | Index: python/rpmmodule.c | ||
161 | =================================================================== | ||
162 | --- python/rpmmodule.c.orig 2008-04-01 08:28:22.000000000 +0100 | ||
163 | +++ python/rpmmodule.c 2008-08-26 16:58:09.000000000 +0100 | ||
164 | @@ -433,7 +433,7 @@ | ||
165 | REGISTER_ENUM(RPMSENSE_RPMLIB); | ||
166 | REGISTER_ENUM(RPMSENSE_TRIGGERPREIN); | ||
167 | REGISTER_ENUM(RPMSENSE_KEYRING); | ||
168 | - REGISTER_ENUM(RPMSENSE_PATCHES); | ||
169 | + REGISTER_ENUM(RPMSENSE_STRONG); | ||
170 | REGISTER_ENUM(RPMSENSE_CONFIG); | ||
171 | |||
172 | REGISTER_ENUM(RPMTRANS_FLAG_TEST); | ||
173 | Index: lib/rpmds.c | ||
174 | =================================================================== | ||
175 | --- lib/rpmds.c.orig 2008-04-01 08:28:22.000000000 +0100 | ||
176 | +++ lib/rpmds.c 2008-08-26 16:58:09.000000000 +0100 | ||
177 | @@ -320,6 +320,11 @@ | ||
178 | tagEVR = RPMTAG_TRIGGERVERSION; | ||
179 | tagF = RPMTAG_TRIGGERFLAGS; | ||
180 | } else | ||
181 | + if (tagN == RPMTAG_ENHANCESNAME) { | ||
182 | + Type = "Enhances"; | ||
183 | + tagEVR = RPMTAG_ENHANCESVERSION; | ||
184 | + tagF = RPMTAG_ENHANCESFLAGS; | ||
185 | + } else | ||
186 | goto exit; | ||
187 | |||
188 | /*@-branchstate@*/ | ||
189 | Index: rpmpopt.in | ||
190 | =================================================================== | ||
191 | --- rpmpopt.in.orig 2008-04-01 08:28:22.000000000 +0100 | ||
192 | +++ rpmpopt.in 2008-08-26 16:58:09.000000000 +0100 | ||
193 | @@ -68,6 +68,22 @@ | ||
194 | --POPTdesc=$"list capabilities required by package(s)" | ||
195 | rpm alias -R --requires | ||
196 | |||
197 | +rpm alias --suggests --qf \ | ||
198 | + "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ | ||
199 | + --POPTdesc=$"list capabilities this package suggests" | ||
200 | + | ||
201 | +rpm alias --recommends --qf \ | ||
202 | + "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ | ||
203 | + --POPTdesc=$"list capabilities this package recommends" | ||
204 | + | ||
205 | +rpm alias --enhances --qf \ | ||
206 | + "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ | ||
207 | + --POPTdesc=$"list capabilities this package enhances" | ||
208 | + | ||
209 | +rpm alias --supplements --qf \ | ||
210 | + "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ | ||
211 | + --POPTdesc=$"list capabilities this package supplements" | ||
212 | + | ||
213 | rpm alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\ | ||
214 | Version : %-27{VERSION} Vendor: %{VENDOR}\n\ | ||
215 | Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\ | ||
216 | @@ -351,6 +367,22 @@ | ||
217 | --POPTdesc=$"list capabilities required by package(s)" | ||
218 | rpmq alias -R --requires | ||
219 | |||
220 | +rpmq alias --suggests --qf \ | ||
221 | + "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ | ||
222 | + --POPTdesc=$"list capabilities this package suggests" | ||
223 | + | ||
224 | +rpmq alias --recommends --qf \ | ||
225 | + "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ | ||
226 | + --POPTdesc=$"list capabilities this package recommends" | ||
227 | + | ||
228 | +rpmq alias --enhances --qf \ | ||
229 | + "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ | ||
230 | + --POPTdesc=$"list capabilities this package enhances" | ||
231 | + | ||
232 | +rpmq alias --supplements --qf \ | ||
233 | + "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ | ||
234 | + --POPTdesc=$"list capabilities this package supplements" | ||
235 | + | ||
236 | rpmq alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\ | ||
237 | Version : %-27{VERSION} Vendor: %{VENDOR}\n\ | ||
238 | Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\ | ||
239 | @@ -452,6 +484,22 @@ | ||
240 | --POPTdesc=$"list capabilities required by package(s)" | ||
241 | rpmquery alias -R --requires | ||
242 | |||
243 | +rpmquery alias --suggests --qf \ | ||
244 | + "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ | ||
245 | + --POPTdesc=$"list capabilities this package suggests" | ||
246 | + | ||
247 | +rpmquery alias --recommends --qf \ | ||
248 | + "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ | ||
249 | + --POPTdesc=$"list capabilities this package recommends" | ||
250 | + | ||
251 | +rpmquery alias --enhances --qf \ | ||
252 | + "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ | ||
253 | + --POPTdesc=$"list capabilities this package enhances" | ||
254 | + | ||
255 | +rpmquery alias --supplements --qf \ | ||
256 | + "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ | ||
257 | + --POPTdesc=$"list capabilities this package supplements" | ||
258 | + | ||
259 | rpmquery alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\ | ||
260 | Version : %-27{VERSION} Vendor: %{VENDOR}\n\ | ||
261 | Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\ | ||
262 | Index: lib/formats.c | ||
263 | =================================================================== | ||
264 | --- lib/formats.c.orig 2008-04-01 08:28:22.000000000 +0100 | ||
265 | +++ lib/formats.c 2008-08-26 16:58:09.000000000 +0100 | ||
266 | @@ -543,6 +543,38 @@ | ||
267 | return val; | ||
268 | } | ||
269 | |||
270 | +static /*@only@*/ char * depflag_strongFormat(int_32 type, const void * data, | ||
271 | + char * formatPrefix, int padding, /*@unused@*/ int element) | ||
272 | + /*@modifies formatPrefix @*/ | ||
273 | + /*@requires maxRead(data) >= 0 @*/ | ||
274 | +{ | ||
275 | + char * val; | ||
276 | + char buf[10]; | ||
277 | + int anint; | ||
278 | + | ||
279 | + if (type != RPM_INT32_TYPE) { | ||
280 | + val = xstrdup(_("(not a number)")); | ||
281 | + } else { | ||
282 | + anint = *((int_32 *) data); | ||
283 | + buf[0] = '\0'; | ||
284 | + | ||
285 | +/*@-boundswrite@*/ | ||
286 | + if (anint & RPMSENSE_STRONG) | ||
287 | + strcat(buf, "strong"); | ||
288 | +/*@=boundswrite@*/ | ||
289 | + | ||
290 | + val = xmalloc(7 + padding); | ||
291 | +/*@-boundswrite@*/ | ||
292 | + strcat(formatPrefix, "s"); | ||
293 | +/*@=boundswrite@*/ | ||
294 | + /*@-formatconst@*/ | ||
295 | + sprintf(val, formatPrefix, buf); | ||
296 | + /*@=formatconst@*/ | ||
297 | + } | ||
298 | + | ||
299 | + return val; | ||
300 | +} | ||
301 | + | ||
302 | /** | ||
303 | * Retrieve mounted file system paths. | ||
304 | * @param h header | ||
305 | @@ -1171,6 +1203,7 @@ | ||
306 | { HEADER_EXT_FORMAT, "base64", { base64Format } }, | ||
307 | { HEADER_EXT_FORMAT, "pgpsig", { pgpsigFormat } }, | ||
308 | { HEADER_EXT_FORMAT, "depflags", { depflagsFormat } }, | ||
309 | + { HEADER_EXT_FORMAT, "depflag_strong", { depflag_strongFormat } }, | ||
310 | { HEADER_EXT_FORMAT, "fflags", { fflagsFormat } }, | ||
311 | { HEADER_EXT_FORMAT, "perms", { permsFormat } }, | ||
312 | { HEADER_EXT_FORMAT, "permissions", { permsFormat } }, | ||
diff --git a/meta/packages/rpm/rpm-native_4.4.2.3.bb b/meta/packages/rpm/rpm-native_4.4.2.3.bb deleted file mode 100644 index 8a59289b1e..0000000000 --- a/meta/packages/rpm/rpm-native_4.4.2.3.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | require rpm_${PV}.bb | ||
2 | inherit native | ||
3 | |||
4 | DEPENDS = "beecrypt-native zlib-native file-native popt-native python-native gettext-native" | ||
5 | |||
6 | export varprefix = "${localstatedir}" | ||
diff --git a/meta/packages/rpm/rpm/remove-compiled-tests.patch b/meta/packages/rpm/rpm/remove-compiled-tests.patch new file mode 100644 index 0000000000..69b7130b9b --- /dev/null +++ b/meta/packages/rpm/rpm/remove-compiled-tests.patch | |||
@@ -0,0 +1,440 @@ | |||
1 | Index: rpm-5.1.9/configure.ac | ||
2 | =================================================================== | ||
3 | --- rpm-5.1.9.orig/configure.ac 2009-04-18 17:47:02.000000000 +0100 | ||
4 | +++ rpm-5.1.9/configure.ac 2010-07-06 14:47:28.985462456 +0100 | ||
5 | @@ -643,38 +643,22 @@ | ||
6 | dnl look for libc features | ||
7 | PROVIDES_ERRNO=no | ||
8 | AC_MSG_CHECKING(if <netdb.h> defines h_errno) | ||
9 | -AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[printf("%d",h_errno)]])],[PROVIDES_ERRNO=yes],[]) | ||
10 | -AC_MSG_RESULT($PROVIDES_ERRNO) | ||
11 | -if test $PROVIDES_ERRNO = yes; then | ||
12 | - AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno]) | ||
13 | -fi | ||
14 | +AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno]) | ||
15 | |||
16 | dnl If a system doesn't have S_IFSOCK, define it as 0 which will | ||
17 | dnl make S_ISSOCK always return false (nice, eh?) | ||
18 | AC_MSG_CHECKING(if <sys/stat.h> defines S_IFSOCK) | ||
19 | -AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_IFSOCK)]])],[HAS_S_IFSOCK=yes],[HAS_S_IFSOCK=no]) | ||
20 | -AC_MSG_RESULT($HAS_S_IFSOCK) | ||
21 | -if test $HAS_S_IFSOCK = yes; then | ||
22 | - AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK]) | ||
23 | -fi | ||
24 | +AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK]) | ||
25 | |||
26 | dnl Some Unix's are missing S_ISLNK, S_ISSOCK | ||
27 | AC_MSG_CHECKING(if <sys/stat.h> defines S_ISLNK) | ||
28 | -AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISLNK(0755))]])],[HAS_S_ISLNK=yes],[HAS_S_ISLNK=no]) | ||
29 | -AC_MSG_RESULT($HAS_S_ISLNK) | ||
30 | -if test $HAS_S_ISLNK = yes; then | ||
31 | - AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK]) | ||
32 | -fi | ||
33 | +AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK]) | ||
34 | |||
35 | AC_MSG_CHECKING(if <sys/stat.h> defines S_ISSOCK) | ||
36 | -AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISSOCK(0755))]])],[HAS_S_ISSOCK=yes],[HAS_S_ISSOCK=no]) | ||
37 | -AC_MSG_RESULT($HAS_S_ISSOCK) | ||
38 | -if test $HAS_S_ISSOCK = yes; then | ||
39 | - AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK]) | ||
40 | -fi | ||
41 | +AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK]) | ||
42 | |||
43 | AC_MSG_CHECKING(if timezone is defined) | ||
44 | -AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[printf("%ld", timezone)]])],[HAS_TIMEZONE=yes],[HAS_TIMEZONE=no]) | ||
45 | +$HAS_TIMEZONE=yes | ||
46 | AC_MSG_RESULT($HAS_TIMEZONE) | ||
47 | |||
48 | dnl check for missing typedefs | ||
49 | @@ -726,53 +710,12 @@ | ||
50 | AC_MSG_RESULT(yes) | ||
51 | AC_CHECK_HEADERS([libelf.h gelf.h]) | ||
52 | if test ".$ac_cv_header_libelf_h" = .no; then | ||
53 | - dnl # <libelf.h> on Solaris is incompatible with LFS. If we couldn't | ||
54 | - dnl # include <libelf.h>, see if we can when _FILE_OFFSET_BITS is | ||
55 | - dnl # set for non-LFS. Same applies for <gelf.h>, since it probably | ||
56 | - dnl # includes <libelf.h> | ||
57 | - AC_MSG_CHECKING([if libelf.h conflicts with _LARGEFILE_SOURCE]) | ||
58 | - AC_COMPILE_IFELSE([ | ||
59 | - AC_LANG_PROGRAM([[ | ||
60 | -#undef _LARGEFILE64_SOURCE | ||
61 | -#undef _LARGEFILE_SOURCE | ||
62 | -#if !defined(_LP64) | ||
63 | -# undef _FILE_OFFSET_BITS | ||
64 | -# define _FILE_OFFSET_BITS 32 | ||
65 | -#endif | ||
66 | -#include <libelf.h> | ||
67 | - ]], [[ | ||
68 | - Elf_Data foo; | ||
69 | - ]]) | ||
70 | - ], [ | ||
71 | - AC_DEFINE(HAVE_LIBELF_H, 1, [Define to 1 if you have libelf.h]) | ||
72 | - ac_cv_header_libelf_h=yes | ||
73 | - AC_DEFINE(LIBELF_H_LFS_CONFLICT, 1, [Define to 1 if libelf.h is incompatible with LFS API]) | ||
74 | - AC_MSG_RESULT(yes) | ||
75 | - ], [ | ||
76 | - AC_MSG_RESULT(no) | ||
77 | - ]) | ||
78 | + AC_DEFINE(HAVE_LIBELF_H, 1, [Define to 1 if you have libelf.h]) | ||
79 | + ac_cv_header_libelf_h=yes | ||
80 | fi | ||
81 | if test ".$ac_cv_header_gelf_h" = .no; then | ||
82 | - AC_MSG_CHECKING([if gelf.h conflicts with _LARGEFILE_SOURCE]) | ||
83 | - AC_COMPILE_IFELSE([ | ||
84 | - AC_LANG_PROGRAM([[ | ||
85 | -#undef _LARGEFILE64_SOURCE | ||
86 | -#undef _LARGEFILE_SOURCE | ||
87 | -#if !defined(_LP64) | ||
88 | -# undef _FILE_OFFSET_BITS | ||
89 | -# define _FILE_OFFSET_BITS 32 | ||
90 | -#endif | ||
91 | -#include <gelf.h> | ||
92 | - ]], [[ | ||
93 | - Elf32_Verdef foo; | ||
94 | - ]]) | ||
95 | - ], [ | ||
96 | - AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have gelf.h]) | ||
97 | - ac_cv_header_gelf_h=yes | ||
98 | - AC_MSG_RESULT(yes) | ||
99 | - ], [ | ||
100 | - AC_MSG_RESULT(no) | ||
101 | - ]) | ||
102 | + AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have gelf.h]) | ||
103 | + ac_cv_header_gelf_h=yes | ||
104 | fi | ||
105 | if test ".$ac_cv_header_gelf_h" = .yes; then | ||
106 | AC_CHECK_LIB([elf], [elf_version], [ | ||
107 | @@ -854,78 +797,9 @@ | ||
108 | python_version="" | ||
109 | ;; | ||
110 | esac | ||
111 | - for python_ver in $python_version ; do | ||
112 | - if test "$python_ver" != "2.x" ; then | ||
113 | - AC_MSG_CHECKING([for Python ${python_ver} API]) | ||
114 | - save_CFLAGS="${CFLAGS}" | ||
115 | - for i in "$prefix" "/usr/local" "/usr"; do | ||
116 | - CFLAGS="${save_CFLAGS} -I$i/include/python${python_ver}" | ||
117 | - AC_RUN_IFELSE([AC_LANG_SOURCE( | ||
118 | - [[#include "Python.h" | ||
119 | - main() { exit(strncmp("${python_ver}", PY_VERSION, 3)); } ]]) | ||
120 | - ], [ | ||
121 | - PYTHON_VERSION="${python_ver}" | ||
122 | - AC_MSG_RESULT(yes) | ||
123 | - PYTHON_PREFIX="${i}" | ||
124 | - break | ||
125 | - ], [ | ||
126 | - ], [ | ||
127 | - dnl if we're cross compiling, assume the user has a clue | ||
128 | - if test "$withval" = "$python_ver"; then | ||
129 | - PYTHON_VERSION="${python_ver}" | ||
130 | - AC_MSG_RESULT(yes) | ||
131 | - break | ||
132 | - fi | ||
133 | - ]) | ||
134 | - done | ||
135 | - CFLAGS="${save_CFLAGS}" | ||
136 | - if test ".$PYTHON_VERSION" == "."; then | ||
137 | - dnl check Mac OS X framework | ||
138 | - save_CFLAGS="${CFLAGS}" | ||
139 | - for f in "~" "" "/System" "/Network"; do | ||
140 | - CFLAGS="${save_CFLAGS} -I$f/Library/Frameworks/Python.framework/Versions/${python_ver}/include/python${python_ver}" | ||
141 | - AC_RUN_IFELSE([AC_LANG_SOURCE( | ||
142 | - [[#include "Python.h" | ||
143 | - main() { exit(strncmp("${python_ver}", PY_VERSION, 3)); } ]]) | ||
144 | - ], [ | ||
145 | - PYTHON_VERSION="${python_ver}" | ||
146 | - AC_MSG_RESULT([yes (using Python.framework)]) | ||
147 | - PYTHON_PREFIX="$f/Library/Frameworks/Python.framework/Versions/${python_ver}" | ||
148 | - break | ||
149 | - ], [ | ||
150 | - ]) | ||
151 | - done | ||
152 | - CFLAGS="${save_CFLAGS}" | ||
153 | - fi | ||
154 | - if test ".$PYTHON_VERSION" == "."; then | ||
155 | - AC_MSG_RESULT(no) | ||
156 | - fi | ||
157 | - else | ||
158 | - AC_MSG_CHECKING([for Python 2.x API]) | ||
159 | - AC_RUN_IFELSE([AC_LANG_SOURCE( | ||
160 | - [[#include <python/Python.h> | ||
161 | - main() { exit(strncmp("2.", PY_VERSION, 2)); } ]]) | ||
162 | - ], [ | ||
163 | - PYTHON_VERSION="" | ||
164 | - AC_MSG_RESULT(yes) | ||
165 | - ], [ | ||
166 | - AC_MSG_RESULT(no) | ||
167 | - ], [ | ||
168 | - dnl if we're cross compiling, assume the user has a clue | ||
169 | - if test "$withval" = "$python_ver"; then | ||
170 | - PYTHON_VERSION="${python_ver}" | ||
171 | - AC_MSG_RESULT(yes) | ||
172 | - else | ||
173 | - AC_MSG_RESULT(no) | ||
174 | - fi | ||
175 | - ]) | ||
176 | - fi | ||
177 | - if test ".$PYTHON_VERSION" != "."; then | ||
178 | - WITH_PYTHON_SUBDIR=python | ||
179 | - WITH_PYTHON_SUBPACKAGE=1 | ||
180 | - break | ||
181 | - fi | ||
182 | - done | ||
183 | + PYTHON_VERSION="${python_ver}" | ||
184 | + WITH_PYTHON_SUBDIR=python | ||
185 | + WITH_PYTHON_SUBPACKAGE=1 | ||
186 | fi | ||
187 | AC_ARG_WITH(python-inc-dir, AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]), | ||
188 | [WITH_PYTHON_INCDIR="$withval"], [WITH_PYTHON_INCDIR="`(python -c 'from distutils.sysconfig import get_python_inc; print get_python_inc()') 2>/dev/null`"]) | ||
189 | @@ -1157,15 +1031,8 @@ | ||
190 | AC_SUBST(WITH_PCRE_LIBS) | ||
191 | else | ||
192 | dnl # make sure PCRE POSIX API can be really _USED_ by RPM | ||
193 | - LIBS_SAVED="$LIBS" | ||
194 | LIBS="-lpcreposix $LIBS" | ||
195 | - AC_LINK_IFELSE([ | ||
196 | - AC_LANG_PROGRAM([#include <pcreposix.h>], [(void)regcomp(0, 0, 0)]) | ||
197 | - ], [ | ||
198 | - AC_DEFINE(WITH_PCRE_POSIX, 1, [Define as 1 if PCRE's POSIX API is available]) | ||
199 | - ], [ | ||
200 | - LIBS="$LIBS_SAVED" | ||
201 | - ]) | ||
202 | + AC_DEFINE(WITH_PCRE_POSIX, 1, [Define as 1 if PCRE's POSIX API is available]) | ||
203 | fi | ||
204 | dnl # enable PCRE native API support for embedded Lua | ||
205 | if test ".$WITH_LUA" = .yes; then | ||
206 | @@ -1234,30 +1101,7 @@ | ||
207 | |||
208 | dnl # figure out what root's primary group is | ||
209 | AC_MSG_CHECKING([root's primary group]) | ||
210 | -AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> | ||
211 | -#include <sys/types.h> | ||
212 | -#include <pwd.h> | ||
213 | -#include <grp.h> | ||
214 | -int main() | ||
215 | -{ | ||
216 | - struct passwd *root = NULL; | ||
217 | - struct group *roots_group = NULL; | ||
218 | - FILE * tempfile = NULL; | ||
219 | - root = getpwuid( (uid_t) 0 ); | ||
220 | - if (root != NULL) { | ||
221 | - roots_group = getgrgid(root->pw_gid); | ||
222 | - if (roots_group != NULL) { | ||
223 | - tempfile = fopen("conftest_rootg", "w"); | ||
224 | - if (tempfile != NULL) { | ||
225 | - fprintf(tempfile, "%s\n", roots_group->gr_name); | ||
226 | - fclose(tempfile); | ||
227 | - exit(0); | ||
228 | - } | ||
229 | - } | ||
230 | - } | ||
231 | - exit(1); | ||
232 | -}]])],[ROOT_GROUP=`cat conftest_rootg`; rm -f conftest_rootg],[ROOT_GROUP="root"],[ROOT_GROUP="root" | ||
233 | -]) | ||
234 | +$ROOT_GROUP="root" | ||
235 | AC_MSG_RESULT([$ROOT_GROUP]) | ||
236 | AC_SUBST(ROOT_GROUP) | ||
237 | |||
238 | Index: rpm-5.1.9/pcre/configure.ac | ||
239 | =================================================================== | ||
240 | --- rpm-5.1.9.orig/pcre/configure.ac 2009-01-14 20:19:31.000000000 +0000 | ||
241 | +++ rpm-5.1.9/pcre/configure.ac 2010-07-06 14:51:50.769586089 +0100 | ||
242 | @@ -278,34 +278,6 @@ | ||
243 | # The files below are C++ header files. | ||
244 | pcre_have_type_traits="0" | ||
245 | pcre_have_bits_type_traits="0" | ||
246 | -if test "x$enable_cpp" = "xyes" -a -n "$CXX" | ||
247 | -then | ||
248 | -AC_LANG_PUSH(C++) | ||
249 | - | ||
250 | -# Older versions of pcre defined pcrecpp::no_arg, but in new versions | ||
251 | -# it's called pcrecpp::RE::no_arg. For backwards ABI compatibility, | ||
252 | -# we want to make one an alias for the other. Different systems do | ||
253 | -# this in different ways. Some systems, for instance, can do it via | ||
254 | -# a linker flag: -alias (for os x 10.5) or -i (for os x <=10.4). | ||
255 | -OLD_LDFLAGS="$LDFLAGS" | ||
256 | -for flag in "-alias,__ZN7pcrecpp2RE6no_argE,__ZN7pcrecpp6no_argE" \ | ||
257 | - "-i__ZN7pcrecpp6no_argE:__ZN7pcrecpp2RE6no_argE"; do | ||
258 | - AC_MSG_CHECKING([for alias support in the linker]) | ||
259 | - LDFLAGS="$OLD_LDFLAGS -Wl,$flag" | ||
260 | - # We try to run the linker with this new ld flag. If the link fails, | ||
261 | - # we give up and remove the new flag from LDFLAGS. | ||
262 | - AC_LINK_IFELSE(AC_LANG_PROGRAM([namespace pcrecpp { | ||
263 | - class RE { static int no_arg; }; | ||
264 | - int RE::no_arg; | ||
265 | - }], | ||
266 | - []), | ||
267 | - [AC_MSG_RESULT([yes]); | ||
268 | - EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS -Wl,$flag"; | ||
269 | - break;], | ||
270 | - AC_MSG_RESULT([no])) | ||
271 | -done | ||
272 | -LDFLAGS="$OLD_LDFLAGS" | ||
273 | - | ||
274 | # We could be more clever here, given we're doing AC_SUBST with this | ||
275 | # (eg set a var to be the name of the include file we want). But we're not | ||
276 | # so it's easy to change back to 'regular' autoconf vars if we needed to. | ||
277 | @@ -316,7 +288,6 @@ | ||
278 | AC_CHECK_HEADERS(type_traits.h, [pcre_have_type_traits="1"], | ||
279 | [pcre_have_type_traits="0"]) | ||
280 | |||
281 | -AC_LANG_POP | ||
282 | fi | ||
283 | # Using AC_SUBST eliminates the need to include config.h in a public .h file | ||
284 | AC_SUBST(pcre_have_type_traits) | ||
285 | Index: rpm-5.1.9/db/dist/configure.ac | ||
286 | =================================================================== | ||
287 | --- rpm-5.1.9.orig/db/dist/configure.ac 2008-06-15 08:16:21.000000000 +0100 | ||
288 | +++ rpm-5.1.9/db/dist/configure.ac 2010-07-06 15:36:39.262461127 +0100 | ||
289 | @@ -602,24 +602,6 @@ | ||
290 | aux*) AC_LIBOBJ([getopt]);; | ||
291 | esac | ||
292 | |||
293 | -# Linux has a broken O_DIRECT flag, but you can't detect it at configure time. | ||
294 | -# Linux and SGI require buffer alignment we may not match, otherwise writes | ||
295 | -# will fail. Default to not using the O_DIRECT flag. | ||
296 | -if test "$db_cv_o_direct" = "yes"; then | ||
297 | - AC_CACHE_CHECK([for open/O_DIRECT], db_cv_open_o_direct, [ | ||
298 | - AC_TRY_LINK([ | ||
299 | - #include <sys/types.h> | ||
300 | - #include <fcntl.h>], [ | ||
301 | - open("a", O_RDONLY | O_DIRECT, 0); | ||
302 | - ], [db_cv_open_o_direct=yes], [db_cv_open_o_direct=no])]) | ||
303 | - if test \ | ||
304 | - "$db_cv_o_direct" = "yes" -a "$db_cv_open_o_direct" = "yes"; then | ||
305 | - AC_DEFINE(HAVE_O_DIRECT) | ||
306 | - AH_TEMPLATE(HAVE_O_DIRECT, | ||
307 | - [Define to 1 if you have the O_DIRECT flag.]) | ||
308 | - fi | ||
309 | -fi | ||
310 | - | ||
311 | # Check for largefile support. | ||
312 | AC_SYS_LARGEFILE | ||
313 | |||
314 | Index: rpm-5.1.9/xz/configure.ac | ||
315 | =================================================================== | ||
316 | --- rpm-5.1.9.orig/xz/configure.ac 2009-02-16 17:07:46.000000000 +0000 | ||
317 | +++ rpm-5.1.9/xz/configure.ac 2010-07-06 15:41:22.632467951 +0100 | ||
318 | @@ -457,26 +457,9 @@ | ||
319 | #endif | ||
320 | ]) | ||
321 | |||
322 | -# Even if we have byteswap.h, we may lack the specific macros/functions. | ||
323 | -if test x$ac_cv_header_byteswap_h = xyes ; then | ||
324 | - m4_foreach([FUNC], [bswap_16,bswap_32,bswap_64], [ | ||
325 | - AC_MSG_CHECKING([if FUNC is available]) | ||
326 | - AC_LINK_IFELSE([AC_LANG_SOURCE([ | ||
327 | -#include <byteswap.h> | ||
328 | -int | ||
329 | -main(void) | ||
330 | -{ | ||
331 | - FUNC[](42); | ||
332 | - return 0; | ||
333 | -} | ||
334 | - ])], [ | ||
335 | - AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1], | ||
336 | - [Define to 1 if] FUNC [is available.]) | ||
337 | - AC_MSG_RESULT([yes]) | ||
338 | - ], [AC_MSG_RESULT([no])]) | ||
339 | - | ||
340 | - ])dnl | ||
341 | -fi | ||
342 | +AC_DEFINE(HAVE_BSWAP_16, 1) | ||
343 | +AC_DEFINE(HAVE_BSWAP_32, 1) | ||
344 | +AC_DEFINE(HAVE_BSWAP_64, 1) | ||
345 | |||
346 | |||
347 | ############################################################################### | ||
348 | @@ -527,90 +510,16 @@ | ||
349 | # xz command line tool uses this to automatically limit its memory usage. | ||
350 | # - sysconf() gives all the needed info on GNU+Linux and Solaris. | ||
351 | # - BSDs use sysctl(). | ||
352 | -AC_MSG_CHECKING([how to detect the amount of physical memory]) | ||
353 | -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ | ||
354 | -#include <unistd.h> | ||
355 | -int | ||
356 | -main() | ||
357 | -{ | ||
358 | - long i; | ||
359 | - i = sysconf(_SC_PAGESIZE); | ||
360 | - i = sysconf(_SC_PHYS_PAGES); | ||
361 | - return 0; | ||
362 | -} | ||
363 | -]])], [ | ||
364 | - AC_DEFINE([HAVE_PHYSMEM_SYSCONF], [1], | ||
365 | +AC_DEFINE([HAVE_PHYSMEM_SYSCONF], [1], | ||
366 | [Define to 1 if the amount of physical memory can be detected | ||
367 | with sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES).]) | ||
368 | - AC_MSG_RESULT([sysconf]) | ||
369 | -], [ | ||
370 | -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ | ||
371 | -#include <sys/types.h> | ||
372 | -#ifdef HAVE_SYS_PARAM_H | ||
373 | -# include <sys/param.h> | ||
374 | -#endif | ||
375 | -#include <sys/sysctl.h> | ||
376 | -int | ||
377 | -main() | ||
378 | -{ | ||
379 | - int name[2] = { CTL_HW, HW_PHYSMEM }; | ||
380 | - unsigned long mem; | ||
381 | - size_t mem_ptr_size = sizeof(mem); | ||
382 | - sysctl(name, 2, &mem, &mem_ptr_size, NULL, NULL); | ||
383 | - return 0; | ||
384 | -} | ||
385 | -]])], [ | ||
386 | - AC_DEFINE([HAVE_PHYSMEM_SYSCTL], [1], | ||
387 | - [Define to 1 if the amount of physical memory can be detected | ||
388 | - with sysctl().]) | ||
389 | - AC_MSG_RESULT([sysctl]) | ||
390 | -], [ | ||
391 | - AC_MSG_RESULT([unknown]) | ||
392 | -])]) | ||
393 | |||
394 | # Check how to find out the number of available CPU cores in the system. | ||
395 | # sysconf(_SC_NPROCESSORS_ONLN) works on most systems, except that BSDs | ||
396 | # use sysctl(). | ||
397 | -AC_MSG_CHECKING([how to detect the number of available CPU cores]) | ||
398 | -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ | ||
399 | -#include <unistd.h> | ||
400 | -int | ||
401 | -main() | ||
402 | -{ | ||
403 | - long i; | ||
404 | - i = sysconf(_SC_NPROCESSORS_ONLN); | ||
405 | - return 0; | ||
406 | -} | ||
407 | -]])], [ | ||
408 | - AC_DEFINE([HAVE_NCPU_SYSCONF], [1], | ||
409 | +AC_DEFINE([HAVE_NCPU_SYSCONF], [1], | ||
410 | [Define to 1 if the number of available CPU cores can be | ||
411 | detected with sysconf(_SC_NPROCESSORS_ONLN).]) | ||
412 | - AC_MSG_RESULT([sysconf]) | ||
413 | -], [ | ||
414 | -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ | ||
415 | -#include <sys/types.h> | ||
416 | -#ifdef HAVE_SYS_PARAM_H | ||
417 | -# include <sys/param.h> | ||
418 | -#endif | ||
419 | -#include <sys/sysctl.h> | ||
420 | -int | ||
421 | -main() | ||
422 | -{ | ||
423 | - int name[2] = { CTL_HW, HW_NCPU }; | ||
424 | - int cpus; | ||
425 | - size_t cpus_size = sizeof(cpus); | ||
426 | - sysctl(name, 2, &cpus, &cpus_size, NULL, NULL); | ||
427 | - return 0; | ||
428 | -} | ||
429 | -]])], [ | ||
430 | - AC_DEFINE([HAVE_NCPU_SYSCTL], [1], | ||
431 | - [Define to 1 if the number of available CPU cores can be | ||
432 | - detected with sysctl().]) | ||
433 | - AC_MSG_RESULT([sysctl]) | ||
434 | -], [ | ||
435 | - AC_MSG_RESULT([unknown]) | ||
436 | -])]) | ||
437 | - | ||
438 | |||
439 | ############################################################################### | ||
440 | # If using GCC, set some additional CFLAGS: | ||
diff --git a/meta/packages/rpm/rpm_4.4.2.3.bb b/meta/packages/rpm/rpm_4.4.2.3.bb deleted file mode 100644 index 6605650023..0000000000 --- a/meta/packages/rpm/rpm_4.4.2.3.bb +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | DESCRIPTION = "The RPM Package Manager." | ||
2 | HOMEPAGE = "http://rpm.org/" | ||
3 | BUGTRACKER = "http://rpm.org/report" | ||
4 | |||
5 | # library is covered under dual license of GPL | LGPL | ||
6 | LICENSE = "(LGPLv2+ | GPLv2+) & GPLv2+" | ||
7 | |||
8 | DEPENDS = "zlib beecrypt file popt python" | ||
9 | PR = "r16" | ||
10 | |||
11 | SRC_URI = "http://www.rpm.org/releases/rpm-4.4.x/rpm-4.4.2.3.tar.gz \ | ||
12 | file://external-tools.patch;patch=1 \ | ||
13 | file://cross_libpaths.patch;patch=1 \ | ||
14 | file://weakdeps.patch;patch=1;pnum=0 \ | ||
15 | file://tagsbackport.patch;patch=1;pnum=0 \ | ||
16 | file://missingok.patch;patch=1;pnum=0 \ | ||
17 | file://extcond.patch;patch=1;pnum=0 \ | ||
18 | file://disabledwarf.patch;patch=1" | ||
19 | |||
20 | S = "${WORKDIR}/rpm-${PV}" | ||
21 | |||
22 | inherit autotools gettext | ||
23 | |||
24 | acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" | ||
25 | |||
26 | EXTRA_OECONF = "--with-python=$PYTHONVER \ | ||
27 | --with-python-incdir=${STAGING_INCDIR}/python$PYTHONVER \ | ||
28 | --with-python-libdir=${libdir}/python$PYTHONVER \ | ||
29 | --without-apidocs \ | ||
30 | --without-selinux \ | ||
31 | --without-lua \ | ||
32 | --without-dmalloc \ | ||
33 | --without-efence" | ||
34 | |||
35 | PACKAGES += "python-rpm" | ||
36 | FILES_python-rpm = "${libdir}/python*/site-packages/rpm/_*" | ||
37 | |||
38 | # Handle the db MUTEX settings here, the POSIX library is | ||
39 | # the default - "POSIX/pthreads/library". | ||
40 | # Don't ignore the nice SWP instruction on the ARM: | ||
41 | # These enable the ARM assembler mutex code, this won't | ||
42 | # work with thumb compilation... | ||
43 | ARM_MUTEX = "--with-mutex=ARM/gcc-assembly" | ||
44 | MUTEX = "" | ||
45 | MUTEX_arm = "${ARM_MUTEX}" | ||
46 | MUTEX_armeb = "${ARM_MUTEX}" | ||
47 | EXTRA_OECONF += "${MUTEX}" | ||
48 | |||
49 | export varprefix = "${localstatedir}" | ||
50 | |||
51 | do_configure () { | ||
52 | rm ${S}/popt/ -Rf | ||
53 | rm ${S}/db/dist/configure.in -f | ||
54 | cd ${S}/db/dist/aclocal | ||
55 | rm libtool* -f | ||
56 | for i in `ls *.ac`; do | ||
57 | j=`echo $i | sed 's/.ac/.m4/g'` | ||
58 | mv $i $j | ||
59 | done | ||
60 | cd ${S}/db/dist/aclocal_java | ||
61 | for i in `ls *.ac`; do | ||
62 | j=`echo $i | sed 's/.ac/.m4/g'` | ||
63 | mv $i $j | ||
64 | done | ||
65 | cd ${S} | ||
66 | autotools_do_configure | ||
67 | cd ${S}/db/dist | ||
68 | . ./RELEASE | ||
69 | # Edit version information we couldn't pre-compute. | ||
70 | (echo "1,\$s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" && | ||
71 | echo "1,\$s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" && | ||
72 | echo "1,\$s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" && | ||
73 | echo "1,\$s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" && | ||
74 | echo "1,\$s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" && | ||
75 | echo "1,\$s/__EDIT_DB_VERSION__/$DB_VERSION/g" && | ||
76 | echo "w" && | ||
77 | echo "q") | ed configure | ||
78 | cd ${S}/db3 | ||
79 | ${S}/db3/configure \ | ||
80 | --build=${BUILD_SYS} \ | ||
81 | --host=${HOST_SYS} \ | ||
82 | --target=${TARGET_SYS} \ | ||
83 | --prefix=${prefix} \ | ||
84 | --exec_prefix=${exec_prefix} \ | ||
85 | --bindir=${bindir} \ | ||
86 | --sbindir=${sbindir} \ | ||
87 | --libexecdir=${libexecdir} \ | ||
88 | --datadir=${datadir} \ | ||
89 | --sysconfdir=${sysconfdir} \ | ||
90 | --sharedstatedir=${sharedstatedir} \ | ||
91 | --localstatedir=${localstatedir} \ | ||
92 | --libdir=${libdir} \ | ||
93 | --includedir=${includedir} \ | ||
94 | --oldincludedir=${oldincludedir} \ | ||
95 | --infodir=${infodir} \ | ||
96 | --mandir=${mandir} \ | ||
97 | ${EXTRA_OECONF} \ | ||
98 | --with-pic | ||
99 | |||
100 | } | ||
101 | |||
102 | do_install_append () { | ||
103 | rmdir ${D}${localstatedir}/tmp || true | ||
104 | } | ||
105 | |||
106 | def rpm_python_version(d): | ||
107 | import os, bb | ||
108 | staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 ) | ||
109 | if os.path.exists( "%s/python2.6" % staging_incdir ): return "2.6" | ||
110 | if os.path.exists( "%s/python2.5" % staging_incdir ): return "2.5" | ||
111 | if os.path.exists( "%s/python2.4" % staging_incdir ): return "2.4" | ||
112 | if os.path.exists( "%s/python2.3" % staging_incdir ): return "2.3" | ||
113 | raise "No Python in STAGING_INCDIR. Forgot to build python/python-native?" | ||
114 | |||
115 | # Use a shell variable here since otherwise gettext trys to expand this at | ||
116 | # parse time when it manipulates EXTRA_OECONF which fails | ||
117 | export PYTHONVER = "${@rpm_python_version(d)}" | ||
diff --git a/meta/packages/rpm/rpm_5.1.9.bb b/meta/packages/rpm/rpm_5.1.9.bb new file mode 100644 index 0000000000..9ba1126533 --- /dev/null +++ b/meta/packages/rpm/rpm_5.1.9.bb | |||
@@ -0,0 +1,96 @@ | |||
1 | DESCRIPTION = "The RPM Package Manager - relaunched" | ||
2 | HOMEPAGE = "http://rpm5.org/" | ||
3 | LICENSE = "LGPL 2.1" | ||
4 | DEPENDS = "zlib perl popt beecrypt python libpcre" | ||
5 | PR = "r0" | ||
6 | |||
7 | SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/${BPN}-${PV}.tar.gz \ | ||
8 | file://remove-compiled-tests.patch;apply=no \ | ||
9 | " | ||
10 | inherit autotools gettext | ||
11 | |||
12 | acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" | ||
13 | |||
14 | # Specify the default rpm macros in terms of adjustable variables | ||
15 | rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" | ||
16 | |||
17 | EXTRA_OECONF = "--with-python=$PYTHONVER \ | ||
18 | --with-python-inc-dir=${STAGING_INCDIR}/python$PYTHONVER \ | ||
19 | --with-python-lib-dir=${libdir}/python$PYTHONVER \ | ||
20 | --with-db=internal \ | ||
21 | --with-db-tools-integrated \ | ||
22 | --without-apidocs \ | ||
23 | --without-selinux \ | ||
24 | --without-lua \ | ||
25 | --without-dmalloc \ | ||
26 | --without-efence \ | ||
27 | --without-neon \ | ||
28 | --with-pcre=${libdir} \ | ||
29 | --with-path-macros=${rpm_macros}" | ||
30 | |||
31 | CFLAGS_append = " -DRPM_VENDOR_WINDRIVER" | ||
32 | |||
33 | PACKAGES += "python-rpm" | ||
34 | FILES_python-rpm = "${libdir}/python*/site-packages/rpm/_*" | ||
35 | |||
36 | # The mutex needs to be POSIX/pthreads/library or we can't | ||
37 | # share a database between host and target environments | ||
38 | # (there is a minor performance penalty, but not one great enough | ||
39 | # to justify the pain of a more optimized approach!) | ||
40 | EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library" | ||
41 | |||
42 | do_configure() { | ||
43 | rm ${S}/db/dist/configure.in -f | ||
44 | for i in `find ${S} -name *.ac`; do | ||
45 | j=`echo $i | sed 's/.ac/.m4/g'` | ||
46 | mv $i $j | ||
47 | done | ||
48 | export ac_cv_va_copy=C99 | ||
49 | autotools_do_configure | ||
50 | cd ${S}/db3 | ||
51 | ${S}/db3/configure \ | ||
52 | --build=${BUILD_SYS} \ | ||
53 | --host=${HOST_SYS} \ | ||
54 | --target=${TARGET_SYS} \ | ||
55 | --prefix=${prefix} \ | ||
56 | --exec_prefix=${exec_prefix} \ | ||
57 | --bindir=${bindir} \ | ||
58 | --sbindir=${sbindir} \ | ||
59 | --libexecdir=${libexecdir} \ | ||
60 | --datadir=${datadir} \ | ||
61 | --sysconfdir=${sysconfdir} \ | ||
62 | --sharedstatedir=${sharedstatedir} \ | ||
63 | --localstatedir=${localstatedir} \ | ||
64 | --libdir=${libdir} \ | ||
65 | --includedir=${includedir} \ | ||
66 | --oldincludedir=${oldincludedir} \ | ||
67 | --infodir=${infodir} \ | ||
68 | --mandir=${mandir} \ | ||
69 | ${EXTRA_OECONF} | ||
70 | } | ||
71 | |||
72 | INSTALL_ACTIONS="" | ||
73 | |||
74 | # When installing the native version, the rpm components are renamed with a | ||
75 | # naming transform. We need to adjust the rpmpopt file with the same transform | ||
76 | INSTALL_ACTIONS_virtclass-native="sed -i -e 's,rpm,${HOST_SYS}-rpm,' ${D}/${libdir}/rpm/rpmpopt" | ||
77 | |||
78 | do_install_append() { | ||
79 | ${INSTALL_ACTIONS} | ||
80 | sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros | ||
81 | } | ||
82 | |||
83 | def rpm_python_version(d): | ||
84 | import os, bb | ||
85 | staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 ) | ||
86 | if os.path.exists( "%s/python2.6" % staging_incdir ): return "2.6" | ||
87 | if os.path.exists( "%s/python2.5" % staging_incdir ): return "2.5" | ||
88 | if os.path.exists( "%s/python2.4" % staging_incdir ): return "2.4" | ||
89 | if os.path.exists( "%s/python2.3" % staging_incdir ): return "2.3" | ||
90 | raise "No Python in STAGING_INCDIR. Forgot to build python/python-native?" | ||
91 | |||
92 | # Use a shell variable here since otherwise gettext trys to expand this at | ||
93 | # parse time when it manipulates EXTRA_OECONF which fails | ||
94 | export PYTHONVER = "${@rpm_python_version(d)}" | ||
95 | |||
96 | BBCLASSEXTEND = "native" | ||