From 32f9e02ecfd7ea720100e6d53b947c404a6c7534 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sat, 11 Apr 2020 22:15:08 +0200 Subject: [PATCH] libtool: do not link transitive dependencies explicitly. Let runtime_loader figure this out. It makes it easier for us to manage updates to libraries. --- sys-devel/libtool/libtool-2.4.2.recipe | 95 ------------------- sys-devel/libtool/libtool-2.4.6.recipe | 7 +- sys-devel/libtool/libtool-2.4.recipe | 95 ------------------- .../2.4.2/adjust_config_for_packaging.patch | 17 ---- .../2.4.2/remove_help2man_dependency.patch | 21 ---- .../2.4/adjust_config_for_packaging.patch | 17 ---- .../2.4/remove_help2man_dependency.patch | 24 ----- .../libtool/patches/libtool-2.4.6.patchset | 37 +++++++- 8 files changed, 41 insertions(+), 272 deletions(-) delete mode 100644 sys-devel/libtool/libtool-2.4.2.recipe delete mode 100644 sys-devel/libtool/libtool-2.4.recipe delete mode 100644 sys-devel/libtool/patches/2.4.2/adjust_config_for_packaging.patch delete mode 100644 sys-devel/libtool/patches/2.4.2/remove_help2man_dependency.patch delete mode 100644 sys-devel/libtool/patches/2.4/adjust_config_for_packaging.patch delete mode 100644 sys-devel/libtool/patches/2.4/remove_help2man_dependency.patch diff --git a/sys-devel/libtool/libtool-2.4.2.recipe b/sys-devel/libtool/libtool-2.4.2.recipe deleted file mode 100644 index aeb37431c..000000000 --- a/sys-devel/libtool/libtool-2.4.2.recipe +++ /dev/null @@ -1,95 +0,0 @@ -SUMMARY="A generic library of support scripts" -DESCRIPTION="GNU libtool is a set of shell scripts to automatically configure \ -UNIX architectures to build shared libraries in a generic fashion." -HOMEPAGE="http://www.gnu.org/software/libtool" -COPYRIGHT="2004-2010 Free Software Foundation, Inc." -LICENSE="GNU GPL v2" -REVISION="3" -SOURCE_URI="ftp://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz" -CHECKSUM_SHA256="b38de44862a987293cd3d8dfae1c409d514b6c4e794ebc93648febf9afc38918" -PATCHES="2.4.2/adjust_config_for_packaging.patch - 2.4.2/remove_help2man_dependency.patch" - -ARCHITECTURES="x86_gcc2 x86 x86_64 arm" -SECONDARY_ARCHITECTURES="x86_gcc2 x86" - -PROVIDES=" - libtool$secondaryArchSuffix = $portVersion compat >= 2.4 - cmd:libtool$secondaryArchSuffix = $portVersion compat >= 2.4 - cmd:libtoolize$secondaryArchSuffix = $portVersion compat >= 2.4 - devel:libltdl$secondaryArchSuffix = 7.3.0 compat >= 7 - " -REQUIRES=" - haiku$secondaryArchSuffix - libtool_libltdl$secondaryArchSuffix == $portVersion base - cmd:aclocal - cmd:automake - cmd:find - cmd:sed - cmd:tar - cmd:xargs - " - -SUMMARY_libltdl="The libtool libltdl library" -PROVIDES_libltdl=" - libtool_libltdl$secondaryArchSuffix = $portVersion compat >= 2.4 - lib:libltdl$secondaryArchSuffix = 7.3.0 compat >= 7 - " -REQUIRES_libltdl=" - haiku$secondaryArchSuffix - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - " -BUILD_PREREQUIRES=" - cmd:aclocal - cmd:autoconf >= 2.62 - cmd:autoheader >= 2.62 - cmd:find - cmd:gcc$secondaryArchSuffix - cmd:ld$secondaryArchSuffix - cmd:make - cmd:nm - cmd:ranlib - cmd:sed - cmd:xargs - " - -BUILD() -{ - ./bootstrap - SED='sed' NM='nm' LD=ld runConfigure ./configure \ - --with-gnu-ld - make $jobArgs - # Desperate move to remove the absolute paths from libtool. For some reason - # only for the C++ compiler those are set (not for the C compiler). In - # openSuse libtool doesn't have those variables set either, but building - # according to their libroot.spec produces a libtool that has them set as - # well. My guess is that one has to build libtool without a C++ compiler - # installed to get that result. - sed -i -e 's@^predep_objects=".*"$@predep_objects=""'@ \ - -e 's@^postdep_objects=".*"$@postdep_objects=""'@ \ - -e 's@^postdeps=".*"$@postdeps=""'@ \ - -e 's@^compiler_lib_search_path=".*"$@compiler_lib_search_path=""'@ \ - -e 's@^compiler_lib_search_dirs=".*"$@compiler_lib_search_dirs=""'@ \ - libtool -} - -INSTALL() -{ - make install - prepareInstalledDevelLibs libltdl - - # libltdl package - packageEntries libltdl \ - $libDir/libltdl* - - # main package - rmdir $libDir -} - -TEST() -{ - make check -} diff --git a/sys-devel/libtool/libtool-2.4.6.recipe b/sys-devel/libtool/libtool-2.4.6.recipe index dd17356fe..80c0e78ed 100644 --- a/sys-devel/libtool/libtool-2.4.6.recipe +++ b/sys-devel/libtool/libtool-2.4.6.recipe @@ -4,7 +4,7 @@ UNIX architectures to build shared libraries in a generic fashion." HOMEPAGE="http://www.gnu.org/software/libtool" COPYRIGHT="2004-2010 Free Software Foundation, Inc." LICENSE="GNU GPL v2" -REVISION="1" +REVISION="2" SOURCE_URI="https://ftp.gnu.org/gnu/libtool/libtool-$portVersion.tar.gz" CHECKSUM_SHA256="e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3" PATCHES="libtool-$portVersion.patchset" @@ -63,7 +63,12 @@ BUILD() export XZ=/bin/true touch README-release + cp m4/libtool.m4 m4/libtool.m4.bak ./bootstrap --force + mv m4/libtool.m4.bak m4/libtool.m4 + # bootstrap copies back the file from the system over the current ones. + # But we must run it, because libtool is shipped with old aclocal-1.15 + # files and we have only a newer aclocal. So just restore the file. SED='sed' NM='nm' LD=ld runConfigure ./configure \ --with-gnu-ld make $jobArgs diff --git a/sys-devel/libtool/libtool-2.4.recipe b/sys-devel/libtool/libtool-2.4.recipe deleted file mode 100644 index 2f2146382..000000000 --- a/sys-devel/libtool/libtool-2.4.recipe +++ /dev/null @@ -1,95 +0,0 @@ -SUMMARY="A generic library support script" -DESCRIPTION=" -GNU libtool is a set of shell scripts to automatically configure UNIX \ -architectures to build shared libraries in a generic fashion. -" -HOMEPAGE="http://www.gnu.org/software/libtool" -COPYRIGHT="2004-2010 Free Software Foundation, Inc." -LICENSE="GNU GPL v2" -SOURCE_URI="ftp://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.gz" -CHECKSUM_SHA256="13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e" -REVISION="8" -ARCHITECTURES="x86_gcc2 x86 x86_64" - -PATCHES=" - 2.4/adjust_config_for_packaging.patch - 2.4/remove_help2man_dependency.patch - " - -PROVIDES=" - libtool = $portVersion compat >= 2.4 - cmd:libtool = $portVersion compat >= 2.4 - cmd:libtoolize = $portVersion compat >= 2.4 - devel:libltdl = 7.3.0 compat >= 7 - " -REQUIRES=" - haiku - libtool_libltdl == $portVersion base - cmd:aclocal - cmd:automake - cmd:sed - cmd:tar - " -BUILD_REQUIRES=" - " -BUILD_PREREQUIRES=" - haiku_devel - cmd:aclocal - cmd:autoconf >= 2.62 - cmd:autoheader >= 2.62 - cmd:gcc - cmd:ld - cmd:make - cmd:nm - cmd:ranlib - cmd:sed - " - -BUILD() -{ - ./bootstrap - SED='sed' NM='nm' LD=ld runConfigure ./configure \ - --with-gnu-ld - make $jobArgs - # Desperate move to remove the absolute paths from libtool. For some reason - # only for the C++ compiler those are set (not for the C compiler). In - # openSuse libtool doesn't have those variables set either, but building - # according to their libroot.spec produces a libtool that has them set as - # well. My guess is that one has to build libtool without a C++ compiler - # installed to get that result. - sed -i -e 's@^predep_objects=".*"$@predep_objects=""'@ \ - -e 's@^postdep_objects=".*"$@postdep_objects=""'@ \ - -e 's@^postdeps=".*"$@postdeps=""'@ \ - -e 's@^compiler_lib_search_path=".*"$@compiler_lib_search_path=""'@ \ - -e 's@^compiler_lib_search_dirs=".*"$@compiler_lib_search_dirs=""'@ \ - libtool -} - -INSTALL() -{ - make install - prepareInstalledDevelLibs libltdl - - # libltdl package - packageEntries libltdl \ - $libDir/libltdl* - - # main package - rmdir $libDir -} - -TEST() -{ - make check -} - -# ----- libltdl package ------------------------------------------------------- - -SUMMARY_libltdl="The libtool libltdl library" -PROVIDES_libltdl=" - libtool_libltdl = $portVersion compat >= 2.4 - lib:libltdl = 7.3.0 compat >= 7 - " -REQUIRES_libltdl=" - haiku - " diff --git a/sys-devel/libtool/patches/2.4.2/adjust_config_for_packaging.patch b/sys-devel/libtool/patches/2.4.2/adjust_config_for_packaging.patch deleted file mode 100644 index 0ae018240..000000000 --- a/sys-devel/libtool/patches/2.4.2/adjust_config_for_packaging.patch +++ /dev/null @@ -1,17 +0,0 @@ -Adjust haiku configuration of upstream libtool for packaging. - -diff -ruwN libtool-2.4.2/libltdl/m4/libtool.m4 libtool-2.4.2_haiku/libltdl/m4/libtool.m4 ---- libtool-2.4.2/libltdl/m4/libtool.m4 2010-09-22 10:41:19.021233664 +0200 -+++ libtool-2.4.2_haiku/libltdl/m4/libtool.m4 2013-04-27 21:00:11.784859136 +0200 -@@ -2473,8 +2473,9 @@ - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' -- hardcode_into_libs=yes -+ sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' -+ hardcode_into_libs=no - ;; - - hpux9* | hpux10* | hpux11*) diff --git a/sys-devel/libtool/patches/2.4.2/remove_help2man_dependency.patch b/sys-devel/libtool/patches/2.4.2/remove_help2man_dependency.patch deleted file mode 100644 index 4b3a62fce..000000000 --- a/sys-devel/libtool/patches/2.4.2/remove_help2man_dependency.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/Makefile.am b/Makefile.am -index 268b399..a8236c1 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -328,16 +328,6 @@ $(srcdir)/doc/notes.txt: $(srcdir)/doc/notes.texi - $(MAKEINFO) --no-headers $(MAKEINFOFLAGS) -o notes.txt notes.texi - - dist_man1_MANS = $(srcdir)/doc/libtool.1 $(srcdir)/doc/libtoolize.1 --MAINTAINERCLEANFILES += $(dist_man1_MANS) --update_mans = \ -- PATH=".$(PATH_SEPARATOR)$$PATH"; export PATH; \ -- $(HELP2MAN) --output=$@ --$(srcdir)/doc/libtool.1: $(srcdir)/$(auxdir)/ltmain.sh -- $(update_mans) --help-option=--help-all libtool --$(srcdir)/doc/libtoolize.1: $(srcdir)/libtoolize.in -- $(update_mans) libtoolize -- -- - ## ------------- ## - ## Installation. ## - ## ------------- ## diff --git a/sys-devel/libtool/patches/2.4/adjust_config_for_packaging.patch b/sys-devel/libtool/patches/2.4/adjust_config_for_packaging.patch deleted file mode 100644 index 53cdd3033..000000000 --- a/sys-devel/libtool/patches/2.4/adjust_config_for_packaging.patch +++ /dev/null @@ -1,17 +0,0 @@ -Adjust haiku configuration of upstream libtool for packaging. - -diff -ruwN libtool-2.4/libltdl/m4/libtool.m4 libtool-2.4_haiku/libltdl/m4/libtool.m4 ---- libtool-2.4/libltdl/m4/libtool.m4 2010-09-22 10:41:19.021233664 +0200 -+++ libtool-2.4_haiku/libltdl/m4/libtool.m4 2013-04-27 21:00:11.784859136 +0200 -@@ -2473,8 +2473,9 @@ - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' -- hardcode_into_libs=yes -+ sys_lib_search_path_spec='/boot/common/non-packaged/lib /boot/common/develop/lib /boot/common/lib /boot/system/develop/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/common/non-packaged/lib /boot/common/lib /boot/system/lib' -+ hardcode_into_libs=no - ;; - - hpux9* | hpux10* | hpux11*) diff --git a/sys-devel/libtool/patches/2.4/remove_help2man_dependency.patch b/sys-devel/libtool/patches/2.4/remove_help2man_dependency.patch deleted file mode 100644 index de7615273..000000000 --- a/sys-devel/libtool/patches/2.4/remove_help2man_dependency.patch +++ /dev/null @@ -1,24 +0,0 @@ -Remove dependency to help2man, which tries to regenerate the manpages. -As the failure to use help2man has become an error with automake-1.13, -we just use the manpages that come with the source. - -diff -ruwN libtool-2.4/Makefile.am libtool-2.4_haiku/Makefile.am ---- libtool-2.4/Makefile.am 2010-09-21 09:07:22.038535168 +0200 -+++ libtool-2.4_haiku/Makefile.am 2013-04-23 23:41:18.886833152 +0200 -@@ -322,16 +322,6 @@ - $(MAKEINFO) --no-headers $(MAKEINFOFLAGS) -o notes.txt notes.texi - - dist_man1_MANS = $(srcdir)/doc/libtool.1 $(srcdir)/doc/libtoolize.1 --MAINTAINERCLEANFILES += $(dist_man1_MANS) --update_mans = \ -- PATH=.$(PATH_SEPARATOR)$$PATH; export PATH; \ -- $(HELP2MAN) --output=$@ --$(srcdir)/doc/libtool.1: $(srcdir)/$(auxdir)/ltmain.sh -- $(update_mans) --help-option=--help-all libtool --$(srcdir)/doc/libtoolize.1: $(srcdir)/libtoolize.in -- $(update_mans) libtoolize -- -- - ## ------------- ## - ## Installation. ## - ## ------------- ## diff --git a/sys-devel/libtool/patches/libtool-2.4.6.patchset b/sys-devel/libtool/patches/libtool-2.4.6.patchset index e86691451..524b4c92d 100644 --- a/sys-devel/libtool/patches/libtool-2.4.6.patchset +++ b/sys-devel/libtool/patches/libtool-2.4.6.patchset @@ -1,4 +1,4 @@ -From f1c971cb704ffd1d012b6adb770686282011687c Mon Sep 17 00:00:00 2001 +From 3b142951766c96626786c8e65cc87c1aed0b6818 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 30 Sep 2017 12:12:08 +0200 Subject: Adjust haiku configuration of upstream libtool for packaging. @@ -21,5 +21,38 @@ index a3bc337..1885e22 100644 hpux9* | hpux10* | hpux11*) -- -2.13.1 +2.26.0 + + +From f9239bc54a5c90cd2ef7dbebf94e8eb4d5f3a454 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sat, 11 Apr 2020 21:12:42 +0200 +Subject: Do not explicitly link dependencies on Haiku. + +This is not needed, the runtime_loader can figure them out. + +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 1885e22..667d45e 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -5128,7 +5128,7 @@ _LT_EOF + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' +- _LT_TAGVAR(link_all_deplibs, $1)=yes ++ _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + + os2*) +@@ -6769,7 +6769,7 @@ if test yes != "$_lt_caught_CXX_error"; then + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' +- _LT_TAGVAR(link_all_deplibs, $1)=yes ++ _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + + hpux9*) +-- +2.26.0