Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Stream EDitor (text filtering utility)" |
| 2 | HOMEPAGE = "http://www.gnu.org/software/sed/" |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 3 | DESCRIPTION = "sed (stream editor) is a non-interactive command-line text editor." |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4 | LICENSE = "GPL-3.0-or-later" |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame^] | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \ |
| 6 | file://sed/sed.h;beginline=1;endline=15;md5=4e8e0f77bc4c1c2c02c2b90d3d24c670 \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 7 | " |
| 8 | SECTION = "console/utils" |
| 9 | |
| 10 | SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.xz \ |
| 11 | file://run-ptest \ |
| 12 | " |
| 13 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame^] | 14 | SRC_URI[sha256sum] = "6e226b732e1cd739464ad6862bd1a1aba42d7982922da7a53519631d24975181" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 15 | |
| 16 | inherit autotools texinfo update-alternatives gettext ptest |
| 17 | |
| 18 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" |
| 19 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 20 | RDEPENDS:${PN}-ptest += "make gawk perl perl-module-filehandle perl-module-file-compare perl-module-file-find perl-module-file-temp perl-module-file-stat" |
| 21 | RRECOMMENDS:${PN}-ptest:append:libc-glibc = " locale-base-ru-ru locale-base-en-us locale-base-el-gr.iso-8859-7" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 22 | |
| 23 | EXTRA_OECONF = "--disable-acl \ |
| 24 | " |
| 25 | |
| 26 | do_install () { |
| 27 | autotools_do_install |
| 28 | install -d ${D}${base_bindir} |
| 29 | if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then |
| 30 | mv ${D}${bindir}/sed ${D}${base_bindir}/sed |
| 31 | rmdir ${D}${bindir}/ |
| 32 | fi |
| 33 | } |
| 34 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 35 | ALTERNATIVE:${PN} = "sed" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 36 | ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed" |
| 37 | ALTERNATIVE_PRIORITY = "100" |
| 38 | |
| 39 | do_compile_ptest() { |
| 40 | oe_runmake testsuite/get-mb-cur-max testsuite/test-mbrtowc |
| 41 | } |
| 42 | |
| 43 | do_install_ptest() { |
| 44 | cp -rf ${S}/testsuite/ ${D}${PTEST_PATH} |
| 45 | cp -rf ${B}/testsuite/* ${D}${PTEST_PATH}/testsuite/ |
| 46 | cp -rf ${S}/build-aux/ ${D}${PTEST_PATH}/ |
| 47 | cp ${B}/Makefile ${D}${PTEST_PATH} |
| 48 | cp ${S}/init.cfg ${D}${PTEST_PATH} |
| 49 | |
| 50 | sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i ${D}${PTEST_PATH}/Makefile |
| 51 | for i in `grep -rl "sed/sed" ${D}${PTEST_PATH}`; do sed -e 's/..\/sed\/sed/sed/' -i $i; done |
| 52 | |
| 53 | sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ |
| 54 | -e 's|${DEBUG_PREFIX_MAP}||g' \ |
| 55 | -e 's:${HOSTTOOLS_DIR}/::g' \ |
| 56 | -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ |
| 57 | -e 's:abs_top_builddir =.*:abs_top_builddir = ..:g' \ |
| 58 | -e 's:abs_top_srcdir =.*:abs_top_srcdir = ..:g' \ |
| 59 | -e 's:abs_srcdir =.*:abs_srcdir = ..:g' \ |
| 60 | -e 's:top_srcdir =.*:top_srcdir = ..:g' \ |
| 61 | -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ |
| 62 | -i ${D}${PTEST_PATH}/Makefile |
| 63 | } |
| 64 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | RPROVIDES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sed', '', d)}" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 66 | |
| 67 | BBCLASSEXTEND = "nativesdk" |