aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-06-28 13:20:07 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-06-28 13:20:07 -0400
commit74d885ce487911cae6b2d4c596d98dc25d2865a6 (patch)
tree2efc8b211f30eab5d561e78d2ff95cb128bbd21e
parentsys-devel/libtool: add m4/libtool.m4 patch for ppc64le #581314 (diff)
downloadppc64le-74d885ce487911cae6b2d4c596d98dc25d2865a6.zip
ppc64le-74d885ce487911cae6b2d4c596d98dc25d2865a6.tar.gz
ppc64le-74d885ce487911cae6b2d4c596d98dc25d2865a6.tar.bz2
eclass/libtool.eclass + ELT-patches: copy from tree
-rw-r--r--eclass/ELT-patches/aixrtl/1.5.0-cmds-c11
-rw-r--r--eclass/ELT-patches/aixrtl/1.5.0-cmds-cxx11
-rw-r--r--eclass/ELT-patches/aixrtl/1.5.0-expsym-c14
-rw-r--r--eclass/ELT-patches/aixrtl/1.5.0-expsym-cxx14
-rw-r--r--eclass/ELT-patches/aixrtl/1.5.0-noundef-c11
-rw-r--r--eclass/ELT-patches/aixrtl/1.5.0-noundef-cxx11
-rw-r--r--eclass/ELT-patches/aixrtl/1.5.0-soname12
-rw-r--r--eclass/ELT-patches/aixrtl/1.5.0-usertl-c10
-rw-r--r--eclass/ELT-patches/aixrtl/1.5.0-usertl-cxx10
-rw-r--r--eclass/ELT-patches/aixrtl/1.5.22-cmds-c11
-rw-r--r--eclass/ELT-patches/aixrtl/1.5.22-cmds-cxx11
-rw-r--r--eclass/ELT-patches/aixrtl/2.0.0-fpic-c12
-rw-r--r--eclass/ELT-patches/aixrtl/2.0.0-fpic-cxx12
-rw-r--r--eclass/ELT-patches/aixrtl/2.2.0-cmds-c11
-rw-r--r--eclass/ELT-patches/aixrtl/2.2.0-cmds-cxx11
-rw-r--r--eclass/ELT-patches/aixrtl/2.2.0-expsym-c14
-rw-r--r--eclass/ELT-patches/aixrtl/2.2.0-expsym-cxx14
-rw-r--r--eclass/ELT-patches/aixrtl/2.2.0-noundef-c11
-rw-r--r--eclass/ELT-patches/aixrtl/2.2.0-noundef-cxx11
-rw-r--r--eclass/ELT-patches/aixrtl/2.2.0-usertl-cxx10
-rw-r--r--eclass/ELT-patches/aixrtl/2.2.8-cmds-c11
-rw-r--r--eclass/ELT-patches/aixrtl/2.2.8-cmds-cxx11
-rw-r--r--eclass/ELT-patches/aixrtl/2.4.0-expsym-c14
-rw-r--r--eclass/ELT-patches/aixrtl/2.4.0-expsym-cxx14
-rw-r--r--eclass/ELT-patches/aixrtl/2.4.2.418-cmds-c11
-rw-r--r--eclass/ELT-patches/aixrtl/2.4.2.418-cmds-cxx11
-rw-r--r--eclass/ELT-patches/aixrtl/2.4.2.418-soname10
-rw-r--r--eclass/ELT-patches/aixrtl/2.4.4-with-svr411
-rw-r--r--eclass/ELT-patches/as-needed/1.530
-rw-r--r--eclass/ELT-patches/as-needed/1.5.2638
-rw-r--r--eclass/ELT-patches/as-needed/2.2.638
-rw-r--r--eclass/ELT-patches/as-needed/2.4.238
-rw-r--r--eclass/ELT-patches/as-needed/2.4.338
-rw-r--r--eclass/ELT-patches/cross/2.220
-rw-r--r--eclass/ELT-patches/cross/2.420
-rw-r--r--eclass/ELT-patches/cross/2.4.321
-rw-r--r--eclass/ELT-patches/darwin-conf/1.524
-rw-r--r--eclass/ELT-patches/darwin-conf/1.5b33
-rw-r--r--eclass/ELT-patches/darwin-conf/2.2.429
-rw-r--r--eclass/ELT-patches/darwin-conf/2.2.643
-rw-r--r--eclass/ELT-patches/darwin-conf/2.4.629
-rw-r--r--eclass/ELT-patches/darwin-ltconf/1.2.066
-rw-r--r--eclass/ELT-patches/darwin-ltconf/1.3.067
-rw-r--r--eclass/ELT-patches/darwin-ltmain/1.2.040
-rw-r--r--eclass/ELT-patches/darwin-ltmain/1.3.064
-rw-r--r--eclass/ELT-patches/deplibs/1.518
-rw-r--r--eclass/ELT-patches/deplibs/2.1b18
-rw-r--r--eclass/ELT-patches/fbsd-conf/00broken-libglade33
-rw-r--r--eclass/ELT-patches/fbsd-conf/1.4.032
-rw-r--r--eclass/ELT-patches/fbsd-conf/1.5.10120
-rw-r--r--eclass/ELT-patches/fbsd-conf/1.5.18116
-rw-r--r--eclass/ELT-patches/fbsd-conf/1.5.20116
-rw-r--r--eclass/ELT-patches/fbsd-conf/1.5.20b61
-rw-r--r--eclass/ELT-patches/fbsd-conf/1.9f60
-rw-r--r--eclass/ELT-patches/fbsd-ltconf/1.2.026
-rw-r--r--eclass/ELT-patches/fbsd-ltconf/1.3.032
-rw-r--r--eclass/ELT-patches/fbsd-ltconf/1.4a32
-rw-r--r--eclass/ELT-patches/fbsd-ltconf/1.4a-GCC3.032
-rw-r--r--eclass/ELT-patches/fix-relink/1.4.063
-rw-r--r--eclass/ELT-patches/fix-relink/1.4.362
-rw-r--r--eclass/ELT-patches/fix-relink/1.5.051
-rw-r--r--eclass/ELT-patches/gold-conf/2.2.610
-rw-r--r--eclass/ELT-patches/hardcode-relink/1.3d8
-rw-r--r--eclass/ELT-patches/hardcode/1.3d21
-rw-r--r--eclass/ELT-patches/hardcode/2.1b36
-rw-r--r--eclass/ELT-patches/hc-flag-ld/1.518
-rw-r--r--eclass/ELT-patches/hpux-conf/1.5.22-syslibpath24
-rw-r--r--eclass/ELT-patches/install-sh/1.514
-rw-r--r--eclass/ELT-patches/install-sh/1.5.414
-rw-r--r--eclass/ELT-patches/install-sh/1.5.614
-rw-r--r--eclass/ELT-patches/irix-ltmain/2.2.630
-rw-r--r--eclass/ELT-patches/ltmain/1.518
-rw-r--r--eclass/ELT-patches/max_cmd_len/1.5.033
-rw-r--r--eclass/ELT-patches/max_cmd_len/1.5.1433
-rw-r--r--eclass/ELT-patches/max_cmd_len/1.5.2033
-rw-r--r--eclass/ELT-patches/mint-conf/2.2.615
-rw-r--r--eclass/ELT-patches/no-lc/1.3d13
-rw-r--r--eclass/ELT-patches/no-lc/1.5.2211
-rw-r--r--eclass/ELT-patches/nocxx/nocxx-2.64.patch13
-rw-r--r--eclass/ELT-patches/nocxx/nocxx.patch15
-rw-r--r--eclass/ELT-patches/portage/1.2.07
-rw-r--r--eclass/ELT-patches/portage/1.3.0c66
-rw-r--r--eclass/ELT-patches/portage/1.3.371
-rw-r--r--eclass/ELT-patches/portage/1.4.074
-rw-r--r--eclass/ELT-patches/portage/1.5.1077
-rw-r--r--eclass/ELT-patches/portage/2.269
-rw-r--r--eclass/ELT-patches/relink-prog/1.3d24
-rw-r--r--eclass/ELT-patches/relink-prog/2.1b24
-rw-r--r--eclass/ELT-patches/relink/1.4.0a99
-rw-r--r--eclass/ELT-patches/relink/1.4.0a-GCC3.0-199
-rw-r--r--eclass/ELT-patches/relink/1.4.0a-GCC3.0-2100
-rw-r--r--eclass/ELT-patches/relink/1.4.1124
-rw-r--r--eclass/ELT-patches/relink/1.4.299
-rw-r--r--eclass/ELT-patches/relink/1.4.3111
-rw-r--r--eclass/ELT-patches/rem-int-dep/1.3.511
-rw-r--r--eclass/ELT-patches/sed/1.3.414
-rw-r--r--eclass/ELT-patches/sed/1.4.014
-rw-r--r--eclass/ELT-patches/sed/1.5.616
-rw-r--r--eclass/ELT-patches/sol2-conf/2.4.214
-rw-r--r--eclass/ELT-patches/sol2-ltmain/2.4.211
-rw-r--r--eclass/ELT-patches/sys-lib-dlsearch/2.421
-rw-r--r--eclass/ELT-patches/target-nm/2.4.245
-rw-r--r--eclass/ELT-patches/test/1.4.0291
-rw-r--r--eclass/ELT-patches/test/1.4.2578
-rw-r--r--eclass/ELT-patches/tmp/1.3.515
-rw-r--r--eclass/ELT-patches/uclibc-conf/1.2.048
-rw-r--r--eclass/ELT-patches/uclibc-conf/1.3.0c48
-rw-r--r--eclass/ELT-patches/uclibc-ltconf/1.2.036
-rw-r--r--eclass/ELT-patches/uclibc-ltconf/1.3.039
-rw-r--r--eclass/libtool.eclass514
110 files changed, 4967 insertions, 0 deletions
diff --git a/eclass/ELT-patches/aixrtl/1.5.0-cmds-c b/eclass/ELT-patches/aixrtl/1.5.0-cmds-c
new file mode 100644
index 0000000..9be0568
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/1.5.0-cmds-c
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -7234,7 +7235,7 @@
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+- archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++ archive_expsym_cmds='eval `echo "$soname" | sed -e "s,^,: ,; s,(,; membnam=,; s,\.o),,"`~rm -f -r $lib.d~mkdir -p $lib.d~$CC -o $lib.d/$membnam.o $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags -shared $wl-G$allow_undefined_flag $wl'$exp_sym_flag':$export_symbols~$STRIP -e $lib.d/$membnam.o~( echo "#! $soname"; if test $membnam = shr_64; then echo "# 64"; else echo "# 32"; fi; cat $export_symbols ) > $lib.d/$membnam.imp~$AR $AR_FLAGS $lib $lib.d/$membnam.o $lib.d/$membnam.imp~rm -f -r $lib.d'
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
diff --git a/eclass/ELT-patches/aixrtl/1.5.0-cmds-cxx b/eclass/ELT-patches/aixrtl/1.5.0-cmds-cxx
new file mode 100644
index 0000000..13ffb7a
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/1.5.0-cmds-cxx
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -10041,7 +10043,7 @@
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+- archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++ archive_expsym_cmds_CXX='eval `echo "$soname" | sed -e "s,^,: ,; s,(,; membnam=,; s,\.o),,"`~rm -f -r $lib.d~mkdir -p $lib.d~$CC -o $lib.d/$membnam.o $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags -shared $wl-G$allow_undefined_flag $wl'$exp_sym_flag':$export_symbols~$STRIP -e $lib.d/$membnam.o~( echo "#! $soname"; if test $membnam = shr_64; then echo "# 64"; else echo "# 32"; fi; cat $export_symbols ) > $lib.d/$membnam.imp~$AR $AR_FLAGS $lib $lib.d/$membnam.o $lib.d/$membnam.imp~rm -f -r $lib.d'
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
diff --git a/eclass/ELT-patches/aixrtl/1.5.0-expsym-c b/eclass/ELT-patches/aixrtl/1.5.0-expsym-c
new file mode 100644
index 0000000..2b54887
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/1.5.0-expsym-c
@@ -0,0 +1,14 @@
+--- configure
++++ configure
+@@ -7113,9 +7113,9 @@
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds='`echo $NM | sed -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
diff --git a/eclass/ELT-patches/aixrtl/1.5.0-expsym-cxx b/eclass/ELT-patches/aixrtl/1.5.0-expsym-cxx
new file mode 100644
index 0000000..9b6bdc2
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/1.5.0-expsym-cxx
@@ -0,0 +1,14 @@
+--- configure
++++ configure
+@@ -11217,9 +11217,9 @@
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds_CXX='`echo $NM | sed -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
diff --git a/eclass/ELT-patches/aixrtl/1.5.0-noundef-c b/eclass/ELT-patches/aixrtl/1.5.0-noundef-c
new file mode 100644
index 0000000..c893f9c
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/1.5.0-noundef-c
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -7189,7 +7190,7 @@
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+- allow_undefined_flag='-berok'
++ no_undefined_flag=' ${wl}-bernotok'
+ # Determine the default libpath from the value encoded in an empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
diff --git a/eclass/ELT-patches/aixrtl/1.5.0-noundef-cxx b/eclass/ELT-patches/aixrtl/1.5.0-noundef-cxx
new file mode 100644
index 0000000..dc01fca
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/1.5.0-noundef-cxx
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -9995,7 +9997,7 @@
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+- allow_undefined_flag_CXX='-berok'
++ no_undefined_flag_CXX=' ${wl}-bernotok'
+ # Determine the default libpath from the value encoded in an empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
diff --git a/eclass/ELT-patches/aixrtl/1.5.0-soname b/eclass/ELT-patches/aixrtl/1.5.0-soname
new file mode 100644
index 0000000..113fe2d
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/1.5.0-soname
@@ -0,0 +1,12 @@
+--- configure
++++ configure
+@@ -14426,7 +14426,8 @@
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
++ [ "${OBJECT_MODE:-32}" = '64' ] && soname_spec='$libname$release$shared_ext$major(shr_64.o)' || soname_spec='$libname$release$shared_ext$major(shr.o)'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
diff --git a/eclass/ELT-patches/aixrtl/1.5.0-usertl-c b/eclass/ELT-patches/aixrtl/1.5.0-usertl-c
new file mode 100644
index 0000000..b5ff186
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/1.5.0-usertl-c
@@ -0,0 +1,10 @@
+--- configure
++++ configure
+@@ -7130,6 +7130,7 @@
+ fi
+ done
+ esac
++ aix_use_runtimelinking=yes
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
diff --git a/eclass/ELT-patches/aixrtl/1.5.0-usertl-cxx b/eclass/ELT-patches/aixrtl/1.5.0-usertl-cxx
new file mode 100644
index 0000000..36c84e9
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/1.5.0-usertl-cxx
@@ -0,0 +1,10 @@
+--- configure
++++ configure
+@@ -9936,6 +9937,7 @@
+ esac
+ done
+ esac
++ aix_use_runtimelinking=yes
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
diff --git a/eclass/ELT-patches/aixrtl/1.5.22-cmds-c b/eclass/ELT-patches/aixrtl/1.5.22-cmds-c
new file mode 100644
index 0000000..a97485a
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/1.5.22-cmds-c
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -8679,7 +8679,7 @@
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+- archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++ archive_expsym_cmds='eval `echo "$soname" | sed -e "s,^,: ,; s,(,; membnam=,; s,\.o),,"`~rm -f -r $lib.d~mkdir -p $lib.d~$CC -o $lib.d/$membnam.o $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags -shared $wl-G$allow_undefined_flag $wl'$exp_sym_flag':$export_symbols~$STRIP -e $lib.d/$membnam.o~( echo "#! $soname"; if test $membnam = shr_64; then echo "# 64"; else echo "# 32"; fi; cat $export_symbols ) > $lib.d/$membnam.imp~$AR $AR_FLAGS $lib $lib.d/$membnam.o $lib.d/$membnam.imp~rm -f -r $lib.d'
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
diff --git a/eclass/ELT-patches/aixrtl/1.5.22-cmds-cxx b/eclass/ELT-patches/aixrtl/1.5.22-cmds-cxx
new file mode 100644
index 0000000..222a0f7
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/1.5.22-cmds-cxx
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -11731,7 +11731,7 @@
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+- archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++ archive_expsym_cmds_CXX='eval `echo "$soname" | sed -e "s,^,: ,; s,(,; membnam=,; s,\.o),,"`~rm -f -r $lib.d~mkdir -p $lib.d~$CC -o $lib.d/$membnam.o $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags -shared $wl-G$allow_undefined_flag $wl'$exp_sym_flag':$export_symbols~$STRIP -e $lib.d/$membnam.o~( echo "#! $soname"; if test $membnam = shr_64; then echo "# 64"; else echo "# 32"; fi; cat $export_symbols ) > $lib.d/$membnam.imp~$AR $AR_FLAGS $lib $lib.d/$membnam.o $lib.d/$membnam.imp~rm -f -r $lib.d'
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
diff --git a/eclass/ELT-patches/aixrtl/2.0.0-fpic-c b/eclass/ELT-patches/aixrtl/2.0.0-fpic-c
new file mode 100644
index 0000000..bb3cb42
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.0.0-fpic-c
@@ -0,0 +1,12 @@
+--- configure
++++ configure
+@@ -1,6 +1,9 @@
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
++ lt_prog_compiler_pic='-fPIC'
++ else
++ lt_prog_compiler_pic='-fPIC'
+ fi
+ ;;
+
diff --git a/eclass/ELT-patches/aixrtl/2.0.0-fpic-cxx b/eclass/ELT-patches/aixrtl/2.0.0-fpic-cxx
new file mode 100644
index 0000000..532bbcf
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.0.0-fpic-cxx
@@ -0,0 +1,12 @@
+--- configure
++++ configure
+@@ -1,6 +1,9 @@
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
++ lt_prog_compiler_pic_CXX='-fPIC'
++ else
++ lt_prog_compiler_pic_CXX='-fPIC'
+ fi
+ ;;
+
diff --git a/eclass/ELT-patches/aixrtl/2.2.0-cmds-c b/eclass/ELT-patches/aixrtl/2.2.0-cmds-c
new file mode 100644
index 0000000..6c2cd7e
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.2.0-cmds-c
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -8619,7 +8619,7 @@
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++ archive_expsym_cmds='eval `echo "$soname" | sed -e "s,^,: ,; s,(,; membnam=,; s,\.o),,"`~rm -f -r $lib.d~mkdir -p $lib.d~$CC -o $lib.d/$membnam.o $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags -shared $wl-G$allow_undefined_flag $wl'$exp_sym_flag':$export_symbols~$STRIP -e $lib.d/$membnam.o~( echo "#! $soname"; if test $membnam = shr_64; then echo "# 64"; else echo "# 32"; fi; cat $export_symbols ) > $lib.d/$membnam.imp~$AR $AR_FLAGS $lib $lib.d/$membnam.o $lib.d/$membnam.imp~rm -f -r $lib.d'
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
diff --git a/eclass/ELT-patches/aixrtl/2.2.0-cmds-cxx b/eclass/ELT-patches/aixrtl/2.2.0-cmds-cxx
new file mode 100644
index 0000000..af3c7b7
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.2.0-cmds-cxx
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -13946,7 +13947,7 @@
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+- archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++ archive_expsym_cmds_CXX='eval `echo "$soname" | sed -e "s,^,: ,; s,(,; membnam=,; s,\.o),,"`~rm -f -r $lib.d~mkdir -p $lib.d~$CC -o $lib.d/$membnam.o $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags -shared $wl-G$allow_undefined_flag $wl'$exp_sym_flag':$export_symbols~$STRIP -e $lib.d/$membnam.o~( echo "#! $soname"; if test $membnam = shr_64; then echo "# 64"; else echo "# 32"; fi; cat $export_symbols ) > $lib.d/$membnam.imp~$AR $AR_FLAGS $lib $lib.d/$membnam.o $lib.d/$membnam.imp~rm -f -r $lib.d'
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
diff --git a/eclass/ELT-patches/aixrtl/2.2.0-expsym-c b/eclass/ELT-patches/aixrtl/2.2.0-expsym-c
new file mode 100644
index 0000000..196a5a3
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.2.0-expsym-c
@@ -0,0 +1,14 @@
+--- configure
++++ configure
+@@ -8475,9 +8475,9 @@
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds='`echo $NM | sed -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
diff --git a/eclass/ELT-patches/aixrtl/2.2.0-expsym-cxx b/eclass/ELT-patches/aixrtl/2.2.0-expsym-cxx
new file mode 100644
index 0000000..ee4d163
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.2.0-expsym-cxx
@@ -0,0 +1,14 @@
+--- configure
++++ configure
+@@ -15506,9 +15506,9 @@
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds_CXX='`echo $NM | sed -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
diff --git a/eclass/ELT-patches/aixrtl/2.2.0-noundef-c b/eclass/ELT-patches/aixrtl/2.2.0-noundef-c
new file mode 100644
index 0000000..d9520cb
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.2.0-noundef-c
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -8558,7 +8558,7 @@
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+- allow_undefined_flag='-berok'
++ no_undefined_flag=' ${wl}-bernotok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
diff --git a/eclass/ELT-patches/aixrtl/2.2.0-noundef-cxx b/eclass/ELT-patches/aixrtl/2.2.0-noundef-cxx
new file mode 100644
index 0000000..37d02db
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.2.0-noundef-cxx
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -13884,7 +13885,7 @@
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+- allow_undefined_flag_CXX='-berok'
++ no_undefined_flag_CXX=' ${wl}-bernotok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ cat >conftest.$ac_ext <<_ACEOF
diff --git a/eclass/ELT-patches/aixrtl/2.2.0-usertl-cxx b/eclass/ELT-patches/aixrtl/2.2.0-usertl-cxx
new file mode 100644
index 0000000..c59a093
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.2.0-usertl-cxx
@@ -0,0 +1,10 @@
+--- configure
++++ configure
+@@ -13819,6 +13819,7 @@
+ done
+ ;;
+ esac
++ aix_use_runtimelinking=yes
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
diff --git a/eclass/ELT-patches/aixrtl/2.2.8-cmds-c b/eclass/ELT-patches/aixrtl/2.2.8-cmds-c
new file mode 100644
index 0000000..e1e0934
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.2.8-cmds-c
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -9214,7 +9214,7 @@
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++ archive_expsym_cmds='eval `echo "$soname" | sed -e "s,^,: ,; s,(,; membnam=,; s,\.o),,"`~rm -f -r $lib.d~mkdir -p $lib.d~$CC -o $lib.d/$membnam.o $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags -shared $wl-G$allow_undefined_flag $wl'$exp_sym_flag':$export_symbols~$STRIP -e $lib.d/$membnam.o~( echo "#! $soname"; if test $membnam = shr_64; then echo "# 64"; else echo "# 32"; fi; cat $export_symbols ) > $lib.d/$membnam.imp~$AR $AR_FLAGS $lib $lib.d/$membnam.o $lib.d/$membnam.imp~rm -f -r $lib.d'
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
diff --git a/eclass/ELT-patches/aixrtl/2.2.8-cmds-cxx b/eclass/ELT-patches/aixrtl/2.2.8-cmds-cxx
new file mode 100644
index 0000000..7a31f66
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.2.8-cmds-cxx
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -13307,7 +13307,7 @@
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+- archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++ archive_expsym_cmds_CXX='eval `echo "$soname" | sed -e "s,^,: ,; s,(,; membnam=,; s,\.o),,"`~rm -f -r $lib.d~mkdir -p $lib.d~$CC -o $lib.d/$membnam.o $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags -shared $wl-G$allow_undefined_flag $wl'$exp_sym_flag':$export_symbols~$STRIP -e $lib.d/$membnam.o~( echo "#! $soname"; if test $membnam = shr_64; then echo "# 64"; else echo "# 32"; fi; cat $export_symbols ) > $lib.d/$membnam.imp~$AR $AR_FLAGS $lib $lib.d/$membnam.o $lib.d/$membnam.imp~rm -f -r $lib.d'
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
diff --git a/eclass/ELT-patches/aixrtl/2.4.0-expsym-c b/eclass/ELT-patches/aixrtl/2.4.0-expsym-c
new file mode 100644
index 0000000..6860317
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.4.0-expsym-c
@@ -0,0 +1,14 @@
+--- configure
++++ configure
+@@ -9660,9 +9660,9 @@
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds='`echo $NM | sed -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
diff --git a/eclass/ELT-patches/aixrtl/2.4.0-expsym-cxx b/eclass/ELT-patches/aixrtl/2.4.0-expsym-cxx
new file mode 100644
index 0000000..ca9fd97
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.4.0-expsym-cxx
@@ -0,0 +1,14 @@
+--- configure
++++ configure
+@@ -15711,9 +15711,9 @@
+ # Also, AIX nm treats weak defined symbols like other global defined
+ # symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds_CXX='`echo $NM | sed -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
diff --git a/eclass/ELT-patches/aixrtl/2.4.2.418-cmds-c b/eclass/ELT-patches/aixrtl/2.4.2.418-cmds-c
new file mode 100644
index 0000000..d92ce34
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.4.2.418-cmds-c
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -9214,7 +9214,7 @@
+ fi
+
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
++ archive_expsym_cmds='eval `echo "$soname" | $SED -e "s,^,: ,; s,(,; membnam=,; s,\.o),,"`~$RM -r $lib.d~$MKDIR $lib.d~$CC -o $lib.d/$membnam.o $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags -shared $wl-G$allow_undefined_flag $wl'$exp_sym_flag':$export_symbols~$STRIP -e $lib.d/$membnam.o~( echo "#! $soname"; if test $membnam = shr_64; then echo "# 64"; else echo "# 32"; fi; cat $export_symbols ) > $lib.d/$membnam.imp~$AR $AR_FLAGS $lib $lib.d/$membnam.o $lib.d/$membnam.imp~$RM -r $lib.d'
+ else
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
diff --git a/eclass/ELT-patches/aixrtl/2.4.2.418-cmds-cxx b/eclass/ELT-patches/aixrtl/2.4.2.418-cmds-cxx
new file mode 100644
index 0000000..851be27
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.4.2.418-cmds-cxx
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -13307,7 +13307,7 @@
+
+ hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
+
+- archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
++ archive_expsym_cmds_CXX='eval `echo "$soname" | sed -e "s,^,: ,; s,(,; membnam=,; s,\.o),,"`~$RM -r $lib.d~$MKDIR $lib.d~$CC -o $lib.d/$membnam.o $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags -shared $wl-G$allow_undefined_flag $wl'$exp_sym_flag':$export_symbols~$STRIP -e $lib.d/$membnam.o~( echo "#! $soname"; if test $membnam = shr_64; then echo "# 64"; else echo "# 32"; fi; cat $export_symbols ) > $lib.d/$membnam.imp~$AR $AR_FLAGS $lib $lib.d/$membnam.o $lib.d/$membnam.imp~$RM -r $lib.d'
+ else
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
diff --git a/eclass/ELT-patches/aixrtl/2.4.2.418-soname b/eclass/ELT-patches/aixrtl/2.4.2.418-soname
new file mode 100644
index 0000000..de3e93e
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.4.2.418-soname
@@ -0,0 +1,10 @@
+--- configure
++++ configure
+@@ -14426,6 +14426,7 @@
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
++ [ "${OBJECT_MODE:-32}" = '64' ] && soname_spec='$libname$release$shared_ext$major(shr_64.o)' || soname_spec='$libname$release$shared_ext$major(shr.o)'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
diff --git a/eclass/ELT-patches/aixrtl/2.4.4-with-svr4 b/eclass/ELT-patches/aixrtl/2.4.4-with-svr4
new file mode 100644
index 0000000..f356ea9
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.4.4-with-svr4
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -10835,7 +10835,7 @@
+ if ${lt_cv_with_aix_soname+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+- lt_cv_with_aix_soname=aix
++ lt_cv_with_aix_soname=svr4
+ fi
+
+ with_aix_soname=$lt_cv_with_aix_soname
diff --git a/eclass/ELT-patches/as-needed/1.5 b/eclass/ELT-patches/as-needed/1.5
new file mode 100644
index 0000000..01759c9
--- /dev/null
+++ b/eclass/ELT-patches/as-needed/1.5
@@ -0,0 +1,30 @@
+--- ltmain.sh.orig 2006-03-29 15:45:36.000000000 +0200
++++ ltmain.sh 2006-03-29 16:39:30.000000000 +0200
+@@ -1754,6 +1754,11 @@
+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ ;;
+
++ -Wl,--as-needed|-Wl,--no-as-needed)
++ deplibs="$deplibs $arg"
++ continue
++ ;;
++
+ -Wl,*)
+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+ arg=
+@@ -2094,6 +2099,15 @@
+ lib=
+ found=no
+ case $deplib in
++ -Wl,--as-needed|-Wl,--no-as-needed)
++ if test "$linkmode,$pass" = "prog,link"; then
++ compile_deplibs="$deplib $compile_deplibs"
++ finalize_deplibs="$deplib $finalize_deplibs"
++ else
++ deplibs="$deplib $deplibs"
++ fi
++ continue
++ ;;
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
diff --git a/eclass/ELT-patches/as-needed/1.5.26 b/eclass/ELT-patches/as-needed/1.5.26
new file mode 100644
index 0000000..6836c55
--- /dev/null
+++ b/eclass/ELT-patches/as-needed/1.5.26
@@ -0,0 +1,38 @@
+--- ltmain.sh.orig 2009-04-18 16:51:52.000000000 +0200
++++ ltmain.sh 2009-04-18 16:55:05.000000000 +0200
+@@ -1812,10 +1812,15 @@
+ done
+ IFS="$save_ifs"
+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ ;;
+
++ -Wl,--as-needed|-Wl,--no-as-needed)
++ deplibs="$deplibs $arg"
++ continue
++ ;;
++
+ -Wl,*)
+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+@@ -2152,10 +2157,19 @@
+ fi
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
++ -Wl,--as-needed|-Wl,--no-as-needed)
++ if test "$linkmode,$pass" = "prog,link"; then
++ compile_deplibs="$deplib $compile_deplibs"
++ finalize_deplibs="$deplib $finalize_deplibs"
++ else
++ deplibs="$deplib $deplibs"
++ fi
++ continue
++ ;;
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
diff --git a/eclass/ELT-patches/as-needed/2.2.6 b/eclass/ELT-patches/as-needed/2.2.6
new file mode 100644
index 0000000..7e71de4
--- /dev/null
+++ b/eclass/ELT-patches/as-needed/2.2.6
@@ -0,0 +1,38 @@
+--- ltmain.sh.orig 2009-04-18 14:37:16.000000000 +0200
++++ ltmain.sh 2009-04-18 14:40:08.000000000 +0200
+@@ -4721,10 +4721,15 @@
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
++ -Wl,--as-needed|-Wl,--no-as-needed)
++ deplibs="$deplibs $arg"
++ continue
++ ;;
++
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+@@ -5075,10 +5080,19 @@
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
++ -Wl,--as-needed|-Wl,--no-as-needed)
++ if test "$linkmode,$pass" = "prog,link"; then
++ compile_deplibs="$deplib $compile_deplibs"
++ finalize_deplibs="$deplib $finalize_deplibs"
++ else
++ deplibs="$deplib $deplibs"
++ fi
++ continue
++ ;;
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
diff --git a/eclass/ELT-patches/as-needed/2.4.2 b/eclass/ELT-patches/as-needed/2.4.2
new file mode 100644
index 0000000..526877a
--- /dev/null
+++ b/eclass/ELT-patches/as-needed/2.4.2
@@ -0,0 +1,38 @@
+--- ltmain.sh.orig 2012-08-19 10:18:57.929178597 +0200
++++ ltmain.sh 2012-08-19 10:31:43.409388998 +0200
+@@ -5798,10 +5798,15 @@
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
++ -Wl,--as-needed|-Wl,--no-as-needed)
++ deplibs="$deplibs $arg"
++ continue
++ ;;
++
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+@@ -6158,10 +6163,19 @@
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
++ -Wl,--as-needed|-Wl,--no-as-needed)
++ if test "$linkmode,$pass" = "prog,link"; then
++ compile_deplibs="$deplib $compile_deplibs"
++ finalize_deplibs="$deplib $finalize_deplibs"
++ else
++ deplibs="$deplib $deplibs"
++ fi
++ continue
++ ;;
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
diff --git a/eclass/ELT-patches/as-needed/2.4.3 b/eclass/ELT-patches/as-needed/2.4.3
new file mode 100644
index 0000000..a31e9ed
--- /dev/null
+++ b/eclass/ELT-patches/as-needed/2.4.3
@@ -0,0 +1,38 @@
+--- ltmain.sh
++++ ltmain.sh
+@@ -7225,10 +7225,15 @@
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
++ -Wl,--as-needed|-Wl,--no-as-needed)
++ deplibs="$deplibs $arg"
++ continue
++ ;;
++
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+@@ -7609,10 +7614,19 @@
+
+ for deplib in $libs; do
+ lib=
+ found=false
+ case $deplib in
++ -Wl,--as-needed|-Wl,--no-as-needed)
++ if test "$linkmode,$pass" = "prog,link"; then
++ compile_deplibs="$deplib $compile_deplibs"
++ finalize_deplibs="$deplib $finalize_deplibs"
++ else
++ deplibs="$deplib $deplibs"
++ fi
++ continue
++ ;;
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
diff --git a/eclass/ELT-patches/cross/2.2 b/eclass/ELT-patches/cross/2.2
new file mode 100644
index 0000000..e8fc2be
--- /dev/null
+++ b/eclass/ELT-patches/cross/2.2
@@ -0,0 +1,20 @@
+--- ltmain.sh
++++ ltmain.sh
+@@ -5768,7 +5768,7 @@
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+- add_dir="-L$libdir"
++ add_dir="-L${SYSROOT}$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+@@ -5785,7 +5785,7 @@
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+- add_dir="-L$libdir"
++ add_dir="-L${SYSROOT}/$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
diff --git a/eclass/ELT-patches/cross/2.4 b/eclass/ELT-patches/cross/2.4
new file mode 100644
index 0000000..9b35295
--- /dev/null
+++ b/eclass/ELT-patches/cross/2.4
@@ -0,0 +1,20 @@
+--- ltmain.sh
++++ ltmain.sh
+@@ -5768,7 +5768,7 @@
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+- add_dir="-L$libdir"
++ add_dir="-L${lt_sysroot:-${SYSROOT}}$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+@@ -5785,7 +5785,7 @@
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+- add_dir="-L$libdir"
++ add_dir="-L${lt_sysroot:-${SYSROOT}}/$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
diff --git a/eclass/ELT-patches/cross/2.4.3 b/eclass/ELT-patches/cross/2.4.3
new file mode 100644
index 0000000..760104f
--- /dev/null
+++ b/eclass/ELT-patches/cross/2.4.3
@@ -0,0 +1,21 @@
+--- ltmain.sh
++++ ltmain.sh
+@@ -8367,7 +8367,7 @@
+ test no = "$hardcode_direct_absolute"; then
+ add=$libdir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+- add_dir=-L$libdir
++ add_dir=-L${lt_sysroot:-${SYSROOT}}$libdir
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ case :$finalize_shlibpath: in
+@@ -8384,7 +8384,7 @@
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+- add_dir=-L$libdir
++ add_dir=-L${lt_sysroot:-${SYSROOT}}$libdir
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+
diff --git a/eclass/ELT-patches/darwin-conf/1.5 b/eclass/ELT-patches/darwin-conf/1.5
new file mode 100644
index 0000000..46d9e5a
--- /dev/null
+++ b/eclass/ELT-patches/darwin-conf/1.5
@@ -0,0 +1,24 @@
+In Gentoo Prefix we go by Apple's convention to give modules the .bundle
+extension.
+http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html
+(Above link was removed by Apple, the link below contains a copy:
+http://disanji.net/iOS_Doc/#documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html,
+in case it disappears also, the relevant quote:
+
+Bundle. Bundles are executable files that can be loaded at runtime by
+other products. Plug-ins are implemented using bundles. The term bundle
+in this context refers to the binary itself, not to a structured
+hierarchy. Bundles have the .bundle extension; for example,
+MyBundle.bundle.)
+
+--- configure.orig 2009-05-22 12:05:31 +0200
++++ configure 2009-05-22 12:05:39 +0200
+@@ -15461,7 +15461,7 @@
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
++ shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
diff --git a/eclass/ELT-patches/darwin-conf/1.5b b/eclass/ELT-patches/darwin-conf/1.5b
new file mode 100644
index 0000000..65633a8
--- /dev/null
+++ b/eclass/ELT-patches/darwin-conf/1.5b
@@ -0,0 +1,33 @@
+In Gentoo Prefix we go by Apple's convention to give modules the .bundle
+extension.
+http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html
+(Above link was removed by Apple, the link below contains a copy:
+http://disanji.net/iOS_Doc/#documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html,
+in case it disappears also, the relevant quote:
+
+Bundle. Bundles are executable files that can be loaded at runtime by
+other products. Plug-ins are implemented using bundles. The term bundle
+in this context refers to the binary itself, not to a structured
+hierarchy. Bundles have the .bundle extension; for example,
+MyBundle.bundle.)
+
+--- configure
++++ configure
+@@ -10570,7 +10570,7 @@
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
++ shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+@@ -14213,7 +14213,7 @@
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
++ shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
+
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
diff --git a/eclass/ELT-patches/darwin-conf/2.2.4 b/eclass/ELT-patches/darwin-conf/2.2.4
new file mode 100644
index 0000000..5ad8293
--- /dev/null
+++ b/eclass/ELT-patches/darwin-conf/2.2.4
@@ -0,0 +1,29 @@
+In Gentoo Prefix we go by Apple's convention to give modules the .bundle
+extension.
+http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html
+(Above link was removed by Apple, the link below contains a copy:
+http://disanji.net/iOS_Doc/#documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html,
+in case it disappears also, the relevant quote:
+
+Bundle. Bundles are executable files that can be loaded at runtime by
+other products. Plug-ins are implemented using bundles. The term bundle
+in this context refers to the binary itself, not to a structured
+hierarchy. Bundles have the .bundle extension; for example,
+MyBundle.bundle.)
+
+--- configure
++++ configure
+@@ -12172,11 +12172,11 @@
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
++ library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
++ shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
diff --git a/eclass/ELT-patches/darwin-conf/2.2.6 b/eclass/ELT-patches/darwin-conf/2.2.6
new file mode 100644
index 0000000..669a68d
--- /dev/null
+++ b/eclass/ELT-patches/darwin-conf/2.2.6
@@ -0,0 +1,43 @@
+In Gentoo Prefix we go by Apple's convention to give modules the .bundle
+extension.
+http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html
+(Above link was removed by Apple, the link below contains a copy:
+http://disanji.net/iOS_Doc/#documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html,
+in case it disappears also, the relevant quote:
+
+Bundle. Bundles are executable files that can be loaded at runtime by
+other products. Plug-ins are implemented using bundles. The term bundle
+in this context refers to the binary itself, not to a structured
+hierarchy. Bundles have the .bundle extension; for example,
+MyBundle.bundle.)
+
+--- configure
++++ configure
+@@ -11455,11 +11455,11 @@
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
++ library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
++ shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+@@ -15321,11 +15331,11 @@
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
++ library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
++ shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
+
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
diff --git a/eclass/ELT-patches/darwin-conf/2.4.6 b/eclass/ELT-patches/darwin-conf/2.4.6
new file mode 100644
index 0000000..a67ba12
--- /dev/null
+++ b/eclass/ELT-patches/darwin-conf/2.4.6
@@ -0,0 +1,29 @@
+In Gentoo Prefix we go by Apple's convention to give modules the .bundle
+extension.
+http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html
+(Above link was removed by Apple, the link below contains a copy:
+http://disanji.net/iOS_Doc/#documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html,
+in case it disappears also, the relevant quote:
+
+Bundle. Bundles are executable files that can be loaded at runtime by
+other products. Plug-ins are implemented using bundles. The term bundle
+in this context refers to the binary itself, not to a structured
+hierarchy. Bundles have the .bundle extension; for example,
+MyBundle.bundle.)
+
+--- configure
++++ configure
+@@ -13108,11 +13108,11 @@
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
++ library_names_spec='${libname}${release}${versuffix}$shared_ext $libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
++ shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
diff --git a/eclass/ELT-patches/darwin-ltconf/1.2.0 b/eclass/ELT-patches/darwin-ltconf/1.2.0
new file mode 100644
index 0000000..da9f7e4
--- /dev/null
+++ b/eclass/ELT-patches/darwin-ltconf/1.2.0
@@ -0,0 +1,66 @@
+--- ltconfig-1.2 Wed May 19 09:17:36 1999
++++ ltconfig Wed Oct 6 14:29:08 2004
+@@ -459,6 +459,11 @@
+ os2*)
+ # We can build DLLs from non-PIC.
+ ;;
++ darwin* | rhapsody*)
++ # PIC is the default on this platform
++ # Common symbols not allowed in MH_DYLIB files
++ pic_flag='-fno-common'
++ ;;
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+@@ -785,6 +790,23 @@
+ hardcode_shlibpath_var=no
+ ;;
+
++ darwin* | rhapsody*)
++ case "$host_os" in
++ rhapsody* | darwin1.[012])
++ allow_undefined_flag='-undefined suppress'
++ ;;
++ *) # Darwin 1.3 on
++ allow_undefined_flag='-flat_namespace -undefined suppress'
++ ;;
++ esac
++ archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
++ # We need to add '_' to the symbols in $export_symbols first
++ #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
++ hardcode_direct=yes
++ hardcode_shlibpath_var=no
++ whole_archive_flag_spec='-all_load $convenience'
++ ;;
++
+ hpux9*)
+ archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib'
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+@@ -1134,6 +1156,27 @@
+ version_type=sunos
+ library_names_spec='${libname}${release}.so.$versuffix'
+ shlibpath_var=LD_LIBRARY_PATH
++ ;;
++
++darwin* | rhapsody*)
++ dynamic_linker="$host_os dyld"
++ version_type=darwin
++ need_lib_prefix=no
++ need_version=no
++ deplibs_check_method='file_magic Mach-O dynamically linked shared library'
++ file_magic_cmd='/usr/bin/file -L'
++ case "$host_os" in
++ rhapsody* | darwin1.[012])
++ file_magic_test_file='/System/Library/Frameworks/System.framework/System'
++ ;;
++ *) # Darwin 1.3 on
++ file_magic_test_file='/usr/lib/libSystem.dylib'
++ ;;
++ esac
++ library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
++ soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
++ shlibpath_overrides_runpath=yes
++ shlibpath_var=DYLD_LIBRARY_PATH
+ ;;
+
+ hpux9* | hpux10*)
diff --git a/eclass/ELT-patches/darwin-ltconf/1.3.0 b/eclass/ELT-patches/darwin-ltconf/1.3.0
new file mode 100644
index 0000000..49ae67d
--- /dev/null
+++ b/eclass/ELT-patches/darwin-ltconf/1.3.0
@@ -0,0 +1,67 @@
+--- ltconfig.darwin 2000-02-02 19:53:22.000000000 -0500
++++ ltconfig 2004-09-23 20:25:11.000000000 -0400
+@@ -678,6 +678,11 @@
+ cygwin* | mingw* | os2*)
+ # We can build DLLs from non-PIC.
+ ;;
++ darwin* | rhapsody*)
++ # PIC is the default on this platform
++ # Common symbols not allowed in MH_DYLIB files
++ pic_flag='-fno-common'
++ ;;
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+@@ -1361,6 +1372,23 @@
+ hardcode_shlibpath_var=no
+ ;;
+
++ darwin* | rhapsody*)
++ case "$host_os" in
++ rhapsody* | darwin1.[012])
++ allow_undefined_flag='-undefined suppress'
++ ;;
++ *) # Darwin 1.3 on
++ allow_undefined_flag='-flat_namespace -undefined suppress'
++ ;;
++ esac
++ archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
++ # We need to add '_' to the symbols in $export_symbols first
++ #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
++ hardcode_direct=yes
++ hardcode_shlibpath_var=no
++ whole_archive_flag_spec='-all_load $convenience'
++ ;;
++
+ hpux9* | hpux10* | hpux11*)
+ case "$host_os" in
+ hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
+@@ -1897,6 +1931,27 @@
+ esac
+ ;;
+
++darwin* | rhapsody*)
++ dynamic_linker="$host_os dyld"
++ version_type=darwin
++ need_lib_prefix=no
++ need_version=no
++ deplibs_check_method='file_magic Mach-O dynamically linked shared library'
++ file_magic_cmd='/usr/bin/file -L'
++ case "$host_os" in
++ rhapsody* | darwin1.[012])
++ file_magic_test_file='/System/Library/Frameworks/System.framework/System'
++ ;;
++ *) # Darwin 1.3 on
++ file_magic_test_file='/usr/lib/libSystem.dylib'
++ ;;
++ esac
++ library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
++ soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
++ shlibpath_overrides_runpath=yes
++ shlibpath_var=DYLD_LIBRARY_PATH
++ ;;
++
+ gnu*)
+ version_type=linux
+ need_lib_prefix=no
+
diff --git a/eclass/ELT-patches/darwin-ltmain/1.2.0 b/eclass/ELT-patches/darwin-ltmain/1.2.0
new file mode 100644
index 0000000..aaab86a
--- /dev/null
+++ b/eclass/ELT-patches/darwin-ltmain/1.2.0
@@ -0,0 +1,40 @@
+--- ltmain.sh-1.2 Wed May 19 09:17:36 1999
++++ ltmain.sh Wed Oct 6 14:38:37 2004
+@@ -967,6 +967,16 @@
+ versuffix="$current.$revision"
+ ;;
+
++ darwin)
++ # Like Linux, but with the current version available in
++ # verstring for coding it into the library header
++ major=.`expr $current - $age`
++ versuffix="$major.$age.$revision"
++ # Darwin ld doesn't like 0 for these options...
++ minor_current=`expr $current + 1`
++ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
++ ;;
++
+ *)
+ $echo "$modename: unknown library version type \`$version_type'" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+@@ -1000,9 +1010,17 @@
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+- # Add libc to deplibs on all systems.
+- dependency_libs="$deplibs"
+- deplibs="$deplibs -lc"
++ case "$version_type" in
++ rhapsody|darwin)
++ # Rhapsody C library is in the System framework
++ deplibs="$deplibs -framework System"
++ ;;
++ *)
++ # Add libc to deplibs on all other systems.
++ dependency_libs="$deplibs"
++ deplibs="$deplibs -lc"
++ ;;
++ esac
+
+ if test "$build_libtool_libs" = yes; then
+ # Get the real and link names of the library.
diff --git a/eclass/ELT-patches/darwin-ltmain/1.3.0 b/eclass/ELT-patches/darwin-ltmain/1.3.0
new file mode 100644
index 0000000..7148efb
--- /dev/null
+++ b/eclass/ELT-patches/darwin-ltmain/1.3.0
@@ -0,0 +1,64 @@
+--- ltmain.sh.darwin 2000-02-02 19:53:22.000000000 -0500
++++ ltmain.sh 2004-09-23 20:25:11.000000000 -0400
+@@ -24,6 +24,8 @@
+ # configuration script generated by Autoconf, you may include it under
+ # the same distribution terms that you use for the rest of that program.
+
++_S_=${LIBTOOL_CMD_SEP-\~}
++
+ # Check that we have a working $echo.
+ if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+@@ -1079,6 +1079,11 @@
+ # These systems don't actually have c library (as such)
+ continue
+ ;;
++ *-*-rhapsody* | *-*-darwin1.[012])
++ # Rhapsody C library is in the System framework
++ deplibs="$deplibs -framework System"
++ continue
++ ;;
+ esac
+ elif test "$arg" = "-lm"; then
+ case "$host" in
+@@ -1086,6 +1091,11 @@
+ # These systems don't actually have math library (as such)
+ continue
+ ;;
++ *-*-rhapsody* | *-*-darwin1.[012])
++ # Rhapsody math library is in the System framework
++ deplibs="$deplibs -framework System"
++ continue
++ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+@@ -1753,6 +1763,16 @@
+ versuffix="-$major-$age-$revision"
+ ;;
+
++ darwin)
++ # Like Linux, but with the current version available in
++ # verstring for coding it into the library header
++ major=.`expr $current - $age`
++ versuffix="$major.$age.$revision"
++ # Darwin ld doesn't like 0 for these options...
++ minor_current=`expr $current + 1`
++ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
++ ;;
++
+ *)
+ $echo "$modename: unknown library version type \`$version_type'" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+@@ -1795,6 +1824,10 @@
+ *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
+ # these systems don't actually have a c library (as such)!
+ ;;
++ *-*-rhapsody* | *-*-darwin1.[012])
++ # Rhapsody C library is in the System framework
++ deplibs="$deplibs -framework System"
++ ;;
+ *)
+ # Add libc to deplibs on all other systems.
+ deplibs="$deplibs -lc"
+
diff --git a/eclass/ELT-patches/deplibs/1.5 b/eclass/ELT-patches/deplibs/1.5
new file mode 100644
index 0000000..36c507a
--- /dev/null
+++ b/eclass/ELT-patches/deplibs/1.5
@@ -0,0 +1,18 @@
+--- libtool.orig 2009-07-15 16:25:32 +0200
++++ libtool 2009-07-15 16:51:56 +0200
+@@ -3319,7 +3319,14 @@
+ ;;
+ esac
+ if grep "^installed=no" $deplib > /dev/null; then
+- path="$absdir/$objdir"
++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
++ eval library_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
++ for library_name in ${library_names}; do :; done
++ if test $mode = relink && test -f "${inst_prefix_dir}${libdir}/${library_name}"; then
++ path="${inst_prefix_dir}${libdir}"
++ else
++ path="$absdir/$objdir"
++ fi
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ if test -z "$libdir"; then
diff --git a/eclass/ELT-patches/deplibs/2.1b b/eclass/ELT-patches/deplibs/2.1b
new file mode 100644
index 0000000..3df590d
--- /dev/null
+++ b/eclass/ELT-patches/deplibs/2.1b
@@ -0,0 +1,18 @@
+--- ltmain-release-2-1b.in 2009-06-22 15:33:26.000000000 +0200
++++ ltmain-release-2-1b.in.new 2009-07-15 16:59:45.000000000 +0200
+@@ -4946,7 +4946,14 @@
+ fi
+ ;;
+ *)
+- path="-L$absdir/$objdir"
++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
++ eval library_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
++ for library_name in ${library_names}; do :; done
++ if test $mode = relink && test -f "${inst_prefix_dir}${libdir}/${library_name}"; then
++ path="-L${inst_prefix_dir}${libdir}"
++ else
++ path="-L$absdir/$objdir"
++ fi
+ ;;
+ esac
+ else
diff --git a/eclass/ELT-patches/fbsd-conf/00broken-libglade b/eclass/ELT-patches/fbsd-conf/00broken-libglade
new file mode 100644
index 0000000..df3c438
--- /dev/null
+++ b/eclass/ELT-patches/fbsd-conf/00broken-libglade
@@ -0,0 +1,33 @@
+Index: tiff-3.8.2/configure
+===================================================================
+--- tiff-3.8.2.orig/configure
++++ tiff-3.8.2/configure
+@@ -8199,7 +8199,14 @@ freebsd* | dragonfly*)
+ *) objformat=elf ;;
+ esac
+ fi
+- version_type=freebsd-$objformat
++ # Handle Gentoo/FreeBSD as it was Linux
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -8210,6 +8216,12 @@ freebsd* | dragonfly*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in \ No newline at end of file
diff --git a/eclass/ELT-patches/fbsd-conf/1.4.0 b/eclass/ELT-patches/fbsd-conf/1.4.0
new file mode 100644
index 0000000..b986f8d
--- /dev/null
+++ b/eclass/ELT-patches/fbsd-conf/1.4.0
@@ -0,0 +1,32 @@
+Index: expat-1.95.8/configure
+===================================================================
+--- expat-1.95.8.orig/configure
++++ expat-1.95.8/configure
+@@ -5479,7 +5479,13 @@ freebsd1*)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+@@ -5490,6 +5496,12 @@ freebsd*)
+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}.so'
++ soname_spec='${libname}${release}.so$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
diff --git a/eclass/ELT-patches/fbsd-conf/1.5.10 b/eclass/ELT-patches/fbsd-conf/1.5.10
new file mode 100644
index 0000000..90c6347
--- /dev/null
+++ b/eclass/ELT-patches/fbsd-conf/1.5.10
@@ -0,0 +1,120 @@
+Index: libiconv-1.10/configure
+===================================================================
+--- libiconv-1.10.orig/configure
++++ libiconv-1.10/configure
+@@ -8902,7 +8902,14 @@ kfreebsd*-gnu)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ # Gentoo/FreeBSD uses linux-style versioning to be user-friendly.
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -8913,6 +8920,12 @@ freebsd*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -12620,7 +12633,14 @@ kfreebsd*-gnu)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ # Gentoo/FreeBSD uses linux-style versioning to be user-friendly.
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -12631,6 +12651,12 @@ freebsd*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -15784,7 +15810,14 @@ kfreebsd*-gnu)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ # Gentoo/FreeBSD uses linux-style versioning to be user-friendly.
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -15795,6 +15828,12 @@ freebsd*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -18150,7 +18189,14 @@ kfreebsd*-gnu)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ # Gentoo/FreeBSD uses linux-style versioning to be user-friendly.
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -18161,6 +18207,12 @@ freebsd*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
diff --git a/eclass/ELT-patches/fbsd-conf/1.5.18 b/eclass/ELT-patches/fbsd-conf/1.5.18
new file mode 100644
index 0000000..0636ceb
--- /dev/null
+++ b/eclass/ELT-patches/fbsd-conf/1.5.18
@@ -0,0 +1,116 @@
+Index: libtool-1.5.18/configure
+===================================================================
+--- libtool-1.5.18.orig/configure
++++ libtool-1.5.18/configure
+@@ -8433,7 +8433,13 @@ freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -8444,6 +8450,12 @@ freebsd* | dragonfly*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -12205,7 +12217,13 @@ freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -12216,6 +12234,12 @@ freebsd* | dragonfly*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -15461,7 +15485,13 @@ freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -15472,6 +15502,12 @@ freebsd* | dragonfly*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -17929,7 +17965,13 @@ freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -17940,6 +17982,12 @@ freebsd* | dragonfly*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
diff --git a/eclass/ELT-patches/fbsd-conf/1.5.20 b/eclass/ELT-patches/fbsd-conf/1.5.20
new file mode 100644
index 0000000..e17920f
--- /dev/null
+++ b/eclass/ELT-patches/fbsd-conf/1.5.20
@@ -0,0 +1,116 @@
+Index: libtool-1.5.20/configure
+===================================================================
+--- libtool-1.5.20.orig/configure
++++ libtool-1.5.20/configure
+@@ -8441,7 +8441,13 @@ freebsd* | dragonfly*)
+ *) objformat=elf ;;
+ esac
+ fi
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -8452,6 +8458,12 @@ freebsd* | dragonfly*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -12228,7 +12240,13 @@ freebsd* | dragonfly*)
+ *) objformat=elf ;;
+ esac
+ fi
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -12239,6 +12257,12 @@ freebsd* | dragonfly*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -15492,7 +15516,13 @@ freebsd* | dragonfly*)
+ *) objformat=elf ;;
+ esac
+ fi
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -15503,6 +15533,12 @@ freebsd* | dragonfly*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -17968,7 +18004,13 @@ freebsd* | dragonfly*)
+ *) objformat=elf ;;
+ esac
+ fi
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -17979,6 +18021,12 @@ freebsd* | dragonfly*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
diff --git a/eclass/ELT-patches/fbsd-conf/1.5.20b b/eclass/ELT-patches/fbsd-conf/1.5.20b
new file mode 100644
index 0000000..0659b1c
--- /dev/null
+++ b/eclass/ELT-patches/fbsd-conf/1.5.20b
@@ -0,0 +1,61 @@
+Index: tiff-3.8.2/configure
+===================================================================
+--- tiff-3.8.2.orig/configure
++++ tiff-3.8.2/configure
+@@ -8199,7 +8199,14 @@ freebsd* | dragonfly*)
+ *) objformat=elf ;;
+ esac
+ fi
+- version_type=freebsd-$objformat
++ # Handle Gentoo/FreeBSD as it was Linux
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -8210,6 +8216,12 @@ freebsd* | dragonfly*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -19253,7 +19265,13 @@ freebsd* | dragonfly*)
+ *) objformat=elf ;;
+ esac
+ fi
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -19264,6 +19282,12 @@ freebsd* | dragonfly*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
diff --git a/eclass/ELT-patches/fbsd-conf/1.9f b/eclass/ELT-patches/fbsd-conf/1.9f
new file mode 100644
index 0000000..f16ddb8
--- /dev/null
+++ b/eclass/ELT-patches/fbsd-conf/1.9f
@@ -0,0 +1,60 @@
+Index: libtorrent-0.10.0/configure
+===================================================================
+--- libtorrent-0.10.0.orig/configure
++++ libtorrent-0.10.0/configure
+@@ -8173,7 +8173,13 @@ kfreebsd*-gnu)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || $ECHO aout`
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -8184,6 +8190,12 @@ freebsd*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -12461,7 +12473,13 @@ kfreebsd*-gnu)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || $ECHO aout`
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -12472,6 +12490,12 @@ freebsd*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
diff --git a/eclass/ELT-patches/fbsd-ltconf/1.2.0 b/eclass/ELT-patches/fbsd-ltconf/1.2.0
new file mode 100644
index 0000000..7d2f554
--- /dev/null
+++ b/eclass/ELT-patches/fbsd-ltconf/1.2.0
@@ -0,0 +1,26 @@
+Index: jpeg-6b/ltconfig
+===================================================================
+--- jpeg-6b.orig/ltconfig
++++ jpeg-6b/ltconfig
+@@ -1126,9 +1126,18 @@ amigaos*)
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+ ;;
+
+-freebsd2* | freebsd3*)
+- version_type=sunos
+- library_names_spec='${libname}${release}.so.$versuffix $libname.so'
++freebsd[234567]*)
++ case $host_vendor in
++ gentoo)
++ version_type=linux
++ library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}.so'
++ soname_spec='${libname}${release}.so.$major'
++ ;;
++ *)
++ version_type=sunos
++ library_names_spec='${libname}${release}.so.$versuffix $libname.so'
++ ;;
++ esac
+ finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
diff --git a/eclass/ELT-patches/fbsd-ltconf/1.3.0 b/eclass/ELT-patches/fbsd-ltconf/1.3.0
new file mode 100644
index 0000000..69aa94e
--- /dev/null
+++ b/eclass/ELT-patches/fbsd-ltconf/1.3.0
@@ -0,0 +1,32 @@
+Index: libtool-1.3.5/ltconfig
+===================================================================
+--- libtool-1.3.5.orig/ltconfig
++++ libtool-1.3.5/ltconfig
+@@ -1888,7 +1888,13 @@ freebsd1*)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case "$version_type" in
+ freebsd-elf*)
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+@@ -1903,6 +1909,12 @@ freebsd*)
+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}.so'
++ soname_spec='${libname}${release}.so$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case "$host_os" in
diff --git a/eclass/ELT-patches/fbsd-ltconf/1.4a b/eclass/ELT-patches/fbsd-ltconf/1.4a
new file mode 100644
index 0000000..0008407
--- /dev/null
+++ b/eclass/ELT-patches/fbsd-ltconf/1.4a
@@ -0,0 +1,32 @@
+Index: binutils-2.16.1/ltconfig
+===================================================================
+--- binutils-2.16.1.orig/ltconfig
++++ binutils-2.16.1/ltconfig
+@@ -1129,7 +1129,13 @@ freebsd1*)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+@@ -1141,6 +1147,12 @@ freebsd*)
+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}.so'
++ soname_spec='${libname}${release}.so$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
diff --git a/eclass/ELT-patches/fbsd-ltconf/1.4a-GCC3.0 b/eclass/ELT-patches/fbsd-ltconf/1.4a-GCC3.0
new file mode 100644
index 0000000..e88bb45
--- /dev/null
+++ b/eclass/ELT-patches/fbsd-ltconf/1.4a-GCC3.0
@@ -0,0 +1,32 @@
+Index: binutils-2.16.1/ltconfig
+===================================================================
+--- binutils-2.16.1.orig/ltconfig
++++ binutils-2.16.1/ltconfig
+@@ -1129,7 +1129,13 @@ freebsd1*)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
+- version_type=freebsd-$objformat
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+@@ -1141,6 +1147,12 @@ freebsd*)
+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}.so'
++ soname_spec='${libname}${release}.so$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
diff --git a/eclass/ELT-patches/fix-relink/1.4.0 b/eclass/ELT-patches/fix-relink/1.4.0
new file mode 100644
index 0000000..1b12c9b
--- /dev/null
+++ b/eclass/ELT-patches/fix-relink/1.4.0
@@ -0,0 +1,63 @@
+--- ltmain.sh 2003-09-24 18:22:17.528129376 +0200
++++ ltmain.sh 2003-09-24 18:23:17.101072912 +0200
+@@ -1582,6 +1582,8 @@
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ tmp_libs=
++ # PKGW
++ dependency_libs=
+ for deplib in $dependency_libs; do
+ #echo "Adding $deplib to \$deplibs"
+ deplibs="$deplib $deplibs"
+@@ -1699,6 +1701,8 @@
+ fi
+
+ tmp_libs=
++ #PKGW
++ dependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+@@ -1860,6 +1864,16 @@
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
++ # Try looking first in the location we're being installed to.
++ if test -n "$inst_prefix_dir"; then
++ case "$libdir" in
++ [\\/]*)
++ # Add the install location to the beginning, minimising possiblilty
++ # of linking to older version of the lib already installed.
++ add_dir="-L$inst_prefix_dir$libdir $add_dir"
++ ;;
++ esac
++ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+@@ -1918,6 +1932,16 @@
+ 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
++ [\\/]*)
++ # Add the install location to the beginning, minimising possiblilty
++ # of linking to older version of the lib already installed.
++ add_dir="-L$inst_prefix_dir$libdir $add_dir"
++ ;;
++ esac
++ fi
+ add="-l$name"
+ fi
+
+@@ -2117,7 +2141,7 @@
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+- *) tmp_libs="$tmp_libs $deplib" ;;
++ *) tmp_libs="$deplib $tmp_libs" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
diff --git a/eclass/ELT-patches/fix-relink/1.4.3 b/eclass/ELT-patches/fix-relink/1.4.3
new file mode 100644
index 0000000..959fe1d
--- /dev/null
+++ b/eclass/ELT-patches/fix-relink/1.4.3
@@ -0,0 +1,62 @@
+--- ltmain.sh 2003-09-24 19:48:39.367370072 +0200
++++ ltmain.sh 2003-09-24 19:49:31.773403144 +0200
+@@ -1593,6 +1593,8 @@
+ convenience="$convenience $ladir/$objdir/$old_library"
+ old_convenience="$old_convenience $ladir/$objdir/$old_library"
+ tmp_libs=
++ # PKGW
++ dependency_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if test "X$duplicate_deps" = "Xyes" ; then
+@@ -1710,6 +1712,8 @@
+ fi
+
+ tmp_libs=
++ #PKGW
++ dependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+@@ -1871,6 +1875,16 @@
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
++ # Try looking first in the location we're being installed to.
++ if test -n "$inst_prefix_dir"; then
++ case "$libdir" in
++ [\\/]*)
++ # Add the install location to the beginning, minimising possiblilty
++ # of linking to older version of the lib already installed.
++ add_dir="-L$inst_prefix_dir$libdir $add_dir"
++ ;;
++ esac
++ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+@@ -1938,11 +1952,13 @@
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ # Try looking first in the location we're being installed to.
+- add_dir=
++ add_dir="-L$dir"
+ if test -n "$inst_prefix_dir"; then
+ case "$libdir" in
+ [\\/]*)
+- add_dir="-L$inst_prefix_dir$libdir"
++ # Add the install location to the beginning, minimising possiblilty
++ # of linking to older version of the lib already installed.
++ add_dir="-L$inst_prefix_dir$libdir $add_dir"
+ ;;
+ esac
+ fi
+@@ -2146,7 +2162,7 @@
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+- *) tmp_libs="$tmp_libs $deplib" ;;
++ *) tmp_libs="$deplib $tmp_libs" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
diff --git a/eclass/ELT-patches/fix-relink/1.5.0 b/eclass/ELT-patches/fix-relink/1.5.0
new file mode 100644
index 0000000..29b7db7
--- /dev/null
+++ b/eclass/ELT-patches/fix-relink/1.5.0
@@ -0,0 +1,51 @@
+--- ltmain.sh 2003-09-24 18:18:14.961005184 +0200
++++ ltmain.sh 2003-09-24 18:20:11.204333512 +0200
+@@ -2022,6 +2022,8 @@
+ convenience="$convenience $ladir/$objdir/$old_library"
+ old_convenience="$old_convenience $ladir/$objdir/$old_library"
+ tmp_libs=
++ # PKGW
++ dependency_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if test "X$duplicate_deps" = "Xyes" ; then
+@@ -2143,6 +2145,8 @@
+ fi
+
+ tmp_libs=
++ #PKGW
++ dependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+@@ -2359,7 +2363,9 @@
+ if test -n "$inst_prefix_dir"; then
+ case "$libdir" in
+ [\\/]*)
+- add_dir="$add_dir -L$inst_prefix_dir$libdir"
++ # Add the install location to the beginning, minimising possiblilty
++ # of linking to older version of the lib already installed.
++ add_dir="-L$inst_prefix_dir$libdir $add_dir"
+ ;;
+ esac
+ fi
+@@ -2431,7 +2437,9 @@
+ if test -n "$inst_prefix_dir"; then
+ case "$libdir" in
+ [\\/]*)
+- add_dir="$add_dir -L$inst_prefix_dir$libdir"
++ # Add the install location to the beginning, minimising possiblilty
++ # of linking to older version of the lib already installed.
++ add_dir="-L$inst_prefix_dir$libdir $add_dir"
+ ;;
+ esac
+ fi
+@@ -2691,7 +2699,7 @@
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+- *) tmp_libs="$tmp_libs $deplib" ;;
++ *) tmp_libs="$deplib $tmp_libs" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
diff --git a/eclass/ELT-patches/gold-conf/2.2.6 b/eclass/ELT-patches/gold-conf/2.2.6
new file mode 100644
index 0000000..048cbad
--- /dev/null
+++ b/eclass/ELT-patches/gold-conf/2.2.6
@@ -0,0 +1,10 @@
+--- configure.orig
++++ configure
+@@ -9933,6 +9933,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
++ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
diff --git a/eclass/ELT-patches/hardcode-relink/1.3d b/eclass/ELT-patches/hardcode-relink/1.3d
new file mode 100644
index 0000000..dc7819f
--- /dev/null
+++ b/eclass/ELT-patches/hardcode-relink/1.3d
@@ -0,0 +1,8 @@
+--- ltmain.sh
++++ ltmain.sh
+@@ -2208,4 +2208,4 @@
+ relink)
+- if test "$hardcode_direct" = yes; then
++ if false && test "$hardcode_direct" = yes; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
diff --git a/eclass/ELT-patches/hardcode/1.3d b/eclass/ELT-patches/hardcode/1.3d
new file mode 100644
index 0000000..7408b37
--- /dev/null
+++ b/eclass/ELT-patches/hardcode/1.3d
@@ -0,0 +1,21 @@
+http://lists.gnu.org/archive/html/bug-libtool/2008-03/msg00124.html
+
+but this patch disables hardcoding independent of inst_prefix_dir at all,
+for both hardcode_direct=yes and hardcode_minus_L=yes.
+
+If you update this patch, please also update libtool/files/libtool-1.3d-hardcode.patch
+
+--- ltmain.in.orig 2008-04-16 15:54:04.000000000 +0200
++++ ltmain.in 2008-04-16 16:21:04.000000000 +0200
+@@ -1900,9 +1900,9 @@
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+- if test "$hardcode_direct" = yes; then
++ if false && test "$hardcode_direct" = yes; then
+ add="$libdir/$linklib"
+- elif test "$hardcode_minus_L" = yes; then
++ elif false && test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
diff --git a/eclass/ELT-patches/hardcode/2.1b b/eclass/ELT-patches/hardcode/2.1b
new file mode 100644
index 0000000..48571f3
--- /dev/null
+++ b/eclass/ELT-patches/hardcode/2.1b
@@ -0,0 +1,36 @@
+Hardcoding library path does not work with DESTDIR installs.
+
+Affects any platform with 'hardcode_direct=yes' or 'hardcode_minus_L=yes'.
+According to libtool.m4 (as of libtool-1.5.26), these are:
+ *-aix*
+ *-hpux9
+ hppa-hpux* (not hppa64 or ia64)
+ *-netbsd
+ *-openbsd
+ *-freebsd
+ *-dragonfly
+ *-newsos6
+ *-os2
+ *-amigaos
+ *-sunos4
+ *-sysv4
+It definitely is required for aix (to support DESTDIR),
+although it should help for others too...
+
+--- ../../libtool.orig 2009-07-16 18:06:59 +0200
++++ ../../libtool 2009-07-16 18:07:45 +0200
+@@ -6298,13 +6298,13 @@
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+- elif test "$hardcode_minus_L" = yes; then
++ elif false && test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
diff --git a/eclass/ELT-patches/hc-flag-ld/1.5 b/eclass/ELT-patches/hc-flag-ld/1.5
new file mode 100644
index 0000000..bf88873
--- /dev/null
+++ b/eclass/ELT-patches/hc-flag-ld/1.5
@@ -0,0 +1,18 @@
+http://lists.gnu.org/archive/html/libtool/2006-01/msg00012.html
+
+--- ltmain.sh.orig 2007-11-19 17:07:34.946648000 +0100
++++ ltmain.sh 2007-11-19 17:07:57.785975000 +0100
+@@ -3915,8 +3915,11 @@
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+- else
++ case $archive_cmds in
++ *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
++ *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
++ esac
++ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ fi
diff --git a/eclass/ELT-patches/hpux-conf/1.5.22-syslibpath b/eclass/ELT-patches/hpux-conf/1.5.22-syslibpath
new file mode 100644
index 0000000..27fef48
--- /dev/null
+++ b/eclass/ELT-patches/hpux-conf/1.5.22-syslibpath
@@ -0,0 +1,24 @@
+must not search /usr/local in prefix
+
+--- configure.orig 2007-12-02 19:14:55 +0100
++++ configure 2007-12-02 19:14:59 +0100
+@@ -8920,9 +8920,17 @@
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
++ if test "$GCC" = yes; then
++ sys_lib_search_path_spec="${sys_lib_search_path_spec} /usr/lib/hpux32"
++ else
++ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
++ fi
+ else
+- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
++ if test "$GCC" = yes; then
++ sys_lib_search_path_spec="${sys_lib_search_path_spec} /usr/lib/hpux64"
++ else
++ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
++ fi
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
diff --git a/eclass/ELT-patches/install-sh/1.5 b/eclass/ELT-patches/install-sh/1.5
new file mode 100644
index 0000000..1b8b20b
--- /dev/null
+++ b/eclass/ELT-patches/install-sh/1.5
@@ -0,0 +1,14 @@
+--- install-sh 2007-07-04 14:36:49 +0100
++++ install-sh 2007-09-14 11:00:41 +0100
+@@ -192,7 +192,10 @@
+
+ if [ x"$dir_arg" != x ]
+ then
+- $doit $instcmd $dst &&
++ { $doit $instcmd "$dst" || lasterr=$?
++ # It's ok for mkdir to fail if the directory already exists.
++ test -d "$dst" || { (exit ${lasterr-1}); exit; }
++ } &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
diff --git a/eclass/ELT-patches/install-sh/1.5.4 b/eclass/ELT-patches/install-sh/1.5.4
new file mode 100644
index 0000000..0b1c220
--- /dev/null
+++ b/eclass/ELT-patches/install-sh/1.5.4
@@ -0,0 +1,14 @@
+--- install-sh 2006-03-25 20:04:46 +0000
++++ install-sh 2007-09-14 10:53:29 +0100
+@@ -246,7 +246,10 @@
+ fi
+
+ if test -n "$dir_arg"; then
+- $doit $mkdircmd "$dst" \
++ { $doit $mkdircmd "$dst" || lasterr=$?
++ # It's ok for mkdir to fail if the directory already exists.
++ test -d "$dst" || { (exit ${lasterr-1}); exit; }
++ } \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
diff --git a/eclass/ELT-patches/install-sh/1.5.6 b/eclass/ELT-patches/install-sh/1.5.6
new file mode 100644
index 0000000..d107740
--- /dev/null
+++ b/eclass/ELT-patches/install-sh/1.5.6
@@ -0,0 +1,14 @@
+--- install-sh 2006-03-14 12:57:54 -0300
++++ install-sh 2008-06-19 22:23:04 -0300
+@@ -240,7 +240,10 @@
+ fi
+
+ if test -n "$dir_arg"; then
+- $doit $instcmd "$dst" \
++ { $doit $instcmd "$dst" || lasterr=$?
++ # It's ok for mkdir to fail if the directory already exists.
++ test -d "$dst" || { (exit ${lasterr-1}); exit; }
++ } \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
diff --git a/eclass/ELT-patches/irix-ltmain/2.2.6 b/eclass/ELT-patches/irix-ltmain/2.2.6
new file mode 100644
index 0000000..7091637
--- /dev/null
+++ b/eclass/ELT-patches/irix-ltmain/2.2.6
@@ -0,0 +1,30 @@
+I notice that $EPREFIX/usr/share/libtool/config/ltmain.sh also has this
+stray increment - so I'd assume that this is a bug in libtool (which is
+perhaps trying to fix a deprecated behaviour of old IRIX versions?).
+
+http://bugs.gentoo.org/show_bug.cgi?id=301520
+
+
+--- ltmain.sh.dist 2010-01-19 14:04:22.101603800 +0000
++++ ltmain.sh 2010-01-19 14:08:29.361500240 +0000
+@@ -6225,7 +6225,6 @@ func_mode_link ()
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_minor"
+- lt_irix_increment=no
+ ;;
+ esac
+ ;;
+@@ -6297,11 +6296,7 @@ func_mode_link ()
+ ;;
+
+ irix | nonstopux)
+- if test "X$lt_irix_increment" = "Xno"; then
+- func_arith $current - $age
+- else
+- func_arith $current - $age + 1
+- fi
++ func_arith $current - $age
+ major=$func_arith_result
+
+ case $version_type in
diff --git a/eclass/ELT-patches/ltmain/1.5 b/eclass/ELT-patches/ltmain/1.5
new file mode 100644
index 0000000..39abee0
--- /dev/null
+++ b/eclass/ELT-patches/ltmain/1.5
@@ -0,0 +1,18 @@
+--- ltmain.sh 2007-09-15 07:35:19 +0100
++++ ltmain.sh 2004-01-25 12:40:26 +0000
+@@ -1854,6 +1840,15 @@
+ lib=
+ found=no
+ case $deplib in
++ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
++ if test "$linkmode,$pass" = "prog,link"; then
++ compile_deplibs="$deplib $compile_deplibs"
++ finalize_deplibs="$deplib $finalize_deplibs"
++ else
++ deplibs="$deplib $deplibs"
++ fi
++ continue
++ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
diff --git a/eclass/ELT-patches/max_cmd_len/1.5.0 b/eclass/ELT-patches/max_cmd_len/1.5.0
new file mode 100644
index 0000000..6d5f88b
--- /dev/null
+++ b/eclass/ELT-patches/max_cmd_len/1.5.0
@@ -0,0 +1,33 @@
+--- ltmain.sh 2004-02-11 20:55:14.587581248 +0200
++++ ltmain.sh 2004-02-11 21:15:33.467283368 +0200
+@@ -117,6 +117,30 @@
+ execute_dlfiles=
+ lo2o="s/\\.lo\$/.${objext}/"
+ o2lo="s/\\.${objext}\$/.lo/"
++
++if test -z "$max_cmd_len"; then
++ i=0
++ testring="ABCD"
++ new_result=
++
++ # If test is not a shell built-in, we'll probably end up computing a
++ # maximum length that is only half of the actual maximum length, but
++ # we can't tell.
++ while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
++ = "XX$testring") >/dev/null 2>&1 &&
++ new_result=`expr "X$testring" : ".*" 2>&1` &&
++ max_cmd_len="$new_result" &&
++ test $i != 17 # 1/2 MB should be enough
++ do
++ i=`expr $i + 1`
++ testring="$testring$testring"
++ done
++ testring=
++ # Add a significant safety factor because C++ compilers can tack on massive
++ # amounts of additional arguments before passing them to the linker.
++ # It appears as though 1/2 is a usable value.
++ max_cmd_len=`expr $max_cmd_len \/ 2`
++fi
+
+ #####################################
+ # Shell function definitions:
diff --git a/eclass/ELT-patches/max_cmd_len/1.5.14 b/eclass/ELT-patches/max_cmd_len/1.5.14
new file mode 100644
index 0000000..8f299e8
--- /dev/null
+++ b/eclass/ELT-patches/max_cmd_len/1.5.14
@@ -0,0 +1,33 @@
+--- ltmain.sh
++++ ltmain.sh
+@@ -136,6 +136,30 @@
+ lo2o="s/\\.lo\$/.${objext}/"
+ o2lo="s/\\.${objext}\$/.lo/"
+ quote_scanset='[[~#^*{};<>?'"'"' ]'
++
++if test -z "$max_cmd_len"; then
++ i=0
++ testring="ABCD"
++ new_result=
++
++ # If test is not a shell built-in, we'll probably end up computing a
++ # maximum length that is only half of the actual maximum length, but
++ # we can't tell.
++ while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
++ = "XX$testring") >/dev/null 2>&1 &&
++ new_result=`expr "X$testring" : ".*" 2>&1` &&
++ max_cmd_len="$new_result" &&
++ test "$i" != 17 # 1/2 MB should be enough
++ do
++ i=`expr $i + 1`
++ testring="$testring$testring"
++ done
++ testring=
++ # Add a significant safety factor because C++ compilers can tack on massive
++ # amounts of additional arguments before passing them to the linker.
++ # It appears as though 1/2 is a usable value.
++ max_cmd_len=`expr $max_cmd_len \/ 2`
++fi
+
+ #####################################
+ # Shell function definitions:
diff --git a/eclass/ELT-patches/max_cmd_len/1.5.20 b/eclass/ELT-patches/max_cmd_len/1.5.20
new file mode 100644
index 0000000..76dc213
--- /dev/null
+++ b/eclass/ELT-patches/max_cmd_len/1.5.20
@@ -0,0 +1,33 @@
+--- ltmain.sh
++++ ltmain.sh
+@@ -136,6 +136,30 @@
+ execute_dlfiles=
+ lo2o="s/\\.lo\$/.${objext}/"
+ o2lo="s/\\.${objext}\$/.lo/"
++
++if test -z "$max_cmd_len"; then
++ i=0
++ testring="ABCD"
++ new_result=
++
++ # If test is not a shell built-in, we'll probably end up computing a
++ # maximum length that is only half of the actual maximum length, but
++ # we can't tell.
++ while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
++ = "XX$testring") >/dev/null 2>&1 &&
++ new_result=`expr "X$testring" : ".*" 2>&1` &&
++ max_cmd_len="$new_result" &&
++ test "$i" != 17 # 1/2 MB should be enough
++ do
++ i=`expr $i + 1`
++ testring="$testring$testring"
++ done
++ testring=
++ # Add a significant safety factor because C++ compilers can tack on massive
++ # amounts of additional arguments before passing them to the linker.
++ # It appears as though 1/2 is a usable value.
++ max_cmd_len=`expr $max_cmd_len \/ 2`
++fi
+
+ #####################################
+ # Shell function definitions:
diff --git a/eclass/ELT-patches/mint-conf/2.2.6 b/eclass/ELT-patches/mint-conf/2.2.6
new file mode 100644
index 0000000..34f2e5f
--- /dev/null
+++ b/eclass/ELT-patches/mint-conf/2.2.6
@@ -0,0 +1,15 @@
+Calculating the max args here takes hours.
+
+--- configure
++++ configure
+@@ -7351,6 +7351,10 @@
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
++ mint*)
++ lt_cv_sys_max_cmd_len=8192;
++ ;;
++
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
diff --git a/eclass/ELT-patches/no-lc/1.3d b/eclass/ELT-patches/no-lc/1.3d
new file mode 100644
index 0000000..de20b0c
--- /dev/null
+++ b/eclass/ELT-patches/no-lc/1.3d
@@ -0,0 +1,13 @@
+--- release-1-3d.orig 2009-12-03 17:05:15.608916799 +0100
++++ release-1-3d 2009-12-14 22:01:06.634927600 +0100
+@@ -1035,6 +1035,10 @@
+ esac
+ elif test "$arg" = "-lm"; then
+ case $host in
++ *-*-hpux*)
++ # Compiler inserts libc in the correct place for threads to work
++ test "X$arg" = "X-lc" && continue
++ ;;
+ *-*-cygwin* | *-*-pw32* | *-*-beos*)
+ # These systems don't actually have math library (as such)
+ continue
diff --git a/eclass/ELT-patches/no-lc/1.5.22 b/eclass/ELT-patches/no-lc/1.5.22
new file mode 100644
index 0000000..786284d
--- /dev/null
+++ b/eclass/ELT-patches/no-lc/1.5.22
@@ -0,0 +1,11 @@
+--- release-1-5-22.orig 2009-12-03 17:05:15.605534999 +0100
++++ release-1-5-22 2009-12-14 21:56:58.884956366 +0100
+@@ -1573,7 +1573,7 @@
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+- *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
++ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX* | *-*-hpux*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
diff --git a/eclass/ELT-patches/nocxx/nocxx-2.64.patch b/eclass/ELT-patches/nocxx/nocxx-2.64.patch
new file mode 100644
index 0000000..4b10e46
--- /dev/null
+++ b/eclass/ELT-patches/nocxx/nocxx-2.64.patch
@@ -0,0 +1,13 @@
+--- a/configure
++++ b/configure
+@@ -5148,8 +5148,8 @@
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+-See \`config.log' for more details" "$LINENO" 5; }
++$as_echo "See \`config.log' for more details." >&5;
++$ac_echo "C++ sucks, ignoring ..." >&5; }
+ fi
+
+ ac_ext=c
diff --git a/eclass/ELT-patches/nocxx/nocxx.patch b/eclass/ELT-patches/nocxx/nocxx.patch
new file mode 100644
index 0000000..4b32692
--- /dev/null
+++ b/eclass/ELT-patches/nocxx/nocxx.patch
@@ -0,0 +1,15 @@
+--- a/configure
++++ b/configure
+@@ -5148,10 +5148,8 @@
+ :
+ else
+ { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+-See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; }
++See \`config.log' for more details." >&5;}
++ { echo "C++ sucks, ignoring ..." >&5; }; }
+ fi
+
+ ac_ext=cc
diff --git a/eclass/ELT-patches/portage/1.2.0 b/eclass/ELT-patches/portage/1.2.0
new file mode 100644
index 0000000..70b0261
--- /dev/null
+++ b/eclass/ELT-patches/portage/1.2.0
@@ -0,0 +1,7 @@
+# Dummy patch, not needed by libtool-1.2
+
+--- ltmain.sh
++++ ltmain.sh
+@@ -32,1 +32,1 @@
+-PACKAGE=libtool
++PACKAGE=libtool
diff --git a/eclass/ELT-patches/portage/1.3.0c b/eclass/ELT-patches/portage/1.3.0c
new file mode 100644
index 0000000..ad071ae
--- /dev/null
+++ b/eclass/ELT-patches/portage/1.3.0c
@@ -0,0 +1,66 @@
+--- ltmain.sh 2005-09-02 22:19:17.000000000 +0200
++++ ltmain.sh 2005-09-02 22:20:55.000000000 +0200
+@@ -3769,9 +3769,50 @@
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+- newdependency_libs="$newdependency_libs $libdir/$name"
++ # We do not want portage's install root ($D) present. Check only for
++ # this if the .la is being installed.
++ if test "$installed" = yes && test "$D"; then
++ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ else
++ mynewdependency_lib="$libdir/$name"
++ fi
++ # Do not add duplicates
++ if test "$mynewdependency_lib"; then
++ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
++ if test -z "$my_little_ninja_foo_1"; then
++ newdependency_libs="$newdependency_libs $mynewdependency_lib"
++ fi
++ fi
++ ;;
++ *)
++ if test "$installed" = yes; then
++ # Rather use S=WORKDIR if our version of portage supports it.
++ # This is because some ebuild (gcc) do not use $S as buildroot.
++ if test "$WORKDIR"; then
++ S="$WORKDIR"
++ fi
++ # We do not want portage's build root ($S) present.
++ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
++ # We do not want portage's install root ($D) present.
++ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
++ if test -n "$my_little_ninja_foo_2" && test "$S"; then
++ mynewdependency_lib=""
++ elif test -n "$my_little_ninja_foo_3" && test "$D"; then
++ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ else
++ mynewdependency_lib="$deplib"
++ fi
++ else
++ mynewdependency_lib="$deplib"
++ fi
++ # Do not add duplicates
++ if test "$mynewdependency_lib"; then
++ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
++ if test -z "$my_little_ninja_foo_4"; then
++ newdependency_libs="$newdependency_libs $mynewdependency_lib"
++ fi
++ fi
+ ;;
+- *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+@@ -3799,6 +3840,10 @@
+ dlprefiles="$newdlprefiles"
+ fi
+ $rm $output
++ # Do not add duplicates
++ if test "$installed" = yes && test "$D"; then
++ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ fi
+ $echo > $output "\
+ # $outputname - a libtool library file
+ # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
diff --git a/eclass/ELT-patches/portage/1.3.3 b/eclass/ELT-patches/portage/1.3.3
new file mode 100644
index 0000000..731076b
--- /dev/null
+++ b/eclass/ELT-patches/portage/1.3.3
@@ -0,0 +1,71 @@
+--- ltmain.sh 2005-05-13 10:53:28.000000000 +0200
++++ ltmain.sh 2005-05-13 11:44:15.000000000 +0200
+@@ -3078,6 +3078,68 @@
+ break
+ fi
+ output="$output_objdir/$outputname"i
++ # Replace all uninstalled libtool libraries with the installed ones
++ newdependency_libs=
++ for deplib in $dependency_libs; do
++ case $deplib in
++ *.la)
++ name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
++ if test -z "$libdir"; then
++ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
++ exit $EXIT_FAILURE
++ fi
++ # We do not want portage's install root ($D) present. Check only for
++ # this if the .la is being installed.
++ if test "$installed" = yes && test "$D"; then
++ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ else
++ mynewdependency_lib="$libdir/$name"
++ fi
++ # Do not add duplicates
++ if test "$mynewdependency_lib"; then
++ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
++ if test -z "$my_little_ninja_foo_1"; then
++ newdependency_libs="$newdependency_libs $mynewdependency_lib"
++ fi
++ fi
++ ;;
++ *)
++ if test "$installed" = yes; then
++ # Rather use S=WORKDIR if our version of portage supports it.
++ # This is because some ebuild (gcc) do not use $S as buildroot.
++ if test "$WORKDIR"; then
++ S="$WORKDIR"
++ fi
++ # We do not want portage's build root ($S) present.
++ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
++ # We do not want portage's install root ($D) present.
++ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
++ if test -n "$my_little_ninja_foo_2" && test "$S"; then
++ mynewdependency_lib=""
++ elif test -n "$my_little_ninja_foo_3" && test "$D"; then
++ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ else
++ mynewdependency_lib="$deplib"
++ fi
++ else
++ mynewdependency_lib="$deplib"
++ fi
++ # Do not add duplicates
++ if test "$mynewdependency_lib"; then
++ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
++ if test -z "$my_little_ninja_foo_4"; then
++ newdependency_libs="$newdependency_libs $mynewdependency_lib"
++ fi
++ fi
++ ;;
++ esac
++ done
++ dependency_libs="$newdependency_libs"
++ fi
++ # Do not add duplicates
++ if test "$installed" = yes && test "$D"; then
++ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ fi
+ $rm $output
+ $echo > $output "\
diff --git a/eclass/ELT-patches/portage/1.4.0 b/eclass/ELT-patches/portage/1.4.0
new file mode 100644
index 0000000..5566a39
--- /dev/null
+++ b/eclass/ELT-patches/portage/1.4.0
@@ -0,0 +1,74 @@
+Note that if you update this patch, please update this one as well:
+
+ eclass/ELT-patches/portage/1.4.1
+
+The file name can stay 1.4.1, as it will still apply to all versions. Only
+when a new version of libtool comes out that it do not apply to, then the
+name should be bumped, but the patch content should stay fairly the same.
+
+--- ltmain.sh Wed Apr 3 01:19:37 2002
++++ ltmain.sh Sun May 26 19:50:52 2002
+@@ -3940,9 +3940,50 @@
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+- newdependency_libs="$newdependency_libs $libdir/$name"
++ # We do not want portage's install root ($D) present. Check only for
++ # this if the .la is being installed.
++ if test "$installed" = yes && test "$D"; then
++ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ else
++ mynewdependency_lib="$libdir/$name"
++ fi
++ # Do not add duplicates
++ if test "$mynewdependency_lib"; then
++ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
++ if test -z "$my_little_ninja_foo_1"; then
++ newdependency_libs="$newdependency_libs $mynewdependency_lib"
++ fi
++ fi
++ ;;
++ *)
++ if test "$installed" = yes; then
++ # Rather use S=WORKDIR if our version of portage supports it.
++ # This is because some ebuild (gcc) do not use $S as buildroot.
++ if test "$WORKDIR"; then
++ S="$WORKDIR"
++ fi
++ # We do not want portage's build root ($S) present.
++ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
++ # We do not want portage's install root ($D) present.
++ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
++ if test -n "$my_little_ninja_foo_2" && test "$S"; then
++ mynewdependency_lib=""
++ elif test -n "$my_little_ninja_foo_3" && test "$D"; then
++ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ else
++ mynewdependency_lib="$deplib"
++ fi
++ else
++ mynewdependency_lib="$deplib"
++ fi
++ # Do not add duplicates
++ if test "$mynewdependency_lib"; then
++ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
++ if test -z "$my_little_ninja_foo_4"; then
++ newdependency_libs="$newdependency_libs $mynewdependency_lib"
++ fi
++ fi
+ ;;
+- *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+@@ -3975,6 +4005,10 @@
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
++ # Do not add duplicates
++ if test "$installed" = yes && test "$D"; then
++ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ fi
+ $echo > $output "\
+ # $outputname - a libtool library file
+ # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
diff --git a/eclass/ELT-patches/portage/1.5.10 b/eclass/ELT-patches/portage/1.5.10
new file mode 100644
index 0000000..f33d906
--- /dev/null
+++ b/eclass/ELT-patches/portage/1.5.10
@@ -0,0 +1,77 @@
+Note that if you update this patch, please update this one as well:
+
+ eclass/ELT-patches/portage/1.4.1
+
+The file name can stay 1.4.1, as it will still apply to all versions. Only
+when a new version of libtool comes out that it do not apply to, then the
+name should be bumped, but the patch content should stay fairly the same.
+
+--- ltmain.sh Wed Apr 3 01:19:37 2002
++++ ltmain.sh Sun May 26 19:50:52 2002
+@@ -3940,9 +3940,53 @@
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+- newdependency_libs="$newdependency_libs $libdir/$name"
++ if test "x$EGREP" = x ; then
++ EGREP=egrep
++ fi
++ # We do not want portage's install root ($D) present. Check only for
++ # this if the .la is being installed.
++ if test "$installed" = yes && test "$D"; then
++ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ else
++ mynewdependency_lib="$libdir/$name"
++ fi
++ # Do not add duplicates
++ if test "$mynewdependency_lib"; then
++ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
++ if test -z "$my_little_ninja_foo_1"; then
++ newdependency_libs="$newdependency_libs $mynewdependency_lib"
++ fi
++ fi
++ ;;
++ *)
++ if test "$installed" = yes; then
++ # Rather use S=WORKDIR if our version of portage supports it.
++ # This is because some ebuild (gcc) do not use $S as buildroot.
++ if test "$WORKDIR"; then
++ S="$WORKDIR"
++ fi
++ # We do not want portage's build root ($S) present.
++ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
++ # We do not want portage's install root ($D) present.
++ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
++ if test -n "$my_little_ninja_foo_2" && test "$S"; then
++ mynewdependency_lib=""
++ elif test -n "$my_little_ninja_foo_3" && test "$D"; then
++ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ else
++ mynewdependency_lib="$deplib"
++ fi
++ else
++ mynewdependency_lib="$deplib"
++ fi
++ # Do not add duplicates
++ if test "$mynewdependency_lib"; then
++ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
++ if test -z "$my_little_ninja_foo_4"; then
++ newdependency_libs="$newdependency_libs $mynewdependency_lib"
++ fi
++ fi
+ ;;
+- *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+@@ -3975,6 +4005,10 @@
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
++ # Do not add duplicates
++ if test "$installed" = yes && test "$D"; then
++ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ fi
+ $echo > $output "\
+ # $outputname - a libtool library file
+ # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
diff --git a/eclass/ELT-patches/portage/2.2 b/eclass/ELT-patches/portage/2.2
new file mode 100644
index 0000000..1f724e7
--- /dev/null
+++ b/eclass/ELT-patches/portage/2.2
@@ -0,0 +1,69 @@
+--- ltmain.sh
++++ ltmain.sh
+@@ -7410,9 +7410,53 @@
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+- newdependency_libs="$newdependency_libs $libdir/$name"
++ if test "x$EGREP" = x ; then
++ EGREP=egrep
++ fi
++ # We do not want portage's install root ($D) present. Check only for
++ # this if the .la is being installed.
++ if test "$installed" = yes && test "$D"; then
++ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ else
++ mynewdependency_lib="$libdir/$name"
++ fi
++ # Do not add duplicates
++ if test "$mynewdependency_lib"; then
++ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
++ if test -z "$my_little_ninja_foo_1"; then
++ newdependency_libs="$newdependency_libs $mynewdependency_lib"
++ fi
++ fi
++ ;;
++ *)
++ if test "$installed" = yes; then
++ # Rather use S=WORKDIR if our version of portage supports it.
++ # This is because some ebuild (gcc) do not use $S as buildroot.
++ if test "$WORKDIR"; then
++ S="$WORKDIR"
++ fi
++ # We do not want portage's build root ($S) present.
++ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
++ # We do not want portage's install root ($D) present.
++ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
++ if test -n "$my_little_ninja_foo_2" && test "$S"; then
++ mynewdependency_lib=""
++ elif test -n "$my_little_ninja_foo_3" && test "$D"; then
++ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ else
++ mynewdependency_lib="$deplib"
++ fi
++ else
++ mynewdependency_lib="$deplib"
++ fi
++ # Do not add duplicates
++ if test "$mynewdependency_lib"; then
++ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
++ if test -z "$my_little_ninja_foo_4"; then
++ newdependency_libs="$newdependency_libs $mynewdependency_lib"
++ fi
++ fi
+ ;;
+- *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+@@ -7476,6 +7520,10 @@
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
++ # Do not add duplicates
++ if test "$installed" = yes && test "$D"; then
++ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
++ fi
+ $ECHO > $output "\
+ # $outputname - a libtool library file
+ # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
diff --git a/eclass/ELT-patches/relink-prog/1.3d b/eclass/ELT-patches/relink-prog/1.3d
new file mode 100644
index 0000000..ccb6cb8
--- /dev/null
+++ b/eclass/ELT-patches/relink-prog/1.3d
@@ -0,0 +1,24 @@
+--- ltmain.sh
++++ ltmain.sh
+@@ -3203,6 +3203,12 @@
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
++ else
++ case $libdir in
++ [\\/]*)
++ add_dir="$add_dir -L\\\"\\\${D}\\\"$libdir"
++ ;;
++ esac
+ fi
+ add="-l$name"
+ fi
+@@ -6630,7 +6636,7 @@
+ esac
+ fi
+ libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+- if test -n "$libdir" && test ! -f "$libfile"; then
++ if test -n "$libdir" && test ! -f "${D}$libfile"; then
+ $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+ finalize=no
+ fi
diff --git a/eclass/ELT-patches/relink-prog/2.1b b/eclass/ELT-patches/relink-prog/2.1b
new file mode 100644
index 0000000..71a0970
--- /dev/null
+++ b/eclass/ELT-patches/relink-prog/2.1b
@@ -0,0 +1,24 @@
+--- ltmain-v2.2.6.in 2009-06-22 15:33:27.000000000 +0200
++++ ltmain-v2.2.6.in.new 2009-07-16 16:21:04.000000000 +0200
+@@ -1742,7 +1742,7 @@
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+- if test -n "$libdir" && test ! -f "$libfile"; then
++ if test -n "$libdir" && test ! -f "${D}$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+@@ -5351,6 +5351,12 @@
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
++ else
++ case $libdir in
++ [\\/]*)
++ add_dir="$add_dir -L\\\"\\\${D}\\\"$libdir"
++ ;;
++ esac
+ fi
+ add="-l$name"
+ fi
diff --git a/eclass/ELT-patches/relink/1.4.0a b/eclass/ELT-patches/relink/1.4.0a
new file mode 100644
index 0000000..382d760
--- /dev/null
+++ b/eclass/ELT-patches/relink/1.4.0a
@@ -0,0 +1,99 @@
+--- ltmain.sh Wed Oct 3 02:05:35 2001
++++ ltmain.sh Wed Oct 3 05:16:14 2001
+@@ -754,6 +754,7 @@
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
++ inst_prefix_dir=
+
+ avoid_version=no
+ dlfiles=
+@@ -884,6 +885,11 @@
+ prev=
+ continue
+ ;;
++ inst_prefix)
++ inst_prefix_dir="$arg"
++ prev=
++ continue
++ ;;
+ release)
+ release="-$arg"
+ prev=
+@@ -985,6 +991,11 @@
+ continue
+ ;;
+
++ -inst-prefix-dir)
++ prev=inst_prefix
++ continue
++ ;;
++
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+@@ -1866,6 +1877,7 @@
+
+ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
++ add_prefix_dir=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+@@ -1886,10 +1898,22 @@
+ add="-l$name"
+ fi
+
++ if test -n "$inst_prefix_dir"; then
++ case "$libdir" in
++ [\\/]*)
++ add_prefix_dir="-L$inst_prefix_dir$libdir"
++ ;;
++ esac
++ fi
++
++ # add_prefix_dir must be appended instead, otherwise it can
++ # possibly be overrided by any hardcoded -L/... path in deplibs
+ if test "$linkmode" = prog; then
++ test -n "$add_prefix_dir" && finalize_deplibs="$finalize_deplibs $add_prefix_dir"
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
++ test -n "$add_prefix_dir" && deplibs="$deplibs $add_prefix_dir"
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+@@ -3856,7 +3880,7 @@
+ fi
+ done
+ # Quote the link command for shipping.
+- relink_command="($relink_command; cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
++ relink_command="($relink_command; cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+
+ # Only create the output if not a dry run.
+@@ -4157,6 +4181,24 @@
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
++ # Determine the prefix the user has applied to our future dir.
++ inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"`
++
++ # Don't allow the user to place us outside of our expected
++ # location b/c this prevents finding dependent libraries that
++ # are installed to the same prefix.
++ if test "$inst_prefix_dir" = "$destdir"; then
++ $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
++ exit 1
++ fi
++
++ if test -n "$inst_prefix_dir"; then
++ # Stick the inst_prefix_dir data into the link command.
++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
++ else
++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"`
++ fi
++
+ $echo "$modename: warning: relinking \`$file'" 1>&2
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
diff --git a/eclass/ELT-patches/relink/1.4.0a-GCC3.0-1 b/eclass/ELT-patches/relink/1.4.0a-GCC3.0-1
new file mode 100644
index 0000000..6bf45e5
--- /dev/null
+++ b/eclass/ELT-patches/relink/1.4.0a-GCC3.0-1
@@ -0,0 +1,99 @@
+--- ltmain.sh Wed Oct 3 02:05:35 2001
++++ ltmain.sh Wed Oct 3 05:16:14 2001
+@@ -754,6 +754,7 @@
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
++ inst_prefix_dir=
+
+ avoid_version=no
+ dlfiles=
+@@ -884,6 +885,11 @@
+ prev=
+ continue
+ ;;
++ inst_prefix)
++ inst_prefix_dir="$arg"
++ prev=
++ continue
++ ;;
+ release)
+ release="-$arg"
+ prev=
+@@ -985,6 +991,11 @@
+ continue
+ ;;
+
++ -inst-prefix-dir)
++ prev=inst_prefix
++ continue
++ ;;
++
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+@@ -1866,6 +1877,7 @@
+
+ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
++ add_prefix_dir=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+@@ -1886,10 +1898,22 @@
+ add="-l$name"
+ fi
+
++ if test -n "$inst_prefix_dir"; then
++ case "$libdir" in
++ [\\/]*)
++ add_prefix_dir="-L$inst_prefix_dir$libdir"
++ ;;
++ esac
++ fi
++
++ # add_prefix_dir must be appended instead, otherwise it can
++ # possibly be overrided by any hardcoded -L/... path in deplibs
+ if test "$linkmode" = prog; then
++ test -n "$add_prefix_dir" && finalize_deplibs="$finalize_deplibs $add_prefix_dir"
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
++ test -n "$add_prefix_dir" && deplibs="$deplibs $add_prefix_dir"
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+@@ -3856,7 +3880,7 @@
+ for tag in $taglist; do
+ tagopts="$tagopts --tag $tag"
+ done
+- relink_command="(cd `pwd`; $SHELL $0$tagopts --mode=relink $libtool_args)"
++ relink_command="(cd `pwd`; $SHELL $0$tagopts --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+
+ # Only create the output if not a dry run.
+@@ -4157,6 +4181,24 @@
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
++ # Determine the prefix the user has applied to our future dir.
++ inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"`
++
++ # Don't allow the user to place us outside of our expected
++ # location b/c this prevents finding dependent libraries that
++ # are installed to the same prefix.
++ if test "$inst_prefix_dir" = "$destdir"; then
++ $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
++ exit 1
++ fi
++
++ if test -n "$inst_prefix_dir"; then
++ # Stick the inst_prefix_dir data into the link command.
++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
++ else
++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"`
++ fi
++
+ $echo "$modename: warning: relinking \`$file'" 1>&2
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
diff --git a/eclass/ELT-patches/relink/1.4.0a-GCC3.0-2 b/eclass/ELT-patches/relink/1.4.0a-GCC3.0-2
new file mode 100644
index 0000000..55103a4
--- /dev/null
+++ b/eclass/ELT-patches/relink/1.4.0a-GCC3.0-2
@@ -0,0 +1,100 @@
+--- ltmain.sh Wed Oct 3 02:05:35 2001
++++ ltmain.sh Wed Oct 3 05:16:14 2001
+@@ -754,6 +754,7 @@
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
++ inst_prefix_dir=
+
+ avoid_version=no
+ dlfiles=
+@@ -884,6 +885,11 @@
+ prev=
+ continue
+ ;;
++ inst_prefix)
++ inst_prefix_dir="$arg"
++ prev=
++ continue
++ ;;
+ release)
+ release="-$arg"
+ prev=
+@@ -985,6 +991,11 @@
+ continue
+ ;;
+
++ -inst-prefix-dir)
++ prev=inst_prefix
++ continue
++ ;;
++
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+@@ -1866,6 +1877,7 @@
+
+ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
++ add_prefix_dir=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+@@ -1886,10 +1898,22 @@
+ add="-l$name"
+ fi
+
+- if test $linkmode = prog; then
++ if test -n "$inst_prefix_dir"; then
++ case "$libdir" in
++ [\\/]*)
++ add_prefix_dir="-L$inst_prefix_dir$libdir"
++ ;;
++ esac
++ fi
++
++ # add_prefix_dir must be appended instead, otherwise it can
++ # possibly be overrided by any hardcoded -L/... path in deplibs
++ if test "$linkmode" = prog; then
++ test -n "$add_prefix_dir" && finalize_deplibs="$finalize_deplibs $add_prefix_dir"
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
++ test -n "$add_prefix_dir" && deplibs="$deplibs $add_prefix_dir"
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+@@ -3856,7 +3880,7 @@
+ for tag in $taglist; do
+ tagopts="$tagopts --tag $tag"
+ done
+- relink_command="(cd `pwd`; $SHELL $0$tagopts --mode=relink $libtool_args)"
++ relink_command="(cd `pwd`; $SHELL $0$tagopts --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+
+ # Only create the output if not a dry run.
+@@ -4157,6 +4181,24 @@
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
++ # Determine the prefix the user has applied to our future dir.
++ inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"`
++
++ # Don't allow the user to place us outside of our expected
++ # location b/c this prevents finding dependent libraries that
++ # are installed to the same prefix.
++ if test "$inst_prefix_dir" = "$destdir"; then
++ $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
++ exit 1
++ fi
++
++ if test -n "$inst_prefix_dir"; then
++ # Stick the inst_prefix_dir data into the link command.
++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
++ else
++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"`
++ fi
++
+ $echo "$modename: warning: relinking \`$file'" 1>&2
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
diff --git a/eclass/ELT-patches/relink/1.4.1 b/eclass/ELT-patches/relink/1.4.1
new file mode 100644
index 0000000..f34863f
--- /dev/null
+++ b/eclass/ELT-patches/relink/1.4.1
@@ -0,0 +1,124 @@
+--- ltmain.sh Sun Aug 12 18:08:05 2001
++++ ltmain.sh Tue Aug 28 18:55:13 2001
+@@ -827,6 +827,7 @@
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
++ inst_prefix_dir=
+
+ avoid_version=no
+ dlfiles=
+@@ -959,6 +960,11 @@
+ prev=
+ continue
+ ;;
++ inst_prefix)
++ inst_prefix_dir="$arg"
++ prev=
++ continue
++ ;;
+ release)
+ release="-$arg"
+ prev=
+@@ -1167,6 +1173,11 @@
+ continue
+ ;;
+
++ -inst-prefix-dir)
++ prev=inst_prefix
++ continue
++ ;;
++
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+@@ -2231,7 +2242,16 @@
+ if test "$hardcode_direct" = yes; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+- add_dir="-L$libdir"
++ # Try looking first in the location we're being installed to.
++ add_dir=
++ if test -n "$inst_prefix_dir"; then
++ case "$libdir" in
++ [\\/]*)
++ add_dir="-L$inst_prefix_dir$libdir"
++ ;;
++ esac
++ fi
++ add_dir="$add_dir -L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+@@ -2241,7 +2261,16 @@
+ add="-l$name"
+ 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.
++ add_dir=
++ if test -n "$inst_prefix_dir"; then
++ case "$libdir" in
++ [\\/]*)
++ add_dir="-L$inst_prefix_dir$libdir"
++ ;;
++ esac
++ fi
++ add_dir="$add_dir -L$libdir"
+ add="-l$name"
+ fi
+
+@@ -4321,7 +4350,7 @@
+ fi
+ done
+ # Quote the link command for shipping.
+- relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
++ relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+
+ # Only create the output if not a dry run.
+@@ -4622,12 +4651,30 @@
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
++ # Determine the prefix the user has applied to our future dir.
++ inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"`
++
++ # Don't allow the user to place us outside of our expected
++ # location b/c this prevents finding dependent libraries that
++ # are installed to the same prefix.
++ if test "$inst_prefix_dir" = "$destdir"; then
++ $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
++ exit 1
++ fi
++
++ if test -n "$inst_prefix_dir"; then
++ # Stick the inst_prefix_dir data into the link command.
++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
++ else
++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"`
++ fi
++
+ $echo "$modename: warning: relinking \`$file'" 1>&2
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+- continue
++ exit 1
+ fi
+ fi
+
+@@ -4782,7 +4829,11 @@
+ if test "$finalize" = yes && test -z "$run"; then
+ tmpdir="/tmp"
+ test -n "$TMPDIR" && tmpdir="$TMPDIR"
+- tmpdir="$tmpdir/libtool-$$"
++ tmpdir=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null`
++ if test $? = 0 ; then :
++ else
++ tmpdir="$tmpdir/libtool-$$"
++ fi
+ if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+ else
+ $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
diff --git a/eclass/ELT-patches/relink/1.4.2 b/eclass/ELT-patches/relink/1.4.2
new file mode 100644
index 0000000..17a630b
--- /dev/null
+++ b/eclass/ELT-patches/relink/1.4.2
@@ -0,0 +1,99 @@
+--- ltmain.sh Wed Oct 3 02:05:35 2001
++++ ltmain.sh Wed Oct 3 05:16:14 2001
+@@ -754,6 +754,7 @@
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
++ inst_prefix_dir=
+
+ avoid_version=no
+ dlfiles=
+@@ -884,6 +885,11 @@
+ prev=
+ continue
+ ;;
++ inst_prefix)
++ inst_prefix_dir="$arg"
++ prev=
++ continue
++ ;;
+ release)
+ release="-$arg"
+ prev=
+@@ -985,6 +991,11 @@
+ continue
+ ;;
+
++ -inst-prefix-dir)
++ prev=inst_prefix
++ continue
++ ;;
++
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+@@ -1866,6 +1877,7 @@
+
+ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
++ add_prefix_dir=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+@@ -1886,10 +1898,22 @@
+ add="-l$name"
+ fi
+
++ if test -n "$inst_prefix_dir"; then
++ case "$libdir" in
++ [\\/]*)
++ add_prefix_dir="-L$inst_prefix_dir$libdir"
++ ;;
++ esac
++ fi
++
++ # add_prefix_dir must be appended instead, otherwise it can
++ # possibly be overrided by any hardcoded -L/... path in deplibs
+ if test "$linkmode" = prog; then
++ test -n "$add_prefix_dir" && finalize_deplibs="$finalize_deplibs $add_prefix_dir"
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
++ test -n "$add_prefix_dir" && deplibs="$deplibs $add_prefix_dir"
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+@@ -3856,7 +3880,7 @@
+ fi
+ done
+ # Quote the link command for shipping.
+- relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
++ relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+
+ # Only create the output if not a dry run.
+@@ -4157,6 +4181,24 @@
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
++ # Determine the prefix the user has applied to our future dir.
++ inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"`
++
++ # Don't allow the user to place us outside of our expected
++ # location b/c this prevents finding dependent libraries that
++ # are installed to the same prefix.
++ if test "$inst_prefix_dir" = "$destdir"; then
++ $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
++ exit 1
++ fi
++
++ if test -n "$inst_prefix_dir"; then
++ # Stick the inst_prefix_dir data into the link command.
++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
++ else
++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"`
++ fi
++
+ $echo "$modename: warning: relinking \`$file'" 1>&2
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
diff --git a/eclass/ELT-patches/relink/1.4.3 b/eclass/ELT-patches/relink/1.4.3
new file mode 100644
index 0000000..3ed5fe3
--- /dev/null
+++ b/eclass/ELT-patches/relink/1.4.3
@@ -0,0 +1,111 @@
+--- ltmain.sh Mon Feb 4 15:12:15 2002
++++ ltmain.sh Mon Feb 4 15:12:15 2002
+@@ -745,6 +745,7 @@
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
++ inst_prefix_dir=
+
+ avoid_version=no
+ dlfiles=
+@@ -875,6 +876,11 @@
+ prev=
+ continue
+ ;;
++ inst_prefix)
++ inst_prefix_dir="$arg"
++ prev=
++ continue
++ ;;
+ release)
+ release="-$arg"
+ prev=
+@@ -976,6 +982,11 @@
+ continue
+ ;;
+
++ -inst-prefix-dir)
++ prev=inst_prefix
++ continue
++ ;;
++
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+@@ -1851,7 +1862,16 @@
+ if test "$hardcode_direct" = yes; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+- add_dir="-L$libdir"
++ # Try looking first in the location we're being installed to.
++ add_dir=
++ if test -n "$inst_prefix_dir"; then
++ case "$libdir" in
++ [\\/]*)
++ add_dir="-L$inst_prefix_dir$libdir"
++ ;;
++ esac
++ fi
++ add_dir="$add_dir -L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+@@ -1861,7 +1881,16 @@
+ add="-l$name"
+ 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.
++ add_dir=
++ if test -n "$inst_prefix_dir"; then
++ case "$libdir" in
++ [\\/]*)
++ add_dir="-L$inst_prefix_dir$libdir"
++ ;;
++ esac
++ fi
++ add_dir="$add_dir -L$libdir"
+ add="-l$name"
+ fi
+
+@@ -3823,7 +3852,7 @@
+ fi
+ done
+ # Quote the link command for shipping.
+- relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
++ relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+
+ # Only create the output if not a dry run.
+@@ -4124,12 +4153,30 @@
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
++ # Determine the prefix the user has applied to our future dir.
++ inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"`
++
++ # Don't allow the user to place us outside of our expected
++ # location b/c this prevents finding dependent libraries that
++ # are installed to the same prefix.
++ if test "$inst_prefix_dir" = "$destdir"; then
++ $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
++ exit 1
++ fi
++
++ if test -n "$inst_prefix_dir"; then
++ # Stick the inst_prefix_dir data into the link command.
++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
++ else
++ relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"`
++ fi
++
+ $echo "$modename: warning: relinking \`$file'" 1>&2
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+- continue
++ exit 1
+ fi
+ fi
+
diff --git a/eclass/ELT-patches/rem-int-dep/1.3.5 b/eclass/ELT-patches/rem-int-dep/1.3.5
new file mode 100644
index 0000000..4302623
--- /dev/null
+++ b/eclass/ELT-patches/rem-int-dep/1.3.5
@@ -0,0 +1,11 @@
+--- ltmain.sh 2002-11-01 19:56:50.000000000 -0600
++++ ltmain.sh 2002-11-01 19:57:03.000000000 -0600
+@@ -4551,6 +4551,8 @@
+ if test "$installed" = yes && test "$D"; then
+ install_libdir="`echo "$install_libdir" |sed -e "s:$D::g" -e 's://:/:g'`"
+ fi
++ # Removing @REM_INT_DEP@ from dependency_libs in .la
++ dependency_libs=`echo $dependency_libs | $Xsed -e 's%\([^ ]*lib@REM_INT_DEP@\.\(so\|la\|a\)\)\|\(-l@REM_INT_DEP@\)%%g'`
+ \$echo > \$output "\\
+ # \$outputname - a libtool library file
+ # Generated by \$PROGRAM - GNU \$PACKAGE \$VERSION\$TIMESTAMP
diff --git a/eclass/ELT-patches/sed/1.3.4 b/eclass/ELT-patches/sed/1.3.4
new file mode 100644
index 0000000..c88ff72
--- /dev/null
+++ b/eclass/ELT-patches/sed/1.3.4
@@ -0,0 +1,14 @@
+--- ltmain.sh 2005-05-13 11:48:24.000000000 +0200
++++ ltmain.sh 2005-05-13 11:48:42.000000000 +0200
+@@ -47,6 +47,11 @@
+ exit 0
+ fi
+
++# define variables for historic ltconfig's generated by Libtool 1.3
++test -z "$SED" && SED=sed
++test -z "$EGREP" && EGREP=egrep
++test -z "$LTCC" && LTCC=${CC-gcc}
++
+ # The name of this program.
+ progname=`$echo "$0" | sed 's%^.*/%%'`
+ modename="$progname"
diff --git a/eclass/ELT-patches/sed/1.4.0 b/eclass/ELT-patches/sed/1.4.0
new file mode 100644
index 0000000..9c51ac2
--- /dev/null
+++ b/eclass/ELT-patches/sed/1.4.0
@@ -0,0 +1,14 @@
+--- ltmain.sh 2003-02-13 14:54:24.000000000 +0100
++++ ltmain.sh 2003-02-13 15:24:49.000000000 +0100
+@@ -48,6 +48,11 @@ EOF
+ exit 0
+ fi
+
++# define variables for historic ltconfig's generated by Libtool 1.3
++test -z "$SED" && SED=sed
++test -z "$EGREP" && EGREP=egrep
++test -z "$LTCC" && LTCC=${CC-gcc}
++
+ # The name of this program.
+ progname=`$echo "$0" | ${SED} 's%^.*/%%'`
+ modename="$progname"
diff --git a/eclass/ELT-patches/sed/1.5.6 b/eclass/ELT-patches/sed/1.5.6
new file mode 100644
index 0000000..5efd531
--- /dev/null
+++ b/eclass/ELT-patches/sed/1.5.6
@@ -0,0 +1,16 @@
+--- ltmain.sh 2005-04-16 16:50:02.000000000 +0200
++++ ltmain.sh 2005-04-16 16:46:46.000000000 +0200
+@@ -39,6 +39,13 @@
+ if [ "x$SED" = x ] ; then
+ SED=sed
+ fi
++# Same for EGREP, and just to be sure, do LTCC as well
++if test "x$EGREP" = x ; then
++ EGREP=egrep
++fi
++if test "x$LTCC" = x ; then
++ LTCC=${CC-gcc}
++fi
+
+ # The name of this program:
+ progname=`echo "$progpath" | $SED $basename`
diff --git a/eclass/ELT-patches/sol2-conf/2.4.2 b/eclass/ELT-patches/sol2-conf/2.4.2
new file mode 100644
index 0000000..a57f22c
--- /dev/null
+++ b/eclass/ELT-patches/sol2-conf/2.4.2
@@ -0,0 +1,14 @@
+Unbreak x86_64-pc-solaris2.1[01], it IS 64-bits too. Without this,
+libtool thinks the linker is called ld_sol2.
+
+--- configure
++++ configure
+@@ -1383,7 +1383,7 @@
+ case $lt_cv_prog_gnu_ld in
+ yes*)
+ case $host in
+- i?86-*-solaris*)
++ i?86-*-solaris*|x86_64-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
diff --git a/eclass/ELT-patches/sol2-ltmain/2.4.2 b/eclass/ELT-patches/sol2-ltmain/2.4.2
new file mode 100644
index 0000000..ad35ed8
--- /dev/null
+++ b/eclass/ELT-patches/sol2-ltmain/2.4.2
@@ -0,0 +1,11 @@
+--- libltdl/config/ltmain.sh
++++ libltdl/config/ltmain.sh
+@@ -1180,7 +1180,7 @@
+ test "$opt_debug" = : || func_append preserve_args " --debug"
+
+ case $host in
+- *cygwin* | *mingw* | *pw32* | *cegcc*)
++ *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
diff --git a/eclass/ELT-patches/sys-lib-dlsearch/2.4 b/eclass/ELT-patches/sys-lib-dlsearch/2.4
new file mode 100644
index 0000000..89eb699
--- /dev/null
+++ b/eclass/ELT-patches/sys-lib-dlsearch/2.4
@@ -0,0 +1,21 @@
+the linux target parses /etc/ld.so.conf to see what paths are
+searched at runtime, and hardcodes /lib /usr/lib as a fallback.
+this works poorly when cross-compiling, so tweak the behavior:
+ - search $SYSROOT/etc/ld.so.conf
+ - default to Gentoo's notion of the active multilib
+
+--- a/configure
++++ b/configure
+@@ -10405,9 +10405,9 @@
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+- if test -f /etc/ld.so.conf; then
+- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
++ if test -f "$SYSROOT"/etc/ld.so.conf; then
++ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < "$SYSROOT"/etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
++ sys_lib_dlsearch_path_spec="/@GENTOO_LIBDIR@ /usr/@GENTOO_LIBDIR@ $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
diff --git a/eclass/ELT-patches/target-nm/2.4.2 b/eclass/ELT-patches/target-nm/2.4.2
new file mode 100644
index 0000000..1f22220
--- /dev/null
+++ b/eclass/ELT-patches/target-nm/2.4.2
@@ -0,0 +1,45 @@
+https://bugs.gentoo.org/465558
+
+From a4629ebff263dcb2e05feb9e41df649ea5ce3f78 Mon Sep 17 00:00:00 2001
+From: Peter Rosin <peda@lysator.liu.se>
+Date: Sun, 28 Apr 2013 09:16:56 +0200
+Subject: [PATCH] libtool: break all the way out when a good nm is found
+
+The current code tries to locate a compatible nm tool. It starts with
+a prefixed nm tool (great!) and includes a plain nm too (that's fine).
+The problem is that the code searches for the prefixed nm before the
+plain nm (normally fine), but doesn't break once it has found a valid
+match, and the plain nm ends up the winner.
+
+Report and analysis by Mike Frysinger.
+
+* m4/libtool.m4 (LT_PATH_NM): Break all the way out on a good match.
+
+Signed-off-by: Peter Rosin <peda@lysator.liu.se>
+---
+ m4/libtool.m4 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+index 3f50b0c..d7013c5 100644
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -3397,13 +3397,13 @@ else
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+- break
++ break 2
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+- break
++ break 2
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+--
+1.8.2.1
+
diff --git a/eclass/ELT-patches/test/1.4.0 b/eclass/ELT-patches/test/1.4.0
new file mode 100644
index 0000000..d6f442f
--- /dev/null
+++ b/eclass/ELT-patches/test/1.4.0
@@ -0,0 +1,291 @@
+--- ltmain.sh Tue May 29 19:16:03 2001
++++ ltmain.sh Tue May 29 21:26:50 2001
+@@ -459,7 +459,7 @@
+ pic_mode=default
+ ;;
+ esac
+- if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
++ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+@@ -1343,7 +1343,7 @@
+ ;;
+ esac
+ for pass in $passes; do
+- if test $linkmode = prog; then
++ if test "$linkmode" = prog; then
+ # Determine which files to process
+ case $pass in
+ dlopen)
+@@ -1360,11 +1360,11 @@
+ found=no
+ case $deplib in
+ -l*)
+- if test $linkmode = oldlib && test $linkmode = obj; then
++ if test "$linkmode" = oldlib && test "$linkmode" = obj; then
+ $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
+ continue
+ fi
+- if test $pass = conv; then
++ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+@@ -1384,7 +1384,7 @@
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+- test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
++ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+@@ -1393,16 +1393,16 @@
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+- test $pass = conv && continue
++ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ ;;
+ prog)
+- if test $pass = conv; then
++ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+- if test $pass = scan; then
++ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ else
+@@ -1417,7 +1417,7 @@
+ continue
+ ;; # -L
+ -R*)
+- if test $pass = link; then
++ if test "$pass" = link; then
+ dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+@@ -1430,7 +1430,7 @@
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$libext)
+- if test $pass = conv; then
++ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+@@ -1451,7 +1451,7 @@
+ continue
+ ;;
+ prog)
+- if test $pass != link; then
++ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+@@ -1462,7 +1462,7 @@
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+- if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
++ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+@@ -1512,13 +1512,13 @@
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+- { test $linkmode = oldlib && test $linkmode = obj; }; then
++ { test "$linkmode" = oldlib && test "$linkmode" = obj; }; then
+ # Add dl[pre]opened files of deplib
+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+ fi
+
+- if test $pass = conv; then
++ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+@@ -1537,7 +1537,7 @@
+ esac
+ tmp_libs="$tmp_libs $deplib"
+ done
+- elif test $linkmode != prog && test $linkmode != lib; then
++ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ $echo "$modename: \`$lib' is not a convenience library" 1>&2
+ exit 1
+ fi
+@@ -1555,7 +1555,7 @@
+ fi
+
+ # This library was specified with -dlopen.
+- if test $pass = dlopen; then
++ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+ exit 1
+@@ -1604,7 +1604,7 @@
+ name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+ # This library was specified with -dlpreopen.
+- if test $pass = dlpreopen; then
++ if test "$pass" = dlpreopen; then
+ if test -z "$libdir"; then
+ $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+ exit 1
+@@ -1623,7 +1623,7 @@
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+- if test $linkmode = lib; then
++ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+@@ -1634,7 +1634,7 @@
+ continue
+ fi
+
+- if test $linkmode = prog && test $pass != link; then
++ if test "$linkmode" = prog && test "$pass" != link; then
+ newlib_search_path="$newlib_search_path $ladir"
+ deplibs="$lib $deplibs"
+
+@@ -1671,7 +1671,7 @@
+ # Link against this shared library
+
+ if test "$linkmode,$pass" = "prog,link" ||
+- { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
++ { test "$linkmode" = lib && test "$hardcode_into_libs" = yes; }; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+@@ -1693,7 +1693,7 @@
+ esac
+ ;;
+ esac
+- if test $linkmode = prog; then
++ if test "$linkmode" = prog; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+@@ -1777,7 +1777,7 @@
+ linklib=$newlib
+ fi # test -n $old_archive_from_expsyms_cmds
+
+- if test $linkmode = prog || test "$mode" != relink; then
++ if test "$linkmode" = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+@@ -1826,7 +1826,7 @@
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ esac
+ fi
+- if test $linkmode = prog; then
++ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+@@ -1843,7 +1843,7 @@
+ fi
+ fi
+
+- if test $linkmode = prog || test "$mode" = relink; then
++ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+@@ -1865,7 +1865,7 @@
+ add="-l$name"
+ fi
+
+- if test $linkmode = prog; then
++ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+@@ -1873,7 +1873,7 @@
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+- elif test $linkmode = prog; then
++ elif test "$linkmode" = prog; then
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+@@ -1932,9 +1932,9 @@
+ fi
+ fi # link shared/static library?
+
+- if test $linkmode = lib; then
++ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+- { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
++ { test "$hardcode_into_libs" != yes || test $build_old_libs = yes ||
+ test $link_static = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+@@ -1964,7 +1964,7 @@
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+- if test $link_all_deplibs != no; then
++ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ case $deplib in
+@@ -2007,15 +2007,15 @@
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+- if test $pass = dlpreopen; then
++ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+- if test $pass != dlopen; then
+- test $pass != scan && dependency_libs="$newdependency_libs"
+- if test $pass != conv; then
++ if test "$pass" != dlopen; then
++ test "$pass" != scan && dependency_libs="$newdependency_libs"
++ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+@@ -2073,7 +2073,7 @@
+ deplibs=
+ fi
+ done # for pass
+- if test $linkmode = prog; then
++ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ dlprefiles="$newdlprefiles"
+ fi
+@@ -2410,7 +2410,7 @@
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+- if test $build_libtool_need_lc = "yes"; then
++ if test "$build_libtool_need_lc" = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
+ ;;
+@@ -2683,7 +2683,7 @@
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+- if test $hardcode_into_libs = yes; then
++ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
diff --git a/eclass/ELT-patches/test/1.4.2 b/eclass/ELT-patches/test/1.4.2
new file mode 100644
index 0000000..8ae65ef
--- /dev/null
+++ b/eclass/ELT-patches/test/1.4.2
@@ -0,0 +1,578 @@
+--- ltmain.sh 2001-09-10 19:40:18.000000000 -0400
++++ ltmain.sh 2002-07-11 14:49:35.000000000 -0400
+@@ -467,7 +467,7 @@ if test -z "$show_help"; then
+ pic_mode=default
+ ;;
+ esac
+- if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
++ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+@@ -1303,11 +1303,11 @@ compiler."
+ output_objdir="$output_objdir/$objdir"
+ fi
+ # Create the object directory.
+- if test ! -d $output_objdir; then
++ if test ! -d "$output_objdir"; then
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+- if test $status -ne 0 && test ! -d $output_objdir; then
++ if test "$status" -ne 0 && test ! -d "$output_objdir"; then
+ exit $status
+ fi
+ fi
+@@ -1366,7 +1366,7 @@ compiler."
+ ;;
+ esac
+ for pass in $passes; do
+- if test $linkmode = prog; then
++ if test "$linkmode" = prog; then
+ # Determine which files to process
+ case $pass in
+ dlopen)
+@@ -1383,11 +1383,11 @@ compiler."
+ found=no
+ case $deplib in
+ -l*)
+- if test $linkmode = oldlib && test $linkmode = obj; then
++ if test "$linkmode" = oldlib && test "$linkmode" = obj; then
+ $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
+ continue
+ fi
+- if test $pass = conv; then
++ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+@@ -1407,7 +1407,7 @@ compiler."
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+- test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
++ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+@@ -1416,16 +1416,16 @@ compiler."
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+- test $pass = conv && continue
++ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ ;;
+ prog)
+- if test $pass = conv; then
++ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+- if test $pass = scan; then
++ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ else
+@@ -1440,7 +1440,7 @@ compiler."
+ continue
+ ;; # -L
+ -R*)
+- if test $pass = link; then
++ if test "$pass" = link; then
+ dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+@@ -1453,7 +1453,7 @@ compiler."
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$libext)
+- if test $pass = conv; then
++ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+@@ -1474,7 +1474,7 @@ compiler."
+ continue
+ ;;
+ prog)
+- if test $pass != link; then
++ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+@@ -1485,7 +1485,7 @@ compiler."
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+- if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
++ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+@@ -1501,7 +1501,7 @@ compiler."
+ continue
+ ;;
+ esac # case $deplib
+- if test $found = yes || test -f "$lib"; then :
++ if test "$found" = yes || test -f "$lib"; then :
+ else
+ $echo "$modename: cannot find the library \`$lib'" 1>&2
+ exit 1
+@@ -1535,13 +1535,13 @@ compiler."
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+- { test $linkmode = oldlib && test $linkmode = obj; }; then
++ { test "$linkmode" = oldlib && test "$linkmode" = obj; }; then
+ # Add dl[pre]opened files of deplib
+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+ fi
+
+- if test $pass = conv; then
++ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+@@ -1560,7 +1560,7 @@ compiler."
+ esac
+ tmp_libs="$tmp_libs $deplib"
+ done
+- elif test $linkmode != prog && test $linkmode != lib; then
++ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ $echo "$modename: \`$lib' is not a convenience library" 1>&2
+ exit 1
+ fi
+@@ -1578,7 +1578,7 @@ compiler."
+ fi
+
+ # This library was specified with -dlopen.
+- if test $pass = dlopen; then
++ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+ exit 1
+@@ -1627,7 +1627,7 @@ compiler."
+ name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+ # This library was specified with -dlpreopen.
+- if test $pass = dlpreopen; then
++ if test "$pass" = dlpreopen; then
+ if test -z "$libdir"; then
+ $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+ exit 1
+@@ -1646,7 +1646,7 @@ compiler."
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+- if test $linkmode = lib; then
++ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+@@ -1657,7 +1657,7 @@ compiler."
+ continue
+ fi
+
+- if test $linkmode = prog && test $pass != link; then
++ if test "$linkmode" = prog && test "$pass" != link; then
+ newlib_search_path="$newlib_search_path $ladir"
+ deplibs="$lib $deplibs"
+
+@@ -1673,7 +1673,7 @@ compiler."
+ -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+ esac
+ # Need to link against all dependency_libs?
+- if test $linkalldeplibs = yes; then
++ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+@@ -1694,7 +1694,7 @@ compiler."
+ # Link against this shared library
+
+ if test "$linkmode,$pass" = "prog,link" ||
+- { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
++ { test "$linkmode" = lib && test "$hardcode_into_libs" = yes; }; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+@@ -1716,7 +1716,7 @@ compiler."
+ esac
+ ;;
+ esac
+- if test $linkmode = prog; then
++ if test "$linkmode" = prog; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+@@ -1798,9 +1798,9 @@ compiler."
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+- fi # test -n $old_archive_from_expsyms_cmds
++ fi # test -n "$old_archive_from_expsyms_cmds"
+
+- if test $linkmode = prog || test "$mode" != relink; then
++ if test "$linkmode" = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+@@ -1849,7 +1849,7 @@ compiler."
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ esac
+ fi
+- if test $linkmode = prog; then
++ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+@@ -1866,7 +1866,7 @@ compiler."
+ fi
+ fi
+
+- if test $linkmode = prog || test "$mode" = relink; then
++ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+@@ -1888,7 +1888,7 @@ compiler."
+ add="-l$name"
+ fi
+
+- if test $linkmode = prog; then
++ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+@@ -1896,7 +1896,7 @@ compiler."
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+- elif test $linkmode = prog; then
++ elif test "$linkmode" = prog; then
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+@@ -1955,10 +1955,10 @@ compiler."
+ fi
+ fi # link shared/static library?
+
+- if test $linkmode = lib; then
++ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+- { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
+- test $link_static = yes; }; then
++ { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
++ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+@@ -1987,7 +1987,7 @@ compiler."
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+- if test $link_all_deplibs != no; then
++ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ case $deplib in
+@@ -2030,15 +2030,15 @@ compiler."
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+- if test $pass = dlpreopen; then
++ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+- if test $pass != dlopen; then
+- test $pass != scan && dependency_libs="$newdependency_libs"
+- if test $pass != conv; then
++ if test "$pass" != dlopen; then
++ test "$pass" != scan && dependency_libs="$newdependency_libs"
++ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+@@ -2096,7 +2096,7 @@ compiler."
+ deplibs=
+ fi
+ done # for pass
+- if test $linkmode = prog; then
++ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ dlprefiles="$newdlprefiles"
+ fi
+@@ -2173,7 +2173,7 @@ compiler."
+ fi
+
+ set dummy $rpath
+- if test $# -gt 2; then
++ if test "$#" -gt 2; then
+ $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+ fi
+ install_libdir="$2"
+@@ -2240,7 +2240,7 @@ compiler."
+ ;;
+ esac
+
+- if test $age -gt $current; then
++ if test "$age" -gt "$current"; then
+ $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+@@ -2279,7 +2279,7 @@ compiler."
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+- while test $loop != 0; do
++ while test "$loop" -ne 0; do
+ iface=`expr $revision - $loop`
+ loop=`expr $loop - 1`
+ verstring="sgi$major.$iface:$verstring"
+@@ -2302,7 +2302,7 @@ compiler."
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+- while test $loop != 0; do
++ while test "$loop" -ne 0; do
+ iface=`expr $current - $loop`
+ loop=`expr $loop - 1`
+ verstring="$verstring:${iface}.0"
+@@ -2403,7 +2403,7 @@ compiler."
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+- if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
++ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+@@ -2446,7 +2446,7 @@ compiler."
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+- if test $build_libtool_need_lc = "yes"; then
++ if test "$build_libtool_need_lc" = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
+ ;;
+@@ -2487,7 +2487,7 @@ compiler."
+ EOF
+ $rm conftest
+ $CC -o conftest conftest.c $deplibs
+- if test $? -eq 0 ; then
++ if test "$?" -eq 0 ; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+@@ -2521,7 +2521,7 @@ EOF
+ $rm conftest
+ $CC -o conftest conftest.c $i
+ # Did it work?
+- if test $? -eq 0 ; then
++ if test "$?" -eq 0 ; then
+ ldd_output=`ldd conftest`
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+@@ -2692,7 +2692,7 @@ EOF
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+- if test $allow_undefined = no; then
++ if test "$allow_undefined" = no; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+@@ -2719,7 +2719,7 @@ EOF
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+- if test $hardcode_into_libs = yes; then
++ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+@@ -2850,7 +2850,7 @@ EOF
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+- if test $status -ne 0 && test ! -d "$gentop"; then
++ if test "$status" -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+@@ -2869,7 +2869,7 @@ EOF
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+- if test $status -ne 0 && test ! -d "$xdir"; then
++ if test "$status" -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+@@ -2989,7 +2989,7 @@ EOF
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+- if test $status -ne 0 && test ! -d "$gentop"; then
++ if test "$status" -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+@@ -3008,7 +3008,7 @@ EOF
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+- if test $status -ne 0 && test ! -d "$xdir"; then
++ if test "$status" -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+@@ -3403,7 +3403,7 @@ static const void *lt_preloaded_setup()
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+
+- if test $need_relink = no || test "$build_libtool_libs" != yes; then
++ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ # Replace the output file specification.
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+@@ -3528,7 +3528,7 @@ static const void *lt_preloaded_setup()
+ relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ fi
+ done
+- relink_command="cd `pwd`; $relink_command"
++ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+@@ -3771,7 +3771,7 @@ fi\
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+- if test $status -ne 0 && test ! -d "$gentop"; then
++ if test "$status" -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+@@ -3791,7 +3791,7 @@ fi\
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+- if test $status -ne 0 && test ! -d "$xdir"; then
++ if test "$status" -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+@@ -3858,7 +3858,7 @@ fi\
+ fi
+ done
+ # Quote the link command for shipping.
+- relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
++ relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+
+ # Only create the output if not a dry run.
+@@ -3948,7 +3948,7 @@ dlpreopen='$dlprefiles'
+
+ # Directory that this library needs to be installed in:
+ libdir='$install_libdir'"
+- if test "$installed" = no && test $need_relink = yes; then
++ if test "$installed" = no && test "$need_relink" = yes; then
+ $echo >> $output "\
+ relink_command=\"$relink_command\""
+ fi
+@@ -4084,7 +4084,7 @@ relink_command=\"$relink_command\""
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files
+- if test $# -gt 2; then
++ if test "$#" -gt 2; then
+ $echo "$modename: \`$dest' is not a directory" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+@@ -4186,7 +4186,7 @@ relink_command=\"$relink_command\""
+ $run eval "$striplib $destdir/$realname" || exit $?
+ fi
+
+- if test $# -gt 0; then
++ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ for linkname
+ do
+@@ -4444,7 +4444,7 @@ relink_command=\"$relink_command\""
+ fi
+
+ # Exit here if they wanted silent mode.
+- test "$show" = ":" && exit 0
++ test "$show" = : && exit 0
+
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+@@ -4610,7 +4610,7 @@ relink_command=\"$relink_command\""
+ fi
+
+ # Now prepare to actually exec the command.
+- exec_cmd='"$cmd"$args'
++ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+@@ -4660,10 +4660,10 @@ relink_command=\"$relink_command\""
+ objdir="$dir/$objdir"
+ fi
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+- test $mode = uninstall && objdir="$dir"
++ test "$mode" = uninstall && objdir="$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplicates
+- if test $mode = clean; then
++ if test "$mode" = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+@@ -4695,9 +4695,9 @@ relink_command=\"$relink_command\""
+ rmfiles="$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+- test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
++ test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+
+- if test $mode = uninstall; then
++ if test "$mode" = uninstall; then
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ eval cmds=\"$postuninstall_cmds\"
+@@ -4706,7 +4706,7 @@ relink_command=\"$relink_command\""
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+- if test $? != 0 && test "$rmforce" != yes; then
++ if test "$?" -ne 0 && test "$rmforce" != yes; then
+ exit_status=1
+ fi
+ done
+@@ -4721,7 +4721,7 @@ relink_command=\"$relink_command\""
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+- if test $? != 0 && test "$rmforce" != yes; then
++ if test "$?" -ne 0 && test "$rmforce" != yes; then
+ exit_status=1
+ fi
+ done
+@@ -4741,7 +4741,7 @@ relink_command=\"$relink_command\""
+
+ *)
+ # Do a test to see if this is a libtool program.
+- if test $mode = clean &&
++ if test "$mode" = clean &&
+ (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ relink_command=
+ . $dir/$file
diff --git a/eclass/ELT-patches/tmp/1.3.5 b/eclass/ELT-patches/tmp/1.3.5
new file mode 100644
index 0000000..29b70e0
--- /dev/null
+++ b/eclass/ELT-patches/tmp/1.3.5
@@ -0,0 +1,15 @@
+--- ltmain.sh Fri Jul 7 18:49:44 2000
++++ ltmain.sh Fri May 26 21:53:15 2000
+@@ -3462,7 +3462,11 @@
+ if test "$finalize" = yes && test -z "$run"; then
+ tmpdir="/tmp"
+ test -n "$TMPDIR" && tmpdir="$TMPDIR"
+- tmpdir="$tmpdir/libtool-$$"
++ tmpdir=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null`
++ if test $? = 0 ; then :
++ else
++ tmpdir="$tmpdir/libtool-$$"
++ fi
+ if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+ else
+ $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
diff --git a/eclass/ELT-patches/uclibc-conf/1.2.0 b/eclass/ELT-patches/uclibc-conf/1.2.0
new file mode 100644
index 0000000..acd804c
--- /dev/null
+++ b/eclass/ELT-patches/uclibc-conf/1.2.0
@@ -0,0 +1,48 @@
+--- configure.libltdl~ Fri Jun 11 08:54:04 2004
++++ configure Fri Jun 11 08:56:33 2004
+@@ -1978,6 +1978,11 @@
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc*.so`
++ ;;
++
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+@@ -3030,7 +3035,7 @@
+
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
+-linux-gnu*) ;;
++linux-gnu*|linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+
+@@ -4504,6 +4509,24 @@
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
++linux-uclibc*)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
++ soname_spec='${libname}${release}.so$major'
++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=no
++ # This implies no fast_install, which is unacceptable.
++ # Some rework will be needed to allow for fast_install
++ # before this can be enabled.
++ # Note: copied from linux-gnu, and may not be appropriate.
++ hardcode_into_libs=yes
++ # Assume using the uClibc dynamic linker.
++ dynamic_linker="uClibc ld.so"
++ ;;
++
+ netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
diff --git a/eclass/ELT-patches/uclibc-conf/1.3.0c b/eclass/ELT-patches/uclibc-conf/1.3.0c
new file mode 100644
index 0000000..03efc5d
--- /dev/null
+++ b/eclass/ELT-patches/uclibc-conf/1.3.0c
@@ -0,0 +1,48 @@
+--- configure.libltdl~ Fri Jun 11 08:54:04 2004
++++ configure Fri Jun 11 08:56:33 2004
+@@ -1978,6 +1978,11 @@
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc*.so`
++ ;;
++
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+@@ -3030,7 +3035,7 @@
+
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case "$host_os" in
+-linux-gnu*) ;;
++linux-gnu*|linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+
+@@ -4504,6 +4509,24 @@
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
++linux-uclibc*)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
++ soname_spec='${libname}${release}.so$major'
++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=no
++ # This implies no fast_install, which is unacceptable.
++ # Some rework will be needed to allow for fast_install
++ # before this can be enabled.
++ # Note: copied from linux-gnu, and may not be appropriate.
++ hardcode_into_libs=yes
++ # Assume using the uClibc dynamic linker.
++ dynamic_linker="uClibc ld.so"
++ ;;
++
+ netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
diff --git a/eclass/ELT-patches/uclibc-ltconf/1.2.0 b/eclass/ELT-patches/uclibc-ltconf/1.2.0
new file mode 100644
index 0000000..bbc6bc9
--- /dev/null
+++ b/eclass/ELT-patches/uclibc-ltconf/1.2.0
@@ -0,0 +1,36 @@
+--- ltconfig.uclibc 2004-01-14 22:07:42.000000000 +0100
++++ ltconfig 2004-03-10 15:43:37.000000000 +0100
+@@ -603,6 +603,7 @@
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
+ linux-gnu*) ;;
++linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+
+@@ -1259,6 +1260,25 @@
+ fi
+ ;;
+
++linux-uclibc*)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
++ soname_spec='${libname}${release}.so.$major'
++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=no
++ deplibs_check_method=pass_all
++ # This implies no fast_install, which is unacceptable.
++ # Some rework will be needed to allow for fast_install
++ # before this can be enabled.
++ # Note: copied from linux-gnu, and may not be appropriate.
++ hardcode_into_libs=yes
++ # Assume using the uClibc dynamic linker.
++ dynamic_linker="uClibc ld.so"
++ ;;
++
+ netbsd* | openbsd*)
+ version_type=sunos
+ library_names_spec='${libname}${release}.so.$versuffix'
diff --git a/eclass/ELT-patches/uclibc-ltconf/1.3.0 b/eclass/ELT-patches/uclibc-ltconf/1.3.0
new file mode 100644
index 0000000..0a5a9ea
--- /dev/null
+++ b/eclass/ELT-patches/uclibc-ltconf/1.3.0
@@ -0,0 +1,39 @@
+--- ltconfig.uclibc 2004-01-14 22:07:42.000000000 +0100
++++ ltconfig 2004-03-10 15:43:37.000000000 +0100
+@@ -603,6 +603,7 @@
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
+ linux-gnu*) ;;
++linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+
+@@ -1259,6 +1260,28 @@
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
++linux-uclibc*)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
++ soname_spec='${libname}${release}.so$major'
++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=no
++ # deplibs_check_method=pass_all
++ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
++ file_magic_cmd=/usr/bin/file
++ file_magic_test_file=`echo /lib/libuClibc-*.so`
++ # This implies no fast_install, which is unacceptable.
++ # Some rework will be needed to allow for fast_install
++ # before this can be enabled.
++ # Note: copied from linux-gnu, and may not be appropriate.
++ hardcode_into_libs=yes
++ # Assume using the uClibc dynamic linker.
++ dynamic_linker="uClibc ld.so"
++ ;;
++
+ netbsd*)
+ need_lib_prefix=no
+ need_version=no
diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass
new file mode 100644
index 0000000..47ef812
--- /dev/null
+++ b/eclass/libtool.eclass
@@ -0,0 +1,514 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: libtool.eclass
+# @MAINTAINER:
+# base-system@gentoo.org
+# @BLURB: quickly update bundled libtool code
+# @DESCRIPTION:
+# This eclass patches ltmain.sh distributed with libtoolized packages with the
+# relink and portage patch among others
+#
+# Note, this eclass does not require libtool as it only applies patches to
+# generated libtool files. We do not run the libtoolize program because that
+# requires a regeneration of the main autotool files in order to work properly.
+
+if [[ -z ${_LIBTOOL_ECLASS} ]]; then
+_LIBTOOL_ECLASS=1
+
+# If an overlay has eclass overrides, but doesn't actually override the
+# libtool.eclass, we'll have ECLASSDIR pointing to the active overlay's
+# eclass/ dir, but libtool.eclass is still in the main Gentoo tree. So
+# add a check to locate the ELT-patches/ regardless of what's going on.
+# Note: Duplicated in eutils.eclass.
+_LIBTOOL_ECLASSDIR_LOCAL=${BASH_SOURCE[0]%/*}
+libtool_elt_patch_dir() {
+ local d="${ECLASSDIR}/ELT-patches"
+ if [[ ! -d ${d} ]] ; then
+ d="${_LIBTOOL_ECLASSDIR_LOCAL}/ELT-patches"
+ fi
+ echo "${d}"
+}
+
+inherit multilib toolchain-funcs
+
+#
+# See if we can apply $2 on $1, and if so, do it
+#
+ELT_try_and_apply_patch() {
+ local ret=0
+ local file=$1
+ local patch=$2
+ local src=$3
+ local disp="${src} patch"
+ local log="${T}/elibtool.log"
+
+ if [[ -z ${_ELT_NOTED_TMP} ]] ; then
+ _ELT_NOTED_TMP=true
+ printf 'temp patch: %s\n' "${patch}" > "${log}"
+ fi
+ printf '\nTrying %s\n' "${disp}" >> "${log}"
+
+ if [[ ! -e ${file} ]] ; then
+ echo "File not found: ${file}" >> "${log}"
+ return 1
+ fi
+
+ # Save file for permission restoration. `patch` sometimes resets things.
+ # Ideally we'd want 'stat -c %a', but stat is highly non portable and we are
+ # guaranted to have GNU find, so use that instead.
+ local perms="$(find ${file} -maxdepth 0 -printf '%m')"
+ # We only support patchlevel of 0 - why worry if its static patches?
+ if patch -p0 --dry-run "${file}" "${patch}" >> "${log}" 2>&1 ; then
+ einfo " Applying ${disp} ..."
+ patch -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" >> "${log}" 2>&1
+ ret=$?
+ export ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${src}"
+ else
+ ret=1
+ fi
+ chmod "${perms}" "${file}"
+
+ return "${ret}"
+}
+
+#
+# Get string version of ltmain.sh or ltconfig (passed as $1)
+#
+ELT_libtool_version() {
+ (
+ unset VERSION
+ eval $(grep -e '^[[:space:]]*VERSION=' "$1")
+ echo "${VERSION:-0}"
+ )
+}
+
+#
+# Run through the patches in $2 and see if any
+# apply to $1 ...
+#
+ELT_walk_patches() {
+ local patch tmp
+ local ret=1
+ local file=$1
+ local patch_set=$2
+ local patch_dir="$(libtool_elt_patch_dir)/${patch_set}"
+ local rem_int_dep=$3
+
+ [[ -z ${patch_set} ]] && return 1
+ [[ ! -d ${patch_dir} ]] && return 1
+
+ # Allow patches to use @GENTOO_LIBDIR@ replacements
+ local sed_args=( -e "s:@GENTOO_LIBDIR@:$(get_libdir):g" )
+ if [[ -n ${rem_int_dep} ]] ; then
+ # replace @REM_INT_DEP@ with what was passed
+ # to --remove-internal-dep
+ sed_args+=( -e "s|@REM_INT_DEP@|${rem_int_dep}|g" )
+ fi
+
+ pushd "$(libtool_elt_patch_dir)" >/dev/null || die
+
+ # Go through the patches in reverse order (newer version to older)
+ for patch in $(find "${patch_set}" -maxdepth 1 -type f | LC_ALL=C sort -r) ; do
+ tmp="${T}/libtool-elt.patch"
+ sed "${sed_args[@]}" "${patch}" > "${tmp}" || die
+ if ELT_try_and_apply_patch "${file}" "${tmp}" "${patch}" ; then
+ # Break to unwind w/popd rather than return directly
+ ret=0
+ break
+ fi
+ done
+
+ popd >/dev/null
+ return ${ret}
+}
+
+# @FUNCTION: elibtoolize
+# @USAGE: [dirs] [--portage] [--reverse-deps] [--patch-only] [--remove-internal-dep=xxx] [--shallow] [--no-uclibc]
+# @DESCRIPTION:
+# Apply a smorgasbord of patches to bundled libtool files. This function
+# should always be safe to run. If no directories are specified, then
+# ${S} will be searched for appropriate files.
+#
+# If the --shallow option is used, then only ${S}/ltmain.sh will be patched.
+#
+# The other options should be avoided in general unless you know what's going on.
+elibtoolize() {
+ local x
+ local dirs=()
+ local do_portage="no"
+ local do_reversedeps="yes"
+ local do_only_patches="no"
+ local do_uclibc="yes"
+ local deptoremove=
+ local do_shallow="no"
+ local force="false"
+ local elt_patches="install-sh ltmain portage relink max_cmd_len sed test tmp cross as-needed target-nm"
+
+ for x in "$@" ; do
+ case ${x} in
+ --portage)
+ # Only apply portage patch, and don't
+ # 'libtoolize --copy --force' if all patches fail.
+ do_portage="yes"
+ ;;
+ --reverse-deps)
+ # Apply the reverse-deps patch
+ # http://bugzilla.gnome.org/show_bug.cgi?id=75635
+ do_reversedeps="yes"
+ elt_patches+=" fix-relink"
+ ;;
+ --patch-only)
+ # Do not run libtoolize if none of the patches apply ..
+ do_only_patches="yes"
+ ;;
+ --remove-internal-dep=*)
+ # We will replace @REM_INT_DEP@ with what is needed
+ # in ELT_walk_patches() ...
+ deptoremove=${x#--remove-internal-dep=}
+
+ # Add the patch for this ...
+ [[ -n ${deptoremove} ]] && elt_patches+=" rem-int-dep"
+ ;;
+ --shallow)
+ # Only patch the ltmain.sh in ${S}
+ do_shallow="yes"
+ ;;
+ --no-uclibc)
+ do_uclibc="no"
+ ;;
+ --force)
+ force="true"
+ ;;
+ -*)
+ eerror "Invalid elibtoolize option: ${x}"
+ die "elibtoolize called with ${x} ??"
+ ;;
+ *) dirs+=( "${x}" )
+ esac
+ done
+
+ [[ ${do_uclibc} == "yes" ]] && elt_patches+=" uclibc-conf uclibc-ltconf"
+
+ case ${CHOST} in
+ *-aix*) elt_patches+=" hardcode aixrtl" ;; #213277
+ *-darwin*) elt_patches+=" darwin-ltconf darwin-ltmain darwin-conf" ;;
+ *-solaris*) elt_patches+=" sol2-conf sol2-ltmain" ;;
+ *-freebsd*) elt_patches+=" fbsd-conf fbsd-ltconf" ;;
+ *-hpux*) elt_patches+=" hpux-conf deplibs hc-flag-ld hardcode hardcode-relink relink-prog no-lc" ;;
+ *-irix*) elt_patches+=" irix-ltmain" ;;
+ *-mint*) elt_patches+=" mint-conf" ;;
+ esac
+
+ if $(tc-getLD) --version 2>&1 | grep -qs 'GNU gold'; then
+ elt_patches+=" gold-conf"
+ fi
+
+ # Find out what dirs to scan.
+ if [[ ${do_shallow} == "yes" ]] ; then
+ [[ ${#dirs[@]} -ne 0 ]] && die "Using --shallow with explicit dirs doesn't make sense"
+ [[ -f ${S}/ltmain.sh || -f ${S}/configure ]] && dirs+=( "${S}" )
+ else
+ [[ ${#dirs[@]} -eq 0 ]] && dirs+=( "${S}" )
+ dirs=( $(find "${dirs[@]}" '(' -name ltmain.sh -o -name configure ')' -printf '%h\n' | sort -u) )
+ fi
+
+ local d p ret
+ for d in "${dirs[@]}" ; do
+ export ELT_APPLIED_PATCHES=
+
+ if [[ -f ${d}/.elibtoolized ]] ; then
+ ${force} || continue
+ fi
+
+ local outfunc="einfo"
+ [[ -f ${d}/.elibtoolized ]] && outfunc="ewarn"
+ ${outfunc} "Running elibtoolize in: ${d#${WORKDIR}/}/"
+ if [[ ${outfunc} == "ewarn" ]] ; then
+ ewarn " We've already been run in this tree; you should"
+ ewarn " avoid this if possible (perhaps by filing a bug)"
+ fi
+
+ # patching ltmain.sh
+ [[ -f ${d}/ltmain.sh ]] &&
+ for p in ${elt_patches} ; do
+ ret=0
+
+ case ${p} in
+ portage)
+ # Stupid test to see if its already applied ...
+ if ! grep -qs 'We do not want portage' "${d}/ltmain.sh" ; then
+ ELT_walk_patches "${d}/ltmain.sh" "${p}"
+ ret=$?
+ fi
+ ;;
+ rem-int-dep)
+ ELT_walk_patches "${d}/ltmain.sh" "${p}" "${deptoremove}"
+ ret=$?
+ ;;
+ fix-relink)
+ # Do not apply if we do not have the relink patch applied ...
+ if grep -qs 'inst_prefix_dir' "${d}/ltmain.sh" ; then
+ ELT_walk_patches "${d}/ltmain.sh" "${p}"
+ ret=$?
+ fi
+ ;;
+ max_cmd_len)
+ # Do not apply if $max_cmd_len is not used ...
+ if grep -qs 'max_cmd_len' "${d}/ltmain.sh" ; then
+ ELT_walk_patches "${d}/ltmain.sh" "${p}"
+ ret=$?
+ fi
+ ;;
+ as-needed)
+ ELT_walk_patches "${d}/ltmain.sh" "${p}"
+ ret=$?
+ ;;
+ uclibc-ltconf)
+ # Newer libtoolize clears ltconfig, as not used anymore
+ if [[ -s ${d}/ltconfig ]] ; then
+ ELT_walk_patches "${d}/ltconfig" "${p}"
+ ret=$?
+ fi
+ ;;
+ fbsd-ltconf)
+ if [[ -s ${d}/ltconfig ]] ; then
+ ELT_walk_patches "${d}/ltconfig" "${p}"
+ ret=$?
+ fi
+ ;;
+ darwin-ltconf)
+ # Newer libtoolize clears ltconfig, as not used anymore
+ if [[ -s ${d}/ltconfig ]] ; then
+ ELT_walk_patches "${d}/ltconfig" "${p}"
+ ret=$?
+ fi
+ ;;
+ darwin-ltmain)
+ # special case to avoid false positives (failing to apply
+ # ltmain.sh path message), newer libtools have this patch
+ # built in, so not much to patch around then
+ if [[ -e ${d}/ltmain.sh ]] && \
+ ! grep -qs 'verstring="-compatibility_version' "${d}/ltmain.sh" ; then
+ ELT_walk_patches "${d}/ltmain.sh" "${p}"
+ ret=$?
+ fi
+ ;;
+ install-sh)
+ ELT_walk_patches "${d}/install-sh" "${p}"
+ ret=$?
+ ;;
+ cross)
+ if tc-is-cross-compiler ; then
+ ELT_walk_patches "${d}/ltmain.sh" "${p}"
+ ret=$?
+ fi
+ ;;
+ *)
+ ELT_walk_patches "${d}/ltmain.sh" "${p}"
+ ret=$?
+ ;;
+ esac
+
+ if [[ ${ret} -ne 0 ]] ; then
+ case ${p} in
+ relink)
+ local version=$(ELT_libtool_version "${d}/ltmain.sh")
+ # Critical patch, but could be applied ...
+ # FIXME: Still need a patch for ltmain.sh > 1.4.0
+ if ! grep -qs 'inst_prefix_dir' "${d}/ltmain.sh" && \
+ [[ $(VER_to_int "${version}") -ge $(VER_to_int "1.4.0") ]] ; then
+ ewarn " Could not apply relink.patch!"
+ fi
+ ;;
+ portage)
+ # Critical patch - for this one we abort, as it can really
+ # cause breakage without it applied!
+ if [[ ${do_portage} == "yes" ]] ; then
+ # Stupid test to see if its already applied ...
+ if ! grep -qs 'We do not want portage' "${d}/ltmain.sh" ; then
+ echo
+ eerror "Portage patch requested, but failed to apply!"
+ eerror "Please file a bug report to add a proper patch."
+ die "Portage patch requested, but failed to apply!"
+ fi
+ else
+ if grep -qs 'We do not want portage' "${d}/ltmain.sh" ; then
+ # ewarn " Portage patch seems to be already applied."
+ # ewarn " Please verify that it is not needed."
+ :
+ else
+ local version=$(ELT_libtool_version "${d}"/ltmain.sh)
+ echo
+ eerror "Portage patch failed to apply (ltmain.sh version ${version})!"
+ eerror "Please file a bug report to add a proper patch."
+ die "Portage patch failed to apply!"
+ fi
+ # We do not want to run libtoolize ...
+ ELT_APPLIED_PATCHES="portage"
+ fi
+ ;;
+ darwin-*)
+ [[ ${CHOST} == *"-darwin"* ]] && ewarn " Darwin patch set '${p}' failed to apply!"
+ ;;
+ esac
+ fi
+ done
+
+ # makes sense for ltmain.sh patches only
+ [[ -f ${d}/ltmain.sh ]] &&
+ if [[ -z ${ELT_APPLIED_PATCHES} ]] ; then
+ if [[ ${do_portage} == "no" && \
+ ${do_reversedeps} == "no" && \
+ ${do_only_patches} == "no" && \
+ ${deptoremove} == "" ]]
+ then
+ ewarn "Cannot apply any patches, please file a bug about this"
+ die
+ fi
+ fi
+
+ # patching configure
+ [[ -f ${d}/configure ]] &&
+ for p in ${elt_patches} ; do
+ ret=0
+
+ case ${p} in
+ uclibc-conf)
+ if grep -qs 'Transform linux' "${d}/configure" ; then
+ ELT_walk_patches "${d}/configure" "${p}"
+ ret=$?
+ fi
+ ;;
+ fbsd-conf)
+ if grep -qs 'version_type=freebsd-' "${d}/configure" ; then
+ ELT_walk_patches "${d}/configure" "${p}"
+ ret=$?
+ fi
+ ;;
+ darwin-conf)
+ if grep -qs '&& echo \.so ||' "${d}/configure" ; then
+ ELT_walk_patches "${d}/configure" "${p}"
+ ret=$?
+ fi
+ ;;
+ aixrtl|hpux-conf)
+ ret=1
+ local subret=0
+ # apply multiple patches as often as they match
+ while [[ $subret -eq 0 ]]; do
+ subret=1
+ if [[ -e ${d}/configure ]]; then
+ ELT_walk_patches "${d}/configure" "${p}"
+ subret=$?
+ fi
+ if [[ $subret -eq 0 ]]; then
+ # have at least one patch succeeded.
+ ret=0
+ fi
+ done
+ ;;
+ mint-conf|gold-conf|sol2-conf)
+ ELT_walk_patches "${d}/configure" "${p}"
+ ret=$?
+ ;;
+ target-nm)
+ ELT_walk_patches "${d}/configure" "${p}"
+ ret=$?
+ ;;
+ *)
+ # ltmain.sh patches are applied above
+ ;;
+ esac
+
+ if [[ ${ret} -ne 0 ]] ; then
+ case ${p} in
+ uclibc-*)
+ [[ ${CHOST} == *-uclibc ]] && ewarn " uClibc patch set '${p}' failed to apply!"
+ ;;
+ fbsd-*)
+ if [[ ${CHOST} == *-freebsd* ]] ; then
+ if [[ -z $(grep 'Handle Gentoo/FreeBSD as it was Linux' \
+ "${d}/configure" 2>/dev/null) ]]; then
+ eerror " FreeBSD patch set '${p}' failed to apply!"
+ die "FreeBSD patch set '${p}' failed to apply!"
+ fi
+ fi
+ ;;
+ darwin-*)
+ [[ ${CHOST} == *"-darwin"* ]] && ewarn " Darwin patch set '${p}' failed to apply!"
+ ;;
+ esac
+ fi
+ done
+
+ rm -f "${d}/libtool"
+
+ > "${d}/.elibtoolized"
+ done
+}
+
+uclibctoolize() { die "Use elibtoolize"; }
+darwintoolize() { die "Use elibtoolize"; }
+
+# char *VER_major(string)
+#
+# Return the Major (X of X.Y.Z) version
+#
+VER_major() {
+ [[ -z $1 ]] && return 1
+
+ local VER=$@
+ echo "${VER%%[^[:digit:]]*}"
+}
+
+# char *VER_minor(string)
+#
+# Return the Minor (Y of X.Y.Z) version
+#
+VER_minor() {
+ [[ -z $1 ]] && return 1
+
+ local VER=$@
+ VER=${VER#*.}
+ echo "${VER%%[^[:digit:]]*}"
+}
+
+# char *VER_micro(string)
+#
+# Return the Micro (Z of X.Y.Z) version.
+#
+VER_micro() {
+ [[ -z $1 ]] && return 1
+
+ local VER=$@
+ VER=${VER#*.*.}
+ echo "${VER%%[^[:digit:]]*}"
+}
+
+# int VER_to_int(string)
+#
+# Convert a string type version (2.4.0) to an int (132096)
+# for easy compairing or versions ...
+#
+VER_to_int() {
+ [[ -z $1 ]] && return 1
+
+ local VER_MAJOR=$(VER_major "$1")
+ local VER_MINOR=$(VER_minor "$1")
+ local VER_MICRO=$(VER_micro "$1")
+ local VER_int=$(( VER_MAJOR * 65536 + VER_MINOR * 256 + VER_MICRO ))
+
+ # We make version 1.0.0 the minimum version we will handle as
+ # a sanity check ... if its less, we fail ...
+ if [[ ${VER_int} -ge 65536 ]] ; then
+ echo "${VER_int}"
+ return 0
+ fi
+
+ echo 1
+ return 1
+}
+
+fi