Contents of /smage/trunk/core/libtool/libtool-2.4.2-r6.smage2
Parent Directory | Revision Log
Revision 5676 -
(show annotations)
(download)
Tue Jun 3 12:31:26 2014 UTC (10 years, 3 months ago) by niro
File size: 3103 byte(s)
Tue Jun 3 12:31:26 2014 UTC (10 years, 3 months ago) by niro
File size: 3103 byte(s)
-rebuild against gcc-4.8.3
1 | # $Id$ |
2 | |
3 | PNAME="libtool" |
4 | PVER="2.4.2" |
5 | PBUILD="r6" |
6 | |
7 | SPLIT_PACKAGES="libltdl libtool" |
8 | |
9 | PCAT="sys-dev" |
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 | LIBTOOL_DEPEND="$(marchdepend) |
16 | == sys-dev/gcc-4.8.3" |
17 | LIBLTDL_DEPEND=">= virtual/glibc" |
18 | |
19 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
20 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER/a/}" |
21 | |
22 | sminclude mbuild multilib mtools |
23 | msetfeature "!check" |
24 | |
25 | SRC_URI=( |
26 | gnu://${PNAME}/${SRCFILE} |
27 | mirror://${PNAME}/${SRCFILE} |
28 | ) |
29 | |
30 | UP2DATE="updatecmd_gnu ${PNAME} gz" |
31 | |
32 | split_info_libltdl() |
33 | { |
34 | DESCRIPTION="A system independent dlopen wrapper library for GNU libtool." |
35 | DEPEND="${LIBLTDL_DEPEND}" |
36 | PCAT="sys-libs" |
37 | } |
38 | |
39 | split_info_libtool() |
40 | { |
41 | DESCRIPTION="A shared library tool for developers." |
42 | DEPEND="${LIBTOOL_DEPEND} |
43 | == sys-libs/libltdl-${PVER}" |
44 | } |
45 | |
46 | src_compile() |
47 | { |
48 | local myopts |
49 | |
50 | # set abi specific search pathes on multilib systems |
51 | if [[ ${ARCH} = x86_64 ]] |
52 | then |
53 | echo "lt_cv_sys_dlsearch_path='/lib /usr/lib /usr/local/lib /opt/lib'" > ${BUILDDIR}/config.cache-m32 || die |
54 | echo "lt_cv_sys_dlsearch_path='$(mlibdir) /usr/$(mlibdir) /usr/local/$(mlibdir) /opt/$(mlibdir)'" > ${BUILDDIR}/config.cache-m64 || die |
55 | myopts="--cache-file=${BUILDDIR}/config.cache-$(mabi)" |
56 | fi |
57 | |
58 | # --build=$CHOST prevents libtool link issues at least on x86_64 hosts. |
59 | # sometimes the global_symbol_pipe variable is empty and produces |
60 | # compile errors. we check with 'grep "^global_symbol_pipe" libtool' |
61 | # for a broken libtool, if empty we simply die. |
62 | # |
63 | # grep "^global_symbol_pipe" libtool must give us this: |
64 | # global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" |
65 | # |
66 | mconfigure --build=${CHOST} ${myopts} || die |
67 | mmake || die |
68 | |
69 | # check for broken libtool |
70 | for abi in ${MULTILIB_ABIS} |
71 | do |
72 | if [[ -z $(grep "^global_symbol_pipe" ${SRCDIR}-${abi}/libtool) ]] |
73 | then |
74 | die "compiled libtool is broken: empty 'global_symbol_pipe' variable" |
75 | fi |
76 | done |
77 | } |
78 | |
79 | src_install_libltdl() |
80 | { |
81 | mmake DESTDIR=${BINDIR} install-libLTLIBRARIES || die |
82 | mmake DESTDIR=${BINDIR} install-includeHEADERS || die |
83 | mmake DESTDIR=${BINDIR} install-ltdlincludeHEADERS || die |
84 | mmake DESTDIR=${BINDIR} install-data-local || die |
85 | |
86 | # remove duplicates from other split packages |
87 | mdelete -r /usr/share/aclocal || die |
88 | mdelete -r /usr/share/libtool/config || die |
89 | } |
90 | |
91 | src_install_libtool() |
92 | { |
93 | mmake DESTDIR=${BINDIR} install-binSCRIPTS || die |
94 | mmake DESTDIR=${BINDIR} install-man || die |
95 | mmake DESTDIR=${BINDIR} install-info || die |
96 | mmake DESTDIR=${BINDIR} install-data-local || die |
97 | |
98 | # remove duplicates from other split packages |
99 | mdelete -r /usr/share/libtool/libltdl || die |
100 | |
101 | # on multilib use multilibwrapper |
102 | if [[ ${ARCH} = x86_64 ]] |
103 | then |
104 | # install the multiarch-wrapper |
105 | if [[ -f ${BINDIR}/usr/bin/libtool ]] |
106 | then |
107 | rm -f ${BINDIR}/usr/bin/libtool || die |
108 | fi |
109 | all-abis minstallexec libtool /usr/bin/libtool-$(mabi) || die |
110 | mlink multiarch-wrapper /usr/bin/libtool || die |
111 | fi |
112 | |
113 | minstalldocs AUTHORS COPYING ChangeLog* NEWS README THANKS TODO || die |
114 | } |