Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Stream EDitor (text filtering utility)" |
| 2 | HOMEPAGE = "http://www.gnu.org/software/sed/" |
| 3 | LICENSE = "GPLv3+" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \ |
| 5 | file://sed/sed.h;beginline=1;endline=17;md5=767ab3a06d7584f6fd0469abaec4412f" |
| 6 | SECTION = "console/utils" |
| 7 | |
| 8 | SRC_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 | |
| 14 | SRC_URI[md5sum] = "4111de4faa3b9848a0686b2f260c5056" |
| 15 | SRC_URI[sha256sum] = "fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff" |
| 16 | |
| 17 | inherit autotools texinfo update-alternatives gettext ptest |
| 18 | RDEPENDS_${PN}-ptest += "make ${PN}" |
| 19 | RRECOMMENDS_${PN}-ptest_append_libc-glibc = " locale-base-ru-ru" |
| 20 | |
| 21 | EXTRA_OECONF = "--disable-acl \ |
| 22 | ${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-regex-tests', '', d)}" |
| 23 | |
| 24 | do_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 | |
| 33 | ALTERNATIVE_${PN} = "sed" |
| 34 | ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed" |
| 35 | ALTERNATIVE_PRIORITY = "100" |
| 36 | |
| 37 | TESTDIR = "testsuite" |
| 38 | |
| 39 | do_compile_ptest() { |
| 40 | oe_runmake -C ${TESTDIR} buildtest-TESTS |
| 41 | } |
| 42 | |
| 43 | do_install_ptest() { |
| 44 | oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 45 | sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ |
| 46 | -e 's|${DEBUG_PREFIX_MAP}||g' \ |
| 47 | -e 's:${HOSTTOOLS_DIR}/::g' \ |
| 48 | -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ |
| 49 | -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ |
| 50 | -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | } |
| 52 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 53 | RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sed', '', d)}" |