diff --git a/meta-openeuler/recipes-core/grep/grep_3.6.bb b/meta-openeuler/recipes-core/grep/grep_3.6.bb new file mode 100644 index 0000000000000000000000000000000000000000..0e648199734bdd94b61828c21e9a2c9f912f4288 --- /dev/null +++ b/meta-openeuler/recipes-core/grep/grep_3.6.bb @@ -0,0 +1,46 @@ +SUMMARY = "GNU grep utility" +HOMEPAGE = "http://savannah.gnu.org/projects/grep/" +DESCRIPTION = "Grep searches one or more input files for lines containing a match to a specified pattern. By default, grep prints the matching lines." +BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep" +SECTION = "console/utils" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" + +SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz" + +SRC_URI[sha256sum] = "667e15e8afe189e93f9f21a7cd3a7b3f776202f417330b248c2ad4f997d9373e" + +inherit autotools gettext texinfo pkgconfig + +# Fix "Argument list too long" error when len(TMPDIR) = 410 +acpaths = "-I ./m4" + +do_configure_prepend () { + sed -i -e '1s,#!@SHELL@,#!/bin/sh,' ${S}/src/egrep.sh + rm -f ${S}/m4/init.m4 +} + +do_install () { + autotools_do_install + if [ "${base_bindir}" != "${bindir}" ]; then + install -d ${D}${base_bindir} + mv ${D}${bindir}/grep ${D}${base_bindir}/grep + mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep + mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep + rmdir ${D}${bindir}/ + fi +} + +#inherit update-alternatives + +PACKAGECONFIG ??= "pcre" +PACKAGECONFIG[pcre] = "--enable-perl-regexp,--disable-perl-regexp,libpcre" + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN} = "grep egrep fgrep" +ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep" +ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep" +ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep" + +BBCLASSEXTEND = "nativesdk" diff --git a/meta-openeuler/recipes-core/sed/sed/run-ptest b/meta-openeuler/recipes-core/sed/sed/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..993d7d5d75e723aee40b544f7df18ab482d32d18 --- /dev/null +++ b/meta-openeuler/recipes-core/sed/sed/run-ptest @@ -0,0 +1,5 @@ +#!/bin/sh + +chown nobody testsuite +chown nobody ../ptest +su nobody -c "make test-suite.log" diff --git a/meta-openeuler/recipes-core/sed/sed_4.8.bb b/meta-openeuler/recipes-core/sed/sed_4.8.bb new file mode 100644 index 0000000000000000000000000000000000000000..bd33baf32b53d6fd89065747ba5b42ab928b8c84 --- /dev/null +++ b/meta-openeuler/recipes-core/sed/sed_4.8.bb @@ -0,0 +1,69 @@ +SUMMARY = "Stream EDitor (text filtering utility)" +HOMEPAGE = "http://www.gnu.org/software/sed/" +DESCRIPTION = "sed (stream editor) is a non-interactive command-line text editor." +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e \ + file://sed/sed.h;beginline=1;endline=15;md5=fb3c7e6fbca6f66943859153d4be8efe \ + " +SECTION = "console/utils" + +SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.xz \ + file://run-ptest \ +" + +SRC_URI[md5sum] = "6d906edfdb3202304059233f51f9a71d" +SRC_URI[sha256sum] = "f79b0cfea71b37a8eeec8490db6c5f7ae7719c35587f21edb0617f370eeff633" + +#inherit autotools texinfo update-alternatives gettext ptest +inherit autotools texinfo gettext + +PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" + +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" +RRECOMMENDS_${PN}-ptest_append_libc-glibc = " locale-base-ru-ru locale-base-en-us locale-base-el-gr.iso-8859-7" + +EXTRA_OECONF = "--disable-acl \ + " + +do_install () { + autotools_do_install + install -d ${D}${base_bindir} + if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then + mv ${D}${bindir}/sed ${D}${base_bindir}/sed + rmdir ${D}${bindir}/ + fi +} + +ALTERNATIVE_${PN} = "sed" +ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed" +ALTERNATIVE_PRIORITY = "100" + +do_compile_ptest() { + oe_runmake testsuite/get-mb-cur-max testsuite/test-mbrtowc +} + +do_install_ptest() { + cp -rf ${S}/testsuite/ ${D}${PTEST_PATH} + cp -rf ${B}/testsuite/* ${D}${PTEST_PATH}/testsuite/ + cp -rf ${S}/build-aux/ ${D}${PTEST_PATH}/ + cp ${B}/Makefile ${D}${PTEST_PATH} + cp ${S}/init.cfg ${D}${PTEST_PATH} + + sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i ${D}${PTEST_PATH}/Makefile + for i in `grep -rl "sed/sed" ${D}${PTEST_PATH}`; do sed -e 's/..\/sed\/sed/sed/' -i $i; done + + sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ + -e 's:abs_top_builddir =.*:abs_top_builddir = ..:g' \ + -e 's:abs_top_srcdir =.*:abs_top_srcdir = ..:g' \ + -e 's:abs_srcdir =.*:abs_srcdir = ..:g' \ + -e 's:top_srcdir =.*:top_srcdir = ..:g' \ + -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ + -i ${D}${PTEST_PATH}/Makefile +} + +RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sed', '', d)}" + +BBCLASSEXTEND = "nativesdk"