Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,6 @@
#!/bin/sh
cd src/tests
make check
@@ -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 <ming.liu@windriver.com>
Upstream-Status: Pending
---
Makefile.am | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 4f51b61..80a5ddf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -93,8 +93,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|'gzip'|$(GZIP_TRANSFORMED)|g" \
-e "s|'zdiff'|$(ZDIFF_TRANSFORMED)|g" \
-e "s|'zgrep'|$(ZGREP_TRANSFORMED)|g" \
--
2.7.4
+32
View File
@@ -0,0 +1,32 @@
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"
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"
@@ -0,0 +1,41 @@
require gzip.inc
# change to GPL-3.0-or-later in 2007/07. Previous GPL-2.0-or-later version is
# 1.3.12
LICENSE = "GPL-3.0-or-later"
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[sha256sum] = "5b4fb14d38314e09f2fc8a1c510e7cd540a3ea0e3eb9b0420046b82c3bf41085"