source: scripts/scripts/native-scripts/native-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.3 KB
Line 
1#!/bin/bash
2
3# cross-lfs native gawk build
4# ---------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=gawk-native.log
13
14set_libdirname
15setup_multiarch
16
17unpack_tarball gawk-${GAWK_VER} &&
18cd ${PKGDIR}
19
20case ${GAWK_VER} in
21   3.1.5 )  apply_patch gawk-3.1.5-segfault_fix-1 ;;
22esac
23
24# Following mimics gawk patch
25files="Makefile.in awklib/Makefile.in"
26for file in ${files}; do
27
28   test -f ${file}-ORIG ||
29      cp ${file} ${file}-ORIG
30
31   sed -e 's:libexecdir = @libexecdir@/awk:libexecdir = @libexecdir@:g' \
32       -e 's:datadir = @datadir@/awk:datadir = @datadir@/gawk:g' \
33       ${file}-ORIG > ${file}
34done
35
36max_log_init Gawk ${GAWK_VER} "native (shared)" ${CONFLOGS} ${LOG}
37CC="${CC-gcc} ${ARCH_CFLAGS}" \
38CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
39./configure --prefix=/usr \
40   --libexecdir=/usr/${libdirname}/gawk \
41   --bindir=/bin \
42   >> ${LOGFILE} 2>&1 &&
43echo " o Configure OK" &&
44
45min_log_init ${BUILDLOGS} &&
46make ${PMFLAGS} LDFLAGS="-s" \
47   >> ${LOGFILE} 2>&1 &&
48echo " o Build OK" &&
49
50min_log_init ${TESTLOGS} &&
51make check \
52   >> ${LOGFILE} 2>&1 &&
53echo " o Test OK" &&
54
55min_log_init ${INSTLOGS} &&
56make install \
57   >> ${LOGFILE} 2>&1 &&
58echo " o ALL OK" || barf
59
60# When specifying --bindir the symlink doesn't get created (???)
61ln -sf gawk /bin/awk
62
Note: See TracBrowser for help on using the repository browser.