diff --git a/meta-openeuler/recipes-core/gzip/files/run-ptest b/meta-openeuler/recipes-core/gzip/files/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..cf7c64949abd31148f71b2f260b7f5f6d7c7b969 --- /dev/null +++ b/meta-openeuler/recipes-core/gzip/files/run-ptest @@ -0,0 +1,6 @@ +#!/bin/sh + +cd src/tests + +make check + diff --git a/meta-openeuler/recipes-core/gzip/gzip-1.10/wrong-path-fix.patch b/meta-openeuler/recipes-core/gzip/gzip-1.10/wrong-path-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..7c37bc8d2d9269aaf86c70164aa0ad86c65cae12 --- /dev/null +++ b/meta-openeuler/recipes-core/gzip/gzip-1.10/wrong-path-fix.patch @@ -0,0 +1,36 @@ +fix MakeMaker issues with using wrong SHELL/GREP + +A set of substitution is being processed to all target scripts with sed by +replacing some key words with the detected values at configure time, this +is exactly not compliant with cross compling, and will cause missing path +errors at run time like: +"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory" + +Fixed by removing unneeded substitution and using real runtime paths +instead. + +Signed-off-by: Ming Liu + +Upstream-Status: Pending + +--- + Makefile.am | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index d4ecc3f..e4657d2 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -82,8 +82,7 @@ SUFFIXES = .in + .in: + $(AM_V_GEN)rm -f $@-t $@ \ + && sed \ +- -e 's|/bin/sh|$(SHELL)|g' \ +- -e 's|[@]GREP@|$(GREP)|g' \ ++ -e 's|[@]GREP@|$(base_bindir)/grep|g' \ + -e 's|[@]VERSION@|$(VERSION)|g' \ + $(srcdir)/$@.in >$@-t \ + && chmod a=rx $@-t \ +-- +2.7.4 + diff --git a/meta-openeuler/recipes-core/gzip/gzip.inc b/meta-openeuler/recipes-core/gzip/gzip.inc new file mode 100644 index 0000000000000000000000000000000000000000..1a0747dff837e8ab538e9689c891e4f5d603fc19 --- /dev/null +++ b/meta-openeuler/recipes-core/gzip/gzip.inc @@ -0,0 +1,33 @@ +SUMMARY = "Standard GNU compressor" +DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \ +project. Mark Adler wrote the decompression part" +HOMEPAGE = "http://www.gnu.org/software/gzip/" +SECTION = "console/utils" +# change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12 + +inherit autotools texinfo +export DEFS="NO_ASM" + +EXTRA_OEMAKE_class-target = "GREP=${base_bindir}/grep" +EXTRA_OECONF_append_libc-musl = " gl_cv_func_fflush_stdin=yes " + +do_install_append () { + if [ "${base_bindir}" != "${bindir}" ]; then + # Rename and move files into /bin (FHS), which is typical place for gzip + install -d ${D}${base_bindir} + mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip + mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip + mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat + mv ${D}${bindir}/uncompress ${D}${base_bindir}/uncompress + fi +} + +#inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "gunzip gzip zcat" +ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip" +ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip" +ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat" + +export CONFIG_SHELL="/bin/sh" diff --git a/meta-openeuler/recipes-core/gzip/gzip_1.10.bb b/meta-openeuler/recipes-core/gzip/gzip_1.10.bb new file mode 100644 index 0000000000000000000000000000000000000000..9778e687e1abc023dd25138ca30a166162b271a5 --- /dev/null +++ b/meta-openeuler/recipes-core/gzip/gzip_1.10.bb @@ -0,0 +1,40 @@ +require gzip.inc + +LICENSE = "GPLv3+" + +SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \ + file://run-ptest \ + " +SRC_URI_append_class-target = " file://wrong-path-fix.patch" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e" + +PROVIDES_append_class-native = " gzip-replacement-native" + +RDEPENDS_${PN}-ptest += "make perl grep diffutils" + +BBCLASSEXTEND = "native nativesdk" + +inherit ptest + +do_install_ptest() { + mkdir -p ${D}${PTEST_PATH}/src/build-aux + cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/src/build-aux/ + mkdir -p ${D}${PTEST_PATH}/src/tests + cp -r ${S}/tests/* ${D}${PTEST_PATH}/src/tests + sed -e 's/^abs_srcdir = ..*/abs_srcdir = \.\./' \ + -e 's/^top_srcdir = ..*/top_srcdir = \.\./' \ + -e 's/^GREP = ..*/GREP = grep/' \ + -e 's/^AWK = ..*/AWK = awk/' \ + -e 's/^srcdir = ..*/srcdir = \./' \ + -e 's/^Makefile: ..*/Makefile: /' \ + -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ + ${B}/tests/Makefile > ${D}${PTEST_PATH}/src/tests/Makefile +} + +SRC_URI[md5sum] = "cf9ee51aff167ff69844d5d7d71c8b20" +SRC_URI[sha256sum] = "c91f74430bf7bc20402e1f657d0b252cb80aa66ba333a25704512af346633c68" diff --git a/meta-openeuler/recipes-core/xz/xz_5.2.5.bb b/meta-openeuler/recipes-core/xz/xz_5.2.5.bb new file mode 100644 index 0000000000000000000000000000000000000000..63a91fc556a072dfa1bdcdb9ee542ddaf8571ce8 --- /dev/null +++ b/meta-openeuler/recipes-core/xz/xz_5.2.5.bb @@ -0,0 +1,45 @@ +SUMMARY = "Utilities for managing LZMA compressed files" +HOMEPAGE = "https://tukaani.org/xz/" +DESCRIPTION = "XZ Utils is free general-purpose data compression software with a high compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils." +SECTION = "base" + +# The source includes bits of PD, GPLv2, GPLv3, LGPLv2.1+, but the only file +# which is GPLv3 is an m4 macro which isn't shipped in any of our packages, +# and the LGPL bits are under lib/, which appears to be used for libgnu, which +# appears to be used for DOS builds. So we're left with GPLv2+ and PD. +LICENSE = "GPLv2+ & GPL-3.0-with-autoconf-exception & LGPLv2.1+ & PD" +LICENSE_${PN} = "GPLv2+" +LICENSE_${PN}-dev = "GPLv2+" +LICENSE_${PN}-staticdev = "GPLv2+" +LICENSE_${PN}-doc = "GPLv2+" +LICENSE_${PN}-dbg = "GPLv2+" +LICENSE_${PN}-locale = "GPLv2+" +LICENSE_liblzma = "PD" + +LIC_FILES_CHKSUM = "file://COPYING;md5=97d554a32881fee0aa283d96e47cb24a \ + file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \ + file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 \ + " + +SRC_URI = "https://tukaani.org/xz/xz-${PV}.tar.gz" +SRC_URI[md5sum] = "0d270c997aff29708c74d53f599ef717" +SRC_URI[sha256sum] = "f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10" +UPSTREAM_CHECK_REGEX = "xz-(?P\d+(\.\d+)+)\.tar" + +CACHED_CONFIGUREVARS += "gl_cv_posix_shell=/bin/sh" + +inherit autotools gettext + +PACKAGES =+ "liblzma" + +FILES_liblzma = "${libdir}/liblzma*${SOLIBS}" + +#inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "xz xzcat unxz \ + lzma lzcat unlzma" + +BBCLASSEXTEND = "native nativesdk"