1 | #!/bin/bash
|
---|
2 |
|
---|
3 | # cross-lfs target gettext build
|
---|
4 | # ------------------------------
|
---|
5 | # $LastChangedBy$
|
---|
6 | # $LastChangedDate$
|
---|
7 | # $LastChangedRevision$
|
---|
8 | # $HeadURL$
|
---|
9 | #
|
---|
10 |
|
---|
11 | cd ${SRC}
|
---|
12 | LOG=gettext-target.log
|
---|
13 | libdirname="lib"
|
---|
14 |
|
---|
15 | SELF=`basename ${0}`
|
---|
16 | set_buildenv
|
---|
17 | set_libdirname
|
---|
18 | setup_multiarch
|
---|
19 |
|
---|
20 | if [ "${USE_SYSROOT}" = "Y" ]; then
|
---|
21 | BUILD_PREFIX=/usr
|
---|
22 | INSTALL_PREFIX="${LFS}${BUILD_PREFIX}"
|
---|
23 | INSTALL_OPTIONS="DESTDIR=${LFS}"
|
---|
24 | else
|
---|
25 | BUILD_PREFIX=${TGT_TOOLS}
|
---|
26 | INSTALL_PREFIX="${TGT_TOOLS}"
|
---|
27 | INSTALL_OPTIONS=""
|
---|
28 | fi
|
---|
29 |
|
---|
30 | if [ ! "${libdirname}" = "lib" ]; then
|
---|
31 | extra_conf="--libdir=${BUILD_PREFIX}/${libdirname}"
|
---|
32 | fi
|
---|
33 |
|
---|
34 | unpack_tarball gettext-${GETTEXT_VER} &&
|
---|
35 | cd ${PKGDIR}
|
---|
36 |
|
---|
37 | # Curse of getline again...
|
---|
38 | echo "am_cv_func_working_getline=yes" > config.cache
|
---|
39 |
|
---|
40 | max_log_init Gettext ${GETTEXT_VER} "target (shared)" ${CONFLOGS} ${LOG}
|
---|
41 | CFLAGS="-O2 -pipe ${ARCH_CFLAGS}" \
|
---|
42 | CXXFLAGS="-O2 -pipe ${ARCH_CFLAGS}" \
|
---|
43 | ./configure --prefix=${BUILD_PREFIX} \
|
---|
44 | --host=${TARGET} ${extra_conf} \
|
---|
45 | --cache-file=config.cache \
|
---|
46 | >> ${LOGFILE} 2>&1 &&
|
---|
47 | echo " o Configure OK" &&
|
---|
48 |
|
---|
49 | # libtools is a pain.
|
---|
50 | # with libasprintf it tries to link in the startfiles even though
|
---|
51 | # g++ will look after this itself. This is a hack, should really edit
|
---|
52 | # ltmain.sh...
|
---|
53 | test -f gettext-runtime/libasprintf/libtool-ORIG ||
|
---|
54 | mv gettext-runtime/libasprintf/libtool gettext-runtime/libasprintf/libtool-ORIG
|
---|
55 | sed 's@^\(archive_cmds.*-shared \)\(.*predep_objects.*\)@\1 -nostartfiles -nostdlib \2@g' \
|
---|
56 | gettext-runtime/libasprintf/libtool-ORIG > gettext-runtime/libasprintf/libtool
|
---|
57 |
|
---|
58 | min_log_init ${BUILDLOGS} &&
|
---|
59 | #make ${PMFLAGS} LDFLAGS="-s" \
|
---|
60 | make LDFLAGS="-s" \
|
---|
61 | >> ${LOGFILE} 2>&1 &&
|
---|
62 | echo " o Build OK" || barf
|
---|
63 |
|
---|
64 | min_log_init ${INSTLOGS} &&
|
---|
65 | make ${INSTALL_OPTIONS} install \
|
---|
66 | >> ${LOGFILE} 2>&1 &&
|
---|
67 | echo " o ALL OK" || barf
|
---|
68 |
|
---|