From 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd Mon Sep 17 00:00:00 2001 From: ToshikazuOhiwa Date: Mon, 30 Mar 2020 09:24:26 +0900 Subject: agl-basesystem --- .../meta/recipes-devtools/quilt/quilt-native.inc | 18 ++++++ .../recipes-devtools/quilt/quilt-native_0.65.bb | 2 + .../poky/meta/recipes-devtools/quilt/quilt.inc | 70 ++++++++++++++++++++++ ...0001-tests-Allow-different-output-from-mv.patch | 29 +++++++++ .../meta/recipes-devtools/quilt/quilt/Makefile | 13 ++++ .../quilt/quilt/gnu_patch_test_fix_target.patch | 26 ++++++++ .../meta/recipes-devtools/quilt/quilt/run-ptest | 8 +++ .../poky/meta/recipes-devtools/quilt/quilt/test.sh | 1 + .../poky/meta/recipes-devtools/quilt/quilt_0.65.bb | 8 +++ 9 files changed, 175 insertions(+) create mode 100644 external/poky/meta/recipes-devtools/quilt/quilt-native.inc create mode 100644 external/poky/meta/recipes-devtools/quilt/quilt-native_0.65.bb create mode 100644 external/poky/meta/recipes-devtools/quilt/quilt.inc create mode 100644 external/poky/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch create mode 100644 external/poky/meta/recipes-devtools/quilt/quilt/Makefile create mode 100644 external/poky/meta/recipes-devtools/quilt/quilt/gnu_patch_test_fix_target.patch create mode 100755 external/poky/meta/recipes-devtools/quilt/quilt/run-ptest create mode 100755 external/poky/meta/recipes-devtools/quilt/quilt/test.sh create mode 100644 external/poky/meta/recipes-devtools/quilt/quilt_0.65.bb (limited to 'external/poky/meta/recipes-devtools/quilt') diff --git a/external/poky/meta/recipes-devtools/quilt/quilt-native.inc b/external/poky/meta/recipes-devtools/quilt/quilt-native.inc new file mode 100644 index 00000000..c7067042 --- /dev/null +++ b/external/poky/meta/recipes-devtools/quilt/quilt-native.inc @@ -0,0 +1,18 @@ +RDEPENDS_${PN} = "diffstat-native patch-native bzip2-native util-linux-native" + +INHIBIT_AUTOTOOLS_DEPS = "1" + +inherit native + +PATCHTOOL = "patch" +EXTRA_OECONF_append = " --disable-nls" + +do_configure () { + oe_runconf +} + +do_install_append () { + # Dummy quiltrc file for patch.bbclass + install -d ${D}${sysconfdir}/ + touch ${D}${sysconfdir}/quiltrc +} diff --git a/external/poky/meta/recipes-devtools/quilt/quilt-native_0.65.bb b/external/poky/meta/recipes-devtools/quilt/quilt-native_0.65.bb new file mode 100644 index 00000000..6bc7dcdb --- /dev/null +++ b/external/poky/meta/recipes-devtools/quilt/quilt-native_0.65.bb @@ -0,0 +1,2 @@ +require quilt.inc +require quilt-native.inc diff --git a/external/poky/meta/recipes-devtools/quilt/quilt.inc b/external/poky/meta/recipes-devtools/quilt/quilt.inc new file mode 100644 index 00000000..48ed9bab --- /dev/null +++ b/external/poky/meta/recipes-devtools/quilt/quilt.inc @@ -0,0 +1,70 @@ +SUMMARY = "Tool for working with series of patches" +HOMEPAGE = "http://savannah.nongnu.org/projects/quilt/" +SECTION = "devel" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \ + file://run-ptest \ + file://Makefile \ + file://test.sh \ + file://0001-tests-Allow-different-output-from-mv.patch \ +" + +SRC_URI[md5sum] = "c67ba0228f5b7b8bbe469474661f92d6" +SRC_URI[sha256sum] = "f6cbc788e5cbbb381a3c6eab5b9efce67c776a8662a7795c7432fd27aa096819" + +inherit autotools-brokensep ptest + +CLEANBROKEN = "1" + +EXTRA_OECONF = "--with-perl='${USRBINPATH}/env perl' --with-patch=patch" + +CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash" + +# Make sure we don't have "-w" in shebang lines: it breaks using +# "/usr/bin/env perl" as parser +do_configure_prepend () { + find ${S} -name "*.in" -exec sed -i -e "1s,^#\!.*@PERL@ -w$,#\! @PERL@\nuse warnings;," {} \; +} + +# Don't setup symlinks to host utilities, we don't need them +do_configure_append () { + sed -e 's,^COMPAT_SYMLINKS.*:=.*,COMPAT_SYMLINKS :=,' -i ${S}/Makefile +} + +# quilt Makefiles install to BUILD_ROOT instead of DESTDIR +do_install () { + oe_runmake 'BUILD_ROOT=${D}' install + # cleanup unpackaged files + rm -rf ${D}/${datadir}/emacs +} + +do_compile_ptest() { + oe_runmake bin/patch-wrapper test/.depend +} + +do_install_ptest() { + tar -c --exclude=\*.in bin/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) + tar -c --exclude=\*.in compat/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) + tar -c --exclude=\*.in quilt/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) + tar -c --exclude=mail.test --exclude=delete.test test/ | ( cd ${D}${PTEST_PATH} && tar -xf - && chmod 777 test) + cp ${WORKDIR}/Makefile ${D}${PTEST_PATH} + cp ${WORKDIR}/test.sh ${D}${PTEST_PATH} +} + +PACKAGES += "guards guards-doc" + +FILES_${PN} = "${sysconfdir} ${datadir}/quilt \ + ${bindir}/quilt ${libdir}/quilt" +FILES_guards = "${bindir}/guards" +FILES_${PN}-doc = "${mandir}/man1/quilt.1 ${docdir}/${BPN}" +FILES_guards-doc = "${mandir}/man1/guards.1" + +RDEPENDS_${PN} = "bash" +RDEPENDS_${PN}-ptest = "make file sed gawk diffutils findutils ed perl \ + perl-module-filehandle perl-module-getopt-std \ + perl-module-posix perl-module-file-temp \ + perl-module-text-parsewords perl-module-overloading \ + bash util-linux-getopt \ + " diff --git a/external/poky/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch b/external/poky/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch new file mode 100644 index 00000000..21219a0b --- /dev/null +++ b/external/poky/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch @@ -0,0 +1,29 @@ +From 1530138960cfafbeefb95f2a760954c00b4d0ef0 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen +Date: Wed, 29 Mar 2017 15:11:59 +0300 +Subject: [PATCH] tests: Allow different output from mv + +busybox mv has different error messages: fix the test + +Upstream-Status: Inappropriate [embedded] +Signed-off-by: Jussi Kukkonen +--- + test/failbackup.test | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/failbackup.test b/test/failbackup.test +index 37046f7..fce6725 100644 +--- a/test/failbackup.test ++++ b/test/failbackup.test +@@ -16,7 +16,7 @@ What happens when refresh fails because of a permission error? + $ cat > test.txt + < This is updated test.txt. + $ quilt refresh --backup +- >~ mv: cannot move [`']?%{P}test.diff'? to [`']?%{P}test.diff~'?: Permission denied ++ >~ mv: .*: Permission denied + $ echo %{?} + > 1 + +-- +2.1.4 + diff --git a/external/poky/meta/recipes-devtools/quilt/quilt/Makefile b/external/poky/meta/recipes-devtools/quilt/quilt/Makefile new file mode 100644 index 00000000..7b3ac8a4 --- /dev/null +++ b/external/poky/meta/recipes-devtools/quilt/quilt/Makefile @@ -0,0 +1,13 @@ +PATH := $(CURDIR)/bin:$(CURDIR)/compat:$(PATH) +QUILT_DIR := $(CURDIR)/quilt +QUILTRC := $(CURDIR)/test/test.quiltrc +export QUILT_DIR QUILTRC +CHECK_ENV := P=patches/; _P=../patches/; export P _P +-include test/.depend + +check-% : test/%.test + @LANG=C; LC_ALL=C; \ + export LANG LC_ALL; \ + $(CHECK_ENV); \ + cd $( + +diff --git a/configure.ac b/configure.ac +index 026a36c..8af591b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -245,6 +245,7 @@ fi + QUILT_COMPAT_PROG_PATH(DIFF, diff) + QUILT_COMPAT_PROG_PATH(PATCH, patch) + ++if test "x$cross_compiling" != "xyes"; then + # Sun diff and others will not work because GNU patch options are used. + AC_MSG_CHECKING([the version of $DIFF]) + if $DIFF --version 2>/dev/null | grep GNU >/dev/null; then +@@ -293,6 +294,7 @@ current version of patch from ftp.gnu.org, or if you already have GNU patch + then you can supply its path with the '--with-patch=' option. + ]) + fi ++fi + + QUILT_COMPAT_PROG_PATH(FIND, find) + diff --git a/external/poky/meta/recipes-devtools/quilt/quilt/run-ptest b/external/poky/meta/recipes-devtools/quilt/quilt/run-ptest new file mode 100755 index 00000000..4b808aee --- /dev/null +++ b/external/poky/meta/recipes-devtools/quilt/quilt/run-ptest @@ -0,0 +1,8 @@ +#!/bin/sh + +THIS_SH=/bin/sh +ln -sf /bin/ed /usr/bin/ed +/usr/sbin/adduser --disabled-password quilttest +su -c "${THIS_SH} ./test.sh" quilttest +/usr/sbin/deluser quilttest +rm -f /usr/bin/ed diff --git a/external/poky/meta/recipes-devtools/quilt/quilt/test.sh b/external/poky/meta/recipes-devtools/quilt/quilt/test.sh new file mode 100755 index 00000000..6563e4a2 --- /dev/null +++ b/external/poky/meta/recipes-devtools/quilt/quilt/test.sh @@ -0,0 +1 @@ +for i in `ls test/*.test |awk -F. '{print $1}' |awk -F/ '{print $2}'`; do make check-$i; if [ $? -eq 0 ]; then echo PASS: $i.test; else echo FAIL: $i.test; fi; done diff --git a/external/poky/meta/recipes-devtools/quilt/quilt_0.65.bb b/external/poky/meta/recipes-devtools/quilt/quilt_0.65.bb new file mode 100644 index 00000000..5bf818d0 --- /dev/null +++ b/external/poky/meta/recipes-devtools/quilt/quilt_0.65.bb @@ -0,0 +1,8 @@ +require quilt.inc +inherit gettext + +SRC_URI += "file://gnu_patch_test_fix_target.patch" + +EXTRA_AUTORECONF += "--exclude=aclocal" + +RDEPENDS_${PN} += "patch diffstat bzip2 util-linux" -- cgit 1.2.3-korg