-
Notifications
You must be signed in to change notification settings - Fork 17
Improvements #13
Improvements #13
Changes from all commits
6b85b65
2ece2e3
44b9a69
4828fa2
6832cc9
aa47ed4
b77d075
ca543d0
d7449f9
b583f72
bf420e7
d5b7759
3916e2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| ## them. | ||
|
|
||
| inherit binconfig-stage | ||
| inherit wrapper-stage | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have already moved this commit to PR #14, so please drop it from this PR. |
||
| inherit libtool-stage | ||
| addtask stage | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| ## Class for packages depending on recipes having wrapper files. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have already moved this commit to PR #14, so please drop it from this PR. |
||
| ## | ||
| ## 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: | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| ## Class for packages having wrapper files. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have already moved this commit to PR #14, so please drop it from this PR. |
||
| ## | ||
| ## 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: | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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" | ||
|
|
@@ -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" | ||
|
|
@@ -129,9 +130,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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mentioned earlier that this line was redundant. How is it that? How is all the auto-package-utils packages pulled in by RDEPENDS_${PN} without this line?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please look the last 2 lines of this recipe
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see. Sorry about that :) |
||
| # that we don't get into multiple provider problems with libbfd. | ||
| DEFAULT_PREFERENCE = "2" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please move this commit to separate commit (together with the similar binutils commit). We need to investigate what is going on here, but let's avoid blocking the rest of this PR by that. |
||
|
|
||
| inherit auto-package-utils | ||
| AUTO_PACKAGE_UTILS = "cpp g++ gcov" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| PN = "libtool" | ||
| require ${PN}-${PV}.inc | ||
|
|
||
| RECIPE_TYPES = "native" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 22b71a8b5ce3ad86e1094e7285981cae10e6ff88 libtool-2.4.2.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if you have USE_nls flag disabled, you need native:gettext-utils for native recipes, but nothing for other recipe types? Why/how is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some native tools need gettext in order to be compiled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And gettext is not needed when cross-building the same tools?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure on this point... I have to give a boost on my oe-lite PR :)