source: scripts/target-scripts/target-gettext.sh@ 61bc4da

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 61bc4da was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 1.7 KB
Line 
1#!/bin/bash
2
3# cross-lfs target gettext build
4# ------------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=gettext-target.log
13libdirname="lib"
14
15SELF=`basename ${0}`
16set_buildenv
17set_libdirname
18setup_multiarch
19
20if [ "${USE_SYSROOT}" = "Y" ]; then
21 BUILD_PREFIX=/usr
22 INSTALL_PREFIX="${LFS}${BUILD_PREFIX}"
23 INSTALL_OPTIONS="DESTDIR=${LFS}"
24else
25 BUILD_PREFIX=${TGT_TOOLS}
26 INSTALL_PREFIX="${TGT_TOOLS}"
27 INSTALL_OPTIONS=""
28fi
29
30if [ ! "${libdirname}" = "lib" ]; then
31 extra_conf="--libdir=${BUILD_PREFIX}/${libdirname}"
32fi
33
34unpack_tarball gettext-${GETTEXT_VER} &&
35cd ${PKGDIR}
36
37# Curse of getline again...
38echo "am_cv_func_working_getline=yes" > config.cache
39
40max_log_init Gettext ${GETTEXT_VER} "target (shared)" ${CONFLOGS} ${LOG}
41CFLAGS="-O2 -pipe ${ARCH_CFLAGS}" \
42CXXFLAGS="-O2 -pipe ${ARCH_CFLAGS}" \
43 ./configure --prefix=${BUILD_PREFIX} \
44 --host=${TARGET} ${extra_conf} \
45 --cache-file=config.cache \
46 >> ${LOGFILE} 2>&1 &&
47echo " 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...
53test -f gettext-runtime/libasprintf/libtool-ORIG ||
54 mv gettext-runtime/libasprintf/libtool gettext-runtime/libasprintf/libtool-ORIG
55sed 's@^\(archive_cmds.*-shared \)\(.*predep_objects.*\)@\1 -nostartfiles -nostdlib \2@g' \
56gettext-runtime/libasprintf/libtool-ORIG > gettext-runtime/libasprintf/libtool
57
58min_log_init ${BUILDLOGS} &&
59#make ${PMFLAGS} LDFLAGS="-s" \
60make LDFLAGS="-s" \
61 >> ${LOGFILE} 2>&1 &&
62echo " o Build OK" || barf
63
64min_log_init ${INSTLOGS} &&
65make ${INSTALL_OPTIONS} install \
66 >> ${LOGFILE} 2>&1 &&
67echo " o ALL OK" || barf
68
Note: See TracBrowser for help on using the repository browser.