From 6b85b65a3a1196e125f902a0dbd6e66753326263 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 10:09:41 +0200 Subject: [PATCH 01/13] gmp: need native dependency on m4 --- recipes/gmp/gmp.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/gmp/gmp.inc b/recipes/gmp/gmp.inc index 1ce38f3b..8716c802 100644 --- a/recipes/gmp/gmp.inc +++ b/recipes/gmp/gmp.inc @@ -9,7 +9,7 @@ RECIPE_TYPES = "native machine sdk" require conf/fetch/gnu.conf SRC_URI = "${GNU_MIRROR}/gmp/gmp-${PV}.tar.xz" -DEPENDS = "native:gawk libm" +DEPENDS = "native:m4 native:gawk libm" inherit autotools c++ make-vpath From 2ece2e3a79701a60319bfd0c6a71c62e0bda1ba3 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 10:10:46 +0200 Subject: [PATCH 02/13] bc: need native dependency on makeinfo --- recipes/bc/bc.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/bc/bc.inc b/recipes/bc/bc.inc index d7ff53f8..2f2fe372 100644 --- a/recipes/bc/bc.inc +++ b/recipes/bc/bc.inc @@ -6,5 +6,5 @@ SRC_URI = "http://alpha.gnu.org/gnu/bc/bc-${PV}.tar.bz2" inherit autotools -DEPENDS += "readline" +DEPENDS += "readline native:makeinfo" EXTRA_OECONF += "--with-readline" From 44b9a69633c42d613240ccb285c4d8a80a25029b Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 10:15:05 +0200 Subject: [PATCH 03/13] binutils: like gcc disable nls --- recipes/binutils/binutils.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/binutils/binutils.inc b/recipes/binutils/binutils.inc index 273deb96..f5c02431 100644 --- a/recipes/binutils/binutils.inc +++ b/recipes/binutils/binutils.inc @@ -12,12 +12,12 @@ BUGTRACKER = "http://sourceware.org/bugzilla/" RECIPE_TYPES = "cross sdk-cross machine canadian-cross" -inherit autotools make-vpath gettext +inherit autotools make-vpath require conf/fetch/gnu.conf SRC_URI = "${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 " -DEPENDS = "native:flex native:bison" +DEPENDS = "native:flex native:bison native:makeinfo native:m4" C_DEPENDS_TARGET = "" @@ -26,7 +26,7 @@ CHRPATH_TYPES = "HOST" LIBTOOL_DEPENDS = "host-cross:libtool" -EXTRA_OECONF = "--enable-install-libbfd --enable-install-libiberty --enable-shared --enable-static --disable-multilib" +EXTRA_OECONF = "--enable-install-libbfd --enable-install-libiberty --enable-shared --enable-static --disable-multilib --disable-nls" EXTRA_OECONF:>HOST_CPU_arm = " --disable-werror" AR = "ar" From 4828fa277b735530f2196a06027605668051c84e Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 10:16:24 +0200 Subject: [PATCH 04/13] binutils: Remove useless and duplicated RDEPENDS with utils PROVIDES/PACKAGES --- recipes/binutils/binutils.inc | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes/binutils/binutils.inc b/recipes/binutils/binutils.inc index f5c02431..4799d855 100644 --- a/recipes/binutils/binutils.inc +++ b/recipes/binutils/binutils.inc @@ -129,9 +129,6 @@ RDEPENDS_${PN}-strip = "libbfd" RDEPENDS_${PN}-ar = "libbfd" RDEPENDS_${PN}-strings = "libbfd" -# The binutils package is used to pull in all provided util features -RDEPENDS_${PN} = "${AUTO_PACKAGE_UTILS_PROVIDES}" - # We need to set a different priority than the highest gcc recipe priority, so # that we don't get into multiple provider problems with libbfd. DEFAULT_PREFERENCE = "2" From 6832cc9cf578c7c2ba4a4f8bd82f76b283e5fbc1 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 10:26:56 +0200 Subject: [PATCH 05/13] libtool: Split native build Add patches for native & cross for working correctly with oe-lite --- recipes/libtool/libtool-2.4.2.inc | 11 +++++ .../libtool/libtool-2.4.2/cross_compile.patch | 43 +++++++++++++++++++ .../libtool-2.4.2/default-bindir.patch | 24 +++++++++++ recipes/libtool/libtool-2.4.2/syslib.patch | 30 +++++++++++++ recipes/libtool/libtool-initial_2.4.2.oe | 4 ++ recipes/libtool/libtool-initial_2.4.2.oe.sig | 1 + recipes/libtool/libtool_2.4.2.oe | 21 +++------ 7 files changed, 120 insertions(+), 14 deletions(-) create mode 100644 recipes/libtool/libtool-2.4.2.inc create mode 100644 recipes/libtool/libtool-2.4.2/cross_compile.patch create mode 100644 recipes/libtool/libtool-2.4.2/default-bindir.patch create mode 100644 recipes/libtool/libtool-2.4.2/syslib.patch create mode 100644 recipes/libtool/libtool-initial_2.4.2.oe create mode 100644 recipes/libtool/libtool-initial_2.4.2.oe.sig diff --git a/recipes/libtool/libtool-2.4.2.inc b/recipes/libtool/libtool-2.4.2.inc new file mode 100644 index 00000000..61c20826 --- /dev/null +++ b/recipes/libtool/libtool-2.4.2.inc @@ -0,0 +1,11 @@ +LICENSE = "GPL-2.0+" +LICENSE_${PN}-libltdl = "LGPL-2.1+" + +require ${PN}.inc + +SRC_URI:>native = " file://syslib.patch" +SRC_URI:>cross = " file://syslib.patch file://cross_compile.patch ${SRC_URI_WINDOWS}" +SRC_URI:>sdk-cross = " file://syslib.patch file://cross_compile.patch ${SRC_URI_WINDOWS}" + +SRC_URI_WINDOWS = "" +SRC_URI_WINDOWS:TARGET_LIBC_mingw = "file://default-bindir.patch" diff --git a/recipes/libtool/libtool-2.4.2/cross_compile.patch b/recipes/libtool/libtool-2.4.2/cross_compile.patch new file mode 100644 index 00000000..149a17f2 --- /dev/null +++ b/recipes/libtool/libtool-2.4.2/cross_compile.patch @@ -0,0 +1,43 @@ +diff -urN a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh +--- a/libltdl/config/ltmain.m4sh 2011-10-17 12:17:05.000000000 +0200 ++++ b/libltdl/config/ltmain.m4sh 2013-10-22 17:50:24.921016169 +0200 +@@ -5731,8 +5731,9 @@ + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$lt_sysroot$libdir" +- absdir="$lt_sysroot$libdir" ++ dir="$abs_ladir" ++ absdir="$abs_ladir" ++ libdir="$abs_ladir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else +@@ -6130,8 +6131,6 @@ + add="$libdir/$linklib" + fi + else +- # We cannot seem to hardcode it, guess we'll fake it. +- add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in +@@ -6286,7 +6285,17 @@ + fi + ;; + *) +- path="-L$absdir/$objdir" ++ # OE sets installed=no in staging. We need to look in $objdir and $absdir, ++ # preferring $objdir. RP 31/04/2008 ++ if test -f "$absdir/$objdir/$depdepl" ; then ++ depdepl="$absdir/$objdir/$depdepl" ++ path="-L$absdir/$objdir" ++ elif test -f "$absdir/$depdepl" ; then ++ depdepl="$absdir/$depdepl" ++ path="-L$absdir" ++ else ++ path="-L$absdir/$objdir" ++ fi + ;; + esac + else diff --git a/recipes/libtool/libtool-2.4.2/default-bindir.patch b/recipes/libtool/libtool-2.4.2/default-bindir.patch new file mode 100644 index 00000000..c8c0effe --- /dev/null +++ b/recipes/libtool/libtool-2.4.2/default-bindir.patch @@ -0,0 +1,24 @@ +diff -urN libtool-2.2.10~orig/libltdl/config/ltmain.m4sh libtool-2.2.10/libltdl/config/ltmain.m4sh +--- libtool-2.2.10~orig/libltdl/config/ltmain.m4sh 2010-06-09 15:06:43.000000000 +0200 ++++ libtool-2.2.10/libltdl/config/ltmain.m4sh 2014-01-31 18:35:15.542467485 +0100 +@@ -3790,7 +3790,7 @@ + new_inherited_linker_flags= + + avoid_version=no +- bindir= ++ bindir=$libtool_bindir + dlfiles= + dlprefiles= + dlself=no +diff -urN libtool-2.2.10~orig/libltdl/config/ltmain.sh libtool-2.2.10/libltdl/config/ltmain.sh +--- libtool-2.2.10~orig/libltdl/config/ltmain.sh 2010-06-09 15:08:53.000000000 +0200 ++++ libtool-2.2.10/libltdl/config/ltmain.sh 2014-01-31 18:36:05.278466455 +0100 +@@ -4386,7 +4386,7 @@ + new_inherited_linker_flags= + + avoid_version=no +- bindir= ++ bindir=$libtool_bindir + dlfiles= + dlprefiles= + dlself=no diff --git a/recipes/libtool/libtool-2.4.2/syslib.patch b/recipes/libtool/libtool-2.4.2/syslib.patch new file mode 100644 index 00000000..912c0107 --- /dev/null +++ b/recipes/libtool/libtool-2.4.2/syslib.patch @@ -0,0 +1,30 @@ +diff -urN a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh +--- a/libltdl/config/ltmain.m4sh 2011-10-17 12:17:05.000000000 +0200 ++++ b/libltdl/config/ltmain.m4sh 2014-04-02 23:19:35.179802667 +0200 +@@ -5397,9 +5397,9 @@ + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then +- searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" ++ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs" + else +- searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" ++ searchdirs="$newlib_search_path $lib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do +diff -urN a/libltdl/config/ltmain.sh b/libltdl/config/ltmain.sh +--- a/libltdl/config/ltmain.sh 2011-10-17 12:19:35.000000000 +0200 ++++ b/libltdl/config/ltmain.sh 2014-04-02 23:19:20.428198693 +0200 +@@ -6184,9 +6184,9 @@ + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then +- searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" ++ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs" + else +- searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" ++ searchdirs="$newlib_search_path $lib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do diff --git a/recipes/libtool/libtool-initial_2.4.2.oe b/recipes/libtool/libtool-initial_2.4.2.oe new file mode 100644 index 00000000..749f4f8c --- /dev/null +++ b/recipes/libtool/libtool-initial_2.4.2.oe @@ -0,0 +1,4 @@ +PN = "libtool" +require ${PN}-${PV}.inc + +RECIPE_TYPES = "native" diff --git a/recipes/libtool/libtool-initial_2.4.2.oe.sig b/recipes/libtool/libtool-initial_2.4.2.oe.sig new file mode 100644 index 00000000..20f70c3b --- /dev/null +++ b/recipes/libtool/libtool-initial_2.4.2.oe.sig @@ -0,0 +1 @@ +22b71a8b5ce3ad86e1094e7285981cae10e6ff88 libtool-2.4.2.tar.gz diff --git a/recipes/libtool/libtool_2.4.2.oe b/recipes/libtool/libtool_2.4.2.oe index 780ba567..94eb7f21 100644 --- a/recipes/libtool/libtool_2.4.2.oe +++ b/recipes/libtool/libtool_2.4.2.oe @@ -1,19 +1,12 @@ -LICENSE = "GPL-2.0+" -LICENSE_${PN}-libltdl = "LGPL-2.1+" +require ${PN}-${PV}.inc -require libtool.inc +inherit autotools-autoreconf -addtask bootstrap before configure after fetch unpack patch stage -do_bootstrap[dirs] = "${S}" +RECIPE_TYPES = "machine cross sdk-cross" -do_bootstrap () { - if [ "${RECIPE_TYPE}" != "native" ]; then - ./bootstrap - fi -} +DEPENDS += "native:help2man" -#SRC_URI:>TARGET_LIBC_mingw = " file://default-bindir.patch" +do_autoreconf () { + ./bootstrap +} -# Local Variables: -# mode: python -# End: From aa47ed43181319ac8baacbca7532d978f415482f Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 10:33:21 +0200 Subject: [PATCH 06/13] Add autoconf class for automate part --- classes/automate.oeclass | 24 ++++++++++++++++++++++++ classes/autotools-autoreconf.oeclass | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 classes/automate.oeclass diff --git a/classes/automate.oeclass b/classes/automate.oeclass new file mode 100644 index 00000000..7844643a --- /dev/null +++ b/classes/automate.oeclass @@ -0,0 +1,24 @@ + +CLASS_DEPENDS += "${DEPENDS_AUTOCONF}" +DEPENDS_AUTOCONF ?= "native:autoconf" + +addtask automate after fetch unpack patch stage siteinfo before configure +do_automate[dirs] = "${B}" + +export autom4te_perllibdir = "${STAGE_DIR}/native${stage_datadir}/autoconf" +export perllibdir = "${STAGE_DIR}/native${stage_datadir}/automake-1.14" +export AUTOCONF = "${STAGE_DIR}/native${stage_bindir}/autoconf" +export AUTOHEADER = "${STAGE_DIR}/native${stage_bindir}/autoheader" +export AUTOM4TE = "${STAGE_DIR}/native${stage_bindir}/autom4te" +export AUTOM4TE_CFG = "${STAGE_DIR}/native${stage_datadir}/autoconf/autom4te.cfg" + +do_automate() { + PP=`echo "${STAGE_DIR}/native" | sed -e 's/[]\/$*.^|[]/\\\\&/g'` + cat ${AUTOM4TE_CFG} | sed "s/include '/include '$PP/g" > ${AUTOM4TE_CFG}.new + rm -rf ${AUTOM4TE_CFG} + mv ${AUTOM4TE_CFG}.new ${AUTOM4TE_CFG} +} + +# Local Variables: +# mode: python +# End: diff --git a/classes/autotools-autoreconf.oeclass b/classes/autotools-autoreconf.oeclass index 9c285a55..85b3ad27 100644 --- a/classes/autotools-autoreconf.oeclass +++ b/classes/autotools-autoreconf.oeclass @@ -3,7 +3,7 @@ ## See the autotools class. If using this class instead of autotools, one ## ensures that the autoreconf command is run before configure. -inherit autotools +inherit autotools automate CLASS_DEPENDS += "${DEPENDS_AUTORECONF}" DEPENDS_AUTORECONF ?= "native:glib-dev" @@ -20,7 +20,7 @@ pkgltdldir:native = "${STAGE_DIR}/native${stage_datadir}/libtool" pkgltdldir:cross = "${STAGE_DIR}/native${stage_datadir}/libtool" pkgltdldir:sdk-cross = "${STAGE_DIR}/native${stage_datadir}/libtool" -addtask autoreconf after fetch unpack patch stage siteinfo before configure +addtask autoreconf after fetch unpack patch stage siteinfo automate before configure do_autoreconf[dirs] = "${S}" export LIBTOOLIZE = "${HOST_PREFIX}libtoolize" From b77d075a2bb761675883d0a0c6e47b77d8bc9481 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 10:34:32 +0200 Subject: [PATCH 07/13] Gettext class modified for supporting native build with gettext --- classes/gettext.oeclass | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/classes/gettext.oeclass b/classes/gettext.oeclass index 5564b3b5..cf03e753 100644 --- a/classes/gettext.oeclass +++ b/classes/gettext.oeclass @@ -5,9 +5,12 @@ ## ## @useflag nls Enable nls -CLASS_DEPENDS =+ "${DEPENDS_GETTEXT}" -DEPENDS_GETTEXT = "" -DEPENDS_GETTEXT:USE_nls = "gettext native:gettext-utils libiconv libintl" +CLASS_DEPENDS =+ "${DEPENDS_GETTEXT_NLS} ${DEPENDS_GETTEXT_NATIVE}" +DEPENDS_GETTEXT_NATIVE = "" +DEPENDS_GETTEXT_NATIVE:native = "native:gettext-utils" +DEPENDS_GETTEXT_NLS = "" +DEPENDS_GETTEXT_NLS:USE_nls = "${DEPENDS_GETTEXT}" +DEPENDS_GETTEXT = "host:gettext native:gettext-utils host:libiconv host:libintl" CLASS_FLAGS += "nls" DEFAULT_USE_nls = "0" From ca543d001a0f0ad3714eb73a0aa69e38186251f2 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 10:38:26 +0200 Subject: [PATCH 08/13] use correct depends for autotools-autoreconf class --- classes/autotools-autoreconf.oeclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/autotools-autoreconf.oeclass b/classes/autotools-autoreconf.oeclass index 85b3ad27..2208bce4 100644 --- a/classes/autotools-autoreconf.oeclass +++ b/classes/autotools-autoreconf.oeclass @@ -6,7 +6,7 @@ inherit autotools automate CLASS_DEPENDS += "${DEPENDS_AUTORECONF}" -DEPENDS_AUTORECONF ?= "native:glib-dev" +DEPENDS_AUTORECONF ?= "native:glib-utils native:automake" EXTRA_AUTORECONF ?= "" AUTORECONF_CMD ?= "autoreconf --verbose --install --force \ From d7449f910ad074c5f6561821f3b236633cfb6d07 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 10:41:16 +0200 Subject: [PATCH 09/13] Modify minimal provided --- conf/provided/minimal.conf | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/conf/provided/minimal.conf b/conf/provided/minimal.conf index 9866937c..2eb9bc26 100644 --- a/conf/provided/minimal.conf +++ b/conf/provided/minimal.conf @@ -10,15 +10,13 @@ native:librt native:libanl native:libBrokenLocale native:libnsl \ native:libmemusage native:libpcprofile native:libSegFault \ native:libnss_files native:libnss_dns native:libnss_compat \ native:libnss_nis native:libnss_nisplus native:libnss_hesiod \ -native:m4 \ native:git native:cvs native:svn native:mercurial native:bzr \ -native:autoconf native:automake native:gnu-config \ -native:gzip native:tar native:xz \ +native:gnu-config \ +native:gzip native:zip native:unzip native:tar native:xz \ native:patch native:quilt native:diffstat \ native:perl native:perl-runtime \ native:python-runtime \ native:util-linux native:coreutils \ native:shasum \ -native:flex native:bison \ native:gawk native:sed native:grep \ " From b583f7267b6757d6af1dc2b83dbfa4fc664af24a Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 11:32:17 +0200 Subject: [PATCH 10/13] autotools-autoreconf: need to export aclocalprefix --- classes/autotools-autoreconf.oeclass | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/autotools-autoreconf.oeclass b/classes/autotools-autoreconf.oeclass index 2208bce4..fd9016ea 100644 --- a/classes/autotools-autoreconf.oeclass +++ b/classes/autotools-autoreconf.oeclass @@ -15,6 +15,7 @@ AUTORECONF_CMD ?= "autoreconf --verbose --install --force \ acpaths = "__default__" +export aclocalprefix = "${STAGE_DIR}/native${stage_prefix}" pkgltdldir = "${STAGE_DIR}/${HOST_CROSS}${stage_datadir}/libtool" pkgltdldir:native = "${STAGE_DIR}/native${stage_datadir}/libtool" pkgltdldir:cross = "${STAGE_DIR}/native${stage_datadir}/libtool" From bf420e7fade1aa3859c8911999ab779b4d0a7e54 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 10:27:57 +0200 Subject: [PATCH 11/13] Wrapper: Add class for wrapping a native tool --- classes/stage.oeclass | 1 + classes/wrapper-stage.oeclass | 59 +++++++++++++++++++++++++++++++++++ classes/wrapper.oeclass | 55 ++++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 classes/wrapper-stage.oeclass create mode 100644 classes/wrapper.oeclass diff --git a/classes/stage.oeclass b/classes/stage.oeclass index 354a4be1..907b5fe1 100644 --- a/classes/stage.oeclass +++ b/classes/stage.oeclass @@ -6,6 +6,7 @@ ## them. inherit binconfig-stage +inherit wrapper-stage inherit libtool-stage addtask stage diff --git a/classes/wrapper-stage.oeclass b/classes/wrapper-stage.oeclass new file mode 100644 index 00000000..5a0c941f --- /dev/null +++ b/classes/wrapper-stage.oeclass @@ -0,0 +1,59 @@ +## Class for packages depending on recipes having wrapper files. +## +## Rewrites the paths in the wrapper files so that it contains valid dirs. + +require conf/meta.conf + +STAGE_FIXUP_FUNCS += "wrapper_stage_fixup" + +WRAPPER_STAGE_DIRNAMES = "prefix exec_prefix bindir sbindir libdir \ + includedir libexecdir datarootdir datadir sysconfdir sharedstatedir \ + localstatedir infodir mandir" + +# FIXME: add a method for packages providing wrapper files to specify which +# dirnames to fixup, so that fx. this installbuilddir could be provided by apr +# recipe, so that it does not impact metadata, and thus signature of all +# recipes. +WRAPPER_STAGE_DIRNAMES += "installbuilddir" + +def wrapper_stage_fixup(d): + import stat + + pkgmetadir = d.get("pkgmetadir").lstrip("/") + metafile_path = os.path.join(pkgmetadir, "wrapper").lstrip("/") + if not os.path.exists(metafile_path): + return + with open(metafile_path, "r") as metafile: + import string + wrapper_files = map(string.strip, metafile.readlines()) + stage_dir = os.path.realpath(d.get("STAGE_DIR")) + pkg_type = d.get("STAGE_FIXUP_PKG_TYPE") + sysroot = os.path.join(stage_dir, pkg_type) + if pkg_type in ("native", "cross", "sdk-cross"): + dirname_prefix = "stage_" + elif pkg_type in ("sdk", "canadian-cross"): + dirname_prefix = "sdk_" + else: + dirname_prefix = "machine_" + dirnames = d.get("WRAPPER_STAGE_DIRNAMES").split() + dirpaths = {} + for dirname in dirnames: + dirpaths[dirname] = d.get(dirname_prefix + dirname) + for filename in wrapper_files: + print "fixing up wrapper file", filename + filename = filename.lstrip("/") + with open(filename, "r") as input_file: + wrapper_file = input_file.read() + for dirname in dirnames: + if dirpaths[dirname] is not None: + wrapper_file = re.sub( + re.compile("\$\{%s\}"%(dirname), re.MULTILINE), + r"%s%s"%(sysroot, dirpaths[dirname]), + wrapper_file) + with open(filename, "w") as output_file: + output_file.write(wrapper_file) + os.chmod(filename, stat.S_IRWXU|stat.S_IRWXG|stat.S_IROTH|stat.S_IXOTH) + +# Local Variables: +# mode: python +# End: diff --git a/classes/wrapper.oeclass b/classes/wrapper.oeclass new file mode 100644 index 00000000..c810df66 --- /dev/null +++ b/classes/wrapper.oeclass @@ -0,0 +1,55 @@ +## Class for packages having wrapper files. +## +## Rewrites the paths in the wrapper files so that it contains valid dirs. + +require conf/meta.conf + +WRAPPER_FILES ?= "${bindir}/*" + +DO_SPLIT_WRAPPER_FIXUP = "" +DO_SPLIT_WRAPPER_FIXUP:native = "do_split_wrapper_fixup" +do_split[postfuncs] += "${DO_SPLIT_WRAPPER_FIXUP}" +def do_split_wrapper_fixup(d): + pkgd = d.get("PKGD") + pkgmetadir = d.get("pkgmetadir").lstrip("/") + wrapper_globs = d.get("WRAPPER_FILES").lstrip("/").split() + os.chdir(pkgd) + for pkg in os.listdir("."): + os.chdir(os.path.join(pkgd, pkg)) + wrapper_files = [] + for wrapper_glob in wrapper_globs: + for wrapper_file in glob.glob(wrapper_glob.lstrip("/")): + wrapper_dotpath = "%s/.%s"%(os.path.dirname(wrapper_file), os.path.basename(wrapper_file)) + + wrapper_file_path = os.path.join(d.get("SRCDIR"), wrapper_file) + print wrapper_file_path + if os.path.isfile(wrapper_file_path): + print "wrapper file %s -> %s" % (wrapper_file, wrapper_dotpath) + wrapper_files.append("/" + wrapper_file) + with open(wrapper_file_path, "r") as input_file: + content = input_file.read() + + os.rename(wrapper_file, wrapper_dotpath) + content = re.sub( + re.compile('\$\{realfile\}', re.MULTILINE), + r"%s"%("/" + wrapper_dotpath), + content) + content = re.sub( + re.compile('\$\{currentfile\}', re.MULTILINE), + r"%s"%("/" + wrapper_file), + content) + + with open(wrapper_file, "w") as metafile: + metafile.write(content) + + if not wrapper_files: + continue + print "wrapper files in package", pkg + oelite.util.makedirs(pkgmetadir) + metafile_path = os.path.join(pkgmetadir, "wrapper") + with open(metafile_path, "w") as metafile: + metafile.write("\n".join(wrapper_files) + "\n") + +# Local Variables: +# mode: python +# End: From d5b775907240dfbef11fc15cfa8587d3b2a4d4f6 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 11:54:55 +0200 Subject: [PATCH 12/13] binutils: add 64 bits library --- recipes/binutils/binutils.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/binutils/binutils.inc b/recipes/binutils/binutils.inc index 4799d855..dff3b00c 100644 --- a/recipes/binutils/binutils.inc +++ b/recipes/binutils/binutils.inc @@ -59,6 +59,7 @@ PACKAGEQA_HOST_LIBDIRS += "/${HOST_ARCH}/${TARGET_ARCH}/lib" PACKAGES += "${PN}-libiberty ${PN}-libiberty-dev" FILES_${PN}-libiberty = "${libdir}/libiberty.a" +FILES_${PN}-libiberty += "${libdir}64/libiberty.a" FILES_${PN}-libiberty-dev = "${includedir}/libiberty.h" FILES_${PN}-libopcodes-dev = "${AUTO_PACKAGE_LIBS_LIBDIR_PREFIX}${includedir}/dis-asm.h" From 3916e2aff86a9fa7fc961ec83e683be0edf6c494 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 11:55:03 +0200 Subject: [PATCH 13/13] gcc: add 64 bits library --- recipes/gcc/gcc.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/gcc/gcc.inc b/recipes/gcc/gcc.inc index cae862da..bb055338 100644 --- a/recipes/gcc/gcc.inc +++ b/recipes/gcc/gcc.inc @@ -48,6 +48,7 @@ PROVIDES_${PN}[qa] += "allow-missing-provides:liblto-plugin" # Get rid of gcc-dev package PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale ${PN}" FILES_${PN} += "${libdir}/*.a" +FILES_${PN} += "${libdir}64/*.a" inherit auto-package-utils AUTO_PACKAGE_UTILS = "cpp g++ gcov"