Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Tool for working with series of patches" |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 2 | DESCRIPTION = "Quilt is a tool to manage large sets of patches by keeping \ |
| 3 | track of the changes each patch makes. Patches can be applied, un-applied,\ |
| 4 | refreshed, etc." |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 5 | HOMEPAGE = "http://savannah.nongnu.org/projects/quilt/" |
| 6 | SECTION = "devel" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7 | LICENSE = "GPL-2.0-only" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" |
| 9 | |
| 10 | SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 11 | file://run-ptest \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 12 | file://test.sh \ |
| 13 | file://0001-tests-Allow-different-output-from-mv.patch \ |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 14 | file://fix-grep-3.8.patch \ |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 15 | file://faildiff-order.patch \ |
Andrew Geissler | 028142b | 2023-05-05 11:29:21 -0500 | [diff] [blame] | 16 | file://0001-test-Fix-a-race-condition-in-merge.test.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | " |
| 18 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 19 | SRC_URI:append:class-target = " file://gnu_patch_test_fix_target.patch" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 20 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 21 | SRC_URI[sha256sum] = "3be3be0987e72a6c364678bb827e3e1fcc10322b56bc5f02b576698f55013cc2" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 22 | |
| 23 | inherit autotools-brokensep ptest |
| 24 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 25 | INHIBIT_AUTOTOOLS_DEPS:class-native = "1" |
| 26 | PATCHTOOL:class-native = "patch" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 27 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 28 | CLEANBROKEN = "1" |
| 29 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 30 | EXTRA_OECONF = "--with-perl='${USRBINPATH}/env perl' --with-patch=patch --without-sendmail" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 31 | EXTRA_OECONF:append:class-native = " --disable-nls" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 32 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 33 | EXTRA_AUTORECONF += "--exclude=aclocal" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 34 | |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 35 | CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash ac_cv_path_COLUMN=column" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 36 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 37 | # Make sure we don't have "-w" in shebang lines: it breaks using |
| 38 | # "/usr/bin/env perl" as parser |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 39 | do_configure:prepend () { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 40 | find ${S} -name "*.in" -exec sed -i -e "1s,^#\!.*@PERL@ -w$,#\! @PERL@\nuse warnings;," {} \; |
| 41 | } |
| 42 | |
| 43 | # Don't setup symlinks to host utilities, we don't need them |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 44 | do_configure:append () { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 45 | sed -e 's,^COMPAT_SYMLINKS.*:=.*,COMPAT_SYMLINKS :=,' -i ${S}/Makefile |
| 46 | } |
| 47 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 48 | do_configure:class-native () { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 49 | oe_runconf |
| 50 | } |
| 51 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 52 | # quilt Makefiles install to BUILD_ROOT instead of DESTDIR |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 53 | do_install () { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 54 | oe_runmake 'BUILD_ROOT=${D}' install |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 55 | # cleanup unpackaged files |
| 56 | rm -rf ${D}/${datadir}/emacs |
| 57 | } |
| 58 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 59 | do_install:append:class-native () { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 60 | # Dummy quiltrc file for patch.bbclass |
| 61 | install -d ${D}${sysconfdir}/ |
| 62 | touch ${D}${sysconfdir}/quiltrc |
| 63 | } |
| 64 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 65 | # The tests need to run as a non-root user, so pull in the ptest user |
| 66 | DEPENDS:append:class-target = "${@bb.utils.contains('PTEST_ENABLED', '1', ' ptest-runner', '', d)}" |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 67 | PACKAGE_WRITE_DEPS += "ptest-runner" |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 68 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 69 | do_install_ptest() { |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 70 | install ${WORKDIR}/test.sh ${D}${PTEST_PATH} |
| 71 | mkdir ${D}${PTEST_PATH}/test |
| 72 | install ${S}/test/* ${D}${PTEST_PATH}/test |
| 73 | # mail needs a MTA, and the patch-wrapper is disabled |
| 74 | rm -f ${D}${PTEST_PATH}/test/mail.test ${D}${PTEST_PATH}/test/patch-wrapper.test |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 75 | } |
| 76 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 77 | # ptest.bbclass currently chowns the ptest directory explicitly, so we need to |
| 78 | # change permission after that has happened so the ptest user can write a |
| 79 | # temporary directory. |
| 80 | do_install_ptest_base:append() { |
| 81 | chgrp ptest ${D}${PTEST_PATH}/test |
| 82 | chmod g+w ${D}${PTEST_PATH}/test |
| 83 | } |
| 84 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 85 | PACKAGES += "guards guards-doc" |
| 86 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 87 | FILES:${PN} = "${sysconfdir} ${datadir}/quilt \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 88 | ${bindir}/quilt ${libdir}/quilt" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 89 | FILES:guards = "${bindir}/guards" |
| 90 | FILES:${PN}-doc = "${mandir}/man1/quilt.1 ${docdir}/${BPN}" |
| 91 | FILES:guards-doc = "${mandir}/man1/guards.1" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 92 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 93 | RDEPENDS:${PN} = "bash patch diffstat bzip2 util-linux less" |
| 94 | RDEPENDS:${PN}:class-native = "diffstat-native patch-native bzip2-native" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 95 | |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 96 | RDEPENDS:${PN}-ptest += "file sed gawk diffutils findutils ed perl \ |
| 97 | perl-module-filehandle perl-module-getopt-std \ |
| 98 | perl-module-posix perl-module-file-temp \ |
| 99 | perl-module-text-parsewords perl-module-overloading \ |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 100 | bash util-linux-getopt ptest-runner \ |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 101 | " |