blob: d6d06c049ca5175ab5e4b6ff65e7f26c5dd03977 [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"
7LICENSE = "GPLv2"
8LIC_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 \
12 file://Makefile \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013 file://test.sh \
14 file://0001-tests-Allow-different-output-from-mv.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015"
16
Brad Bishop19323692019-04-05 15:28:33 -040017SRC_URI_append_class-target = " file://gnu_patch_test_fix_target.patch"
18
Brad Bishop96ff1982019-08-19 13:50:42 -040019SRC_URI[md5sum] = "6800c2404a2c0598ab2eff92a636ba70"
20SRC_URI[sha256sum] = "314b319a6feb13bf9d0f9ffa7ce6683b06919e734a41275087ea457cc9dc6e07"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021
22inherit autotools-brokensep ptest
23
Brad Bishop19323692019-04-05 15:28:33 -040024INHIBIT_AUTOTOOLS_DEPS_class-native = "1"
25PATCHTOOL_class-native = "patch"
26
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027CLEANBROKEN = "1"
28
Brad Bishop6e60e8b2018-02-01 10:27:11 -050029EXTRA_OECONF = "--with-perl='${USRBINPATH}/env perl' --with-patch=patch"
Brad Bishop19323692019-04-05 15:28:33 -040030EXTRA_OECONF_append_class-native = " --disable-nls"
31EXTRA_AUTORECONF += "--exclude=aclocal"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050032
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash"
34
Brad Bishop6e60e8b2018-02-01 10:27:11 -050035# Make sure we don't have "-w" in shebang lines: it breaks using
36# "/usr/bin/env perl" as parser
37do_configure_prepend () {
38 find ${S} -name "*.in" -exec sed -i -e "1s,^#\!.*@PERL@ -w$,#\! @PERL@\nuse warnings;," {} \;
39}
40
41# Don't setup symlinks to host utilities, we don't need them
42do_configure_append () {
43 sed -e 's,^COMPAT_SYMLINKS.*:=.*,COMPAT_SYMLINKS :=,' -i ${S}/Makefile
44}
45
Brad Bishop19323692019-04-05 15:28:33 -040046do_configure_class-native () {
47 oe_runconf
48}
49
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080050# quilt Makefiles install to BUILD_ROOT instead of DESTDIR
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051do_install () {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080052 oe_runmake 'BUILD_ROOT=${D}' install
Patrick Williamsc124f4f2015-09-15 14:41:29 -050053 # cleanup unpackaged files
54 rm -rf ${D}/${datadir}/emacs
55}
56
Brad Bishop19323692019-04-05 15:28:33 -040057do_install_append_class-native () {
58 # Dummy quiltrc file for patch.bbclass
59 install -d ${D}${sysconfdir}/
60 touch ${D}${sysconfdir}/quiltrc
61}
62
Patrick Williamsc124f4f2015-09-15 14:41:29 -050063do_compile_ptest() {
64 oe_runmake bin/patch-wrapper test/.depend
65}
66
67do_install_ptest() {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060068 tar -c --exclude=\*.in bin/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
69 tar -c --exclude=\*.in compat/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
70 tar -c --exclude=\*.in quilt/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
71 tar -c --exclude=mail.test --exclude=delete.test test/ | ( cd ${D}${PTEST_PATH} && tar -xf - && chmod 777 test)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050072 cp ${WORKDIR}/Makefile ${D}${PTEST_PATH}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050073 cp ${WORKDIR}/test.sh ${D}${PTEST_PATH}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050074}
75
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080076PACKAGES += "guards guards-doc"
77
78FILES_${PN} = "${sysconfdir} ${datadir}/quilt \
79 ${bindir}/quilt ${libdir}/quilt"
80FILES_guards = "${bindir}/guards"
81FILES_${PN}-doc = "${mandir}/man1/quilt.1 ${docdir}/${BPN}"
82FILES_guards-doc = "${mandir}/man1/guards.1"
83
Brad Bishopc68388fc2019-08-26 01:33:31 -040084RDEPENDS_${PN} = "bash patch diffstat bzip2 util-linux less"
Brad Bishop19323692019-04-05 15:28:33 -040085RDEPENDS_${PN}_class-native = "diffstat-native patch-native bzip2-native"
86
Patrick Williamsc124f4f2015-09-15 14:41:29 -050087RDEPENDS_${PN}-ptest = "make file sed gawk diffutils findutils ed perl \
88 perl-module-filehandle perl-module-getopt-std \
89 perl-module-posix perl-module-file-temp \
90 perl-module-text-parsewords perl-module-overloading \
Brad Bishop15ae2502019-06-18 21:44:24 -040091 bash util-linux-getopt patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050092 "