source: scripts/scripts/target-scripts/target-gawk.sh @ dd6636b

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since dd6636b was dd6636b, checked in by Jim Gifford <clfs@…>, 18 years ago

r2507@server (orig r1246): ryan | 2006-03-10 02:07:32 -0800

r1296@rei: lfs | 2006-03-09 18:34:49 +1100
Add gawk-3.1.5-segfault_fix-1.patch
-----------------------------------
Submitted By: Matthew Burgess <matthew@…>
Date: 2005-09-24
Initial Package Version: 3.1.5
Upstream Status: From Upstream
Origin: http://lists.gnu.org/archive/html/bug-gnu-utils/2005-08/msg00047.html
Description: Fixes a bug which causes gawk to segfault when operating on a non-existent file.



  • Property mode set to 100755
File size: 1.7 KB
Line 
1#!/bin/bash
2
3# cross-lfs target gawk build
4# ---------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=gawk-cross.log
13
14unpack_tarball gawk-${GAWK_VER} &&
15cd ${PKGDIR}
16
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
30# if target is same as build host, adjust build slightly to avoid running
31# configure checks which we cannot run
32if [ "${TARGET}" = "${BUILD}" ]; then
33   BUILD=`echo ${BUILD} | sed 's@\([_a-zA-Z0-9]*\)\(-[_a-zA-Z0-9]*\)\(.*\)@\1\2x\3@'`
34fi
35
36case ${GAWK_VER} in
37   3.1.5 )  apply_patch gawk-3.1.5-segfault_fix-1 ;;
38esac
39
40# gawk is braindead for setting version information
41# during install while cross compiling, here we will use
42# gawk-$(PACKAGE_VERSION) instead of trying to run gawk --version
43# (which cant be done when cross compiling, derr) to get version info
44test -f Makefile.in-ORIG ||
45   cp -p Makefile.in Makefile.in-ORIG
46sed 's@\(fullname=gawk-\).*\(;.*\)@\1\$(PACKAGE_VERSION) \2@g' \
47   Makefile.in-ORIG > Makefile.in
48
49max_log_init Gawk ${GAWK_VER} "initial (shared)" ${CONFLOGS} ${LOG}
50CC="${TARGET}-gcc ${ARCH_CFLAGS}" \
51CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
52./configure --prefix=${BUILD_PREFIX} \
53   --build=${BUILD} --host=${TARGET} \
54   >> ${LOGFILE} 2>&1 &&
55echo " o Configure OK" &&
56
57min_log_init ${BUILDLOGS} &&
58make ${PMFLAGS} LDFLAGS="-s" \
59   >> ${LOGFILE} 2>&1 &&
60echo " o Build OK" &&
61
62min_log_init ${INSTLOGS} &&
63make ${INSTALL_OPTIONS} install \
64   >> ${LOGFILE} 2>&1 &&
65echo " o ALL OK" || barf
66
Note: See TracBrowser for help on using the repository browser.