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 000000000..b72c9f026 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +: ${RPMDEPS:=rpmdeps} + +process() { + while read file_name ; do + printf "%s\t" ${file_name} + if [ ! -d $file_name ]; then + printf "%s " $($RPMDEPS $1 $file_name | sed -e 's,rpmlib(.*,,' -e 's,\([<>\=]\+ \+[^ ]*\),(\1),g') + fi + printf "\n" + done +} + +usage() { + echo "$0 {-P|--provides} {-R|--requires} FILE ..." +} + +while [ $# -gt 0 ]; do + case "$1" in + --rpmdeps) + RPMDEPS=$2 + shift + shift + ;; + -R|--requires) + process_type=--requires + shift + ;; + -P|--provides) + process_type=--provides + shift + ;; + *) + break; + ;; + esac +done + +if [ -z "$process_type" ]; then + usage + exit 1 +fi + +if [ $# -gt 0 ]; then + find "$@" | process $process_type + exit $? +fi + +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 000000000..69b7130b9 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/remove-compiled-tests.patch @@ -0,0 +1,440 @@ +Index: rpm-5.1.9/configure.ac +=================================================================== +--- rpm-5.1.9.orig/configure.ac 2009-04-18 17:47:02.000000000 +0100 ++++ rpm-5.1.9/configure.ac 2010-07-06 14:47:28.985462456 +0100 +@@ -643,38 +643,22 @@ + dnl look for libc features + PROVIDES_ERRNO=no + AC_MSG_CHECKING(if <netdb.h> defines h_errno) +-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[printf("%d",h_errno)]])],[PROVIDES_ERRNO=yes],[]) +-AC_MSG_RESULT($PROVIDES_ERRNO) +-if test $PROVIDES_ERRNO = yes; then +- AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno]) +-fi ++AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno]) + + dnl If a system doesn't have S_IFSOCK, define it as 0 which will + dnl make S_ISSOCK always return false (nice, eh?) + AC_MSG_CHECKING(if <sys/stat.h> defines S_IFSOCK) +-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_IFSOCK)]])],[HAS_S_IFSOCK=yes],[HAS_S_IFSOCK=no]) +-AC_MSG_RESULT($HAS_S_IFSOCK) +-if test $HAS_S_IFSOCK = yes; then +- AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK]) +-fi ++AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK]) + + dnl Some Unix's are missing S_ISLNK, S_ISSOCK + AC_MSG_CHECKING(if <sys/stat.h> defines S_ISLNK) +-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISLNK(0755))]])],[HAS_S_ISLNK=yes],[HAS_S_ISLNK=no]) +-AC_MSG_RESULT($HAS_S_ISLNK) +-if test $HAS_S_ISLNK = yes; then +- AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK]) +-fi ++AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK]) + + AC_MSG_CHECKING(if <sys/stat.h> defines S_ISSOCK) +-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISSOCK(0755))]])],[HAS_S_ISSOCK=yes],[HAS_S_ISSOCK=no]) +-AC_MSG_RESULT($HAS_S_ISSOCK) +-if test $HAS_S_ISSOCK = yes; then +- AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK]) +-fi ++AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK]) + + AC_MSG_CHECKING(if timezone is defined) +-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[printf("%ld", timezone)]])],[HAS_TIMEZONE=yes],[HAS_TIMEZONE=no]) ++$HAS_TIMEZONE=yes + AC_MSG_RESULT($HAS_TIMEZONE) + + dnl check for missing typedefs +@@ -726,53 +710,12 @@ + AC_MSG_RESULT(yes) + AC_CHECK_HEADERS([libelf.h gelf.h]) + if test ".$ac_cv_header_libelf_h" = .no; then +- dnl # <libelf.h> on Solaris is incompatible with LFS. If we couldn't +- dnl # include <libelf.h>, see if we can when _FILE_OFFSET_BITS is +- dnl # set for non-LFS. Same applies for <gelf.h>, since it probably +- dnl # includes <libelf.h> +- AC_MSG_CHECKING([if libelf.h conflicts with _LARGEFILE_SOURCE]) +- AC_COMPILE_IFELSE([ +- AC_LANG_PROGRAM([[ +-#undef _LARGEFILE64_SOURCE +-#undef _LARGEFILE_SOURCE +-#if !defined(_LP64) +-# undef _FILE_OFFSET_BITS +-# define _FILE_OFFSET_BITS 32 +-#endif +-#include <libelf.h> +- ]], [[ +- Elf_Data foo; +- ]]) +- ], [ +- AC_DEFINE(HAVE_LIBELF_H, 1, [Define to 1 if you have libelf.h]) +- ac_cv_header_libelf_h=yes +- AC_DEFINE(LIBELF_H_LFS_CONFLICT, 1, [Define to 1 if libelf.h is incompatible with LFS API]) +- AC_MSG_RESULT(yes) +- ], [ +- AC_MSG_RESULT(no) +- ]) ++ AC_DEFINE(HAVE_LIBELF_H, 1, [Define to 1 if you have libelf.h]) ++ ac_cv_header_libelf_h=yes + fi + if test ".$ac_cv_header_gelf_h" = .no; then +- AC_MSG_CHECKING([if gelf.h conflicts with _LARGEFILE_SOURCE]) +- AC_COMPILE_IFELSE([ +- AC_LANG_PROGRAM([[ +-#undef _LARGEFILE64_SOURCE +-#undef _LARGEFILE_SOURCE +-#if !defined(_LP64) +-# undef _FILE_OFFSET_BITS +-# define _FILE_OFFSET_BITS 32 +-#endif +-#include <gelf.h> +- ]], [[ +- Elf32_Verdef foo; +- ]]) +- ], [ +- AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have gelf.h]) +- ac_cv_header_gelf_h=yes +- AC_MSG_RESULT(yes) +- ], [ +- AC_MSG_RESULT(no) +- ]) ++ AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have gelf.h]) ++ ac_cv_header_gelf_h=yes + fi + if test ".$ac_cv_header_gelf_h" = .yes; then + AC_CHECK_LIB([elf], [elf_version], [ +@@ -854,78 +797,9 @@ + python_version="" + ;; + esac +- for python_ver in $python_version ; do +- if test "$python_ver" != "2.x" ; then +- AC_MSG_CHECKING([for Python ${python_ver} API]) +- save_CFLAGS="${CFLAGS}" +- for i in "$prefix" "/usr/local" "/usr"; do +- CFLAGS="${save_CFLAGS} -I$i/include/python${python_ver}" +- AC_RUN_IFELSE([AC_LANG_SOURCE( +- [[#include "Python.h" +- main() { exit(strncmp("${python_ver}", PY_VERSION, 3)); } ]]) +- ], [ +- PYTHON_VERSION="${python_ver}" +- AC_MSG_RESULT(yes) +- PYTHON_PREFIX="${i}" +- break +- ], [ +- ], [ +- dnl if we're cross compiling, assume the user has a clue +- if test "$withval" = "$python_ver"; then +- PYTHON_VERSION="${python_ver}" +- AC_MSG_RESULT(yes) +- break +- fi +- ]) +- done +- CFLAGS="${save_CFLAGS}" +- if test ".$PYTHON_VERSION" == "."; then +- dnl check Mac OS X framework +- save_CFLAGS="${CFLAGS}" +- for f in "~" "" "/System" "/Network"; do +- CFLAGS="${save_CFLAGS} -I$f/Library/Frameworks/Python.framework/Versions/${python_ver}/include/python${python_ver}" +- AC_RUN_IFELSE([AC_LANG_SOURCE( +- [[#include "Python.h" +- main() { exit(strncmp("${python_ver}", PY_VERSION, 3)); } ]]) +- ], [ +- PYTHON_VERSION="${python_ver}" +- AC_MSG_RESULT([yes (using Python.framework)]) +- PYTHON_PREFIX="$f/Library/Frameworks/Python.framework/Versions/${python_ver}" +- break +- ], [ +- ]) +- done +- CFLAGS="${save_CFLAGS}" +- fi +- if test ".$PYTHON_VERSION" == "."; then +- AC_MSG_RESULT(no) +- fi +- else +- AC_MSG_CHECKING([for Python 2.x API]) +- AC_RUN_IFELSE([AC_LANG_SOURCE( +- [[#include <python/Python.h> +- main() { exit(strncmp("2.", PY_VERSION, 2)); } ]]) +- ], [ +- PYTHON_VERSION="" +- AC_MSG_RESULT(yes) +- ], [ +- AC_MSG_RESULT(no) +- ], [ +- dnl if we're cross compiling, assume the user has a clue +- if test "$withval" = "$python_ver"; then +- PYTHON_VERSION="${python_ver}" +- AC_MSG_RESULT(yes) +- else +- AC_MSG_RESULT(no) +- fi +- ]) +- fi +- if test ".$PYTHON_VERSION" != "."; then +- WITH_PYTHON_SUBDIR=python +- WITH_PYTHON_SUBPACKAGE=1 +- break +- fi +- done ++ PYTHON_VERSION="${python_ver}" ++ WITH_PYTHON_SUBDIR=python ++ WITH_PYTHON_SUBPACKAGE=1 + fi + AC_ARG_WITH(python-inc-dir, AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]), + [WITH_PYTHON_INCDIR="$withval"], [WITH_PYTHON_INCDIR="`(python -c 'from distutils.sysconfig import get_python_inc; print get_python_inc()') 2>/dev/null`"]) +@@ -1157,15 +1031,8 @@ + AC_SUBST(WITH_PCRE_LIBS) + else + dnl # make sure PCRE POSIX API can be really _USED_ by RPM +- LIBS_SAVED="$LIBS" + LIBS="-lpcreposix $LIBS" +- AC_LINK_IFELSE([ +- AC_LANG_PROGRAM([#include <pcreposix.h>], [(void)regcomp(0, 0, 0)]) +- ], [ +- AC_DEFINE(WITH_PCRE_POSIX, 1, [Define as 1 if PCRE's POSIX API is available]) +- ], [ +- LIBS="$LIBS_SAVED" +- ]) ++ AC_DEFINE(WITH_PCRE_POSIX, 1, [Define as 1 if PCRE's POSIX API is available]) + fi + dnl # enable PCRE native API support for embedded Lua + if test ".$WITH_LUA" = .yes; then +@@ -1234,30 +1101,7 @@ + + dnl # figure out what root's primary group is + AC_MSG_CHECKING([root's primary group]) +-AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> +-#include <sys/types.h> +-#include <pwd.h> +-#include <grp.h> +-int main() +-{ +- struct passwd *root = NULL; +- struct group *roots_group = NULL; +- FILE * tempfile = NULL; +- root = getpwuid( (uid_t) 0 ); +- if (root != NULL) { +- roots_group = getgrgid(root->pw_gid); +- if (roots_group != NULL) { +- tempfile = fopen("conftest_rootg", "w"); +- if (tempfile != NULL) { +- fprintf(tempfile, "%s\n", roots_group->gr_name); +- fclose(tempfile); +- exit(0); +- } +- } +- } +- exit(1); +-}]])],[ROOT_GROUP=`cat conftest_rootg`; rm -f conftest_rootg],[ROOT_GROUP="root"],[ROOT_GROUP="root" +-]) ++$ROOT_GROUP="root" + AC_MSG_RESULT([$ROOT_GROUP]) + AC_SUBST(ROOT_GROUP) + +Index: rpm-5.1.9/pcre/configure.ac +=================================================================== +--- rpm-5.1.9.orig/pcre/configure.ac 2009-01-14 20:19:31.000000000 +0000 ++++ rpm-5.1.9/pcre/configure.ac 2010-07-06 14:51:50.769586089 +0100 +@@ -278,34 +278,6 @@ + # The files below are C++ header files. + pcre_have_type_traits="0" + pcre_have_bits_type_traits="0" +-if test "x$enable_cpp" = "xyes" -a -n "$CXX" +-then +-AC_LANG_PUSH(C++) +- +-# Older versions of pcre defined pcrecpp::no_arg, but in new versions +-# it's called pcrecpp::RE::no_arg. For backwards ABI compatibility, +-# we want to make one an alias for the other. Different systems do +-# this in different ways. Some systems, for instance, can do it via +-# a linker flag: -alias (for os x 10.5) or -i (for os x <=10.4). +-OLD_LDFLAGS="$LDFLAGS" +-for flag in "-alias,__ZN7pcrecpp2RE6no_argE,__ZN7pcrecpp6no_argE" \ +- "-i__ZN7pcrecpp6no_argE:__ZN7pcrecpp2RE6no_argE"; do +- AC_MSG_CHECKING([for alias support in the linker]) +- LDFLAGS="$OLD_LDFLAGS -Wl,$flag" +- # We try to run the linker with this new ld flag. If the link fails, +- # we give up and remove the new flag from LDFLAGS. +- AC_LINK_IFELSE(AC_LANG_PROGRAM([namespace pcrecpp { +- class RE { static int no_arg; }; +- int RE::no_arg; +- }], +- []), +- [AC_MSG_RESULT([yes]); +- EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS -Wl,$flag"; +- break;], +- AC_MSG_RESULT([no])) +-done +-LDFLAGS="$OLD_LDFLAGS" +- + # We could be more clever here, given we're doing AC_SUBST with this + # (eg set a var to be the name of the include file we want). But we're not + # so it's easy to change back to 'regular' autoconf vars if we needed to. +@@ -316,7 +288,6 @@ + AC_CHECK_HEADERS(type_traits.h, [pcre_have_type_traits="1"], + [pcre_have_type_traits="0"]) + +-AC_LANG_POP + fi + # Using AC_SUBST eliminates the need to include config.h in a public .h file + AC_SUBST(pcre_have_type_traits) +Index: rpm-5.1.9/db/dist/configure.ac +=================================================================== +--- rpm-5.1.9.orig/db/dist/configure.ac 2008-06-15 08:16:21.000000000 +0100 ++++ rpm-5.1.9/db/dist/configure.ac 2010-07-06 15:36:39.262461127 +0100 +@@ -602,24 +602,6 @@ + aux*) AC_LIBOBJ([getopt]);; + esac + +-# Linux has a broken O_DIRECT flag, but you can't detect it at configure time. +-# Linux and SGI require buffer alignment we may not match, otherwise writes +-# will fail. Default to not using the O_DIRECT flag. +-if test "$db_cv_o_direct" = "yes"; then +- AC_CACHE_CHECK([for open/O_DIRECT], db_cv_open_o_direct, [ +- AC_TRY_LINK([ +- #include <sys/types.h> +- #include <fcntl.h>], [ +- open("a", O_RDONLY | O_DIRECT, 0); +- ], [db_cv_open_o_direct=yes], [db_cv_open_o_direct=no])]) +- if test \ +- "$db_cv_o_direct" = "yes" -a "$db_cv_open_o_direct" = "yes"; then +- AC_DEFINE(HAVE_O_DIRECT) +- AH_TEMPLATE(HAVE_O_DIRECT, +- [Define to 1 if you have the O_DIRECT flag.]) +- fi +-fi +- + # Check for largefile support. + AC_SYS_LARGEFILE + +Index: rpm-5.1.9/xz/configure.ac +=================================================================== +--- rpm-5.1.9.orig/xz/configure.ac 2009-02-16 17:07:46.000000000 +0000 ++++ rpm-5.1.9/xz/configure.ac 2010-07-06 15:41:22.632467951 +0100 +@@ -457,26 +457,9 @@ + #endif + ]) + +-# Even if we have byteswap.h, we may lack the specific macros/functions. +-if test x$ac_cv_header_byteswap_h = xyes ; then +- m4_foreach([FUNC], [bswap_16,bswap_32,bswap_64], [ +- AC_MSG_CHECKING([if FUNC is available]) +- AC_LINK_IFELSE([AC_LANG_SOURCE([ +-#include <byteswap.h> +-int +-main(void) +-{ +- FUNC[](42); +- return 0; +-} +- ])], [ +- AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1], +- [Define to 1 if] FUNC [is available.]) +- AC_MSG_RESULT([yes]) +- ], [AC_MSG_RESULT([no])]) +- +- ])dnl +-fi ++AC_DEFINE(HAVE_BSWAP_16, 1) ++AC_DEFINE(HAVE_BSWAP_32, 1) ++AC_DEFINE(HAVE_BSWAP_64, 1) + + + ############################################################################### +@@ -527,90 +510,16 @@ + # xz command line tool uses this to automatically limit its memory usage. + # - sysconf() gives all the needed info on GNU+Linux and Solaris. + # - BSDs use sysctl(). +-AC_MSG_CHECKING([how to detect the amount of physical memory]) +-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +-#include <unistd.h> +-int +-main() +-{ +- long i; +- i = sysconf(_SC_PAGESIZE); +- i = sysconf(_SC_PHYS_PAGES); +- return 0; +-} +-]])], [ +- AC_DEFINE([HAVE_PHYSMEM_SYSCONF], [1], ++AC_DEFINE([HAVE_PHYSMEM_SYSCONF], [1], + [Define to 1 if the amount of physical memory can be detected + with sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES).]) +- AC_MSG_RESULT([sysconf]) +-], [ +-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +-#include <sys/types.h> +-#ifdef HAVE_SYS_PARAM_H +-# include <sys/param.h> +-#endif +-#include <sys/sysctl.h> +-int +-main() +-{ +- int name[2] = { CTL_HW, HW_PHYSMEM }; +- unsigned long mem; +- size_t mem_ptr_size = sizeof(mem); +- sysctl(name, 2, &mem, &mem_ptr_size, NULL, NULL); +- return 0; +-} +-]])], [ +- AC_DEFINE([HAVE_PHYSMEM_SYSCTL], [1], +- [Define to 1 if the amount of physical memory can be detected +- with sysctl().]) +- AC_MSG_RESULT([sysctl]) +-], [ +- AC_MSG_RESULT([unknown]) +-])]) + + # Check how to find out the number of available CPU cores in the system. + # sysconf(_SC_NPROCESSORS_ONLN) works on most systems, except that BSDs + # use sysctl(). +-AC_MSG_CHECKING([how to detect the number of available CPU cores]) +-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +-#include <unistd.h> +-int +-main() +-{ +- long i; +- i = sysconf(_SC_NPROCESSORS_ONLN); +- return 0; +-} +-]])], [ +- AC_DEFINE([HAVE_NCPU_SYSCONF], [1], ++AC_DEFINE([HAVE_NCPU_SYSCONF], [1], + [Define to 1 if the number of available CPU cores can be + detected with sysconf(_SC_NPROCESSORS_ONLN).]) +- AC_MSG_RESULT([sysconf]) +-], [ +-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +-#include <sys/types.h> +-#ifdef HAVE_SYS_PARAM_H +-# include <sys/param.h> +-#endif +-#include <sys/sysctl.h> +-int +-main() +-{ +- int name[2] = { CTL_HW, HW_NCPU }; +- int cpus; +- size_t cpus_size = sizeof(cpus); +- sysctl(name, 2, &cpus, &cpus_size, NULL, NULL); +- return 0; +-} +-]])], [ +- AC_DEFINE([HAVE_NCPU_SYSCTL], [1], +- [Define to 1 if the number of available CPU cores can be +- detected with sysctl().]) +- AC_MSG_RESULT([sysctl]) +-], [ +- AC_MSG_RESULT([unknown]) +-])]) +- + + ############################################################################### + # 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 000000000..a7097f760 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm_5.1.10.bb @@ -0,0 +1,137 @@ +DESCRIPTION = "The RPM Package Manager - relaunched" +DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands." +HOMEPAGE = "http://rpm5.org/" +LICENSE = "LGPL 2.1" +DEPENDS = "zlib perl popt beecrypt python libpcre elfutils" +PR = "r2" + +SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/SNAPSHOT/${BPN}-${PV}.tar.gz \ + file://remove-compiled-tests.patch;apply=no \ + file://perfile_rpmdeps.sh \ + " +inherit autotools gettext + +acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" + +# Specify the default rpm macros in terms of adjustable variables +rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" + +EXTRA_OECONF = "--with-python=$PYTHONVER \ + --with-python-inc-dir=${STAGING_INCDIR}/python$PYTHONVER \ + --with-python-lib-dir=${libdir}/python$PYTHONVER \ + --with-db=internal \ + --with-db-tools-integrated \ + --with-libelf \ + --with-file=internal \ + --without-apidocs \ + --without-selinux \ + --without-lua \ + --without-dmalloc \ + --without-efence \ + --without-neon \ + --with-pcre=${libdir} \ + --with-path-macros=${rpm_macros} \ + --with-bugreport=http://bugzilla.pokylinux.org" + +CFLAGS_append = " -DRPM_VENDOR_WINDRIVER" + +PACKAGES =+ "rpm-build python-rpm python-rpm-dbg" + +SOLIBS = "5.0.so" + +FILES_rpm-build = "${bindir}/*-rpmbuild \ + ${bindir}/*-gendiff \ + ${bindir}/*-rpmspecdump \ + ${libdir}/rpm/helpers/* \ + ${libdir}/rpm/*brp* \ + ${libdir}/rpm/*check-files \ + ${libdir}/rpm/*cross-build \ + ${libdir}/rpm/*debugedit \ + ${libdir}/rpm/*dep* \ + ${libdir}/rpm/*prov* \ + ${libdir}/rpm/*req* \ + ${libdir}/rpm/*find* \ + ${libdir}/rpm/qf/* \ + " + +FILES_python-rpm = "${libdir}/python*/rpm/_*" +FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*" + +# The mutex needs to be POSIX/pthreads/library or we can't +# share a database between host and target environments +# (there is a minor performance penalty, but not one great enough +# to justify the pain of a more optimized approach!) +EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library" + +do_configure() { + rm ${S}/db/dist/configure.in -f + for i in `find ${S} -name *.ac`; do + j=`echo $i | sed 's/.ac/.m4/g'` + mv $i $j + done + export ac_cv_va_copy=C99 + autotools_do_configure + cd ${S}/db3 + ${S}/db3/configure \ + --build=${BUILD_SYS} \ + --host=${HOST_SYS} \ + --target=${TARGET_SYS} \ + --prefix=${prefix} \ + --exec_prefix=${exec_prefix} \ + --bindir=${bindir} \ + --sbindir=${sbindir} \ + --libexecdir=${libexecdir} \ + --datadir=${datadir} \ + --sysconfdir=${sysconfdir} \ + --sharedstatedir=${sharedstatedir} \ + --localstatedir=${localstatedir} \ + --libdir=${libdir} \ + --includedir=${includedir} \ + --oldincludedir=${oldincludedir} \ + --infodir=${infodir} \ + --mandir=${mandir} \ + ${EXTRA_OECONF} +} + +INSTALL_ACTIONS="" + +# When installing the native version, the rpm components are renamed with a +# naming transform. We need to adjust the rpmpopt file with the same transform +INSTALL_ACTIONS_virtclass-native="sed -i -e 's,rpm,${HOST_SYS}-rpm,' ${D}/${libdir}/rpm/rpmpopt" + +do_install_append() { + ${INSTALL_ACTIONS} + sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros + sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros + sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros + sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros + sed -i -e 's,pythondeps.sh,${HOST_SYS}-pythondeps.sh,' ${D}/${libdir}/rpm/macros + sed -i -e 's,phpdeps.sh,${HOST_SYS}-phpdeps.sh,' ${D}/${libdir}/rpm/macros + sed -i -e 's,javadeps.sh,${HOST_SYS}-javadeps.sh,' ${D}/${libdir}/rpm/macros + sed -i -e 's,libtooldeps.sh,${HOST_SYS}-libtooldeps.sh,' ${D}/${libdir}/rpm/macros + sed -i -e 's,pkgconfigdeps.sh,${HOST_SYS}-pkgconfigdeps.sh,' ${D}/${libdir}/rpm/macros + sed -i -e 's,executabledeps.sh,${HOST_SYS}-executabledeps.sh,' ${D}/${libdir}/rpm/macros + sed -i -e 's,perl.prov,${HOST_SYS}-perl.prov,' ${D}/${libdir}/rpm/macros + sed -i -e 's,perl.req,${HOST_SYS}-perl.req,' ${D}/${libdir}/rpm/macros + + install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh + + mv ${D}/${libdir}/python$PYTHONVER/rpm/${HOST_SYS}-__init__.py \ + ${D}/${libdir}/python$PYTHONVER/rpm/__init__.py + +} + +def rpm_python_version(d): + import os, bb + staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 ) + if os.path.exists( "%s/python2.6" % staging_incdir ): return "2.6" + if os.path.exists( "%s/python2.5" % staging_incdir ): return "2.5" + if os.path.exists( "%s/python2.4" % staging_incdir ): return "2.4" + if os.path.exists( "%s/python2.3" % staging_incdir ): return "2.3" + raise "No Python in STAGING_INCDIR. Forgot to build python/python-native?" + +# Use a shell variable here since otherwise gettext trys to expand this at +# parse time when it manipulates EXTRA_OECONF which fails +export PYTHONVER = "${@rpm_python_version(d)}" + +BBCLASSEXTEND = "native" |