source: scripts/scripts/target-scripts/target-grep.sh @ c0cf39e

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

r2506@server (orig r1245): ryan | 2006-03-10 02:07:10 -0800

r1295@rei: lfs | 2006-03-09 18:29:16 +1100
Add grep-2.5.1a-redhat_fixes-2.patch
------------------------------------
Submitted by: Alexander E. Patrakov
Date: 2005-08-13
Initial Package Version: 2.5.1a
Upstream Status: Partially accepted, partially rejected, but required for LSB >= 2.0 certification
Origin: RedHat?
Description: Various fixes from RedHat?. Individual patches:


grep-2.5.1-fgrep.patch
grep-2.5.1-bracket.patch
grep-2.5-i18n.patch
grep-2.5.1-oi.patch
grep-2.5.1-manpage.patch
grep-2.5.1-color.patch
grep-2.5.1-icolor.patch
grep-2.5.1-egf-speedup.patch
grep-2.5.1-dfa-optional.patch
grep-2.5.1-tests.patch
grep-2.5.1-w.patch


Testcases:


-fgrep: ???, but required for other patches
-bracket: echo "[" | LANG=en_US.UTF-8 grep ":space:?"
-i18n: many fixes for multibyte locale support, required for LSB.
-oi: echo xxYYzz | LANG=C grep -i -o yy
-manpage: typo
-color: restore the background color correctly
-icolor: ??? echo 'spam foo SPAM FOO' | grep -i --color spam

(but that's also fixed by -oi. Is this patch just a cleanup?)

-egf-speedup: without this, grep is as slow as a snail in UTF-8 locales.
-dfa-optional: disables dfa in multibyte locales by default.
-w: (echo 'foo';echo 'fo') > /tmp/testfile && grep -F -w fo /tmp/testfile



  • Property mode set to 100755
File size: 1.1 KB
Line 
1#!/bin/bash
2
3# cross-lfs target grep build
4# ---------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=grep-target.log
13
14unpack_tarball grep-${GREP_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
30case ${GREP_VER} in
31   2.5.1a ) apply_patch grep-2.5.1a-redhat_fixes-2.patch ;;
32esac
33
34max_log_init Grep ${GREP_VER} "target (shared)" ${CONFLOGS} ${LOG}
35CC="${TARGET}-gcc ${ARCH_CFLAGS}" \
36CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
37./configure --prefix=${BUILD_PREFIX} --host=${TARGET} \
38   --disable-perl-regexp --with-included-regex \
39   >> ${LOGFILE} 2>&1 &&
40echo " o Configure OK" &&
41
42min_log_init ${BUILDLOGS} &&
43make ${PMFLAGS} LDFLAGS="-s" \
44   >> ${LOGFILE} 2>&1 &&
45echo " o Build OK" || barf
46
47min_log_init ${INSTLOGS} &&
48make ${INSTALL_OPTIONS} install \
49   >> ${LOGFILE} 2>&1 &&
50echo " o ALL OK" || barf
51
Note: See TracBrowser for help on using the repository browser.