Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | SUMMARY = "GNU grep utility" |
| 2 | HOMEPAGE = "http://savannah.gnu.org/projects/grep/" |
| 3 | BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep" |
| 4 | SECTION = "console/utils" |
| 5 | LICENSE = "GPLv3" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee" |
| 7 | |
| 8 | SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \ |
| 9 | file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ |
| 10 | " |
| 11 | |
| 12 | SRC_URI[md5sum] = "feca7b3e7c7f4aab2b42ecbfc513b070" |
| 13 | SRC_URI[sha256sum] = "db625c7ab3bb3ee757b3926a5cfa8d9e1c3991ad24707a83dde8a5ef2bf7a07e" |
| 14 | |
| 15 | inherit autotools gettext texinfo pkgconfig |
| 16 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 17 | # Fix "Argument list too long" error when len(TMPDIR) = 410 |
| 18 | acpaths = "-I ./m4" |
| 19 | |
| 20 | do_configure_prepend () { |
| 21 | rm -f ${S}/m4/init.m4 |
| 22 | } |
| 23 | |
| 24 | do_install () { |
| 25 | autotools_do_install |
| 26 | if [ "${base_bindir}" != "${bindir}" ]; then |
| 27 | install -d ${D}${base_bindir} |
| 28 | mv ${D}${bindir}/grep ${D}${base_bindir}/grep |
| 29 | mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep |
| 30 | mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep |
| 31 | rmdir ${D}${bindir}/ |
| 32 | fi |
| 33 | } |
| 34 | |
| 35 | inherit update-alternatives |
| 36 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 37 | PACKAGECONFIG ??= "pcre" |
| 38 | PACKAGECONFIG[pcre] = "--enable-perl-regexp,--disable-perl-regexp,libpcre" |
| 39 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 40 | ALTERNATIVE_PRIORITY = "100" |
| 41 | |
| 42 | ALTERNATIVE_${PN} = "grep egrep fgrep" |
| 43 | ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep" |
| 44 | ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep" |
| 45 | ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep" |
| 46 | |
| 47 | export CONFIG_SHELL="/bin/sh" |