Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Tool for working with series of patches" |
| 2 | HOMEPAGE = "http://savannah.nongnu.org/projects/quilt/" |
| 3 | SECTION = "devel" |
| 4 | LICENSE = "GPLv2" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" |
| 6 | |
| 7 | SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | file://run-ptest \ |
| 9 | file://Makefile \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 10 | file://test.sh \ |
| 11 | file://0001-tests-Allow-different-output-from-mv.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | " |
| 13 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 14 | SRC_URI_append_class-target = " file://gnu_patch_test_fix_target.patch" |
| 15 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 16 | SRC_URI[md5sum] = "c67ba0228f5b7b8bbe469474661f92d6" |
| 17 | SRC_URI[sha256sum] = "f6cbc788e5cbbb381a3c6eab5b9efce67c776a8662a7795c7432fd27aa096819" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 18 | |
| 19 | inherit autotools-brokensep ptest |
| 20 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 21 | INHIBIT_AUTOTOOLS_DEPS_class-native = "1" |
| 22 | PATCHTOOL_class-native = "patch" |
| 23 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 24 | CLEANBROKEN = "1" |
| 25 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 26 | EXTRA_OECONF = "--with-perl='${USRBINPATH}/env perl' --with-patch=patch" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 27 | EXTRA_OECONF_append_class-native = " --disable-nls" |
| 28 | EXTRA_AUTORECONF += "--exclude=aclocal" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 29 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash" |
| 31 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 32 | # Make sure we don't have "-w" in shebang lines: it breaks using |
| 33 | # "/usr/bin/env perl" as parser |
| 34 | do_configure_prepend () { |
| 35 | find ${S} -name "*.in" -exec sed -i -e "1s,^#\!.*@PERL@ -w$,#\! @PERL@\nuse warnings;," {} \; |
| 36 | } |
| 37 | |
| 38 | # Don't setup symlinks to host utilities, we don't need them |
| 39 | do_configure_append () { |
| 40 | sed -e 's,^COMPAT_SYMLINKS.*:=.*,COMPAT_SYMLINKS :=,' -i ${S}/Makefile |
| 41 | } |
| 42 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 43 | do_configure_class-native () { |
| 44 | oe_runconf |
| 45 | } |
| 46 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 47 | # quilt Makefiles install to BUILD_ROOT instead of DESTDIR |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 48 | do_install () { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 49 | oe_runmake 'BUILD_ROOT=${D}' install |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | # cleanup unpackaged files |
| 51 | rm -rf ${D}/${datadir}/emacs |
| 52 | } |
| 53 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 54 | do_install_append_class-native () { |
| 55 | # Dummy quiltrc file for patch.bbclass |
| 56 | install -d ${D}${sysconfdir}/ |
| 57 | touch ${D}${sysconfdir}/quiltrc |
| 58 | } |
| 59 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 60 | do_compile_ptest() { |
| 61 | oe_runmake bin/patch-wrapper test/.depend |
| 62 | } |
| 63 | |
| 64 | do_install_ptest() { |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 65 | tar -c --exclude=\*.in bin/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) |
| 66 | tar -c --exclude=\*.in compat/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) |
| 67 | tar -c --exclude=\*.in quilt/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) |
| 68 | tar -c --exclude=mail.test --exclude=delete.test test/ | ( cd ${D}${PTEST_PATH} && tar -xf - && chmod 777 test) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 69 | cp ${WORKDIR}/Makefile ${D}${PTEST_PATH} |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 70 | cp ${WORKDIR}/test.sh ${D}${PTEST_PATH} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 71 | } |
| 72 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 73 | PACKAGES += "guards guards-doc" |
| 74 | |
| 75 | FILES_${PN} = "${sysconfdir} ${datadir}/quilt \ |
| 76 | ${bindir}/quilt ${libdir}/quilt" |
| 77 | FILES_guards = "${bindir}/guards" |
| 78 | FILES_${PN}-doc = "${mandir}/man1/quilt.1 ${docdir}/${BPN}" |
| 79 | FILES_guards-doc = "${mandir}/man1/guards.1" |
| 80 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 81 | RDEPENDS_${PN} = "bash patch diffstat bzip2 util-linux" |
| 82 | RDEPENDS_${PN}_class-native = "diffstat-native patch-native bzip2-native" |
| 83 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 84 | RDEPENDS_${PN}-ptest = "make file sed gawk diffutils findutils ed perl \ |
| 85 | perl-module-filehandle perl-module-getopt-std \ |
| 86 | perl-module-posix perl-module-file-temp \ |
| 87 | perl-module-text-parsewords perl-module-overloading \ |
| 88 | bash util-linux-getopt \ |
| 89 | " |