Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 301190 - Please review libtool.eclass additions
Summary: Please review libtool.eclass additions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 232820
Blocks:
  Show dependency tree
 
Reported: 2010-01-16 13:41 UTC by Fabian Groffen
Modified: 2010-01-27 20:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libtool.eclass Prefix patch (libtool-prefix.patch,3.77 KB, patch)
2010-01-16 13:42 UTC, Fabian Groffen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2010-01-16 13:41:35 UTC
I would like to merge back the libtool.eclass changes that we use in Prefix.  Please review the attached patch.

The patch does two things:
1)  it adds --force argument to elibtoolize
2)  it adds several ELT-patches, which will have to be merged back too and can be found here: http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/eclass/ELT-patches
Comment 1 Fabian Groffen gentoo-dev 2010-01-16 13:42:14 UTC
Created attachment 216677 [details, diff]
libtool.eclass Prefix patch
Comment 2 SpanKY gentoo-dev 2010-01-17 00:42:29 UTC
since i doubt there will be any overlapping CHOST's there, use a case statement instead of adding glob matching over and over (${CHOST} == *...*)

do you really need to list all of those chosts there wrt hardcode ?  doesnt seem like the comment adds anything useful.

why do you need the --force option ?

as for the new sets of patches, i dont particularly care
Comment 3 Fabian Groffen gentoo-dev 2010-01-17 10:38:31 UTC
(In reply to comment #2)
> since i doubt there will be any overlapping CHOST's there, use a case statement
> instead of adding glob matching over and over (${CHOST} == *...*)

will do

> do you really need to list all of those chosts there wrt hardcode ?  doesnt
> seem like the comment adds anything useful.
> 
> why do you need the --force option ?

haubi, that's your stuff, I wouldn't mind punting the entire list

> as for the new sets of patches, i dont particularly care
Comment 4 Michael Haubenwallner (RETIRED) gentoo-dev 2010-01-19 21:10:10 UTC
(In reply to comment #2)
> why do you need the --force option ?

This is for bug#232820.
Comment 5 Michael Haubenwallner (RETIRED) gentoo-dev 2010-01-19 21:14:24 UTC
(In reply to comment #2)
> do you really need to list all of those chosts there wrt hardcode ?  doesnt
> seem like the comment adds anything useful.

Agreed. This is merely a reminder for myself from the early ppc-aix days and can be dropped now.
Comment 6 SpanKY gentoo-dev 2010-01-19 22:05:13 UTC
the --force option is already being discussed in the other bug and shouldnt be part of this merge.  i'm OK with the other stuff per the changes discussed ... so perhaps post a new patch to make sure we're all on the same page ?
Comment 7 Fabian Groffen gentoo-dev 2010-01-20 09:27:39 UTC
with the force bits removed:

--- libtool.eclass      2009-05-03 22:07:56.000000000 +0200
+++ libtool.eclass      2010-01-17 11:47:20.932058055 +0100
@@ -174,18 +178,30 @@
        [[ ${do_uclibc} == "yes" ]] && \
                elt_patches="${elt_patches} uclibc-conf uclibc-ltconf"
 
-       [[ ${CHOST} == *"-freebsd"* ]] && \
-               elt_patches="${elt_patches} fbsd-conf fbsd-ltconf"
-
-       [[ ${CHOST} == *"-darwin"* ]] && \
-               elt_patches="${elt_patches} darwin-ltconf darwin-ltmain"
+       case "${CHOST}" in
+               *-aix*)
+                       elt_patches="${elt_patches} hardcode aixrtl"
+               ;;
+               *-darwin*)
+                       elt_patches="${elt_patches} darwin-ltconf darwin-ltmain darwin-conf"
+               ;;
+               *-freebsd*)
+                       elt_patches="${elt_patches} fbsd-conf fbsd-ltconf"
+               ;;
+               *-hpux*)
+                       elt_patches="${elt_patches} hpux-conf deplibs hc-flag-ld hardcode hardcode-relink relink-prog no-lc"
+               ;;
+               *-mint*)
+                       elt_patches="${elt_patches} mint-conf"
+               ;;
+       esac
 
        for x in ${my_dirlist} ; do
                local tmp=$(echo "${x}" | sed -e "s|${WORKDIR}||")
                export ELT_APPLIED_PATCHES=
                export ELT_LTMAIN_SH="${x}/ltmain.sh"
 
                [[ -f ${x}/.elibtoolized ]] && continue
 
                cd ${x}
                einfo "Running elibtoolize in: $(echo "/${tmp}" | sed -e 's|//|/|g; s|^/||')"
@@ -260,6 +276,18 @@
                                                ret=$?
                                        fi
                                        ;;
+                               "darwin-conf")
+                                       if [[ -e ${x}/configure && \
+                                             -n $(grep '&& echo \.so ||' "${x}/configure") ]] ; then
+                                               ELT_walk_patches "${x}/configure" "${y}"
+                                               ret=$?
+                                       # ltmain.sh and co might be in a subdirectory ...
+                                       elif [[ ! -e ${x}/configure && -e ${x}/../configure && \
+                                               -n $(grep '&& echo \.so ||' "${x}/../configure") ]] ; then
+                                               ELT_walk_patches "${x}/../configure" "${y}"
+                                               ret=$?
+                                       fi
+                                       ;;
                                "darwin-ltconf")
                                        # Newer libtoolize clears ltconfig, as not used anymore
                                        if [[ -s ${x}/ltconfig ]] ; then
@@ -267,6 +295,32 @@
                                                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 ${x}/ltmain.sh && \
+                                             -z $(grep 'verstring="-compatibility_version' "${x}/ltmain.sh") ]] ; then
+                                               ELT_walk_patches "${x}/ltmain.sh" "${y}"
+                                               ret=$?
+                                       fi
+                                       ;;
+                               "aixrtl" | "hpux-conf" | "mint-conf" )
+                                       ret=1
+                                       local subret=1
+                                       if [[ -e ${x}/configure ]]; then
+                                               ELT_walk_patches "${x}/configure" "${y}"
+                                               subret=$?
+                                       # ltmain.sh and co might be in a subdirectory ...
+                                       elif [[ ! -e ${x}/configure && -e ${x}/../configure ]] ; then
+                                               ELT_walk_patches "${x}/../configure" "${y}"
+                                               subret=$?
+                                       fi
+                                       if [[ $subret -eq 0 ]]; then
+                                               # have at least one patch succeeded.
+                                               ret=0
+                                       fi
+                                       ;;
                                "install-sh")
                                        ELT_walk_patches "${x}/install-sh" "${y}"
                                        ret=$?
Comment 8 SpanKY gentoo-dev 2010-01-21 05:46:49 UTC
i meant post as an attachment, but whatever

those changes look fine, feel free to add
Comment 9 Fabian Groffen gentoo-dev 2010-01-27 20:42:33 UTC
ok, ELT-patches merged back.

For the remaining difference we should come to some conclusion in bug #232820.