From c9b2231b4fde3688b04eafeac5075d1b94948a26 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 22 May 2015 10:26:56 +0200 Subject: [PATCH] libtool: Split native build Add patches for native & cross for working correctly with oe-lite --- recipes/libtool/libtool-2.4.6.inc | 12 ++ .../libtool/libtool-2.4.6/cross_compile.patch | 43 ++++++ .../libtool-2.4.6/default-bindir.patch | 24 ++++ recipes/libtool/libtool-2.4.6/gnulib.patch | 128 ++++++++++++++++++ recipes/libtool/libtool-2.4.6/syslib.patch | 66 +++++++++ recipes/libtool/libtool-initial_2.4.6.oe | 4 + recipes/libtool/libtool-initial_2.4.6.oe.sig | 1 + recipes/libtool/libtool_2.4.6.oe | 12 +- 8 files changed, 289 insertions(+), 1 deletion(-) create mode 100644 recipes/libtool/libtool-2.4.6.inc create mode 100644 recipes/libtool/libtool-2.4.6/cross_compile.patch create mode 100644 recipes/libtool/libtool-2.4.6/default-bindir.patch create mode 100644 recipes/libtool/libtool-2.4.6/gnulib.patch create mode 100644 recipes/libtool/libtool-2.4.6/syslib.patch create mode 100644 recipes/libtool/libtool-initial_2.4.6.oe create mode 100644 recipes/libtool/libtool-initial_2.4.6.oe.sig diff --git a/recipes/libtool/libtool-2.4.6.inc b/recipes/libtool/libtool-2.4.6.inc new file mode 100644 index 00000000..65687499 --- /dev/null +++ b/recipes/libtool/libtool-2.4.6.inc @@ -0,0 +1,12 @@ +LICENSE = "GPL-2.0+" +LICENSE_${PN}-libltdl = "LGPL-2.1+" + +require ${PN}.inc + +SRC_URI:>machine = " file://gnulib.patch" +SRC_URI:>native = " file://syslib.patch" +SRC_URI:>cross = " file://syslib.patch file://gnulib.patch file://cross_compile.patch ${SRC_URI_WINDOWS}" +SRC_URI:>sdk-cross = " file://syslib.patch file://gnulib.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.6/cross_compile.patch b/recipes/libtool/libtool-2.4.6/cross_compile.patch new file mode 100644 index 00000000..9bb7a079 --- /dev/null +++ b/recipes/libtool/libtool-2.4.6/cross_compile.patch @@ -0,0 +1,43 @@ +diff -urN a/build-aux/ltmain.in b/build-aux/ltmain.in +--- a/build-aux/ltmain.in 2015-02-06 13:57:56.000000000 +0100 ++++ b/build-aux/ltmain.in 2016-02-16 19:14:28.069268227 +0100 +@@ -6049,8 +6049,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 yes = "$hardcode_automatic" && avoidtemprpath=yes + else +@@ -6448,8 +6449,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 +@@ -6604,7 +6603,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.6/default-bindir.patch b/recipes/libtool/libtool-2.4.6/default-bindir.patch new file mode 100644 index 00000000..1bd886ac --- /dev/null +++ b/recipes/libtool/libtool-2.4.6/default-bindir.patch @@ -0,0 +1,24 @@ +diff -urN a/build-aux/ltmain.in b/build-aux/ltmain.in +--- a/build-aux/ltmain.in 2015-02-06 13:57:56.000000000 +0100 ++++ b/build-aux/ltmain.in 2016-01-17 14:03:55.985929055 +0100 +@@ -4619,7 +4619,7 @@ + new_inherited_linker_flags= + + avoid_version=no +- bindir= ++ bindir=$libtool_bindir + dlfiles= + dlprefiles= + dlself=no +diff -urN a/build-aux/ltmain.sh b/build-aux/ltmain.sh +--- a/build-aux/ltmain.sh 2015-02-15 17:15:12.000000000 +0100 ++++ b/build-aux/ltmain.sh 2016-01-17 14:03:46.237723639 +0100 +@@ -6531,7 +6531,7 @@ + new_inherited_linker_flags= + + avoid_version=no +- bindir= ++ bindir=$libtool_bindir + dlfiles= + dlprefiles= + dlself=no diff --git a/recipes/libtool/libtool-2.4.6/gnulib.patch b/recipes/libtool/libtool-2.4.6/gnulib.patch new file mode 100644 index 00000000..6b38d4e8 --- /dev/null +++ b/recipes/libtool/libtool-2.4.6/gnulib.patch @@ -0,0 +1,128 @@ +diff -urN a/bootstrap b/bootstrap +--- a/bootstrap 2015-01-20 20:19:11.000000000 +0100 ++++ b/bootstrap 2016-02-16 20:22:53.443561131 +0100 +@@ -2155,7 +2155,7 @@ + test extract-trace = "$progname" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/options-parser + + # Set a version string. +-scriptversion=2015-01-20.17; # UTC ++scriptversion=2015-09-18.21; # UTC + + # This program is free software: you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +diff -urN a/bootstrap.conf b/bootstrap.conf +--- a/bootstrap.conf 2015-01-16 19:52:04.000000000 +0100 ++++ b/bootstrap.conf 2016-02-16 20:22:53.443561131 +0100 +@@ -291,13 +291,8 @@ + libtool_check_for_bogus_macros () + { + $debug_cmd +- +- $opt_dry_run || +- for macro in LT_INIT AC_PROG_LIBTOOL AM_PROG_LIBTOOL; do +- if grep $macro aclocal.m4 libltdl/aclocal.m4; then +- func_fatal_error "Bogus $macro macro contents in an aclocal.m4 file" +- else :; fi +- done ++ $require_build_aux ++ sh $build_aux/no-bogus-m4-defines || exit 1 + } + func_add_hook func_fini libtool_check_for_bogus_macros + +diff -urN a/build-aux/no-bogus-m4-defines b/build-aux/no-bogus-m4-defines +--- a/build-aux/no-bogus-m4-defines 1970-01-01 01:00:00.000000000 +0100 ++++ b/build-aux/no-bogus-m4-defines 2016-02-16 20:22:53.444561151 +0100 +@@ -0,0 +1,61 @@ ++#! /bin/sh ++ ++# no-bogus-m4-defines - detect wrong m4 definitions ++# ------------------------------------------------- ++# Try to catch the case where 'aclocal' pulls installed libtool ++# macro file contents from another version of libtool into the ++# current package 'aclocal.m4'. Currently used by 'make dist' ++# and by ./bootstrap (bootstrap.conf). ++# ++# Copyright (C) 2015 Free Software Foundation, Inc. ++# ++# This file is part of GNU Libtool. ++# ++# GNU Libtool is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation; either version 2 of ++# the License, or (at your option) any later version. ++# ++# GNU Libtool is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GNU Libtool; see the file COPYING. If not, a copy ++# can be downloaded from http://www.gnu.org/licenses/gpl.html, ++# or obtained by writing to the Free Software Foundation, Inc., ++# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ ++# Please report bugs or propose patches to bug-libtool@gnu.org. ++ ++. `echo "$0" |${SED-sed} 's|[^/]*$||'`/funclib.sh ++# source this for "GNU m4" detection methods ++. `echo "$0" |${SED-sed} 's|[^/]*$||'`/extract-trace ++ ++$require_gnu_m4 ++ ++bogus_macros='LT_INIT AC_PROG_LIBTOOL AM_PROG_LIBTOOL' ++ ++bogus_macros_grep='' ++for macro in $bogus_macros; do ++ func_append bogus_macros_grep "/$macro/p;" ++done ++ ++clean_false_alarms="pushdef(\`AC_BEFORE', \`')" ++ ++bogus_macros_check_output=`$ECHO "$clean_false_alarms" \ ++ |$M4 - aclocal.m4 libltdl/aclocal.m4 \ ++ |$SED -n "$bogus_macros_grep"` ++ ++exit_val=0 ++for macro in $bogus_macros; do ++ case $bogus_macros_check_output in ++ *$macro*) ++ func_error "Bogus $macro macro definition in an aclocal.m4 file" ++ exit_val=1 ++ ;; ++ esac ++done ++ ++exit $exit_val +diff -urN a/Makefile.am b/Makefile.am +--- a/Makefile.am 2015-01-20 16:34:33.000000000 +0100 ++++ b/Makefile.am 2016-02-16 20:22:53.442561110 +0100 +@@ -86,11 +86,13 @@ + libtool_m4 = $(srcdir)/$(macro_dir)/libtool.m4 + ltversion_in = $(srcdir)/$(macro_dir)/ltversion.in + ltversion_m4 = $(srcdir)/$(macro_dir)/ltversion.m4 ++no_bogus_macros = $(srcdir)/$(aux_dir)/no-bogus-m4-defines + options_parser = $(srcdir)/$(aux_dir)/options-parser + + EXTRA_DIST += $(extract_trace) $(funclib_sh) $(inline_source) \ + $(libtoolize_in) $(ltmain_in) $(ltmain_sh) \ +- $(ltversion_in) $(ltversion_m4) $(options_parser) ++ $(ltversion_in) $(ltversion_m4) $(no_bogus_macros) \ ++ $(options_parser) + + ## These are the replacements that need to be made at bootstrap time, + ## because they must be static in distributed files, and not accidentally +@@ -608,12 +610,7 @@ + ## ...and similarly for .serial. + $(git_commit_count) > $(dotserial) + ## Ensure aclocal has not wrongly picked up old macro definitions. +- @for macro in LT_INIT AC_PROG_LIBTOOL AM_PROG_LIBTOOL; do \ +- if grep "$$macro" '$(srcdir)/aclocal.m4' '$(lt_aclocal_m4)'; then \ +- echo "Bogus $$macro macro contents in an aclocal.m4 file." >&2; \ +- exit 1; \ +- else :; fi; \ +- done ++ $(no_bogus_macros) + + distcheck-hook: syntax-check + diff --git a/recipes/libtool/libtool-2.4.6/syslib.patch b/recipes/libtool/libtool-2.4.6/syslib.patch new file mode 100644 index 00000000..63cddd06 --- /dev/null +++ b/recipes/libtool/libtool-2.4.6/syslib.patch @@ -0,0 +1,66 @@ +diff -urN a/build-aux/ltmain.in b/build-aux/ltmain.in +--- a/build-aux/ltmain.in 2015-02-06 13:57:56.000000000 +0100 ++++ b/build-aux/ltmain.in 2016-01-17 14:01:37.803019373 +0100 +@@ -5716,9 +5716,9 @@ + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test lib = "$linkmode"; 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 +@@ -7377,7 +7377,7 @@ + libnameglob=$libname + fi + test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` +- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do ++ for i in $lib_search_path; do + if test yes = "$want_nocaseglob"; then + shopt -s nocaseglob + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` +@@ -7455,7 +7455,7 @@ + fi + if test -n "$a_deplib"; then + libname=`eval "\\$ECHO \"$libname_spec\""` +- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do ++ for i in $lib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib=$potent_lib # see symlink-check above in file_magic test +diff -urN a/build-aux/ltmain.sh b/build-aux/ltmain.sh +--- a/build-aux/ltmain.sh 2015-02-15 17:15:12.000000000 +0100 ++++ b/build-aux/ltmain.sh 2016-01-17 14:00:31.841632168 +0100 +@@ -7628,9 +7628,9 @@ + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test lib = "$linkmode"; 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 +@@ -9289,7 +9289,7 @@ + libnameglob=$libname + fi + test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` +- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do ++ for i in $lib_search_path; do + if test yes = "$want_nocaseglob"; then + shopt -s nocaseglob + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` +@@ -9367,7 +9367,7 @@ + fi + if test -n "$a_deplib"; then + libname=`eval "\\$ECHO \"$libname_spec\""` +- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do ++ for i in $lib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib=$potent_lib # see symlink-check above in file_magic test diff --git a/recipes/libtool/libtool-initial_2.4.6.oe b/recipes/libtool/libtool-initial_2.4.6.oe new file mode 100644 index 00000000..749f4f8c --- /dev/null +++ b/recipes/libtool/libtool-initial_2.4.6.oe @@ -0,0 +1,4 @@ +PN = "libtool" +require ${PN}-${PV}.inc + +RECIPE_TYPES = "native" diff --git a/recipes/libtool/libtool-initial_2.4.6.oe.sig b/recipes/libtool/libtool-initial_2.4.6.oe.sig new file mode 100644 index 00000000..a125cce9 --- /dev/null +++ b/recipes/libtool/libtool-initial_2.4.6.oe.sig @@ -0,0 +1 @@ +25b6931265230a06f0fc2146df64c04e5ae6ec33 libtool-2.4.6.tar.gz diff --git a/recipes/libtool/libtool_2.4.6.oe b/recipes/libtool/libtool_2.4.6.oe index 3ed38ed4..fe358e6e 100644 --- a/recipes/libtool/libtool_2.4.6.oe +++ b/recipes/libtool/libtool_2.4.6.oe @@ -1,7 +1,17 @@ LICENSE = "GPL-2.0+" LICENSE_${PN}-libltdl = "LGPL-2.1+" -require libtool.inc +require ${PN}-${PV}.inc + +inherit autotools-autoreconf + +RECIPE_TYPES = "machine cross sdk-cross" + +DEPENDS += "native:help2man native:makeinfo native:xz native:make" + +do_autoreconf () { + ./bootstrap --force +} # Local Variables: # mode: python