From: Vyacheslav Barinov Date: Thu, 14 Aug 2014 07:52:16 +0000 (+0400) Subject: Update autotools files on aarch64 X-Git-Tag: accepted/tizen/common/20140826.160946^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5bc7b1f9411733bb987763682ae92f50cdd9d754;p=platform%2Fupstream%2Frpm.git Update autotools files on aarch64 Patch borrowed from OpenSUSE rpm. We have many packages with old config.sub and config.guess files which don't have aarch64 support. In order not to patch every separate package, just update them from rpmbuild during build initialization Change-Id: I040bab160864edad84fd9cffcff2c9226ef3a4d0 Signed-off-by: Vyacheslav Barinov --- diff --git a/build/parseBuildInstallClean.c b/build/parseBuildInstallClean.c index 6386c23..f7b4bb7 100644 --- a/build/parseBuildInstallClean.c +++ b/build/parseBuildInstallClean.c @@ -46,7 +46,24 @@ int parseBuildInstallClean(rpmSpec spec, int parsePart) } else if (rc < 0) { goto exit; } - + + if (parsePart == PART_BUILD) { + char* buf = strdup( + "if [[ `uname -m` == \"aarch64\" ]]; then\n" + "ref=/usr/lib/rpm\n" + "for s in guess sub; do\n" + " for c in $(find -maxdepth 8 -name \"config.$s\"); do\n" + " grep -q config-patches@ $c || continue\n" + " grep -q aarch64 $c || install -m 755 $ref/config.$s $c\n" + " grep -q ppc64le $c || install -m 755 $ref/config.$s $c\n" + " done\n" + "done\n" + "fi\n" + ); + appendLineStringBuf(*sbp, buf); + free(buf); + } + while (! (nextPart = isPart(spec->line))) { appendStringBuf(*sbp, spec->line); if ((rc = readLine(spec, STRIP_NOTHING)) > 0) { diff --git a/packaging/rpm.spec b/packaging/rpm.spec index 5027ba0..844f557 100644 --- a/packaging/rpm.spec +++ b/packaging/rpm.spec @@ -206,6 +206,10 @@ for i in %{_datadir}/automake-*/*; do fi done popd +%ifarch aarch64 ppc64le +install -m 755 config.guess %{buildroot}/usr/lib/rpm +install -m 755 config.sub %{buildroot}/usr/lib/rpm +%endif rm -f %{buildroot}%{_libdir}/*.la rm -f %{buildroot}%{__plugindir}/*.la @@ -290,6 +294,9 @@ rm -f %{_dbpath}/Filemd5s \ %{rpmhome}/*.req %{rpmhome}/macros.* %{rpmhome}/fileattrs +%ifarch aarch64 ppc64le +%{rpmhome}/config.* +%endif %files devel %manifest %{name}.manifest