summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2010-09-03 12:43:41 -0500
committerSaul Wold <Saul.Wold@intel.com>2010-09-03 18:30:47 -0700
commitc849ec75e718d1095bd7d25d05f57e25d5d94589 (patch)
treeddcc642d7b5ea9db6cebcd419d779d3bf2f095e5 /meta/recipes-devtools/rpm
parenta9b715736f96e3a4ac3fa99737ae412c1ac4f01e (diff)
downloadpoky-c849ec75e718d1095bd7d25d05f57e25d5d94589.tar.gz
rpm: Fix autoconf/libtool usage
In order to resolve a host-contamination problem, we re-work the way that autoconf and friends are invoked during the compilation of RPM. This has a side effect of fixing another bug where RPM was being renamed HOST_ARCH-HOST_OS-rpm. So we remove the "fixes" for that behavior as well. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-autoconf.patch20
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.1.10.bb124
2 files changed, 98 insertions, 46 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-autoconf.patch b/meta/recipes-devtools/rpm/rpm/rpm-autoconf.patch
new file mode 100644
index 0000000000..30c5f7b183
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-autoconf.patch
@@ -0,0 +1,20 @@
1Using the version of autoconf in poky results in:
2
3configure.ac:11: error: m4_divert_push: cannot change diversion to `GROW' inside m4_expand
4
5without this patch.
6
7Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
8
9diff -ur rpm-5.1.10.orig/configure.ac rpm-5.1.10/configure.ac
10--- rpm-5.1.10.orig/configure.ac 2010-08-20 17:12:16.000000000 -0500
11+++ rpm-5.1.10/configure.ac 2010-09-03 11:34:44.722097327 -0500
12@@ -8,7 +8,7 @@
13
14 AC_PREREQ(2.60)
15 AC_DEFUN([PACKAGE_BUGREPORT_DEFAULT], [rpm-devel@rpm5.org])
16-AC_INIT(rpm, [5.1.10], [PACKAGE_BUGREPORT_DEFAULT])
17+AC_INIT(rpm, [5.1.10])
18 PACKAGE_TIMESTAMP="2008" dnl # YYYY[-MM[-DD[ HH[:MM]]]]
19 AC_MSG_TITLE([RPM Package Manager (RPM)], [$PACKAGE_VERSION])
20
diff --git a/meta/recipes-devtools/rpm/rpm_5.1.10.bb b/meta/recipes-devtools/rpm/rpm_5.1.10.bb
index 4cf0fd8777..e5ccf8e99d 100644
--- a/meta/recipes-devtools/rpm/rpm_5.1.10.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.1.10.bb
@@ -3,12 +3,13 @@ DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands."
3HOMEPAGE = "http://rpm5.org/" 3HOMEPAGE = "http://rpm5.org/"
4LICENSE = "LGPL 2.1" 4LICENSE = "LGPL 2.1"
5DEPENDS = "zlib perl popt beecrypt python libpcre elfutils" 5DEPENDS = "zlib perl popt beecrypt python libpcre elfutils"
6PR = "r4" 6PR = "r5"
7 7
8SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/SNAPSHOT/${BPN}-${PV}.tar.gz \ 8SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/SNAPSHOT/${BPN}-${PV}.tar.gz \
9 file://hdraddorappend.patch \ 9 file://hdraddorappend.patch \
10 file://export-rpmbag-h.patch \ 10 file://export-rpmbag-h.patch \
11 file://rpm-nrescan.patch \ 11 file://rpm-nrescan.patch \
12 file://rpm-autoconf.patch \
12 file://remove-compiled-tests.patch;apply=no \ 13 file://remove-compiled-tests.patch;apply=no \
13 file://perfile_rpmdeps.sh \ 14 file://perfile_rpmdeps.sh \
14 " 15 "
@@ -67,64 +68,95 @@ FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*"
67EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library" 68EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library"
68 69
69do_configure() { 70do_configure() {
70 rm ${S}/db/dist/configure.in -f 71 # Manually run through the steps of the autogen.sh
71 for i in `find ${S} -name *.ac`; do 72 ( cd pcre
72 j=`echo $i | sed 's/.ac/.m4/g'` 73 libtoolize --quiet --copy --force --install
73 mv $i $j 74 aclocal
74 done 75 autoheader
76 automake -Wall -Wno-override -a -c
77 autoconf
78 )
79
80 ( cd xz
81 autopoint -f
82 rm -f \
83 codeset.m4 \
84 glibc2.m4 \
85 glibc21.m4 \
86 intdiv0.m4 \
87 intl.m4 \
88 intldir.m4 \
89 intmax.m4 \
90 inttypes-pri.m4 \
91 inttypes_h.m4 \
92 lcmessage.m4 \
93 lock.m4 \
94 longdouble.m4 \
95 longlong.m4 \
96 printf-posix.m4 \
97 size_max.m4 \
98 stdint_h.m4 \
99 uintmax_t.m4 \
100 ulonglong.m4 \
101 visibility.m4 \
102 wchar_t.m4 \
103 wint_t.m4 \
104 xsize.m4
105 libtoolize -c -f || glibtoolize -c -f
106 aclocal -I m4
107 autoconf
108 autoheader
109 automake -acf --foreign
110 )
111
112 ( cd file
113 libtoolize --quiet --copy --force --install
114 aclocal
115 autoheader
116 automake -Wall -Wno-override -a -c
117 autoconf
118 )
119
120 (cd syck
121 libtoolize --quiet --copy --force --install
122 aclocal
123 autoheader
124 automake -Wall -Wno-override -a -c
125 autoconf
126 )
127
128 (cd xar
129 libtoolize --quiet --copy --force --install
130 aclocal
131 autoheader
132 automake -Wall -Wno-override -a -c
133 autoconf
134 )
135
136 rm -rf autom4te.cache || true
137 libtoolize --quiet --copy --force --install
138 autopoint --force
139 rm -f aclocal.m4
140 aclocal -I m4
141 autoheader -I m4
142 automake -Wall -Wno-override -a -c
143 autoconf -I m4
144 # end of autogen.sh steps
145
75 export ac_cv_va_copy=C99 146 export ac_cv_va_copy=C99
76 autotools_do_configure 147 oe_runconf
77 cd ${S}/db3
78 ${S}/db3/configure \
79 --build=${BUILD_SYS} \
80 --host=${HOST_SYS} \
81 --target=${TARGET_SYS} \
82 --prefix=${prefix} \
83 --exec_prefix=${exec_prefix} \
84 --bindir=${bindir} \
85 --sbindir=${sbindir} \
86 --libexecdir=${libexecdir} \
87 --datadir=${datadir} \
88 --sysconfdir=${sysconfdir} \
89 --sharedstatedir=${sharedstatedir} \
90 --localstatedir=${localstatedir} \
91 --libdir=${libdir} \
92 --includedir=${includedir} \
93 --oldincludedir=${oldincludedir} \
94 --infodir=${infodir} \
95 --mandir=${mandir} \
96 ${EXTRA_OECONF}
97} 148}
98 149
99INSTALL_ACTIONS=""
100
101# When installing the native version, the rpm components are renamed with a
102# naming transform. We need to adjust the rpmpopt file with the same transform
103INSTALL_ACTIONS_virtclass-native="sed -i -e 's,rpm,${HOST_SYS}-rpm,' ${D}/${libdir}/rpm/rpmpopt"
104
105do_install_append() { 150do_install_append() {
106 ${INSTALL_ACTIONS}
107 sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros 151 sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros
108 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros 152 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
109 sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros 153 sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros
110 sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros 154 sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros
111 sed -i -e 's,pythondeps.sh,${HOST_SYS}-pythondeps.sh,' ${D}/${libdir}/rpm/macros
112 sed -i -e 's,phpdeps.sh,${HOST_SYS}-phpdeps.sh,' ${D}/${libdir}/rpm/macros
113 sed -i -e 's,javadeps.sh,${HOST_SYS}-javadeps.sh,' ${D}/${libdir}/rpm/macros
114 sed -i -e 's,libtooldeps.sh,${HOST_SYS}-libtooldeps.sh,' ${D}/${libdir}/rpm/macros
115 sed -i -e 's,pkgconfigdeps.sh,${HOST_SYS}-pkgconfigdeps.sh,' ${D}/${libdir}/rpm/macros
116 sed -i -e 's,executabledeps.sh,${HOST_SYS}-executabledeps.sh,' ${D}/${libdir}/rpm/macros
117 sed -i -e 's,perl.prov,${HOST_SYS}-perl.prov,' ${D}/${libdir}/rpm/macros
118 sed -i -e 's,perl.req,${HOST_SYS}-perl.req,' ${D}/${libdir}/rpm/macros
119 155
120 # Enable Debian style arbitrary tags... 156 # Enable Debian style arbitrary tags...
121 sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros 157 sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
122 158
123 install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh 159 install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
124
125 mv ${D}/${libdir}/python${PYTHON_BASEVERSION}/rpm/${HOST_SYS}-__init__.py \
126 ${D}/${libdir}/python${PYTHON_BASEVERSION}/rpm/__init__.py
127
128} 160}
129 161
130BBCLASSEXTEND = "native" 162BBCLASSEXTEND = "native"