Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=x11testing.git;a=commitdiff;h=54af48e9a047ecbf70d615723f7dfbded4ac114a
commit 54af48e9a047ecbf70d615723f7dfbded4ac114a Author: Michel Hermier <[email protected]> Date: Sat Oct 13 17:53:44 2012 +0200 util.sh * Add Flibtool_fixes that attempts to fixes some known problems with libtool's .la files. * Define USE_LIBTOOL_FIXES=y in your FrugalBuild to trigger the Flibtool_fixes at the end of an Fbuild. diff --git a/source/include/util.sh b/source/include/util.sh index 762ee5a..c272c6a 100644 --- a/source/include/util.sh +++ b/source/include/util.sh @@ -1132,10 +1132,33 @@ Fmakeinstall() { fi } +Flibtool_fixes() { + local pkg file + + for pkg in '' "${subpkgs[@]}"; do + local destdir="$(Fsubdestdir "$pkg")" + Fmessage "Libtool fixes$(Fsubdestdirinfo "${pkg}")..." + for file in "${destdir}"/usr/lib/*.la; do + if [ ! -e "${file}" ]; then + break # expension failed + fi + + # Test if a static archive exist for that .la + if [ ! -e "${file/%.la/.a}" ]; then + # No archive found we can purge dependency_libs + Fsed "dependency_libs=.*" "dependency_libs=''" "${file}" +# else +# Fsed "${Fdestdir}" "" "${file}" + fi + done + done +} + ### # * Fbuild(): The default build(): Fpatchall, Fmake, Fmakeinstall. Parameter(s) # are passed to Fmake. ### +USE_LIBTOOL_FIXES="${USE_LIBTOOL_FIXES:-"n"}" Fbuild() { Fpatchall Fmake "$@" @@ -1143,6 +1166,9 @@ Fbuild() { if echo ${source[@]}|grep -q README.Frugalware; then Fdoc README.Frugalware fi + if Fuse LIBTOOL_FIXES; then + Flibtool_fixes + fi } ### _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
