* [Buildroot] [PATCH 1/6] bzip2: improve the packaging
2013-05-27 23:00 [Buildroot] [PATCH 0/6] Cleanup of packages patching Thomas Petazzoni
@ 2013-05-27 23:00 ` Thomas Petazzoni
2013-05-28 10:14 ` Thomas Petazzoni
2013-05-28 19:00 ` Peter Korsgaard
2013-05-27 23:01 ` [Buildroot] [PATCH 2/6] gettext: don't patch different the host and target build Thomas Petazzoni
` (4 subsequent siblings)
5 siblings, 2 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2013-05-27 23:00 UTC (permalink / raw)
To: buildroot
Instead of doing some nasty SED tricks, use a patch that modifies the
bzip2 build system to make it a little bit nicer. Those SEDs were made
differently for the host and target packages, which is contrary to the
logic of not having any difference in the source tree between the host
build and the target build.
This commit also makes sure that bzip2.mk behaves properly in a
BR2_PREFER_STATIC_LIB=y context.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/bzip2/bzip2-improve-build-system.patch | 84 ++++++++++++++++++++++
package/bzip2/bzip2.mk | 92 ++++++++----------------
2 files changed, 115 insertions(+), 61 deletions(-)
create mode 100644 package/bzip2/bzip2-improve-build-system.patch
diff --git a/package/bzip2/bzip2-improve-build-system.patch b/package/bzip2/bzip2-improve-build-system.patch
new file mode 100644
index 0000000..90099aa
--- /dev/null
+++ b/package/bzip2/bzip2-improve-build-system.patch
@@ -0,0 +1,84 @@
+Improve bzip2 build system
+
+This patch makes a number of improvements to the bzip2 build system:
+
+ * Remove the BIGFILE variable that was used to force largefile
+ support. Now, the user of the Makefile is supposed to pass
+ -D_FILE_OFFSET_BITS=64 when largefile support is desired.
+
+ * Use override CFLAGS += so that additional CFLAGS can be passed on
+ the command line.
+
+ * Removed "forced" CFLAGS -O2, -g and -Winline. We don't want them by
+ default, and want the build system to use its own ones.
+
+ * When creating the symbolic links bzegrep, bzfgrep, bzless and
+ bzcmp, don't link them to an absolute path, or they'll point to
+ some path on the build machine.
+
+ * Provide an install target for the shared library, which creates the
+ appropriate symbolic links.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/Makefile
+===================================================================
+--- a/Makefile
++++ b/Makefile
+@@ -20,8 +20,7 @@
+ RANLIB=ranlib
+ LDFLAGS=
+
+-BIGFILES=-D_FILE_OFFSET_BITS=64
+-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
++override CFLAGS += -Wall
+
+ # Where you want it installed when you do 'make install'
+ PREFIX=/usr/local
+@@ -90,14 +89,14 @@
+ cp -f libbz2.a $(PREFIX)/lib
+ chmod a+r $(PREFIX)/lib/libbz2.a
+ cp -f bzgrep $(PREFIX)/bin/bzgrep
+- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
+- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
++ ln -s -f bzgrep $(PREFIX)/bin/bzegrep
++ ln -s -f bzgrep $(PREFIX)/bin/bzfgrep
+ chmod a+x $(PREFIX)/bin/bzgrep
+ cp -f bzmore $(PREFIX)/bin/bzmore
+- ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
++ ln -s -f bzmore $(PREFIX)/bin/bzless
+ chmod a+x $(PREFIX)/bin/bzmore
+ cp -f bzdiff $(PREFIX)/bin/bzdiff
+- ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
++ ln -s -f bzdiff $(PREFIX)/bin/bzcmp
+ chmod a+x $(PREFIX)/bin/bzdiff
+ cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
+ chmod a+r $(PREFIX)/man/man1/bzgrep.1
+Index: b/Makefile-libbz2_so
+===================================================================
+--- a/Makefile-libbz2_so
++++ b/Makefile-libbz2_so
+@@ -23,8 +23,7 @@
+
+ SHELL=/bin/sh
+ CC=gcc
+-BIGFILES=-D_FILE_OFFSET_BITS=64
+-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
++override CFLAGS += -fpic -fPIC -Wall
+
+ OBJS= blocksort.o \
+ huffman.o \
+@@ -37,8 +36,11 @@
+ all: $(OBJS)
+ $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
+ $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
+- rm -f libbz2.so.1.0
+- ln -s libbz2.so.1.0.6 libbz2.so.1.0
++
++install:
++ install -m 0755 -D libbz2.so.1.0.6 $(PREFIX)/lib/libbz2.so.1.0.6
++ ln -sf libbz2.so.1.0.6 $(PREFIX)/lib/libbz2.so
++ ln -sf libbz2.so.1.0.6 $(PREFIX)/lib/libbz2.so.1.0
+
+ clean:
+ rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared
diff --git a/package/bzip2/bzip2.mk b/package/bzip2/bzip2.mk
index b3e4ad3..5f8c35e 100644
--- a/package/bzip2/bzip2.mk
+++ b/package/bzip2/bzip2.mk
@@ -10,67 +10,45 @@ BZIP2_INSTALL_STAGING = YES
BZIP2_LICENSE = bzip2 license
BZIP2_LICENSE_FILES = LICENSE
-define BZIP2_FIX_MAKEFILE
- $(SED) "s,ln \$$(,ln -snf \$$(,g" $(@D)/Makefile
- $(SED) "s,ln -s (lib.*),ln -snf \$$1; ln -snf libbz2.so.$(BZIP2_VERSION)) \
- libbz2.so,g" $(@D)/Makefile-libbz2_so
- $(SED) "s:-O2:$(TARGET_CFLAGS):" $(@D)/Makefile
- $(SED) "s:-O2:$(TARGET_CFLAGS):" $(@D)/Makefile-libbz2_so
+ifeq ($(BR2_PREFER_STATIC_LIB),)
+define BZIP2_BUILD_SHARED_CMDS
+ $(TARGET_MAKE_ENV)
+ $(MAKE) -C $(@D) -f Makefile-libbz2_so $(TARGET_CONFIGURE_OPTS)
endef
+endif
-BZIP2_POST_PATCH_HOOKS += BZIP2_FIX_MAKEFILE
-
-define BZIP2_NOLARGEFILE_FIX_MAKEFILE
- $(SED) "s,^BIGFILES,#BIGFILES,g" $(@D)/Makefile
- $(SED) "s,^BIGFILES,#BIGFILES,g" $(@D)/Makefile-libbz2_so
+define BZIP2_BUILD_CMDS
+ $(TARGET_MAKE_ENV)
+ $(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover $(TARGET_CONFIGURE_OPTS)
+ $(BZIP2_BUILD_SHARED_CMDS)
endef
-ifneq ($(BR2_LARGEFILE),y)
-BZIP2_POST_PATCH_HOOKS += BZIP2_NOLARGEFILE_FIX_MAKEFILE
+ifeq ($(BR2_PREFER_STATIC_LIB),)
+define BZIP2_INSTALL_STAGING_SHARED_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) \
+ -f Makefile-libbz2_so PREFIX=$(STAGING_DIR)/usr -C $(@D) install
+endef
endif
-define BZIP2_BUILD_CMDS
- $(TARGET_MAKE_ENV) \
- $(MAKE) -C $(@D) -f Makefile-libbz2_so \
- CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" AR="$(TARGET_AR)"
- $(TARGET_MAKE_ENV) \
- $(MAKE) -C $(@D) \
- CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" AR="$(TARGET_AR)" \
- libbz2.a bzip2 bzip2recover
+define BZIP2_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) \
+ PREFIX=$(STAGING_DIR)/usr -C $(@D) install
+ $(BZIP2_INSTALL_STAGING_SHARED_CMDS)
endef
-define BZIP2_INSTALL_STAGING_CMDS
- $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \
- $(MAKE) PREFIX=$(STAGING_DIR)/usr -C $(@D) install
- $(INSTALL) -m 0755 -d $(STAGING_DIR)/usr/lib
- cp $(@D)/libbz2.so.$(BZIP2_VERSION) $(STAGING_DIR)/usr/lib/
- cp $(@D)/libbz2.a $(STAGING_DIR)/usr/lib/
- (cd $(STAGING_DIR)/usr/lib/; \
- ln -snf libbz2.so.$(BZIP2_VERSION) libbz2.so; \
- ln -snf libbz2.so.$(BZIP2_VERSION) libbz2.so.1.0; \
- ln -snf libbz2.so.$(BZIP2_VERSION) libbz2.so.1; \
- )
+ifeq ($(BR2_PREFER_STATIC_LIB),)
+define BZIP2_INSTALL_TARGET_SHARED_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) \
+ -f Makefile-libbz2_so PREFIX=$(TARGET_DIR)/usr -C $(@D) install
endef
+endif
# make sure busybox doesn't get overwritten by make install
define BZIP2_INSTALL_TARGET_CMDS
rm -f $(addprefix $(TARGET_DIR)/usr/bin/,bzip2 bunzip2 bzcat)
- $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \
- $(MAKE) PREFIX=$(TARGET_DIR)/usr -C $(@D) install
- cp $(@D)/libbz2.so.$(BZIP2_VERSION) $(TARGET_DIR)/usr/lib/
- (cd $(TARGET_DIR)/usr/lib; \
- ln -snf libbz2.so.$(BZIP2_VERSION) libbz2.so.1.0; \
- ln -snf libbz2.so.$(BZIP2_VERSION) libbz2.so.1; \
- ln -snf libbz2.so.$(BZIP2_VERSION) libbz2.so; \
- )
- (cd $(TARGET_DIR)/usr/bin; \
- ln -snf bzip2 bunzip2; \
- ln -snf bzip2 bzcat; \
- ln -snf bzdiff bzcmp; \
- ln -snf bzmore bzless; \
- ln -snf bzgrep bzegrep; \
- ln -snf bzgrep bzfgrep; \
- )
+ $(TARGET_MAKE_ENV) $(MAKE) \
+ PREFIX=$(TARGET_DIR)/usr -C $(@D) install
+ $(BZIP2_INSTALL_TARGET_SHARED_CMDS)
endef
define BZIP2_CLEAN_CMDS
@@ -83,24 +61,16 @@ define BZIP2_CLEAN_CMDS
-$(MAKE) -C $(@D) clean
endef
-define HOST_BZIP2_FIX_MAKEFILE
- $(SED) "s,ln \$$(,ln -snf \$$(,g" $(@D)/Makefile
- $(SED) "s,ln -s (lib.*),ln -snf \$$1; ln -snf libbz2.so.$(BZIP2_VERSION) \
- libbz2.so,g" $(@D)/Makefile-libbz2_so
- $(SED) "s:-O2:$(HOST_CFLAGS):" $(@D)/Makefile
- $(SED) "s:-O2:$(HOST_CFLAGS):" $(@D)/Makefile-libbz2_so
-endef
-
-HOST_BZIP2_POST_PATCH_HOOKS += HOST_BZIP2_FIX_MAKEFILE
-
define HOST_BZIP2_BUILD_CMDS
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D) -f Makefile-libbz2_so
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover
+ $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) \
+ $(MAKE) -C $(@D) -f Makefile-libbz2_so
+ $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) \
+ $(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover
endef
define HOST_BZIP2_INSTALL_CMDS
$(HOST_MAKE_ENV) \
- $(MAKE) PREFIX=$(HOST_DIR)/usr -C $(@D) install
+ $(MAKE) PREFIX=$(HOST_DIR)/usr -C $(@D) install
endef
$(eval $(generic-package))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [Buildroot] [PATCH 1/6] bzip2: improve the packaging
2013-05-27 23:00 ` [Buildroot] [PATCH 1/6] bzip2: improve the packaging Thomas Petazzoni
@ 2013-05-28 10:14 ` Thomas Petazzoni
2013-05-28 19:00 ` Peter Korsgaard
1 sibling, 0 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2013-05-28 10:14 UTC (permalink / raw)
To: buildroot
On Tue, 28 May 2013 01:00:59 +0200, Thomas Petazzoni wrote:
> Instead of doing some nasty SED tricks, use a patch that modifies the
> bzip2 build system to make it a little bit nicer. Those SEDs were made
> differently for the host and target packages, which is contrary to the
> logic of not having any difference in the source tree between the host
> build and the target build.
>
> This commit also makes sure that bzip2.mk behaves properly in a
> BR2_PREFER_STATIC_LIB=y context.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This patch should also fix
http://autobuild.buildroot.org/results/91e/91ef29128f9e4e68dd433bd87d61c60852e741b3/build-end.log.
(i.e static build on bfin).
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/6] bzip2: improve the packaging
2013-05-27 23:00 ` [Buildroot] [PATCH 1/6] bzip2: improve the packaging Thomas Petazzoni
2013-05-28 10:14 ` Thomas Petazzoni
@ 2013-05-28 19:00 ` Peter Korsgaard
2013-05-28 19:12 ` Thomas Petazzoni
1 sibling, 1 reply; 19+ messages in thread
From: Peter Korsgaard @ 2013-05-28 19:00 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> Instead of doing some nasty SED tricks, use a patch that modifies the
Thomas> bzip2 build system to make it a little bit nicer. Those SEDs were made
Thomas> differently for the host and target packages, which is contrary to the
Thomas> logic of not having any difference in the source tree between the host
Thomas> build and the target build.
Thomas> This commit also makes sure that bzip2.mk behaves properly in a
Thomas> BR2_PREFER_STATIC_LIB=y context.
Committed to next, thanks.
It would be good if you could try to push the patch upstream.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/6] bzip2: improve the packaging
2013-05-28 19:00 ` Peter Korsgaard
@ 2013-05-28 19:12 ` Thomas Petazzoni
2013-05-28 19:50 ` Peter Korsgaard
0 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2013-05-28 19:12 UTC (permalink / raw)
To: buildroot
Dear Peter Korsgaard,
On Tue, 28 May 2013 21:00:00 +0200, Peter Korsgaard wrote:
> Thomas> This commit also makes sure that bzip2.mk behaves properly in a
> Thomas> BR2_PREFER_STATIC_LIB=y context.
>
> Committed to next, thanks.
>
> It would be good if you could try to push the patch upstream.
I've just sent the patch, but I don't think there's much luck. bzip2 is
one of some open-source project that's mostly "done", so there isn't
much activity. Last release 2.5 years ago, no Git tree or even any VCS
at all.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/6] bzip2: improve the packaging
2013-05-28 19:12 ` Thomas Petazzoni
@ 2013-05-28 19:50 ` Peter Korsgaard
0 siblings, 0 replies; 19+ messages in thread
From: Peter Korsgaard @ 2013-05-28 19:50 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
>> It would be good if you could try to push the patch upstream.
Thomas> I've just sent the patch, but I don't think there's much
Thomas> luck. bzip2 is one of some open-source project that's mostly
Thomas> "done", so there isn't much activity. Last release 2.5 years
Thomas> ago, no Git tree or even any VCS at all.
Yes, I know. It's imho still worth a try though.
Thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 2/6] gettext: don't patch different the host and target build
2013-05-27 23:00 [Buildroot] [PATCH 0/6] Cleanup of packages patching Thomas Petazzoni
2013-05-27 23:00 ` [Buildroot] [PATCH 1/6] bzip2: improve the packaging Thomas Petazzoni
@ 2013-05-27 23:01 ` Thomas Petazzoni
2013-05-30 19:47 ` Peter Korsgaard
2013-05-27 23:01 ` [Buildroot] [PATCH 3/6] binutils: apply post-patch hook on both the host and target builds Thomas Petazzoni
` (3 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2013-05-27 23:01 UTC (permalink / raw)
To: buildroot
Until now, the gettext source code was being patched differently for
the host and the target build, which is going to be incompatible with
out-of-tree build. The difference is that the gettext tools could be
disabled in the target build, but are always enabled on the host
build.
Therefore, this commit switches the gettext package to using proper
patches against the relevant configure.ac and Makefile.am
files. gettext is now being autoreconfigured. Configuration options
are also passed for the host variant, in order to disable the build of
a large number of things we don't care about.
Finally, the two existing patches are renamed to include a number in
their filename.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
...patch => gettext-01-error_print_progname.patch} | 0
...patch => gettext-02-fix_rpl_gettimeofday.patch} | 0
.../gettext-03-option-to-disable-tools.patch | 42 ++++++++++++++++++++
.../gettext/gettext-04-remove-examples-tests.patch | 20 ++++++++++
package/gettext/gettext-05-use-shell.patch | 25 ++++++++++++
package/gettext/gettext.mk | 26 ++++++------
6 files changed, 101 insertions(+), 12 deletions(-)
rename package/gettext/{gettext-error_print_progname.patch => gettext-01-error_print_progname.patch} (100%)
rename package/gettext/{gettext-fix_rpl_gettimeofday.patch => gettext-02-fix_rpl_gettimeofday.patch} (100%)
create mode 100644 package/gettext/gettext-03-option-to-disable-tools.patch
create mode 100644 package/gettext/gettext-04-remove-examples-tests.patch
create mode 100644 package/gettext/gettext-05-use-shell.patch
diff --git a/package/gettext/gettext-error_print_progname.patch b/package/gettext/gettext-01-error_print_progname.patch
similarity index 100%
rename from package/gettext/gettext-error_print_progname.patch
rename to package/gettext/gettext-01-error_print_progname.patch
diff --git a/package/gettext/gettext-fix_rpl_gettimeofday.patch b/package/gettext/gettext-02-fix_rpl_gettimeofday.patch
similarity index 100%
rename from package/gettext/gettext-fix_rpl_gettimeofday.patch
rename to package/gettext/gettext-02-fix_rpl_gettimeofday.patch
diff --git a/package/gettext/gettext-03-option-to-disable-tools.patch b/package/gettext/gettext-03-option-to-disable-tools.patch
new file mode 100644
index 0000000..24a9996
--- /dev/null
+++ b/package/gettext/gettext-03-option-to-disable-tools.patch
@@ -0,0 +1,42 @@
+Add a --disable-tools option
+
+This patch adds a --disable-tools option that allows to disable the
+compilation of the gettext tools, which may not be necessary on a
+small embedded Linux system.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -37,6 +37,10 @@
+
+ dnl Checks for library functions.
+
++AC_ARG_ENABLE([tools], [--disable-tools do not build tools],
++ [enable_tools=$enableval], [enable_tools=yes])
++AM_CONDITIONAL([ENABLE_TOOLS], [test "$enable_tools" = "yes"])
++
+ AC_CONFIG_SUBDIRS([gettext-runtime gettext-tools])
+
+ dnl Ensure that "configure --help" lists all the command line options that
+Index: b/Makefile.am
+===================================================================
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -20,7 +20,13 @@
+ ACLOCAL = build-aux/fixaclocal @ACLOCAL@
+ ACLOCAL_AMFLAGS = -I m4
+
+-SUBDIRS = gnulib-local gettext-runtime gettext-tools
++if ENABLE_TOOLS
++TOOLS_SUBDIR = gettext-tools
++else
++TOOLS_SUBDIR =
++endif
++
++SUBDIRS = gnulib-local gettext-runtime $(TOOLS_SUBDIR)
+
+ EXTRA_DIST = \
+ version.sh DEPENDENCIES PACKAGING HACKING ChangeLog.0 autogen.sh \
diff --git a/package/gettext/gettext-04-remove-examples-tests.patch b/package/gettext/gettext-04-remove-examples-tests.patch
new file mode 100644
index 0000000..f7d88d9
--- /dev/null
+++ b/package/gettext/gettext-04-remove-examples-tests.patch
@@ -0,0 +1,20 @@
+Disable tests and examples
+
+This patch disables the gettext-tools tests and examples, which are
+generally not necessary.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/gettext-tools/Makefile.am
+===================================================================
+--- a/gettext-tools/Makefile.am
++++ b/gettext-tools/Makefile.am
+@@ -20,7 +20,7 @@
+ ACLOCAL = ../build-aux/fixaclocal @ACLOCAL@
+ ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
+
+-SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4 tests gnulib-tests examples
++SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4
+
+ EXTRA_DIST = misc/DISCLAIM
+ MOSTLYCLEANFILES = core *.stackdump
diff --git a/package/gettext/gettext-05-use-shell.patch b/package/gettext/gettext-05-use-shell.patch
new file mode 100644
index 0000000..5f6e2c2
--- /dev/null
+++ b/package/gettext/gettext-05-use-shell.patch
@@ -0,0 +1,25 @@
+gettext-runtime: use @SHELL@ for the SHELL variable definition
+
+The gettext-runtime/Makefile.in uses an hardcoded SHELL = /bin/sh
+variable. This causes problems at build time, because libtool is then
+called with the 'sh' shell, which does not support the += construct
+that the libtool script is using.
+
+Instead, this Makefile.in should be definining SHELL = @SHELL@, just
+like all other Makefile.in of gettext.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/gettext-runtime/intl/Makefile.in
+===================================================================
+--- a/gettext-runtime/intl/Makefile.in
++++ b/gettext-runtime/intl/Makefile.in
+@@ -17,7 +17,7 @@
+ PACKAGE = @PACKAGE@
+ VERSION = @VERSION@
+
+-SHELL = /bin/sh
++SHELL = @SHELL@
+
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk
index 8dc701e..9061928 100644
--- a/package/gettext/gettext.mk
+++ b/package/gettext/gettext.mk
@@ -9,6 +9,8 @@ GETTEXT_SITE = $(BR2_GNU_MIRROR)/gettext
GETTEXT_INSTALL_STAGING = YES
GETTEXT_LICENSE = GPLv2+
GETTEXT_LICENSE_FILES = COPYING
+GETTEXT_AUTORECONF = YES
+HOST_GETTEXT_AUTORECONF = YES
GETTEXT_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv)
HOST_GETTEXT_DEPENDENCIES = # we don't want the libiconv dependency
@@ -22,6 +24,18 @@ GETTEXT_CONF_OPT += \
--disable-native-java \
--disable-csharp \
--disable-relocatable \
+ --without-emacs \
+ --disable-tools
+
+HOST_GETTEXT_CONF_OPT = \
+ --disable-libasprintf \
+ --disable-acl \
+ --disable-openmp \
+ --disable-rpath \
+ --disable-java \
+ --disable-native-java \
+ --disable-csharp \
+ --disable-relocatable \
--without-emacs
# Force build with NLS support, otherwise libintl is not built
@@ -42,19 +56,7 @@ define GETTEXT_INSTALL_TARGET_CMDS
cp -dpf $(STAGING_DIR)/usr/lib/libintl*.so* $(TARGET_DIR)/usr/lib/
endef
endif
-# Ditch the tools since they're off and pull other dependencies
-define GETTEXT_DISABLE_TOOLS
- $(SED) 's/runtime gettext-tools/runtime/' $(@D)/Makefile.in
-endef
endif # GETTEXT_TOOLS = n
-# The tools tests build fails with full toolchain without threads
-define GETTEXT_DISABLE_TESTS
- $(SED) 's/m4 tests/m4/' $(@D)/gettext-tools/Makefile.in
-endef
-
-GETTEXT_POST_PATCH_HOOKS += GETTEXT_DISABLE_TOOLS
-GETTEXT_POST_PATCH_HOOKS += GETTEXT_DISABLE_TESTS
-
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [Buildroot] [PATCH 2/6] gettext: don't patch different the host and target build
2013-05-27 23:01 ` [Buildroot] [PATCH 2/6] gettext: don't patch different the host and target build Thomas Petazzoni
@ 2013-05-30 19:47 ` Peter Korsgaard
2013-05-31 7:27 ` Thomas Petazzoni
0 siblings, 1 reply; 19+ messages in thread
From: Peter Korsgaard @ 2013-05-30 19:47 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> Until now, the gettext source code was being patched differently for
Thomas> the host and the target build, which is going to be incompatible with
Thomas> out-of-tree build. The difference is that the gettext tools could be
Thomas> disabled in the target build, but are always enabled on the host
Thomas> build.
Thomas> Therefore, this commit switches the gettext package to using proper
Thomas> patches against the relevant configure.ac and Makefile.am
Thomas> files. gettext is now being autoreconfigured. Configuration options
Thomas> are also passed for the host variant, in order to disable the build of
Thomas> a large number of things we don't care about.
Thomas> Finally, the two existing patches are renamed to include a number in
Thomas> their filename.
Committed to next, thanks.
Please don't forget to send the patches upstream.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 2/6] gettext: don't patch different the host and target build
2013-05-30 19:47 ` Peter Korsgaard
@ 2013-05-31 7:27 ` Thomas Petazzoni
2013-05-31 12:04 ` Peter Korsgaard
0 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2013-05-31 7:27 UTC (permalink / raw)
To: buildroot
Dear Peter Korsgaard,
On Thu, 30 May 2013 21:47:40 +0200, Peter Korsgaard wrote:
> Committed to next, thanks.
>
> Please don't forget to send the patches upstream.
The one fixing SHELL has been merged upstream:
http://git.savannah.gnu.org/cgit/gettext.git/commit/?id=fcff059faeba5108298ee1032a0ed6419eae16a6
The one adding the --disable-tools has been more-or-less rejected by
the gettext maintainer, who suggested to only do the configure in the
gettext-runtime directory when all we need is the runtime libintl:
http://lists.gnu.org/archive/html/bug-gettext/2013-05/msg00044.html
The last one (allowing to disable examples and tests for the tools) is
not yet in a state ready for upstream, but I'll work on it.
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 3/6] binutils: apply post-patch hook on both the host and target builds
2013-05-27 23:00 [Buildroot] [PATCH 0/6] Cleanup of packages patching Thomas Petazzoni
2013-05-27 23:00 ` [Buildroot] [PATCH 1/6] bzip2: improve the packaging Thomas Petazzoni
2013-05-27 23:01 ` [Buildroot] [PATCH 2/6] gettext: don't patch different the host and target build Thomas Petazzoni
@ 2013-05-27 23:01 ` Thomas Petazzoni
2013-05-30 19:51 ` Peter Korsgaard
2013-05-27 23:01 ` [Buildroot] [PATCH 4/6] gutenprint: ensure target and host variant have the same patch hooks Thomas Petazzoni
` (2 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2013-05-27 23:01 UTC (permalink / raw)
To: buildroot
When a Xtensa specific patch needs to be applied, it should be applied
both when doing the target and the host build.
This change is part of the effort to remove the differences between
host and target post-extract and post-patch hooks, that are
problematic for the out-of-tree support.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/binutils/binutils.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index 081be6a..a2c4150 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -81,6 +81,7 @@ define BINUTILS_XTENSA_PRE_PATCH
tar xf $(BR2_XTENSA_OVERLAY_DIR)/xtensa_$(XTENSA_CORE_NAME).tar \
-C $(@D) --strip-components=1 binutils
endef
+BINUTILS_PRE_PATCH_HOOKS += BINUTILS_XTENSA_PRE_PATCH
HOST_BINUTILS_PRE_PATCH_HOOKS += BINUTILS_XTENSA_PRE_PATCH
endif
--
1.7.9.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [Buildroot] [PATCH 4/6] gutenprint: ensure target and host variant have the same patch hooks
2013-05-27 23:00 [Buildroot] [PATCH 0/6] Cleanup of packages patching Thomas Petazzoni
` (2 preceding siblings ...)
2013-05-27 23:01 ` [Buildroot] [PATCH 3/6] binutils: apply post-patch hook on both the host and target builds Thomas Petazzoni
@ 2013-05-27 23:01 ` Thomas Petazzoni
2013-05-28 20:11 ` Arnout Vandecappelle
2013-05-30 19:54 ` Peter Korsgaard
2013-05-27 23:01 ` [Buildroot] [PATCH 5/6] libgtk2: remove useless post-patch hook Thomas Petazzoni
2013-05-27 23:01 ` [Buildroot] [PATCH 6/6] xlib_libX11: ensure target and host variant have the same patch hooks Thomas Petazzoni
5 siblings, 2 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2013-05-27 23:01 UTC (permalink / raw)
To: buildroot
In preparation for the out-of-tree support, it is important that all
packages have the same patch hooks for the host variant and the target
variant (because the source tree will be shared between host and
target variants when doing out-of-tree build).
In the case of gutenprint, the patch hook executed for the target just
creates one directory which is needed for autoreconf to work, and the
host variant is not autoreconf'ed. So there is no harm in also
applying this patch hook to the host variant.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/gutenprint/gutenprint.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/gutenprint/gutenprint.mk b/package/gutenprint/gutenprint.mk
index 834d967..2431a54 100644
--- a/package/gutenprint/gutenprint.mk
+++ b/package/gutenprint/gutenprint.mk
@@ -69,6 +69,7 @@ define GUTENPRINT_CREATE_M4_DIR
mkdir -p $(@D)/m4local
endef
GUTENPRINT_POST_PATCH_HOOKS += GUTENPRINT_CREATE_M4_DIR
+HOST_GUTENPRINT_POST_PATCH_HOOKS += GUTENPRINT_CREATE_M4_DIR
define HOST_GUTENPRINT_POST_BUILD_INSTAL_TMP_HEADER
cp $(@D)/src/xml/xmli18n-tmp.h $(HOST_DIR)/usr/include
--
1.7.9.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [Buildroot] [PATCH 4/6] gutenprint: ensure target and host variant have the same patch hooks
2013-05-27 23:01 ` [Buildroot] [PATCH 4/6] gutenprint: ensure target and host variant have the same patch hooks Thomas Petazzoni
@ 2013-05-28 20:11 ` Arnout Vandecappelle
2013-05-30 19:54 ` Peter Korsgaard
1 sibling, 0 replies; 19+ messages in thread
From: Arnout Vandecappelle @ 2013-05-28 20:11 UTC (permalink / raw)
To: buildroot
On 28/05/13 01:01, Thomas Petazzoni wrote:
> In the case of gutenprint, the patch hook executed for the target just
> creates one directory which is needed for autoreconf to work, and the
> host variant is not autoreconf'ed. So there is no harm in also
> applying this patch hook to the host variant.
Since autoreconf is going to be done on the source tree, you should
probably autoreconf the host variant as well.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 4/6] gutenprint: ensure target and host variant have the same patch hooks
2013-05-27 23:01 ` [Buildroot] [PATCH 4/6] gutenprint: ensure target and host variant have the same patch hooks Thomas Petazzoni
2013-05-28 20:11 ` Arnout Vandecappelle
@ 2013-05-30 19:54 ` Peter Korsgaard
1 sibling, 0 replies; 19+ messages in thread
From: Peter Korsgaard @ 2013-05-30 19:54 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> In preparation for the out-of-tree support, it is important that all
Thomas> packages have the same patch hooks for the host variant and the target
Thomas> variant (because the source tree will be shared between host and
Thomas> target variants when doing out-of-tree build).
Thomas> In the case of gutenprint, the patch hook executed for the target just
Thomas> creates one directory which is needed for autoreconf to work, and the
Thomas> host variant is not autoreconf'ed. So there is no harm in also
Thomas> applying this patch hook to the host variant.
Committed to next with HOST_GUTENPRINT_AUTORECONF = YES as pointed out
by Arnout, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 5/6] libgtk2: remove useless post-patch hook
2013-05-27 23:00 [Buildroot] [PATCH 0/6] Cleanup of packages patching Thomas Petazzoni
` (3 preceding siblings ...)
2013-05-27 23:01 ` [Buildroot] [PATCH 4/6] gutenprint: ensure target and host variant have the same patch hooks Thomas Petazzoni
@ 2013-05-27 23:01 ` Thomas Petazzoni
2013-05-30 19:52 ` Peter Korsgaard
2013-05-27 23:01 ` [Buildroot] [PATCH 6/6] xlib_libX11: ensure target and host variant have the same patch hooks Thomas Petazzoni
5 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2013-05-27 23:01 UTC (permalink / raw)
To: buildroot
There used to be a post-patch hook to apply a patch only on the host
variant of libgtk2. However, after the reorganization of the patch
naming policy, this was no longer working properly, so
dd1848bc73ee9dfe211ca3ed3a233707e3bc5955 changed this by a patch that
works on both the target and host variants.
We can therefore get rid of the useless post-patch hook.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/libgtk2/libgtk2.mk | 6 ------
1 file changed, 6 deletions(-)
diff --git a/package/libgtk2/libgtk2.mk b/package/libgtk2/libgtk2.mk
index b1ce99a..5881ea7 100644
--- a/package/libgtk2/libgtk2.mk
+++ b/package/libgtk2/libgtk2.mk
@@ -175,12 +175,6 @@ HOST_LIBGTK2_CONF_OPT = \
--disable-cups \
--disable-debug
-define HOST_LIBGTK2_PATCH_REDUCE_DEPENDENCIES_HOOK
- support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) host-*.patch
-endef
-
-HOST_LIBGTK2_POST_PATCH_HOOKS += HOST_LIBGTK2_PATCH_REDUCE_DEPENDENCIES_HOOK
-
define HOST_LIBGTK2_BUILD_CMDS
$(HOST_MAKE_ENV) make -C $(@D)/gtk gtk-update-icon-cache
endef
--
1.7.9.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [Buildroot] [PATCH 5/6] libgtk2: remove useless post-patch hook
2013-05-27 23:01 ` [Buildroot] [PATCH 5/6] libgtk2: remove useless post-patch hook Thomas Petazzoni
@ 2013-05-30 19:52 ` Peter Korsgaard
0 siblings, 0 replies; 19+ messages in thread
From: Peter Korsgaard @ 2013-05-30 19:52 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> There used to be a post-patch hook to apply a patch only on the host
Thomas> variant of libgtk2. However, after the reorganization of the patch
Thomas> naming policy, this was no longer working properly, so
Thomas> dd1848bc73ee9dfe211ca3ed3a233707e3bc5955 changed this by a patch that
Thomas> works on both the target and host variants.
Thomas> We can therefore get rid of the useless post-patch hook.
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 6/6] xlib_libX11: ensure target and host variant have the same patch hooks
2013-05-27 23:00 [Buildroot] [PATCH 0/6] Cleanup of packages patching Thomas Petazzoni
` (4 preceding siblings ...)
2013-05-27 23:01 ` [Buildroot] [PATCH 5/6] libgtk2: remove useless post-patch hook Thomas Petazzoni
@ 2013-05-27 23:01 ` Thomas Petazzoni
2013-05-30 19:53 ` Peter Korsgaard
5 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2013-05-27 23:01 UTC (permalink / raw)
To: buildroot
In preparation for the out-of-tree support, it is important that all
packages have the same patch hooks for the host variant and the target
variant (because the source tree will be shared between host and
target variants when doing out-of-tree build).
In the case of the xlib_libX11 package, the post-patch hook removes
some flags from the build of the makekeys utility, so that when
xlib_libX11 is built for the target, the build of makekeys for the
host works properly. This modification can be applied to the host
variant of xlib_libX11 without any problem.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/x11r7/xlib_libX11/xlib_libX11.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/x11r7/xlib_libX11/xlib_libX11.mk b/package/x11r7/xlib_libX11/xlib_libX11.mk
index 2d68f9e..5d0607b 100644
--- a/package/x11r7/xlib_libX11/xlib_libX11.mk
+++ b/package/x11r7/xlib_libX11/xlib_libX11.mk
@@ -43,6 +43,7 @@ define XLIB_LIBX11_DISABLE_MAKEKEYS_X11_CFLAGS
endef
XLIB_LIBX11_POST_PATCH_HOOKS += XLIB_LIBX11_DISABLE_MAKEKEYS_X11_CFLAGS
+HOST_XLIB_LIBX11_POST_PATCH_HOOKS += XLIB_LIBX11_DISABLE_MAKEKEYS_X11_CFLAGS
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [Buildroot] [PATCH 6/6] xlib_libX11: ensure target and host variant have the same patch hooks
2013-05-27 23:01 ` [Buildroot] [PATCH 6/6] xlib_libX11: ensure target and host variant have the same patch hooks Thomas Petazzoni
@ 2013-05-30 19:53 ` Peter Korsgaard
0 siblings, 0 replies; 19+ messages in thread
From: Peter Korsgaard @ 2013-05-30 19:53 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> In preparation for the out-of-tree support, it is important that all
Thomas> packages have the same patch hooks for the host variant and the target
Thomas> variant (because the source tree will be shared between host and
Thomas> target variants when doing out-of-tree build).
Thomas> In the case of the xlib_libX11 package, the post-patch hook removes
Thomas> some flags from the build of the makekeys utility, so that when
Thomas> xlib_libX11 is built for the target, the build of makekeys for the
Thomas> host works properly. This modification can be applied to the host
Thomas> variant of xlib_libX11 without any problem.
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 19+ messages in thread