From 2880c9ea15cb71f3cf2691b1fe666754f7f4f4d5 Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Tue, 27 May 2014 14:11:52 +0200 Subject: [PATCH] meta-tizen: fix rpm build Change-Id: I6dd856580bd896a4b6b9a53e3962ce4abd07ac91 (From meta-tizen rev: 89babbf036c88cd1cccd893b619dd5dbc84d8166) Signed-off-by: Ronan Le Martret Signed-off-by: Patrick Ohly --- meta-tizen/recipes-tizen/rpm/rpm.inc | 116 +++++++++++++++++------------------ 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/meta-tizen/recipes-tizen/rpm/rpm.inc b/meta-tizen/recipes-tizen/rpm/rpm.inc index 47eaca1..2128528 100644 --- a/meta-tizen/recipes-tizen/rpm/rpm.inc +++ b/meta-tizen/recipes-tizen/rpm/rpm.inc @@ -12,13 +12,13 @@ inherit autotools-brokensep BBCLASSEXTEND = "" PROVIDES = "" -#PROVIDES by rpm-security-plugin +#PROVIDES by rpm-security-plugin -#PROVIDES by python-rpm +#PROVIDES by python-rpm -#PROVIDES by rpm-build +#PROVIDES by rpm-build # the PROVIDES rules is ignore "rpmbuild " PROVIDES += "rpmbuild" RPROVIDES_rpm-build += "rpmbuild" @@ -27,16 +27,16 @@ PROVIDES += "rpm:${prefix}/bin/rpmbuild" RPROVIDES_rpm-build += "rpm:${prefix}/bin/rpmbuild" -#PROVIDES by rpm-locale +#PROVIDES by rpm-locale # the PROVIDES rules is ignore "rpm-lang-all = 4.11.0.1" PROVIDES += "rpm-lang-all" RPROVIDES_rpm-locale += "rpm-lang-all" -#PROVIDES by rpm-dev +#PROVIDES by rpm-dev -#PROVIDES by rpm +#PROVIDES by rpm # the PROVIDES rules is ignore "rpminst " PROVIDES += "rpminst" RPROVIDES_rpm += "rpminst" @@ -45,7 +45,7 @@ PROVIDES += "rpm-libs" RPROVIDES_rpm += "rpm-libs" -#PROVIDES by rpm-docs +#PROVIDES by rpm-docs RDEPENDS = "" @@ -78,8 +78,8 @@ RDEPENDS_${PN}-dev += "popt" DEPENDS = "" -#DEPENDS of python-rpm -#DEPENDS of rpm +#DEPENDS of python-rpm +#DEPENDS of rpm DEPENDS += "libxml2" DEPENDS += "xz" DEPENDS += "findutils" @@ -88,7 +88,7 @@ DEPENDS += "popt" DEPENDS += "uthash" DEPENDS += "nss" DEPENDS_append_class-native = " gcc" -DEPENDS_append_class-target = " gcc-cross" +DEPENDS_append_class-target = " gcc" DEPENDS += "lua" DEPENDS += "elfutils" DEPENDS += "patch" @@ -128,8 +128,8 @@ do_prep() { cp -a ${S}/packaging/rpm-tizen_macros tizen_macros rm -f m4/libtool.m4 rm -f m4/lt*.m4 - - + + } do_patch_append() { bb.build.exec_func('do_prep', d) @@ -143,23 +143,23 @@ do_compile() { LANG=C export LANG unset DISPLAY - CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; - CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; - FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; - LD_AS_NEEDED=1; export LD_AS_NEEDED ; - + CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; + CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; + FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; + LD_AS_NEEDED=1; export LD_AS_NEEDED ; + CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`" export CPPFLAGS export CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -ffunction-sections" export LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic-functions -ffunction-sections" - + BUILDTARGET="--host=x86_64-linux-gnu " BUILDTARGET+="--build=x86_64-tizen-linux " - - - CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; - CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; - FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; + + + CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; + CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; + FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \ --target=x86_64-tizen-linux \ --program-prefix= \ @@ -184,11 +184,11 @@ do_compile() { --enable-python \ --with-msm \ $BUILDTARGET - + make -j16 - - - + + + } do_install() { @@ -197,20 +197,20 @@ do_install() { LANG=C export LANG unset DISPLAY - rm -rf ${D} - mkdir -p ${D} - + rm -rf ${D} + mkdir -p ${D} + mkdir -p ${D}${prefix}/lib mkdir -p ${D}${prefix}/share/locale ln -s ../share/locale ${D}${prefix}/lib/locale - + oe_runmake \ DESTDIR=${D} \ INSTALL_ROOT=${D} \ BINDIR=${prefix}/bin \ - install - rm -f ${D}${infodir}/dir - find ${D} -regex ".*\.la$" | xargs rm -f -- + install + rm -f ${D}${infodir}/dir + find ${D} -regex ".*\.la$" | xargs rm -f -- find ${D} -regex ".*\.a$" | xargs rm -f -- install -m 644 db3/db.h ${D}${prefix}/include/rpm mkdir -p ${D}${sysconfdir}/rpm @@ -264,32 +264,32 @@ do_install() { popd rm -f ${D}${prefix}/lib/*.la rm -f ${D}${prefix}/lib/rpm-plugins/*.la - - - _target=""; - _symlinks=0; - - fdupes -q -n -r ${D}${prefix}/lib/rpm/platform | - while read _file; do - if test -z "$_target" ; then - _target="$_file"; - else - if test -z "$_file" ; then - _target=""; - continue ; - fi ; - if test "$_symlinks" = 1; then - ln -sf "${_target#${D}}" "$_file"; - else - ln -f "$_target" "$_file"; + + + _target=""; + _symlinks=0; + + fdupes -q -n -r ${D}${prefix}/lib/rpm/platform | + while read _file; do + if test -z "$_target" ; then + _target="$_file"; + else + if test -z "$_file" ; then + _target=""; + continue ; fi ; - fi ; - done - + if test "$_symlinks" = 1; then + ln -sf "${_target#${D}}" "$_file"; + else + ln -f "$_target" "$_file"; + fi ; + fi ; + done + sh ${D}${prefix}/lib/rpm/find-lang.sh ${D} rpm - - - + + + } PACKAGES += " rpm-security-plugin " -- 2.7.4