Magellan Linux

Annotation of /trunk/core/libtool/libtool-2.4.2-r7.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18332 - (hide annotations) (download)
Fri Jul 12 10:19:54 2013 UTC (10 years, 11 months ago) by niro
File size: 2077 byte(s)
-rebuild against gcc-4.8.1
1 niro 18332 # $Id$
2    
3     PNAME="libtool"
4     PVER="2.4.2"
5     PBUILD="r7"
6    
7     PCAT="sys-dev"
8    
9     DESCRIPTION="A shared library tool for developers."
10     HOMEPAGE="http://www.gnu.org/software/libtool/libtool.html"
11    
12     DEPEND_x86_64=">= sys-apps/multiarch-wrapper-1"
13     SPECIAL_VARS="DEPEND_x86_64"
14    
15     DEPEND="$(marchdepend)
16     >= virtual/glibc"
17    
18     SRCFILE="${PNAME}-${PVER}.tar.gz"
19     SRCDIR="${BUILDDIR}/${PNAME}-${PVER/a/}"
20    
21     sminclude mbuild multilib mtools
22     msetfeature "!check"
23    
24     SRC_URI=(
25     gnu://${PNAME}/${SRCFILE}
26     mirror://${PNAME}/${SRCFILE}
27     )
28    
29     UP2DATE="updatecmd_gnu ${PNAME} gz"
30    
31     src_compile()
32     {
33     local myopts
34    
35     # set abi specific search pathes on multilib systems
36     if [[ ${ARCH} = x86_64 ]]
37     then
38     echo "lt_cv_sys_dlsearch_path='/lib /usr/lib /usr/local/lib /opt/lib'" > ${BUILDDIR}/config.cache-m32 || die
39     echo "lt_cv_sys_dlsearch_path='$(mlibdir) /usr/$(mlibdir) /usr/local/$(mlibdir) /opt/$(mlibdir)'" > ${BUILDDIR}/config.cache-m64 || die
40     myopts="--cache-file=${BUILDDIR}/config.cache-$(mabi)"
41     fi
42    
43     # --build=$CHOST prevents libtool link issues at least on x86_64 hosts.
44     # sometimes the global_symbol_pipe variable is empty and produces
45     # compile errors. we check with 'grep "^global_symbol_pipe" libtool'
46     # for a broken libtool, if empty we simply die.
47     #
48     # grep "^global_symbol_pipe" libtool must give us this:
49     # global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
50     #
51     mconfigure --build=${CHOST} ${myopts} || die
52     mmake || die
53    
54     # check for broken libtool
55     for abi in ${MULTILIB_ABIS}
56     do
57     if [[ -z $(grep "^global_symbol_pipe" ${SRCDIR}-${abi}/libtool) ]]
58     then
59     die "compiled libtool is broken: empty 'global_symbol_pipe' variable"
60     fi
61     done
62     }
63    
64     src_install()
65     {
66     multilib_src_install || die
67    
68     # on multilib use multilibwrapper
69     if [[ ${ARCH} = x86_64 ]]
70     then
71     # install the multiarch-wrapper
72     if [[ -f ${BINDIR}/usr/bin/libtool ]]
73     then
74     rm -f ${BINDIR}/usr/bin/libtool || die
75     fi
76     all-abis minstallexec libtool /usr/bin/libtool-$(mabi) || die
77     mlink multiarch-wrapper /usr/bin/libtool || die
78     fi
79     }