diff options
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rwxr-xr-x | meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh | 50 | ||||
-rw-r--r-- | meta/recipes-devtools/rpm/rpm/remove-compiled-tests.patch | 440 | ||||
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_5.1.10.bb | 137 |
3 files changed, 627 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh b/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh new file mode 100755 index 0000000000..b72c9f0265 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh | |||
@@ -0,0 +1,50 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | : ${RPMDEPS:=rpmdeps} | ||
4 | |||
5 | process() { | ||
6 | while read file_name ; do | ||
7 | printf "%s\t" ${file_name} | ||
8 | if [ ! -d $file_name ]; then | ||
9 | printf "%s " $($RPMDEPS $1 $file_name | sed -e 's,rpmlib(.*,,' -e 's,\([<>\=]\+ \+[^ ]*\),(\1),g') | ||
10 | fi | ||
11 | printf "\n" | ||
12 | done | ||
13 | } | ||
14 | |||
15 | usage() { | ||
16 | echo "$0 {-P|--provides} {-R|--requires} FILE ..." | ||
17 | } | ||
18 | |||
19 | while [ $# -gt 0 ]; do | ||
20 | case "$1" in | ||
21 | --rpmdeps) | ||
22 | RPMDEPS=$2 | ||
23 | shift | ||
24 | shift | ||
25 | ;; | ||
26 | -R|--requires) | ||
27 | process_type=--requires | ||
28 | shift | ||
29 | ;; | ||
30 | -P|--provides) | ||
31 | process_type=--provides | ||
32 | shift | ||
33 | ;; | ||
34 | *) | ||
35 | break; | ||
36 | ;; | ||
37 | esac | ||
38 | done | ||
39 | |||
40 | if [ -z "$process_type" ]; then | ||
41 | usage | ||
42 | exit 1 | ||
43 | fi | ||
44 | |||
45 | if [ $# -gt 0 ]; then | ||
46 | find "$@" | process $process_type | ||
47 | exit $? | ||
48 | fi | ||
49 | |||
50 | process $process_type | ||
diff --git a/meta/recipes-devtools/rpm/rpm/remove-compiled-tests.patch b/meta/recipes-devtools/rpm/rpm/remove-compiled-tests.patch new file mode 100644 index 0000000000..69b7130b9b --- /dev/null +++ b/meta/recipes-devtools/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/recipes-devtools/rpm/rpm_5.1.10.bb b/meta/recipes-devtools/rpm/rpm_5.1.10.bb new file mode 100644 index 0000000000..a7097f760c --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm_5.1.10.bb | |||
@@ -0,0 +1,137 @@ | |||
1 | DESCRIPTION = "The RPM Package Manager - relaunched" | ||
2 | DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands." | ||
3 | HOMEPAGE = "http://rpm5.org/" | ||
4 | LICENSE = "LGPL 2.1" | ||
5 | DEPENDS = "zlib perl popt beecrypt python libpcre elfutils" | ||
6 | PR = "r2" | ||
7 | |||
8 | SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/SNAPSHOT/${BPN}-${PV}.tar.gz \ | ||
9 | file://remove-compiled-tests.patch;apply=no \ | ||
10 | file://perfile_rpmdeps.sh \ | ||
11 | " | ||
12 | inherit autotools gettext | ||
13 | |||
14 | acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" | ||
15 | |||
16 | # Specify the default rpm macros in terms of adjustable variables | ||
17 | rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" | ||
18 | |||
19 | EXTRA_OECONF = "--with-python=$PYTHONVER \ | ||
20 | --with-python-inc-dir=${STAGING_INCDIR}/python$PYTHONVER \ | ||
21 | --with-python-lib-dir=${libdir}/python$PYTHONVER \ | ||
22 | --with-db=internal \ | ||
23 | --with-db-tools-integrated \ | ||
24 | --with-libelf \ | ||
25 | --with-file=internal \ | ||
26 | --without-apidocs \ | ||
27 | --without-selinux \ | ||
28 | --without-lua \ | ||
29 | --without-dmalloc \ | ||
30 | --without-efence \ | ||
31 | --without-neon \ | ||
32 | --with-pcre=${libdir} \ | ||
33 | --with-path-macros=${rpm_macros} \ | ||
34 | --with-bugreport=http://bugzilla.pokylinux.org" | ||
35 | |||
36 | CFLAGS_append = " -DRPM_VENDOR_WINDRIVER" | ||
37 | |||
38 | PACKAGES =+ "rpm-build python-rpm python-rpm-dbg" | ||
39 | |||
40 | SOLIBS = "5.0.so" | ||
41 | |||
42 | FILES_rpm-build = "${bindir}/*-rpmbuild \ | ||
43 | ${bindir}/*-gendiff \ | ||
44 | ${bindir}/*-rpmspecdump \ | ||
45 | ${libdir}/rpm/helpers/* \ | ||
46 | ${libdir}/rpm/*brp* \ | ||
47 | ${libdir}/rpm/*check-files \ | ||
48 | ${libdir}/rpm/*cross-build \ | ||
49 | ${libdir}/rpm/*debugedit \ | ||
50 | ${libdir}/rpm/*dep* \ | ||
51 | ${libdir}/rpm/*prov* \ | ||
52 | ${libdir}/rpm/*req* \ | ||
53 | ${libdir}/rpm/*find* \ | ||
54 | ${libdir}/rpm/qf/* \ | ||
55 | " | ||
56 | |||
57 | FILES_python-rpm = "${libdir}/python*/rpm/_*" | ||
58 | FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*" | ||
59 | |||
60 | # The mutex needs to be POSIX/pthreads/library or we can't | ||
61 | # share a database between host and target environments | ||
62 | # (there is a minor performance penalty, but not one great enough | ||
63 | # to justify the pain of a more optimized approach!) | ||
64 | EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library" | ||
65 | |||
66 | do_configure() { | ||
67 | rm ${S}/db/dist/configure.in -f | ||
68 | for i in `find ${S} -name *.ac`; do | ||
69 | j=`echo $i | sed 's/.ac/.m4/g'` | ||
70 | mv $i $j | ||
71 | done | ||
72 | export ac_cv_va_copy=C99 | ||
73 | autotools_do_configure | ||
74 | cd ${S}/db3 | ||
75 | ${S}/db3/configure \ | ||
76 | --build=${BUILD_SYS} \ | ||
77 | --host=${HOST_SYS} \ | ||
78 | --target=${TARGET_SYS} \ | ||
79 | --prefix=${prefix} \ | ||
80 | --exec_prefix=${exec_prefix} \ | ||
81 | --bindir=${bindir} \ | ||
82 | --sbindir=${sbindir} \ | ||
83 | --libexecdir=${libexecdir} \ | ||
84 | --datadir=${datadir} \ | ||
85 | --sysconfdir=${sysconfdir} \ | ||
86 | --sharedstatedir=${sharedstatedir} \ | ||
87 | --localstatedir=${localstatedir} \ | ||
88 | --libdir=${libdir} \ | ||
89 | --includedir=${includedir} \ | ||
90 | --oldincludedir=${oldincludedir} \ | ||
91 | --infodir=${infodir} \ | ||
92 | --mandir=${mandir} \ | ||
93 | ${EXTRA_OECONF} | ||
94 | } | ||
95 | |||
96 | INSTALL_ACTIONS="" | ||
97 | |||
98 | # When installing the native version, the rpm components are renamed with a | ||
99 | # naming transform. We need to adjust the rpmpopt file with the same transform | ||
100 | INSTALL_ACTIONS_virtclass-native="sed -i -e 's,rpm,${HOST_SYS}-rpm,' ${D}/${libdir}/rpm/rpmpopt" | ||
101 | |||
102 | do_install_append() { | ||
103 | ${INSTALL_ACTIONS} | ||
104 | sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros | ||
105 | sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros | ||
106 | sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros | ||
107 | sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros | ||
108 | sed -i -e 's,pythondeps.sh,${HOST_SYS}-pythondeps.sh,' ${D}/${libdir}/rpm/macros | ||
109 | sed -i -e 's,phpdeps.sh,${HOST_SYS}-phpdeps.sh,' ${D}/${libdir}/rpm/macros | ||
110 | sed -i -e 's,javadeps.sh,${HOST_SYS}-javadeps.sh,' ${D}/${libdir}/rpm/macros | ||
111 | sed -i -e 's,libtooldeps.sh,${HOST_SYS}-libtooldeps.sh,' ${D}/${libdir}/rpm/macros | ||
112 | sed -i -e 's,pkgconfigdeps.sh,${HOST_SYS}-pkgconfigdeps.sh,' ${D}/${libdir}/rpm/macros | ||
113 | sed -i -e 's,executabledeps.sh,${HOST_SYS}-executabledeps.sh,' ${D}/${libdir}/rpm/macros | ||
114 | sed -i -e 's,perl.prov,${HOST_SYS}-perl.prov,' ${D}/${libdir}/rpm/macros | ||
115 | sed -i -e 's,perl.req,${HOST_SYS}-perl.req,' ${D}/${libdir}/rpm/macros | ||
116 | |||
117 | install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh | ||
118 | |||
119 | mv ${D}/${libdir}/python$PYTHONVER/rpm/${HOST_SYS}-__init__.py \ | ||
120 | ${D}/${libdir}/python$PYTHONVER/rpm/__init__.py | ||
121 | |||
122 | } | ||
123 | |||
124 | def rpm_python_version(d): | ||
125 | import os, bb | ||
126 | staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 ) | ||
127 | if os.path.exists( "%s/python2.6" % staging_incdir ): return "2.6" | ||
128 | if os.path.exists( "%s/python2.5" % staging_incdir ): return "2.5" | ||
129 | if os.path.exists( "%s/python2.4" % staging_incdir ): return "2.4" | ||
130 | if os.path.exists( "%s/python2.3" % staging_incdir ): return "2.3" | ||
131 | raise "No Python in STAGING_INCDIR. Forgot to build python/python-native?" | ||
132 | |||
133 | # Use a shell variable here since otherwise gettext trys to expand this at | ||
134 | # parse time when it manipulates EXTRA_OECONF which fails | ||
135 | export PYTHONVER = "${@rpm_python_version(d)}" | ||
136 | |||
137 | BBCLASSEXTEND = "native" | ||