blob: 5aa7d8a07973e5597dce104a9c581f67ff94f7a6 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Stream EDitor (text filtering utility)"
2HOMEPAGE = "http://www.gnu.org/software/sed/"
3LICENSE = "GPLv3+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
5 file://sed/sed.h;beginline=1;endline=17;md5=767ab3a06d7584f6fd0469abaec4412f"
6SECTION = "console/utils"
7
8SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \
9 file://sed-add-ptest.patch \
10 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
11 file://run-ptest \
12"
13
14SRC_URI[md5sum] = "4111de4faa3b9848a0686b2f260c5056"
15SRC_URI[sha256sum] = "fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff"
16
17inherit autotools texinfo update-alternatives gettext ptest
18RDEPENDS_${PN}-ptest += "make ${PN}"
19RRECOMMENDS_${PN}-ptest_append_libc-glibc = " locale-base-ru-ru"
20
21EXTRA_OECONF = "--disable-acl \
22 ${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-regex-tests', '', d)}"
23
24do_install () {
25 autotools_do_install
26 install -d ${D}${base_bindir}
27 if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then
28 mv ${D}${bindir}/sed ${D}${base_bindir}/sed
29 rmdir ${D}${bindir}/
30 fi
31}
32
33ALTERNATIVE_${PN} = "sed"
34ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
35ALTERNATIVE_PRIORITY = "100"
36
37TESTDIR = "testsuite"
38
39do_compile_ptest() {
40 oe_runmake -C ${TESTDIR} buildtest-TESTS
41}
42
43do_install_ptest() {
44 oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
45}
46