blob: f7ff958103e934f1a66d006e50408cb3c69bbda2 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Tool for working with series of patches"
Brad Bishopf3f93bb2019-10-16 14:33:32 -04002DESCRIPTION = "Quilt is a tool to manage large sets of patches by keeping \
3track of the changes each patch makes. Patches can be applied, un-applied,\
4refreshed, etc."
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005HOMEPAGE = "http://savannah.nongnu.org/projects/quilt/"
6SECTION = "devel"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007LICENSE = "GPL-2.0-only"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
9
10SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011 file://run-ptest \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050012 file://test.sh \
13 file://0001-tests-Allow-different-output-from-mv.patch \
Patrick Williams2390b1b2022-11-03 13:47:49 -050014 file://fix-grep-3.8.patch \
Andrew Geisslerc5535c92023-01-27 16:10:19 -060015 file://faildiff-order.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016"
17
Patrick Williams213cb262021-08-07 19:21:33 -050018SRC_URI:append:class-target = " file://gnu_patch_test_fix_target.patch"
Brad Bishop19323692019-04-05 15:28:33 -040019
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000020SRC_URI[sha256sum] = "3be3be0987e72a6c364678bb827e3e1fcc10322b56bc5f02b576698f55013cc2"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021
22inherit autotools-brokensep ptest
23
Patrick Williams213cb262021-08-07 19:21:33 -050024INHIBIT_AUTOTOOLS_DEPS:class-native = "1"
25PATCHTOOL:class-native = "patch"
Brad Bishop19323692019-04-05 15:28:33 -040026
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027CLEANBROKEN = "1"
28
Andrew Geissler9aee5002022-03-30 16:27:02 +000029EXTRA_OECONF = "--with-perl='${USRBINPATH}/env perl' --with-patch=patch --without-sendmail"
Patrick Williams213cb262021-08-07 19:21:33 -050030EXTRA_OECONF:append:class-native = " --disable-nls"
Andrew Geissler9aee5002022-03-30 16:27:02 +000031
Brad Bishop19323692019-04-05 15:28:33 -040032EXTRA_AUTORECONF += "--exclude=aclocal"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050033
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060034CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash ac_cv_path_COLUMN=column"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035
Brad Bishop6e60e8b2018-02-01 10:27:11 -050036# Make sure we don't have "-w" in shebang lines: it breaks using
37# "/usr/bin/env perl" as parser
Patrick Williams213cb262021-08-07 19:21:33 -050038do_configure:prepend () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050039 find ${S} -name "*.in" -exec sed -i -e "1s,^#\!.*@PERL@ -w$,#\! @PERL@\nuse warnings;," {} \;
40}
41
42# Don't setup symlinks to host utilities, we don't need them
Patrick Williams213cb262021-08-07 19:21:33 -050043do_configure:append () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050044 sed -e 's,^COMPAT_SYMLINKS.*:=.*,COMPAT_SYMLINKS :=,' -i ${S}/Makefile
45}
46
Patrick Williams213cb262021-08-07 19:21:33 -050047do_configure:class-native () {
Brad Bishop19323692019-04-05 15:28:33 -040048 oe_runconf
49}
50
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080051# quilt Makefiles install to BUILD_ROOT instead of DESTDIR
Patrick Williamsc124f4f2015-09-15 14:41:29 -050052do_install () {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080053 oe_runmake 'BUILD_ROOT=${D}' install
Patrick Williamsc124f4f2015-09-15 14:41:29 -050054 # cleanup unpackaged files
55 rm -rf ${D}/${datadir}/emacs
56}
57
Patrick Williams213cb262021-08-07 19:21:33 -050058do_install:append:class-native () {
Brad Bishop19323692019-04-05 15:28:33 -040059 # Dummy quiltrc file for patch.bbclass
60 install -d ${D}${sysconfdir}/
61 touch ${D}${sysconfdir}/quiltrc
62}
63
Patrick Williamsc124f4f2015-09-15 14:41:29 -050064do_install_ptest() {
Andrew Geisslerc5535c92023-01-27 16:10:19 -060065 install ${WORKDIR}/test.sh ${D}${PTEST_PATH}
66 mkdir ${D}${PTEST_PATH}/test
67 install ${S}/test/* ${D}${PTEST_PATH}/test
68 # mail needs a MTA, and the patch-wrapper is disabled
69 rm -f ${D}${PTEST_PATH}/test/mail.test ${D}${PTEST_PATH}/test/patch-wrapper.test
Patrick Williamsc124f4f2015-09-15 14:41:29 -050070}
71
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080072PACKAGES += "guards guards-doc"
73
Patrick Williams213cb262021-08-07 19:21:33 -050074FILES:${PN} = "${sysconfdir} ${datadir}/quilt \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080075 ${bindir}/quilt ${libdir}/quilt"
Patrick Williams213cb262021-08-07 19:21:33 -050076FILES:guards = "${bindir}/guards"
77FILES:${PN}-doc = "${mandir}/man1/quilt.1 ${docdir}/${BPN}"
78FILES:guards-doc = "${mandir}/man1/guards.1"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080079
Patrick Williams213cb262021-08-07 19:21:33 -050080RDEPENDS:${PN} = "bash patch diffstat bzip2 util-linux less"
81RDEPENDS:${PN}:class-native = "diffstat-native patch-native bzip2-native"
Brad Bishop19323692019-04-05 15:28:33 -040082
Andrew Geisslerc5535c92023-01-27 16:10:19 -060083RDEPENDS:${PN}-ptest += "file sed gawk diffutils findutils ed perl \
84 perl-module-filehandle perl-module-getopt-std \
85 perl-module-posix perl-module-file-temp \
86 perl-module-text-parsewords perl-module-overloading \
87 bash util-linux-getopt \
88 "