aboutsummaryrefslogtreecommitdiffstats
path: root/tools/quilt
diff options
context:
space:
mode:
authorJames <>2015-09-26 12:29:31 +0100
committerJames <>2015-09-26 12:29:31 +0100
commit626d9efa74685720020e816f3a917b7591d3cf7a (patch)
treed22eef73ae82287b30a1140decb4fc806d39d621 /tools/quilt
downloadtrunk-47048-626d9efa74685720020e816f3a917b7591d3cf7a.tar.gz
trunk-47048-626d9efa74685720020e816f3a917b7591d3cf7a.tar.bz2
trunk-47048-626d9efa74685720020e816f3a917b7591d3cf7a.zip
trunk-47048
Diffstat (limited to 'tools/quilt')
-rw-r--r--tools/quilt/Makefile39
-rw-r--r--tools/quilt/patches/000-relocatable.patch72
-rw-r--r--tools/quilt/patches/001-fix_compile.patch18
3 files changed, 129 insertions, 0 deletions
diff --git a/tools/quilt/Makefile b/tools/quilt/Makefile
new file mode 100644
index 0000000..01b0bd2
--- /dev/null
+++ b/tools/quilt/Makefile
@@ -0,0 +1,39 @@
+#
+# Copyright (C) 2006-2014 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.63
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SAVANNAH/quilt
+PKG_MD5SUM:=c0ef4beb58a6fa72563b955e70624b6e
+
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_CONFIGURE_ARGS += \
+ --with-find=$(FIND)
+
+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
+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 0000000..99d7af5
--- /dev/null
+++ b/tools/quilt/patches/000-relocatable.patch
@@ -0,0 +1,72 @@
+--- a/bin/quilt.in
++++ b/bin/quilt.in
+@@ -15,9 +15,15 @@
+ unset GREP_OPTIONS
+
+ export TEXTDOMAIN=quilt
+-export TEXTDOMAINDIR=@LOCALEDIR@
+
+-: ${QUILT_DIR=@QUILT_DIR@}
++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@}
++fi
++
+ export QUILT_DIR
+
+ 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/patchfns.in
++++ b/quilt/scripts/patchfns.in
+@@ -8,7 +8,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 0000000..c829515
--- /dev/null
+++ b/tools/quilt/patches/001-fix_compile.patch
@@ -0,0 +1,18 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -272,13 +272,10 @@ $(patsubst %.in,%,$(wildcard bin/*.in qu
+ @$(if $(filter $@,$(NON_EXEC_IN)),,chmod +x $@)
+
+ 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 -type f -perm -0100))
+