diff options
Diffstat (limited to 'yocto-poky/meta/recipes-devtools/quilt')
9 files changed, 283 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-devtools/quilt/quilt-native.inc b/yocto-poky/meta/recipes-devtools/quilt/quilt-native.inc new file mode 100644 index 000000000..5c4b0a217 --- /dev/null +++ b/yocto-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 = "--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/yocto-poky/meta/recipes-devtools/quilt/quilt-native_0.64.bb b/yocto-poky/meta/recipes-devtools/quilt/quilt-native_0.64.bb new file mode 100644 index 000000000..6bc7dcdb7 --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/quilt/quilt-native_0.64.bb @@ -0,0 +1,2 @@ +require quilt.inc +require quilt-native.inc diff --git a/yocto-poky/meta/recipes-devtools/quilt/quilt.inc b/yocto-poky/meta/recipes-devtools/quilt/quilt.inc new file mode 100644 index 000000000..837b36ba8 --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/quilt/quilt.inc @@ -0,0 +1,62 @@ +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://install.patch \ + file://run-ptest \ + file://Makefile \ +" + +SRC_URI[md5sum] = "fc0310db5868a0873d602d4332a76d43" +SRC_URI[sha256sum] = "c4bfd3282214a288e8d3e921ae4d52e73e24c4fead72b5446752adee99a7affd" + +inherit autotools-brokensep ptest + +EXTRA_OECONF_darwin += "--without-date \ + --without-getopt \ + " + +CLEANBROKEN = "1" + +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" + +EXTRA_OE_MAKE_ARGS_darwin ?= "" +EXTRA_OE_MAKE_ARGS ?= "BUILD_ROOT=${D}" + +CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash" + +# quilt ignores DESTDIR +do_install () { + oe_runmake ${EXTRA_OE_MAKE_ARGS} install + # cleanup unpackaged files + rm -rf ${D}/${datadir}/emacs +} + +do_compile_ptest() { + oe_runmake bin/patch-wrapper test/.depend +} + +do_install_ptest() { + tar -cf - bin/ --exclude \*.in | ( cd ${D}${PTEST_PATH} && tar -xf - ) + tar -cf - compat/ --exclude \*.in | ( cd ${D}${PTEST_PATH} && tar -xf - ) + tar -cf - quilt/ --exclude \*.in | ( cd ${D}${PTEST_PATH} && tar -xf - ) + tar -cf - test/ --exclude mail.test --exclude delete.test | ( cd ${D}${PTEST_PATH} && tar -xf - ) + cp ${WORKDIR}/Makefile ${D}${PTEST_PATH} +} + +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/yocto-poky/meta/recipes-devtools/quilt/quilt/Makefile b/yocto-poky/meta/recipes-devtools/quilt/quilt/Makefile new file mode 100644 index 000000000..7b3ac8a49 --- /dev/null +++ b/yocto-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 $(<D); \ + ./run -q $(<F) diff --git a/yocto-poky/meta/recipes-devtools/quilt/quilt/aclocal.patch b/yocto-poky/meta/recipes-devtools/quilt/quilt/aclocal.patch new file mode 100644 index 000000000..daf44295e --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/quilt/quilt/aclocal.patch @@ -0,0 +1,128 @@ +Upstream-Status: Pending + +Add the aclocal.m4 as acinclude.m4 + +Index: quilt-0.47/acinclude.m4 +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ quilt-0.47/acinclude.m4 2006-10-10 17:05:56.000000000 +0100 +@@ -0,0 +1,119 @@ ++dnl Allow configure to specify a specific binary ++dnl 1: Environment variable ++dnl 2: binary name ++dnl 3: optional list of alternative binary names ++dnl 4: optional list of additional search directories ++AC_DEFUN([QUILT_COMPAT_PROG_PATH],[ ++ m4_define([internal_$2_cmd],[esyscmd(ls compat/$2.in 2>/dev/null)]) ++ ++ AC_ARG_WITH($2, AC_HELP_STRING( ++ [--with-$2], [name of the $2 executable to use] ++ m4_if(internal_$2_cmd,[],[],[ (use --without-$2 ++ to use an internal mechanism)])), ++ [ ++ if test x"$withval" = xnone; then ++ AC_MSG_ERROR([Invalid configure argument. use --without-$2]) ++ fi ++ if test x"$withval" != xno; then ++ AC_MSG_CHECKING(for $2) ++ $1="$withval" ++ if test -e "$$1"; then ++ if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then ++ AC_MSG_ERROR([$$1 is not an executable file]) ++ fi ++ fi ++ AC_MSG_RESULT([$$1]) ++ if test ! -e "$$1"; then ++ AC_MSG_WARN([$$1 does not exist]) ++ fi ++ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2" ++ fi ++ ],[ ++ m4_if([$3],[],[ ++ AC_PATH_PROG($1,$2,,$PATH:$4) ++ ],[ ++ AC_PATH_PROGS($1,$3,,$PATH:$4) ++ if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then ++ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2" ++ fi ++ ]) ++ m4_if([$4],[],[],[ ++ if test -n "$$1"; then ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++ for dir in "$4"; do ++ if test "`dirname $$1`" = "$dir"; then ++ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2" ++ break ++ fi ++ done ++ IFS="$as_save_IFS" ++ fi ++ ]) ++ ]) ++ if test -z "$$1"; then ++ m4_if(internal_$2_cmd,[],[ ++ AC_MSG_ERROR([Please specify the location of $2 with the option '--with-$2']) ++ ],[ ++ AC_MSG_WARN([Using internal $2 mechanism. Use option '--with-$2' to override]) ++ COMPAT_PROGRAMS="$COMPAT_PROGRAMS $2" ++ $1=$2 ++ INTERNAL_$1=1 ++ ]) ++ fi ++ AC_SUBST($1) ++]) ++ ++dnl Allow configure to specify a specific binary ++dnl This variant is for optional binaries. ++dnl 1: Environment variable ++dnl 2: binary name ++dnl 3: optional list of alternative binary names ++dnl 4: optional list of additional search directories ++AC_DEFUN([QUILT_COMPAT_PROG_PATH_OPT],[ ++ AC_ARG_WITH($2, AC_HELP_STRING( ++ [--with-$2], [name of the $2 executable to use]), ++ [ ++ if test x"$withval" != xno; then ++ AC_MSG_CHECKING(for $2) ++ $1="$withval" ++ if test -e "$$1"; then ++ if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then ++ AC_MSG_ERROR([$$1 is not an executable file]) ++ fi ++ fi ++ AC_MSG_RESULT([$$1]) ++ if test ! -e "$$1"; then ++ AC_MSG_WARN([$$1 does not exist]) ++ fi ++ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2" ++ fi ++ ],[ ++ m4_if([$3],[],[ ++ AC_PATH_PROG($1,$2,,$PATH:$4) ++ ],[ ++ AC_PATH_PROGS($1,$3,,$PATH:$4) ++ if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then ++ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2" ++ fi ++ ]) ++ m4_if([$4],[],[],[ ++ if test -n "$$1"; then ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++ for dir in "$4"; do ++ if test "`dirname $$1`" = "$dir"; then ++ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2" ++ break ++ fi ++ done ++ IFS="$as_save_IFS" ++ fi ++ ]) ++ if test -z "$$1"; then ++ AC_MSG_WARN([$2 not found, some optional functionalities will be missing]) ++ fi ++ ]) ++ if test -z "$$1"; then ++ $1=$2 ++ fi ++ AC_SUBST($1) ++]) diff --git a/yocto-poky/meta/recipes-devtools/quilt/quilt/gnu_patch_test_fix_target.patch b/yocto-poky/meta/recipes-devtools/quilt/quilt/gnu_patch_test_fix_target.patch new file mode 100644 index 000000000..672155bb6 --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/quilt/quilt/gnu_patch_test_fix_target.patch @@ -0,0 +1,26 @@ +Upstream-Status: Pending + +the test should be skipped for cross compiling. + +Signed-off-by: Qing He <qing.he@intel.com> + +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/yocto-poky/meta/recipes-devtools/quilt/quilt/install.patch b/yocto-poky/meta/recipes-devtools/quilt/quilt/install.patch new file mode 100644 index 000000000..e2a7af655 --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/quilt/quilt/install.patch @@ -0,0 +1,13 @@ +Upstream-Status: Pending + +--- quilt-0.47/Makefile.in 2008-12-31 19:09:13.000000000 +0000 ++++ quilt-0.47/Makefile.in.orig 2008-08-21 13:21:32.000000000 +0100 +@@ -13,7 +13,7 @@ + mandir := @mandir@ + localedir := $(datadir)/locale + emacsdir := $(datadir)/emacs/site-lisp +-etcdir := $(subst /usr/etc,/etc,$(prefix)/etc) ++etcdir := @sysconfdir@ + + INSTALL := @INSTALL@ + POD2MAN := @POD2MAN@ diff --git a/yocto-poky/meta/recipes-devtools/quilt/quilt/run-ptest b/yocto-poky/meta/recipes-devtools/quilt/quilt/run-ptest new file mode 100755 index 000000000..958a9df5b --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/quilt/quilt/run-ptest @@ -0,0 +1,5 @@ +#!/bin/sh + +ln -sf /bin/ed /usr/bin/ed +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 +rm -f /usr/bin/ed diff --git a/yocto-poky/meta/recipes-devtools/quilt/quilt_0.64.bb b/yocto-poky/meta/recipes-devtools/quilt/quilt_0.64.bb new file mode 100644 index 000000000..00f900a11 --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/quilt/quilt_0.64.bb @@ -0,0 +1,16 @@ +require quilt.inc +inherit gettext +RDEPENDS_${PN} += "patch diffstat bzip2 util-linux" +SRC_URI += "file://aclocal.patch \ + file://gnu_patch_test_fix_target.patch \ + " + +# fix build-distro specific perl path in the target perl scripts +do_install_append() { + for perlscript in ${D}${datadir}/quilt/scripts/remove-trailing-ws ${D}${datadir}/quilt/scripts/dependency-graph ${D}${datadir}/quilt/scripts/edmail ${D}${bindir}/guards + do + if [ -f $perlscript ]; then + sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' $perlscript + fi + done +} |