Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "GNU grep utility" |
| 2 | HOMEPAGE = "http://savannah.gnu.org/projects/grep/" |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 3 | DESCRIPTION = "Grep searches one or more input files for lines containing a match to a specified pattern. By default, grep prints the matching lines." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 4 | BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep" |
| 5 | SECTION = "console/utils" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 6 | LICENSE = "GPL-3.0-only" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" |
| 8 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 9 | SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \ |
| 10 | file://0001-mcontext-is-not-a-standard-layout-so-glibc-and-musl-.patch \ |
| 11 | " |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 12 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 13 | SRC_URI[sha256sum] = "5c10da312460aec721984d5d83246d24520ec438dd48d7ab5a05dbc0d6d6823c" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | |
| 15 | inherit autotools gettext texinfo pkgconfig |
| 16 | |
| 17 | # Fix "Argument list too long" error when len(TMPDIR) = 410 |
| 18 | acpaths = "-I ./m4" |
| 19 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 20 | do_configure:prepend () { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 21 | sed -i -e '1s,#!@SHELL@,#!/bin/sh,' ${S}/src/egrep.sh |
| 22 | rm -f ${S}/m4/init.m4 |
| 23 | } |
| 24 | |
| 25 | do_install () { |
| 26 | autotools_do_install |
| 27 | if [ "${base_bindir}" != "${bindir}" ]; then |
| 28 | install -d ${D}${base_bindir} |
| 29 | mv ${D}${bindir}/grep ${D}${base_bindir}/grep |
| 30 | mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep |
| 31 | mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep |
| 32 | rmdir ${D}${bindir}/ |
| 33 | fi |
| 34 | } |
| 35 | |
| 36 | inherit update-alternatives |
| 37 | |
| 38 | PACKAGECONFIG ??= "pcre" |
| 39 | PACKAGECONFIG[pcre] = "--enable-perl-regexp,--disable-perl-regexp,libpcre" |
| 40 | |
| 41 | ALTERNATIVE_PRIORITY = "100" |
| 42 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 43 | ALTERNATIVE:${PN} = "grep egrep fgrep" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 44 | ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep" |
| 45 | ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep" |
| 46 | ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 47 | |
| 48 | BBCLASSEXTEND = "nativesdk" |