diff options
Diffstat (limited to 'tools/quilt')
-rw-r--r-- | tools/quilt/Makefile | 43 | ||||
-rw-r--r-- | tools/quilt/patches/000-relocatable.patch | 83 | ||||
-rw-r--r-- | tools/quilt/patches/001-fix_compile.patch | 18 | ||||
-rw-r--r-- | tools/quilt/patches/100-patch_2.6.1_version.patch | 15 |
4 files changed, 159 insertions, 0 deletions
diff --git a/tools/quilt/Makefile b/tools/quilt/Makefile new file mode 100644 index 000000000..510d8f6fd --- /dev/null +++ b/tools/quilt/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2006 -2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=quilt +PKG_VERSION:=0.48 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/$(PKG_NAME) +PKG_MD5SUM:=f77adda60039ffa753f3c584a286f12b + +include $(INCLUDE_DIR)/host-build.mk + +GETOPT:=$(shell which getopt) + +HOST_CONFIGURE_ARGS += \ + --with-patch=$(PATCH) \ + --with-find=$(FIND) \ + --with-getopt=$(GETOPT) + +define Host/Configure + cd $(HOST_BUILD_DIR) && autoconf + $(call Host/Configure/Default) + [ -f $(HOST_BUILD_DIR)/Makefile ] +endef + +define Host/Compile + $(MAKE) -C $(HOST_BUILD_DIR) SHELL="$(BASH)" all lib/backup-files +endef + +define Host/Install + $(MAKE) -C $(HOST_BUILD_DIR) SHELL="$(BASH)" install +endef + +define Host/Clean + rm -f $(STAGING_DIR_HOST)/bin/quilt +endef + +$(eval $(call HostBuild)) diff --git a/tools/quilt/patches/000-relocatable.patch b/tools/quilt/patches/000-relocatable.patch new file mode 100644 index 000000000..f8110236a --- /dev/null +++ b/tools/quilt/patches/000-relocatable.patch @@ -0,0 +1,83 @@ +--- a/bin/quilt.in ++++ b/bin/quilt.in +@@ -7,9 +7,15 @@ + # See the COPYING and AUTHORS files for more details. + + export TEXTDOMAIN=quilt +-export TEXTDOMAINDIR=@LOCALEDIR@ + +-: ${QUILT_DIR=@QUILT_DIR@} ${QUILT_LIB=@QUILT_LIB@} ++if test -n "$STAGING_DIR"; then ++ export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale" ++ : ${QUILT_DIR=$STAGING_DIR/../host/share/quilt} ${QUILT_LIB=$STAGING_DIR/../host/lib/quilt} ++else ++ export TEXTDOMAINDIR=@LOCALEDIR@ ++ : ${QUILT_DIR=@QUILT_DIR@} ${QUILT_LIB=@QUILT_LIB@} ++fi ++ + export QUILT_DIR QUILT_LIB + + if [ -z "$QUILTRC" ] +--- a/quilt/scripts/edmail.in ++++ b/quilt/scripts/edmail.in +@@ -29,7 +29,7 @@ BEGIN { + } + + setlocale(LC_MESSAGES, ""); +-bindtextdomain("quilt", "@LOCALEDIR@"); ++bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/locale' : "@LOCALEDIR@"); + textdomain("quilt"); + + sub _($) { +--- a/quilt/scripts/inspect.in ++++ b/quilt/scripts/inspect.in +@@ -6,7 +6,11 @@ + # + # See the COPYING and AUTHORS files for more details. + +-: ${QUILT_DIR=@QUILT_DIR@} ++if test -n "$STAGING_DIR"; then ++ : ${QUILT_DIR="$STAGING_DIR/../host/share/quilt"} ++else ++ : ${QUILT_DIR=@QUILT_DIR@} ++fi + + if ! [ -r $QUILT_DIR/scripts/patchfns ] + then +--- a/quilt/scripts/parse-patch.in ++++ b/quilt/scripts/parse-patch.in +@@ -34,7 +34,7 @@ BEGIN { + } + + setlocale(LC_MESSAGES, ""); +-bindtextdomain("quilt", "@LOCALEDIR@"); ++bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/locale' : "@LOCALEDIR@"); + textdomain("quilt"); + + sub _($) { +--- a/quilt/scripts/patchfns.in ++++ b/quilt/scripts/patchfns.in +@@ -10,7 +10,11 @@ + # See the COPYING and AUTHORS files for more details. + + export TEXTDOMAIN=quilt +-export TEXTDOMAINDIR=@LOCALEDIR@ ++if [ -n "$STAGING_DIR" ]; then ++ export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale" ++else ++ export TEXTDOMAINDIR=@LOCALEDIR@ ++fi + + : ${LC_CTYPE:=$LANG} + : ${LC_MESSAGES:=$LANG} +--- a/quilt/scripts/remove-trailing-ws.in ++++ b/quilt/scripts/remove-trailing-ws.in +@@ -31,7 +31,7 @@ BEGIN { + } + + setlocale(LC_MESSAGES, ""); +-bindtextdomain("quilt", "@LOCALEDIR@"); ++bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/locale' : "@LOCALEDIR@"); + textdomain("quilt"); + + sub _($) { diff --git a/tools/quilt/patches/001-fix_compile.patch b/tools/quilt/patches/001-fix_compile.patch new file mode 100644 index 000000000..51a4f5e20 --- /dev/null +++ b/tools/quilt/patches/001-fix_compile.patch @@ -0,0 +1,18 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -273,13 +273,10 @@ $(patsubst %.in,%,$(wildcard bin/*.in qu + lib/backup-files.o :: Makefile + + configure : configure.ac aclocal.m4 +- autoconf +- @echo "Please run ./configure" +- @false ++ @touch $@ + + Makefile : Makefile.in configure +- @echo "Please run ./configure" +- @false ++ @touch $@ + + compat_leftover := $(filter-out $(COMPAT),$(shell $(FIND) compat -maxdepth 1 -type f -perm +111)) + diff --git a/tools/quilt/patches/100-patch_2.6.1_version.patch b/tools/quilt/patches/100-patch_2.6.1_version.patch new file mode 100644 index 000000000..1e9ed75df --- /dev/null +++ b/tools/quilt/patches/100-patch_2.6.1_version.patch @@ -0,0 +1,15 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -274,7 +274,11 @@ fi + AC_MSG_CHECKING([the version of $PATCH]) + if $PATCH --version 2> /dev/null | grep GNU >/dev/null; then + set -- `$PATCH --version 2> /dev/null` +- patch_version=$2 ++ if test x$1 = xGNU ; then ++ patch_version=$3 ++ else ++ patch_version=$2 ++ fi + AC_MSG_RESULT($patch_version) + saved_IFS=$IFS; IFS='.' + set -- $patch_version |