[d1afb9e] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | # cross-lfs native libtool build
|
---|
| 4 | # ------------------------------
|
---|
| 5 | # $LastChangedBy: roliver $
|
---|
| 6 | # $LastChangedDate: 2005-05-21 15:22:56 +1000 (Sat, 21 May 2005) $
|
---|
| 7 | # $LastChangedRevision: 528 $
|
---|
| 8 | # $HeadURL: svn+ssh://roliver@be-linux.org/svn/cross-lfs/cross-lfs/trunk/scripts/native-scripts/native-libtool.sh $
|
---|
| 9 | #
|
---|
| 10 |
|
---|
| 11 | cd ${SRC}
|
---|
| 12 | LOG=libtool-native.log
|
---|
| 13 |
|
---|
| 14 | SELF=`basename ${0}`
|
---|
| 15 | DIR=`dirname ${0}`
|
---|
| 16 | PATCHES=${DIR}/patches
|
---|
| 17 | export PATCHES
|
---|
| 18 |
|
---|
| 19 | set_buildenv
|
---|
| 20 | set_libdirname
|
---|
| 21 | setup_multiarch
|
---|
| 22 |
|
---|
| 23 | if [ ! "{libdirname}" = "lib" ]; then
|
---|
| 24 | extra_conf="--libdir=/usr/${libdirname}"
|
---|
| 25 | fi
|
---|
| 26 |
|
---|
| 27 | ### LIBTOOL ###
|
---|
| 28 | unpack_tarball libtool-${LIBTOOL_VER} &&
|
---|
| 29 | cd ${PKGDIR}
|
---|
| 30 |
|
---|
| 31 | # Gentoo fixes for libtool...
|
---|
| 32 | #--------------------------------------------------
|
---|
| 33 | rm -f ltmain.sh
|
---|
| 34 |
|
---|
| 35 | apply_patch libtool-1.4.2-multilib
|
---|
| 36 | apply_patch libtool-1.4.3-lib64
|
---|
| 37 | apply_patch libtool-1.4.2-archive-shared
|
---|
| 38 | apply_patch libtool-1.5.6-ltmain-SED
|
---|
| 39 | apply_patch libtool-1.4.2-expsym-linux
|
---|
| 40 | apply_patch libtool-1.4.3-pass-thread-flags
|
---|
| 41 | apply_patch libtool-1.5.14-ltmain_sh-max_cmd_len
|
---|
| 42 | apply_patch libtool-1.5-filter-host-tags
|
---|
| 43 | apply_patch libtool-1.5.10-locking
|
---|
| 44 | apply_patch libtool-1.5.14-egrep
|
---|
| 45 |
|
---|
| 46 |
|
---|
| 47 | rm -f ltmain.shT
|
---|
| 48 | date=`./mkstamp < ./ChangeLog` && \
|
---|
| 49 | eval `egrep '^[[:space:]]*PACKAGE' configure` && \
|
---|
| 50 | eval `egrep '^[[:space:]]*VERSION' configure` && \
|
---|
| 51 | sed -e "s/@PACKAGE@/${PACKAGE}/" -e "s/@VERSION@/${VERSION}/" \
|
---|
| 52 | -e "s%@TIMESTAMP@%$date%" ./ltmain.in > ltmain.shT
|
---|
| 53 |
|
---|
| 54 | mv -f ltmain.shT ltmain.sh
|
---|
| 55 |
|
---|
| 56 | cp libtool.m4 acinclude.m4
|
---|
| 57 |
|
---|
| 58 | touch acinlude.m4
|
---|
| 59 | aclocal
|
---|
| 60 | automake -c -a
|
---|
| 61 | autoconf
|
---|
| 62 |
|
---|
| 63 | cd libltdl
|
---|
| 64 | touch acinlude.m4
|
---|
| 65 | aclocal
|
---|
| 66 | automake -c -a
|
---|
| 67 | autoconf
|
---|
| 68 |
|
---|
| 69 | cd ${SRC}/${PKGDIR}
|
---|
| 70 |
|
---|
| 71 | #--------------------------------------------------
|
---|
| 72 |
|
---|
| 73 | max_log_init Libtool ${LIBTOOL_VER} "native (shared)" ${CONFLOGS} ${LOG}
|
---|
| 74 | CC="${CC-gcc} ${ARCH_CFLAGS}" \
|
---|
| 75 | CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
|
---|
| 76 | ./configure --prefix=/usr \
|
---|
| 77 | ${extra_conf} \
|
---|
| 78 | >> ${LOGFILE} 2>&1 &&
|
---|
| 79 | echo " o Configure OK" || barf
|
---|
| 80 |
|
---|
| 81 | min_log_init ${BUILDLOGS} &&
|
---|
| 82 | make \
|
---|
| 83 | >> ${LOGFILE} 2>&1 &&
|
---|
| 84 | echo " o Build OK" || barf
|
---|
| 85 |
|
---|
| 86 | #min_log_init ${TESTLOGS} &&
|
---|
| 87 | #make check \
|
---|
| 88 | # >> ${LOGFILE} 2>&1 &&
|
---|
| 89 | #echo " o Test OK" || errmsg
|
---|
| 90 |
|
---|
| 91 | min_log_init ${INSTLOGS} &&
|
---|
| 92 | make install \
|
---|
| 93 | >> ${LOGFILE} 2>&1 &&
|
---|
| 94 | echo " o ALL OK" || barf
|
---|
| 95 |
|
---|
| 96 | rm -f /usr/share/libtool/config.{guess,sub}
|
---|
| 97 | rm -f /usr/share/libtool/libltdl/config.{guess,sub}
|
---|
| 98 | ln -sfn ../gnu-config-files/config.sub /usr/share/libtool/config.sub
|
---|
| 99 | ln -sfn ../gnu-config-files/config.guess /usr/share/libtool/config.guess
|
---|
| 100 | ln -sfn ../../gnu-config-files/config.sub \
|
---|
| 101 | /usr/share/libtool/libltdl/config.sub
|
---|
| 102 | ln -sfn ../../gnu-config-files/config.guess \
|
---|
| 103 | /usr/share/libtool/libltdl/config.guess
|
---|
| 104 |
|
---|
| 105 | ldconfig
|
---|
| 106 |
|
---|