From 626d9efa74685720020e816f3a917b7591d3cf7a Mon Sep 17 00:00:00 2001 From: James <> Date: Sat, 26 Sep 2015 12:29:31 +0100 Subject: trunk-47048 --- tools/quilt/Makefile | 39 +++++++++++++++++ tools/quilt/patches/000-relocatable.patch | 72 +++++++++++++++++++++++++++++++ tools/quilt/patches/001-fix_compile.patch | 18 ++++++++ 3 files changed, 129 insertions(+) create mode 100644 tools/quilt/Makefile create mode 100644 tools/quilt/patches/000-relocatable.patch create mode 100644 tools/quilt/patches/001-fix_compile.patch (limited to 'tools/quilt') 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)) + -- cgit v1.2.3