Skip to contentSkip to conversation

Pull request for branch 2010-05-15-fixes

GIT PULL New Thomas Petazzoni 3 participants 25 messages May 21, 2010 – May 22, 2010

lore
Share & tools
lore
#0 lore raw

Hello,

Here is a new pull request for the set of fixes I have for 2010.05. This new pull request gathers changes from both of the previous 2010-05-14-fixes and 2010-05-15-fixes pull requests.

Changes since the previous pull requests made following Peter's comments:

* BR2_NEEDS_GETTEXT is now only set to 'y' if the C library doesn't contain gettext/libintl *and* BR2_ENABLE_LOCALE is set. This fixes the comment of Peter who wanted to compile Avahi without gettext is a !BR2_ENABLE_LOCALE case. I've tested this change by compiling "ltrace flex libcgicc avahi gmpc grep hal libglib2 libidn libsoup make libmpd php php_ext_gettext psmisc util-linux" with an ARM internal toolchain with locale enabled, an ARM Buildroot uClibc external toolchain with locale disabled and ARM Crosstool-NG eglibc external toolchain.

* Add comment on lmbench requiring RPC support

* Add comment on netsnmp not working with external toolchains + adding the same on BR2_PACKAGE_QUAGGA_SNMP.

The following changes since commit f3122259e2cbbc0be0fc02820a146b4e4f48bef6:
Peter Korsgaard (1):
mtd-utils: buildsystem is broken with parallel make (regarding libubi)

are available in the git repository at:

git://git.busybox.net/~tpetazzoni/git/buildroot 2010-05-15-fixes

Thomas Petazzoni (19):
Add a BR2_NEEDS_GETTEXT option
Make all package using gettext rely on BR2_NEEDS_GETTEXT
libcap: fix build failure
libcgicc: fix package after autotools infrastructure conversion
ltrace: fix build failure
gettext: make only available if BR2_NEEDS_GETTEXT is set external toolchain: check BR2_INSTALL_LIBSTDCPP
iconv: disallow selection when BR2_ENABLE_LOCALE is enabled
lmbench: needs BR2_INET_RPC
startup-notification: add dependency on xlib_libX11
ntp: fix build failure
samba: only require libiconv if !BR2_ENABLE_LOCALE
pango: run pango-querymodules on the target instead of on the host
cairo: remove host variant
mutt: fix build and convert to autotools
lvm2: do not override CC and similar variables
uemacs: don't forget CFLAGS at link time
vpnc: pass CFLAGS at link time
netsnmp: disable build with external toolchain

 package/avahi/Config.in                            |    4 +-
 package/avahi/avahi.mk                             |    2 +-
 package/cairo/cairo.mk                             |    3 -
 package/gettext/Config.in                          |    2 +
 package/gmpc/Config.in                             |    4 +-
 package/gmpc/gmpc.mk                               |    3 +-
 package/grep/Config.in                             |    4 +-
 package/grep/grep.mk                               |    2 +-
 package/hal/Config.in                              |    4 +-
 package/hal/hal.mk                                 |    2 +-
 package/libcap/libcap.mk                           |    4 +-
 ...cgicc-3.2.9-disable-documentation-option.patch} |    0
 package/libcgicc/libcgicc.mk                       |    2 +
 package/libglib2/Config.in                         |    4 +-
 package/libglib2/libglib2.mk                       |    2 +-
 package/libiconv/Config.in                         |    1 +
 package/libidn/libidn.mk                           |    2 +-
 package/libsoup/libsoup.mk                         |    2 +-
 package/lmbench/Config.in                          |    5 ++
 package/ltrace/ltrace.mk                           |    3 +-
 package/lvm2/lvm2.mk                               |    2 +-
 package/make/Config.in                             |    4 +-
 package/make/make.mk                               |    2 +-
 package/multimedia/libmpd/Config.in                |    2 -
 package/mutt/mutt-1.5.16-makedoc-hostcc.patch      |   32 ---------
 package/mutt/mutt-1.5.17+20080114-nodoc.patch      |   21 ++++++
 package/mutt/mutt.mk                               |   73 +++-----------------
 package/netsnmp/Config.in                          |    6 ++
 package/ntp/ntp-4.2.4_p5-nano.patch                |   36 ++++++++++
 package/pango/S25pango                             |   20 ++++++
 package/pango/pango.mk                             |   18 +----
 package/php/Config.ext                             |    2 +-
 package/php/php.mk                                 |    2 +-
 package/psmisc/Config.in                           |    4 +-
 package/psmisc/psmisc.mk                           |    8 +--
 package/quagga/Config.in                           |    4 +
 package/samba/Config.in                            |    2 +-
 package/samba/samba.mk                             |    2 +-
 package/sshfs/Config.in                            |    4 +-
 package/sshfs/sshfs.mk                             |    2 +-
 package/startup-notification/Config.in             |    2 +
 .../startup-notification/startup-notification.mk   |    1 +
 package/uemacs/uemacs.mk                           |    2 +-
 package/util-linux/Config.in                       |    4 +-
 package/util-linux/util-linux.mk                   |    4 +-
 package/vpnc/vpnc.mk                               |    4 +-
 toolchain/Config.in.2                              |    8 ++
 toolchain/external-toolchain/ext-tool.mk           |   12 +++
 48 files changed, 175 insertions(+), 163 deletions(-)
 rename package/libcgicc/{cgicc-3.2.9-disable-documentation-option.patch => libcgicc-3.2.9-disable-documentation-option.patch} (100%)
 delete mode 100644 package/mutt/mutt-1.5.16-makedoc-hostcc.patch
 create mode 100644 package/mutt/mutt-1.5.17+20080114-nodoc.patch
 create mode 100644 package/ntp/ntp-4.2.4_p5-nano.patch
 create mode 100644 package/pango/S25pango

Thanks,

Signature · 1 line
Thomas Petazzoni
#1 lore raw

PATCH 1/19 Add a BR2_NEEDS_GETTEXT option

When using an external toolchain that uses the glibc or eglibc C libraries, compiling a separate gettext and libintl is not needed and is even a source of confusion, causing build failures. These build failures are due to the fact that when libintl is compiled, it replaces the C library libintl.h by its own, which does #define gettext libintl_gettext. Then, when packages want to use gettext, autoconf realize that gettext is available in the C library and therefore do not add -lintl to the LDFLAGS, causing the build failure because the program has been compiled to use libintl_gettext but this function is not available.

Therefore, we should only use gettext if a uClibc internal toolchain or a uClibc external toolchain. If an external glibc toolchain is used, gettext shouldn't be used.

In order to implement that, we introduce the BR2_NEEDS_GETTEXT option, which is hidden to the user, and whose value is computed automatically from the rest of the configuration.

---
 toolchain/Config.in.2 |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
toolchain/Config.in.2 +8 -0
index f04f18a..fc6759d 100644
@@ -56,6 +56,14 @@ config BR2_ENABLE_LOCALE_WHITELIST
 	  will be available on the target - That purely depends on the
 	  support for that locale in the selected packages.
 
+# uClibc toolchains require a separatly-compiled gettext/libintl when
+# locale support is enabled. This isn't necessary with glibc
+#  toolchains as glibc includes gettext/libintl.
+config BR2_NEEDS_GETTEXT
+	bool
+	default y if (BR2_TOOLCHAIN_BUILDROOT && BR2_ENABLE_LOCALE)
+	default y if (BR2_TOOLCHAIN_EXTERNAL_UCLIBC && BR2_ENABLE_LOCALE)
+
 config BR2_USE_WCHAR
 	bool "Enable WCHAR support"
 	help
Signature · 1 line
1.6.3.3
#2 lore raw

PATCH 2/19 Make all package using gettext rely on BR2_NEEDS_GETTEXT

In reply to Thomas Petazzoni
---
 package/avahi/Config.in             |    4 ++--
 package/avahi/avahi.mk              |    2 +-
 package/gmpc/Config.in              |    4 ++--
 package/gmpc/gmpc.mk                |    3 ++-
 package/grep/Config.in              |    4 ++--
 package/grep/grep.mk                |    2 +-
 package/hal/Config.in               |    4 ++--
 package/hal/hal.mk                  |    2 +-
 package/libglib2/Config.in          |    4 ++--
 package/libglib2/libglib2.mk        |    2 +-
 package/libidn/libidn.mk            |    2 +-
 package/libsoup/libsoup.mk          |    2 +-
 package/make/Config.in              |    4 ++--
 package/make/make.mk                |    2 +-
 package/multimedia/libmpd/Config.in |    2 --
 package/pango/pango.mk              |    2 +-
 package/php/Config.ext              |    2 +-
 package/php/php.mk                  |    2 +-
 package/psmisc/Config.in            |    4 ++--
 package/psmisc/psmisc.mk            |    8 +-------
 package/sshfs/Config.in             |    4 ++--
 package/sshfs/sshfs.mk              |    2 +-
 package/util-linux/Config.in        |    4 ++--
 package/util-linux/util-linux.mk    |    4 ++--
 24 files changed, 34 insertions(+), 41 deletions(-)
package/avahi/Config.in +2 -2
index 35b7c27..3386005 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_AVAHI
 	bool "avahi"
-	select BR2_PACKAGE_GETTEXT if BR2_ENABLE_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	help
 	  Avahi is a system which facilitates service
 	  discovery on a local network.
package/avahi/avahi.mk +1 -1
index 9940d28..5e64047 100644
@@ -82,7 +82,7 @@ AVAHI_CONF_OPT = --localstatedir=/var \
 		--with-autoipd-user=default \
 		--with-autoipd-group=default
 
-AVAHI_DEPENDENCIES = $(if $(BR2_PACKAGE_GETTEXT),gettext) host-intltool
+AVAHI_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),gettext libintl) host-intltool
 
 ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),)
 AVAHI_DEPENDENCIES += libdaemon
package/gmpc/Config.in +2 -2
index a834361..056f5a0 100644
@@ -2,8 +2,8 @@ config BR2_PACKAGE_GMPC
 	bool "gmpc"
 	depends on BR2_PACKAGE_LIBGTK2
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT
-	select BR2_PACKAGE_LIBINTL
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_LIBMPD
 	select BR2_PACKAGE_LIBCURL
package/gmpc/gmpc.mk +2 -1
index 0db89b9..aa74a2e 100644
@@ -11,7 +11,8 @@ GMPC_CONF_ENV = ac_cv_lib_curl_curl_global_init=yes \
 		ac_cv_path_GOB2=$(GOB2_HOST_BINARY)
 GMPC_CONF_OPT = --disable-mmkeys
 
-GMPC_DEPENDENCIES = libglib2 libgtk2 libglade libcurl libmpd host-gob2 host-intltool
+GMPC_DEPENDENCIES = libglib2 libgtk2 libglade libcurl libmpd host-gob2 host-intltool \
+	$(if $(BR2_NEEDS_GETTEXT),gettext libintl)
 
 ifeq ($(BR2_PACKAGE_XLIB_LIBSM),y)
 GMPC_DEPENENCIES += xlib_libSM
package/grep/Config.in +2 -2
index 3795330..f898fdf 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_GREP
 	bool "grep"
-	select BR2_PACKAGE_GETTEXT if BR2_ENABLE_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	help
 	  The GNU regular expression matcher.
 
package/grep/grep.mk +1 -1
index acef6e9..93c6caf 100644
@@ -8,6 +8,6 @@ GREP_SOURCE:=grep-$(GREP_VERSION).tar.bz2
 GREP_SITE:=$(BR2_GNU_MIRROR)/grep
 GREP_CONF_OPT = --disable-perl-regexp --without-included-regex
 
-GREP_DEPENDENCIES = $(if $(BR2_ENABLE_LOCALE),gettext libintl)
+GREP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),gettext libintl)
 
 $(eval $(call AUTOTARGETS,package,grep))
package/hal/Config.in +2 -2
index 250e005..9518f13 100644
@@ -2,8 +2,8 @@ config BR2_PACKAGE_HAL
 	bool "hal"
 	select BR2_PACKAGE_EXPAT
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT
-	select BR2_PACKAGE_LIBINTL
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_DBUS_EXPAT
package/hal/hal.mk +1 -1
index 262fc41..62eca70 100644
@@ -79,7 +79,7 @@ $(TARGET_DIR)/$(HAL_TARGET_BINARY): $(HAL_DIR)/hald/hald
 		rm -f $(TARGET_DIR)/usr/libexec/$$file; \
 	done
 
-hal: host-pkg-config host-libxml-parser-perl dbus-glib hwdata udev $(TARGET_DIR)/$(HAL_TARGET_BINARY)
+hal: host-pkg-config host-libxml-parser-perl dbus-glib hwdata udev $(if $(BR2_NEEDS_GETTEXT),gettext libintl) $(TARGET_DIR)/$(HAL_TARGET_BINARY)
 
 hal-clean:
 	rm -f $(TARGET_DIR)/etc/dbus-1/system.d/hal.conf
package/libglib2/Config.in +2 -2
index d947eb6..cc1d6e2 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_LIBGLIB2
 	bool "libglib2"
-	select BR2_PACKAGE_GETTEXT
-	select BR2_PACKAGE_LIBINTL
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  Low-level core library that forms the basis of GTK+ and GNOME.
package/libglib2/libglib2.mk +1 -1
index 72a1396..43b1a89 100644
@@ -55,7 +55,7 @@ HOST_LIBGLIB2_CONF_OPT = \
 		--disable-gtk-doc \
 		--enable-debug=no \
 
-LIBGLIB2_DEPENDENCIES = gettext libintl host-pkg-config host-libglib2
+LIBGLIB2_DEPENDENCIES = host-pkg-config host-libglib2 $(if $(BR2_NEEDS_GETTEXT),gettext libintl)
 
 HOST_LIBGLIB2_DEPENDENCIES = host-pkg-config
 
package/libidn/libidn.mk +1 -1
index 6ee1a96..bc8e001 100644
@@ -10,7 +10,7 @@ LIBIDN_INSTALL_STAGING = YES
 LIBIDN_INSTALL_TARGET = YES
 LIBIDN_CONF_OPT = --enable-shared --disable-java --enable-csharp=no
 LIBIDN_LIBTOOL_PATCH = NO
-LIBIDN_DEPENDENCIES = host-pkg-config gettext $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+LIBIDN_DEPENDENCIES = host-pkg-config $(if $(BR2_NEEDS_GETTEXT),gettext) $(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
 $(eval $(call AUTOTARGETS,package,libidn))
 
package/libsoup/libsoup.mk +1 -1
index 3829a81..45f62e8 100644
@@ -26,6 +26,6 @@ LIBSOUP_CONF_OPT = \
 	--without-gnome		\
 	--disable-gtk-doc
 
-LIBSOUP_DEPENDENCIES = gettext libintl host-pkg-config host-libglib2 libglib2 libxml2
+LIBSOUP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),gettext libintl) host-pkg-config host-libglib2 libglib2 libxml2
 
 $(eval $(call AUTOTARGETS,package,libsoup))
package/make/Config.in +2 -2
index 5264005..674e245 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_MAKE
 	bool "make"
-	select BR2_PACKAGE_GETTEXT if BR2_ENABLE_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	help
 	  A tool which controls the generation of executables and other
 	  non-source files of a program from the program's source files.
package/make/make.mk +1 -1
index 29c7af4..5dd0637 100644
@@ -56,7 +56,7 @@ $(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY): $(GNUMAKE_DIR)/$(GNUMAKE_BINARY)
 	rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
 		$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
 
-make: $(if $(BR2_PACKAGE_GETTEXT),gettext) $(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY)
+make: $(if $(BR2_NEEDS_GETTEXT),gettext) $(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY)
 
 make-clean:
 	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUMAKE_DIR) uninstall
package/multimedia/libmpd/Config.in +0 -2
index c79203c..4f3a714 100644
@@ -1,8 +1,6 @@
 config BR2_PACKAGE_LIBMPD
 	bool "libmpd"
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT
-	select BR2_PACKAGE_LIBINTL
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  High-level client library for accessing Music Player Daemon.
package/pango/pango.mk +1 -1
index 38e163e..812a4c8 100644
@@ -45,7 +45,7 @@ HOST_PANGO_CONF_OPT = \
 		$(if $(BR2_PACKAGE_XORG7),--with-x,--without-x) \
 		--disable-debug \
 
-PANGO_DEPENDENCIES = gettext libintl host-pkg-config host-pango libglib2 cairo
+PANGO_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),gettext libintl) host-pkg-config host-pango libglib2 cairo
 
 HOST_PANGO_DEPENDENCIES = host-pkg-config host-cairo host-libglib2 host-autoconf host-automake
 
package/php/Config.ext +1 -1
index 9b53e87..2fbd05e 100644
@@ -67,7 +67,7 @@ config BR2_PACKAGE_PHP_EXT_FTP
 
 config BR2_PACKAGE_PHP_EXT_GETTEXT
 	bool "gettext"
-	select BR2_PACKAGE_GETTEXT
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  gettext support
 
package/php/php.mk +1 -1
index cd5ed9e..c5f9c14 100644
@@ -84,7 +84,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_GETTEXT),y)
 	PHP_CONF_OPT += --with-gettext=$(STAGING_DIR)/usr
-	PHP_DEPENDENCIES += gettext
+	PHP_DEPENDENCIES += $(if $(BR2_NEEDS_GETTEXT),gettext)
 endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_GMP),y)
package/psmisc/Config.in +2 -2
index e7ce704..31e982c 100644
@@ -1,8 +1,8 @@
 config BR2_PACKAGE_PSMISC
 	bool "psmisc"
 	select BR2_PACKAGE_NCURSES
-	select BR2_PACKAGE_GETTEXT if BR2_ENABLE_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	help
 	  Helpful /proc related utilities such as pstree, fuser, and killall
 
package/psmisc/psmisc.mk +1 -7
index e04923d..b82883f 100644
@@ -7,12 +7,6 @@ PSMISC_VERSION:=22.8
 PSMISC_SOURCE:=psmisc-$(PSMISC_VERSION).tar.gz
 PSMISC_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/psmisc
 PSMISC_AUTORECONF:=NO
-PSMISC_DEPENDENCIES:=ncurses
-
-ifeq ($(BR2_ENABLE_LOCALE),y)
-# psmisc gets confused and forgets to link with libintl
-PSMISC_MAKE_OPT:=LIBS=-lintl
-PSMISC_DEPENDENCIES+= gettext libintl
-endif
+PSMISC_DEPENDENCIES:=ncurses $(if $(BR2_NEEDS_GETTEXT),gettext libintl)
 
 $(eval $(call AUTOTARGETS,package,psmisc))
package/sshfs/Config.in +2 -2
index 12d98f6..7ddd0c1 100644
@@ -2,8 +2,8 @@ config BR2_PACKAGE_SSHFS
 	bool "sshfs (FUSE)"
 	select BR2_PACKAGE_LIBFUSE
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT
-	select BR2_PACKAGE_LIBINTL
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	depends on BR2_PACKAGE_OPENSSH
 	help
package/sshfs/sshfs.mk +1 -1
index 4acc293..d15aa00 100644
@@ -11,6 +11,6 @@ SSHFS_AUTORECONF:=NO
 SSHFS_INSTALL_STAGING:=NO
 SSHFS_INSTALL_TARGET:=YES
 
-SSHFS_DEPENDENCIES = libglib2 libfuse
+SSHFS_DEPENDENCIES = libglib2 libfuse $(if $(BR2_NEEDS_GETTEXT),gettext libintl)
 
 $(eval $(call AUTOTARGETS,package,sshfs))
package/util-linux/Config.in +2 -2
index e21daf6..533ef69 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_UTIL-LINUX
 	bool "util-linux"
-	select BR2_PACKAGE_GETTEXT if BR2_ENABLE_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	depends on BR2_INET_RPC
 	help
 	  Various useful/essential Linux utilities.
package/util-linux/util-linux.mk +2 -2
index e2135e7..6446d37 100644
@@ -18,8 +18,8 @@ else
 UTIL-LINUX_SCHED_UTILS:=--disable-schedutils
 endif
 
-ifeq ($(BR2_PACKAGE_LIBINTL),y)
-UTIL-LINUX_DEPENDENCIES += libintl
+ifeq ($(BR2_NEEDS_GETTEXT),y)
+UTIL-LINUX_DEPENDENCIES += gettext libintl
 UTIL-LINUX_MAKE_OPT = LIBS=-lintl
 endif
 
Signature · 1 line
1.6.3.3
#3 lore raw

PATCH 2/19 Make all package using gettext rely on BR2_NEEDS_GETTEXT

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> --- a/package/libglib2/Config.in
Thomas> +++ b/package/libglib2/Config.in
Thomas> @@ -1,7 +1,7 @@
Thomas> config BR2_PACKAGE_LIBGLIB2
Thomas> bool "libglib2"
Thomas> - select BR2_PACKAGE_GETTEXT
Thomas> - select BR2_PACKAGE_LIBINTL
Thomas> + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
Thomas> + select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT

I unfortunately now get the following error when building with an internal toolchain and locales NOT enabled:

checking libintl.h usability... no
checking libintl.h presence... no
checking for libintl.h... no
configure: error:
*** You must have either have gettext support in your C library, or use the *** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html

make: *** [/tmp/br/build/libglib2-2.22.5/.stamp_configured] Error 1

Seems like we need to make libglib2 depend on locale support?

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 2/19 Make all package using gettext rely on BR2_NEEDS_GETTEXT

Quoted 11 lines · On Fri, 21 May 2010 21:56:05 +0200 Peter Korsgaard <[email protected]> wrote:

I unfortunately now get the following error when building with an internal toolchain and locales NOT enabled:

checking libintl.h usability... no
checking libintl.h presence... no
checking for libintl.h... no
configure: error:
*** You must have either have gettext support in your C library, or use the *** GNU gettext library.
(http://www.gnu.org/software/gettext/gettext.html

Quoted 3 lines

make: *** [/tmp/br/build/libglib2-2.22.5/.stamp_configured] Error 1

Seems like we need to make libglib2 depend on locale support?

I can reproduce the same problem (strange because I thought I tested this case, but anyway).

So we have two cases :

* Packages like Avahi. They understand --disable-nls and therefore when locale support is not enabled, they don't need gettext.

* Packages like libglib2. They don't understand --disable-nls, so even when locale is not enabled, they need gettext. libglib2 builds fine in the previous situation, where BR2_NEEDS_GETTEXT was set to yes as soon as an uClibc toolchain was used (regardless of whether BR2_ENABLE_LOCALE is set or not). So it is possible to build libglib2 with a !BR2_ENABLE_LOCALE toolchain, but it requires gettext to be built.

So either we decide that packages such as libglib2 do require BR2_ENABLE_LOCALE, or we need to find some smarter way.

In general, this locale/gettext/libintl/libiconv thing still isn't 100% clear to me. Why is iconv selected only when !BR2_ENABLE_LOCALE ? Does gettext works when the toolchain doesn't support locales ? What is the exact role of all these components ?

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#5 lore raw

PATCH 2/19 Make all package using gettext rely on BR2_NEEDS_GETTEXT

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hi,

Thomas> So we have two cases :

Thomas> * Packages like Avahi. They understand --disable-nls and therefore
Thomas> when locale support is not enabled, they don't need gettext.

Thomas> * Packages like libglib2. They don't understand --disable-nls, so even

 Thomas>    when locale is not enabled, they need gettext. libglib2 builds
 Thomas>    fine in the previous situation, where BR2_NEEDS_GETTEXT was set
 Thomas>    to yes as soon as an uClibc toolchain was used (regardless of
 Thomas>    whether BR2_ENABLE_LOCALE is set or not). So it is possible to build
 Thomas>    libglib2 with a !BR2_ENABLE_LOCALE toolchain, but it requires
 Thomas>    gettext to be built.

Yes, but note that gettext needs wchar - So there's a wchar dependency here.

Thomas> So either we decide that packages such as libglib2 do require Thomas> BR2_ENABLE_LOCALE, or we need to find some smarter way.

A lot of stuff depends on libglib2, so I would prefer if we wouldn't add a "fake" dependency on localization.

We could handle it in several different ways:
- Make gettext a dummy kconfig/make target when glibc is used
- Make BR2_NEEDS_GETTEXT simply be always enabled on uclibc and then
- select gettext if BR2_NEEDS_GETTEXT (and depends on BR2_USE_WCHAR) for stuff like libglib2
- select getttext if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE) for stuff like avahi

Thomas> In general, this locale/gettext/libintl/libiconv thing still Thomas> isn't 100% clear to me. Why is iconv selected only when Thomas> !BR2_ENABLE_LOCALE ?

I'm definately not localization expert, but this is how I understand it:

Because it's a replacement for the iconv() implementation that uclibc has available when BR2_ENABLE_LOCALE is enabled.

Thomas> Does gettext works when the toolchain doesn't support locales ?

I believe it does - Possible together with libiconv if needed.

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH 2/19 Make all package using gettext rely on BR2_NEEDS_GETTEXT

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

Thomas> So we have two cases :

Thomas> * Packages like Avahi. They understand --disable-nls and therefore Thomas> when locale support is not enabled, they don't need gettext.

Thomas> * Packages like libglib2. They don't understand --disable-nls, so even Thomas> when locale is not enabled, they need gettext. libglib2 builds Thomas> fine in the previous situation, where BR2_NEEDS_GETTEXT was set Thomas> to yes as soon as an uClibc toolchain was used (regardless of Thomas> whether BR2_ENABLE_LOCALE is set or not). So it is possible to build Thomas> libglib2 with a !BR2_ENABLE_LOCALE toolchain, but it requires Thomas> gettext to be built.

Peter> We could handle it in several different ways:
Peter> - Make gettext a dummy kconfig/make target when glibc is used Peter> - Make BR2_NEEDS_GETTEXT simply be always enabled on uclibc and then
Peter> - select gettext if BR2_NEEDS_GETTEXT (and depends on BR2_USE_WCHAR)
Peter> for stuff like libglib2
Peter> - select getttext if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE) for
Peter> stuff like avahi

Thinking a bit more about it, the easiest might just be to introduce two symbols, one for each of the cases, E.G.:

toolchain/Config.in.2 +5 -2
index fc6759d..233303a 100644
@@ -56,13 +56,16 @@ config BR2_ENABLE_LOCALE_WHITELIST
          will be available on the target - That purely depends on the
          support for that locale in the selected packages.
 
+config BR2_TOOLCHAIN_HAS_GETTEXT
+       bool
+       default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC
+
 # uClibc toolchains require a separatly-compiled gettext/libintl when
 # locale support is enabled. This isn't necessary with glibc
 #  toolchains as glibc includes gettext/libintl.
 config BR2_NEEDS_GETTEXT
        bool
-       default y if (BR2_TOOLCHAIN_BUILDROOT && BR2_ENABLE_LOCALE)
-       default y if (BR2_TOOLCHAIN_EXTERNAL_UCLIBC && BR2_ENABLE_LOCALE)
+       default y if (!BR2_TOOLCHAIN_HAS_GETTEXT && BR2_ENABLE_LOCALE)
 
 config BR2_USE_WCHAR
        bool "Enable WCHAR support"

And then let stuff like glib2 do:

select GETTEXT if !BR2_TOOLCHAIN_HAS_GETTEXT (and depend on wchar)

And stuff like avahi stays:

select GETTEXT if BR2_NEEDS_GETTEXT

The BR2_TOOLCHAIN_HAS_GETTEXT unfortunately needs to be used in it's negative form, but I cannot think of a good name in the reverse form that clearly seperates it from BR2_NEEDS_GETTEXT.

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH 3/19 libcap: fix build failure

In reply to Thomas Petazzoni

On a x86-64 host, libcap tried to install things in $(STAGING_DIR)/lib64 and $(TARGET_DIR)/lib64. Therefore, pass lib= and prefix=, as required by the strange build system used by libcap.

---
 package/libcap/libcap.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
package/libcap/libcap.mk +2 -2
index 3ea5e51..301d1b1 100644
@@ -8,7 +8,7 @@ define LIBCAP_BUILD_CMDS
 endef
 
 define LIBCAP_INSTALL_STAGING_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(STAGING_DIR) install
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(STAGING_DIR) prefix=/usr lib=lib install
 endef
 
 define LIBCAP_INSTALL_TARGET_CMDS
@@ -20,7 +20,7 @@ define HOST_LIBCAP_BUILD_CMDS
 endef
 
 define HOST_LIBCAP_INSTALL_CMDS
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(HOST_DIR) install
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(HOST_DIR) prefix=/usr lib=lib install
 endef
 
 $(eval $(call GENTARGETS,package,libcap))
Signature · 1 line
1.6.3.3
#8 lore raw

PATCH 4/19 libcgicc: fix package after autotools infrastructure conversion

In reply to Thomas Petazzoni

The patch had an incorrect name, and the libtool patch was applied while it shouldn't, and the package wasn't autoreconfed while the patch changes some Makefile.am files.

---
 ...cgicc-3.2.9-disable-documentation-option.patch} |    0
 package/libcgicc/libcgicc.mk                       |    2 ++
 2 files changed, 2 insertions(+), 0 deletions(-)
 rename package/libcgicc/{cgicc-3.2.9-disable-documentation-option.patch => libcgicc-3.2.9-disable-documentation-option.patch} (100%)
package/libcgicc/libcgicc-3.2.9-disable-documentation-option.patch renamed from package/libcgicc/cgicc-3.2.9-disable-documentation-option.patch +0 -0
similarity index 100%
rename from package/libcgicc/cgicc-3.2.9-disable-documentation-option.patch
rename to package/libcgicc/libcgicc-3.2.9-disable-documentation-option.patch
package/libcgicc/libcgicc.mk +2 -0
index c2f80b6..b281eed 100644
@@ -7,6 +7,8 @@ LIBCGICC_VERSION=3.2.9
 LIBCGICC_SITE=$(BR2_GNU_MIRROR)/cgicc
 LIBCGICC_SOURCE=cgicc-$(LIBCGICC_VERSION).tar.gz
 LIBCGICC_INSTALL_STAGING=YES
+LIBCGICC_LIBTOOL_PATCH=NO
+LIBCGICC_AUTORECONF=YES
 
 LIBCGICC_CONF_OPT = \
 	--disable-demos \
Signature · 1 line
1.6.3.3
#9 lore raw

PATCH 5/19 ltrace: fix build failure

In reply to Thomas Petazzoni

ltrace failed to build because of missing arguments to gcc to find the header files. This is due to the fact that the existing ltrace.mk was setting CC and LD at build time to incorrect values. Keeping the values set at configure time is just the right thing to do.

---
 package/ltrace/ltrace.mk |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
package/ltrace/ltrace.mk +1 -2
index c99f223..4a6811d 100644
@@ -54,8 +54,7 @@ $(LTRACE_DIR)/.configured: $(LTRACE_DIR)/.patched
 	touch $@
 
 $(LTRACE_DIR)/$(LTRACE_BINARY): $(LTRACE_DIR)/.configured
-	$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(LTRACE_ARCH) \
-		-C $(LTRACE_DIR)
+	$(MAKE) ARCH=$(LTRACE_ARCH) -C $(LTRACE_DIR)
 
 $(TARGET_DIR)/$(LTRACE_TARGET_BINARY): $(LTRACE_DIR)/$(LTRACE_BINARY)
 	#$(MAKE) DESTDIR=$(TARGET_DIR) ARCH=$(LTRACE_ARCH)  -C $(LTRACE_DIR) install
Signature · 1 line
1.6.3.3
#10 lore raw

PATCH 6/19 gettext: make only available if BR2_NEEDS_GETTEXT is set

In reply to Thomas Petazzoni

This allows to make sure that an user, or a randpackageconfig, will not select the gettext or libintl package when using an external toolchain based on glibc/eglibc.

---
 package/gettext/Config.in |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
package/gettext/Config.in +2 -0
index bd5950c..c6792ac 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_GETTEXT
 	bool "gettext"
+	depends on BR2_NEEDS_GETTEXT
 	help
 	  The GNU `gettext' utilities are a set of tools that provide a
 	  framework to help other GNU packages produce multi-lingual
@@ -21,6 +22,7 @@ config BR2_PACKAGE_GETTEXT_STATIC
 
 config BR2_PACKAGE_LIBINTL
 	bool "libintl"
+	depends on BR2_NEEDS_GETTEXT
 	help
 	  Selecting this package installs all of gettext in the staging
 	  directory and the shared library for it's use in the target.
Signature · 1 line
1.6.3.3
#11 lore raw

PATCH 7/19 external toolchain: check BR2_INSTALL_LIBSTDCPP

In reply to Thomas Petazzoni

Verify that the value of BR2_INSTALL_LIBSTDCPP set by the user in the Buildroot configuration really matches the external toolchain capabilities by checking that a C++ cross-compiler is available.

---
 toolchain/external-toolchain/ext-tool.mk |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
toolchain/external-toolchain/ext-tool.mk +12 -0
index 2c2562c..bb4809c 100644
@@ -232,6 +232,15 @@ check_arm_abi = \
 	fi ; \
 
 #
+# Check that the external toolchain supports C++
+#
+check_cplusplus = \
+	if ! test -x $(TARGET_CXX) ; then \
+		echo "BR2_INSTALL_LIBSTDCPP is selected but C++ support not available in external toolchain" ; \
+		exit 1 ; \
+	fi ; \
+
+#
 # Check that the cross-compiler given in the configuration exists
 #
 check_cross_compiler_exists = \
@@ -288,6 +297,9 @@ endif
 ifeq ($(BR2_arm),y)
 	$(Q)$(call check_arm_abi)
 endif
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+	$(Q)$(call check_cplusplus)
+endif
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
 	$(Q)$(call check_uclibc,$(SYSROOT_DIR))
 else
Signature · 1 line
1.6.3.3
#12 lore raw

PATCH 8/19 iconv: disallow selection when BR2_ENABLE_LOCALE is enabled

In reply to Thomas Petazzoni

A C library compiled with locale support already has an iconv() implementation. In that case, libiconv is useless. Therefore, disallow the selection of libiconv when the configuration says that the toolchain has locale support.

This fixes build issues similar to the one we had with gettext:
libiconv headers are installed, but -liconv is not added because the ./configure script detects that the C library supports iconv.

---
 package/libiconv/Config.in |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
package/libiconv/Config.in +1 -0
index b600944..ee4fd62 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBICONV
 	bool "libiconv"
+	depends on !BR2_ENABLE_LOCALE
 	help
 	  unicode conversion library
 
Signature · 1 line
1.6.3.3
#13 lore raw

PATCH 9/19 lmbench: needs BR2_INET_RPC

In reply to Thomas Petazzoni

This package uses several pmap_*() functions in the C library, that are only available if the C library has RPC support.

---
 package/lmbench/Config.in |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
package/lmbench/Config.in +5 -0
index 704b3ff..d09a333 100644
@@ -1,7 +1,12 @@
 config BR2_PACKAGE_LMBENCH
 	bool "lmbench"
+	# Uses pmap_set, pmap__unset, pmap_getport, etc.
+	depends on BR2_INET_RPC
 	help
 	  LMbench is a suite of simple, portable,
 	  ANSI/C microbenchmarks for UNIX/POSIX.
 
 	  http://sourceforge.net/projects/lmbench/
+
+comment "lmbench requires a toolchain with RPC support"
+        depends on !BR2_INET_RPC
Signature · 1 line
1.6.3.3
#14 lore raw

PATCH 10/19 startup-notification: add dependency on xlib_libX11

In reply to Thomas Petazzoni
---
 package/startup-notification/Config.in             |    2 ++
 .../startup-notification/startup-notification.mk   |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)
package/startup-notification/Config.in +2 -0
index 23fdf74..277d300 100644
@@ -1,5 +1,7 @@
 config BR2_PACKAGE_STARTUP_NOTIFICATION
 	bool "startup-notification"
+	select BR2_PACKAGE_XLIB_LIBX11
+	depends on BR2_PACKAGE_XORG7
 	help
 	  Startup-notification is a library used to monitor application startup.
 
package/startup-notification/startup-notification.mk +1 -0
index 62f067a..f70fcc1 100644
@@ -9,6 +9,7 @@ STARTUP_NOTIFICATION_SITE = http://freedesktop.org/software/startup-notification
 STARTUP_NOTIFICATION_AUTORECONF = NO
 STARTUP_NOTIFICATION_INSTALL_STAGING = YES
 STARTUP_NOTIFICATION_INSTALL_TARGET = YES
+STARTUP_NOTIFICATION = xlib_libX11
 
 STARTUP_NOTIFICATION_CONF_ENV = lf_cv_sane_realloc=yes
 
Signature · 1 line
1.6.3.3
#15 lore raw

PATCH 11/19 ntp: fix build failure

In reply to Thomas Petazzoni

This patch adds a patch to NTP to fix the following build failure, using a workaround patch found on the Fedora bugzilla:

ntp_loopfilter.c: In function 'local_clock':
ntp_loopfilter.c:571: error: 'MOD_NANO' undeclared (first use in this function) ntp_loopfilter.c:571: error: (Each undeclared identifier is reported only once ntp_loopfilter.c:571: error: for each function it appears in.) ntp_loopfilter.c: In function 'loop_config':
ntp_loopfilter.c:896: error: 'MOD_NANO' undeclared (first use in this function)

---
 package/ntp/ntp-4.2.4_p5-nano.patch |   36 +++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)
 create mode 100644 package/ntp/ntp-4.2.4_p5-nano.patch
package/ntp/ntp-4.2.4_p5-nano.patch new file +36 -0
new file mode 100644
index 0000000..f4097ee
@@ -0,0 +1,36 @@
+Fixes the MOD_NANO build failure
+
+ntp_loopfilter.c: In function 'local_clock':
+ntp_loopfilter.c:571: error: 'MOD_NANO' undeclared (first use in this function)
+ntp_loopfilter.c:571: error: (Each undeclared identifier is reported only once
+ntp_loopfilter.c:571: error: for each function it appears in.)
+ntp_loopfilter.c: In function 'loop_config':
+ntp_loopfilter.c:896: error: 'MOD_NANO' undeclared (first use in this function)
+
+Taken from
+http://cvs.fedoraproject.org/viewvc/devel/ntp/ntp-4.2.4p7-nano.patch?revision=1.1&content-type=text/plain&view=co
+
+See the discussion at
+https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/412242 for more
+details and links. The below fix is not a correct fix, but only a
+workaround. The real fix required changes to kernel/libc headers.
+
+Index: ntp-4.2.4p5/include/ntp_syscall.h
+===================================================================
+--- ntp-4.2.4p5.orig/include/ntp_syscall.h	2010-05-14 17:34:48.000000000 +0200
++++ ntp-4.2.4p5/include/ntp_syscall.h	2010-05-14 17:35:13.000000000 +0200
+@@ -14,6 +14,14 @@
+ # include <sys/timex.h>
+ #endif
+ 
++#if defined(ADJ_NANO) && !defined(MOD_NANO)
++#define MOD_NANO ADJ_NANO
++#endif
++
++#if defined(ADJ_TAI) && !defined(MOD_TAI)
++#define MOD_TAI ADJ_TAI
++#endif
++
+ #ifndef NTP_SYSCALLS_LIBC
+ #ifdef NTP_SYSCALLS_STD
+ # define ntp_adjtime(t)		syscall(SYS_ntp_adjtime, (t))
Signature · 1 line
1.6.3.3
#16 lore raw

PATCH 12/19 samba: only require libiconv if !BR2_ENABLE_LOCALE

In reply to Thomas Petazzoni
---
 package/samba/Config.in |    2 +-
 package/samba/samba.mk  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/samba/Config.in +1 -1
index 720ecd7..a7a0b34 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_SAMBA
 	bool "samba"
-	select BR2_PACKAGE_LIBICONV
+	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  Provides print services to all manner of SMB/CIFS clients,
 	  including the numerous versions of Microsoft Windows
package/samba/samba.mk +1 -1
index 4115363..39968a9 100644
@@ -16,7 +16,7 @@ SAMBA_INSTALL_TARGET = YES
 
 
 SAMBA_DEPENDENCIES = \
-	libiconv \
+	$(if $(BR2_ENABLE_LOCALE),,libiconv) \
 	$(if $(BR2_PACKAGE_SAMBA_RPCCLIENT),readline) \
 	$(if $(BR2_PACKAGE_SAMBA_SMBCLIENT),readline) \
 	$(if $(BR2_PACKAGE_SAMBA_AVAHI),avahi) \
Signature · 1 line
1.6.3.3
#17 lore raw

PATCH 13/19 pango: run pango-querymodules on the target instead of on the host

In reply to Thomas Petazzoni

We needed to build pango for the host in order to compile pango-querymodules for the host, which was used to produce /etc/pango/pango.modules. Unfortunately:

* This produces an incorrect /etc/pango/pango.modules (no modules detected in my case), probably because the host pango-querymodules was looking at host pango modules

* This requires to build pango for the host, which requires to build cairo for the host, which requires to build X11 for the host.

To make things work and remove the dependency between pango and host-pango, we introduce a S25pango script that creates /etc/pango/pango.modules on startup if it doesn't exist, just as we do with libgtk2 for /etc/gtk-2.0/gdk-pixbuf.loaders.

Since host-pango is no longer needed, we remove all definitions related to it.

---
 package/pango/S25pango |   20 ++++++++++++++++++++
 package/pango/pango.mk |   18 ++----------------
 2 files changed, 22 insertions(+), 16 deletions(-)
 create mode 100644 package/pango/S25pango
package/pango/S25pango new file +20 -0
new file mode 100644
index 0000000..9af9307
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# run pango-querymodules if needed
+
+FILE=/etc/pango/pango.modules
+
+case "$1" in
+     start|"")
+	if [ ! -f $FILE ] ; then
+	   mkdir -p /etc/pango
+	   /usr/bin/pango-querymodules > "$FILE"
+	fi
+	;;
+    stop)
+	;;
+    *)
+	echo "Usage: $0 {start|stop}" >&2
+	exit 1
+	;;
+esac
\ No newline at end of file
package/pango/pango.mk +2 -16
index 812a4c8..c640045 100644
@@ -40,16 +40,7 @@ PANGO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \
 PANGO_CONF_OPT = --enable-shared --enable-static \
 		--enable-explicit-deps=no --disable-debug
 
-HOST_PANGO_CONF_OPT = \
-		--disable-static \
-		$(if $(BR2_PACKAGE_XORG7),--with-x,--without-x) \
-		--disable-debug \
-
-PANGO_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),gettext libintl) host-pkg-config host-pango libglib2 cairo
-
-HOST_PANGO_DEPENDENCIES = host-pkg-config host-cairo host-libglib2 host-autoconf host-automake
-
-HOST_PANGO_AUTORECONF = YES
+PANGO_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),gettext libintl) host-pkg-config libglib2 cairo
 
 ifeq ($(BR2_PACKAGE_XORG7),y)
         PANGO_CONF_OPT += --with-x \
@@ -61,12 +52,7 @@ else
 endif
 
 $(eval $(call AUTOTARGETS,package,pango))
-$(eval $(call AUTOTARGETS,package,pango,host))
 
 $(PANGO_HOOK_POST_INSTALL):
-	mkdir -p $(TARGET_DIR)/etc/pango
-	$(PANGO_HOST_BINARY) > $(TARGET_DIR)/etc/pango/pango.modules
-	$(SED) 's~$(HOST_DIR)~~g' $(TARGET_DIR)/etc/pango/pango.modules
+	$(INSTALL) -m 755 package/pango/S25pango $(TARGET_DIR)/etc/init.d/
 	touch $@
-
-PANGO_HOST_BINARY:=$(HOST_DIR)/usr/bin/pango-querymodules
Signature · 1 line
1.6.3.3
#18 lore raw

PATCH 14/19 cairo: remove host variant

In reply to Thomas Petazzoni

Since we no longer need to build pango on the host, cairo on the host is no longer needed.

---
 package/cairo/cairo.mk |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
package/cairo/cairo.mk +0 -3
index 0ca99aa..9b72ffa 100644
@@ -79,8 +79,6 @@ else
 	CAIRO_CONF_OPT += --disable-svg
 endif
 
-HOST_CAIRO_DEPENDENCIES = host-pkg-config host-pixman host-fontconfig
-
 HOST_CAIRO_CONF_OPT = \
 		--enable-ps \
 		--enable-pdf \
@@ -90,4 +88,3 @@ HOST_CAIRO_CONF_OPT = \
 		--disable-svg
 
 $(eval $(call AUTOTARGETS,package,cairo))
-$(eval $(call AUTOTARGETS,package,cairo,host))
Signature · 1 line
1.6.3.3
#19 lore raw

PATCH 15/19 mutt: fix build and convert to autotools

In reply to Thomas Petazzoni

mutt has been upgraded, but the mutt-1.5.16-makedoc-hostcc.patch wasn't upgraded accordingly, causing build failures in the documentation. Therefore, we add a new patch mutt-1.5.17+20080114-nodoc.patch that disables the construction of the documentation.

As this patch modifies Makefile.am, we need to autoreconf the package. The simplest and cleanest way to do this is to convert the package to the autotools infrastructure.

---
 package/mutt/mutt-1.5.16-makedoc-hostcc.patch |   32 -----------
 package/mutt/mutt-1.5.17+20080114-nodoc.patch |   21 +++++++
 package/mutt/mutt.mk                          |   73 ++++---------------------
 3 files changed, 32 insertions(+), 94 deletions(-)
 delete mode 100644 package/mutt/mutt-1.5.16-makedoc-hostcc.patch
 create mode 100644 package/mutt/mutt-1.5.17+20080114-nodoc.patch
package/mutt/mutt-1.5.16-makedoc-hostcc.patch deleted +0 -32
deleted file mode 100644
index de5cc2d..0000000
@@ -1,32 +0,0 @@
---- mutt-1.5.16.oorig/Makefile.in	2007-09-02 22:16:23.000000000 +0200
-+++ mutt-1.5.16/Makefile.in	2007-09-02 22:19:49.000000000 +0200
-@@ -164,12 +164,6 @@
- DBX = @DBX@
- DEBUGGER = @DEBUGGER@
- 
--# $(makedoc_OBJECTS): $(makedoc_SOURCES)
--# 	$(HOST_CC) $(DEFS) $(AM_CPPFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) -c $<
--
--# makedoc: $(makedoc_OBJECTS) $(makedoc_DEPENDENCIES)
--# 	@rm -rf makedoc
--# 	$(HOST_CC) $(AM_CFLAGS) $(LDFLAGS) $(makedoc_LDFLAGS) $(makedoc_OBJECTS) $(makedoc_LDADD) -o makedoc
- DEFS = -DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
- 	-DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
- 	-DHAVE_CONFIG_H=1
-@@ -447,9 +441,15 @@
- 
- clean-binPROGRAMS:
- 	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-+
-+$(makedoc_OBJECTS): $(makedoc_SOURCES)
-+	$(CC_FOR_BUILD) -DHAVE_UNISTD_H -DHAVE_GETOPT_H -DHAVE_STRERROR -c $< ;#$(DEFS) $(AM_CPPFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) -c $<
-+#makedoc: $(makedoc_OBJECTS) $(makedoc_DEPENDENCIES)
-+#	@rm -rf makedoc
-+#	$(CC_FOR_BUILD) $(AM_CFLAGS) $(LDFLAGS) $(makedoc_LDFLAGS) $(makedoc_OBJECTS) $(makedoc_LDADD) -o makedoc
- makedoc$(EXEEXT): $(makedoc_OBJECTS) $(makedoc_DEPENDENCIES) 
- 	@rm -f makedoc$(EXEEXT)
--	$(LINK) $(makedoc_LDFLAGS) $(makedoc_OBJECTS) $(makedoc_LDADD) $(LIBS)
-+	$(CC_FOR_BUILD) $(makedoc_LDFLAGS) $(makedoc_OBJECTS) $(makedoc_LDADD) $(LIBS) -o $@
- mutt$(EXEEXT): $(mutt_OBJECTS) $(mutt_DEPENDENCIES) 
- 	@rm -f mutt$(EXEEXT)
- 	$(LINK) $(mutt_LDFLAGS) $(mutt_OBJECTS) $(mutt_LDADD) $(LIBS)
package/mutt/mutt-1.5.17+20080114-nodoc.patch new file +21 -0
new file mode 100644
index 0000000..6fd556d
@@ -0,0 +1,21 @@
+Disable the documentation build
+
+The documentation tool is compiled for the target, but executed on the
+host. We don't bother fixing this, as we don't care of the
+documentation in Buildroot.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+
+Index: mutt-1.5.17+20080114/Makefile.am
+===================================================================
+--- mutt-1.5.17+20080114.orig/Makefile.am	2010-05-15 18:15:08.000000000 +0200
++++ mutt-1.5.17+20080114/Makefile.am	2010-05-15 18:15:17.000000000 +0200
+@@ -9,7 +9,7 @@
+ IMAP_INCLUDES = -I$(top_srcdir)/imap
+ endif
+ 
+-SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR)
++SUBDIRS = m4 po intl contrib $(IMAP_SUBDIR)
+ 
+ bin_SCRIPTS = muttbug flea @SMIMEAUX_TARGET@
+ 
package/mutt/mutt.mk +11 -62

82 lines not on this page · raw message

Signature · 1 line
1.6.3.3
#20 lore raw

PATCH 16/19 lvm2: do not override CC and similar variables

In reply to Thomas Petazzoni

Since lvm2 uses autoconf, there's no point in overriding CC and other variables at build time. This causes build breakage as CFLAGS aren't used at link time, therefore --sysroot lacks, which breaks the build with external toolchains.

---
 package/lvm2/lvm2.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
package/lvm2/lvm2.mk +1 -1
index bc6f458..2bd6b8b 100644
@@ -74,7 +74,7 @@ $(LVM2_DIR)/.configured: $(LVM2_DIR)/.unpacked
 
 
 $(LVM2_DIR)/.built: $(LVM2_DIR)/.configured
-	$(MAKE1) CC=$(TARGET_CC) RANLIB=$(TARGET_RANLIB) AR=$(TARGET_AR) -C $(LVM2_DIR) DESTDIR=$(STAGING_DIR)
+	$(MAKE1) -C $(LVM2_DIR) DESTDIR=$(STAGING_DIR)
 	$(MAKE1) -C $(LVM2_DIR) DESTDIR=$(STAGING_DIR) install
 	# Fixup write permissions so that the files can be overwritten
 	# several times in the $(TARGET_DIR)
Signature · 1 line
1.6.3.3
#21 lore raw

PATCH 17/19 uemacs: don't forget CFLAGS at link time

In reply to Thomas Petazzoni

Without CFLAGS, the build breaks because --sysroot is missing at link time, and this option is absolutely mandatory for external toolchain builds.

---
 package/uemacs/uemacs.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
package/uemacs/uemacs.mk +1 -1
index 6e2f4c4..539ad51 100644
@@ -23,7 +23,7 @@ $(UEMACS_DIR)/.unpacked: $(DL_DIR)/$(UEMACS_SOURCE)
 
 $(UEMACS_DIR)/$(UEMACS_BINARY): $(UEMACS_DIR)/.unpacked
 	$(MAKE) -C $(UEMACS_DIR) \
-	CC="$(TARGET_CC)" DEFINES="-DAUTOCONF -DPOSIX -DUSG" CFLAGS+="$(TARGET_CFLAGS) " LIBS=-lncurses
+	CC="$(TARGET_CC)" DEFINES="-DAUTOCONF -DPOSIX -DUSG" CFLAGS+="$(TARGET_CFLAGS) " LIBS="$(TARGET_CFLAGS) -lncurses"
 	$(STRIPCMD) $(UEMACS_DIR)/$(UEMACS_BINARY)
 
 $(TARGET_DIR)/$(UEMACS_TARGET_BINARY): $(UEMACS_DIR)/$(UEMACS_BINARY)
Signature · 1 line
1.6.3.3
#22 lore raw

PATCH 18/19 vpnc: pass CFLAGS at link time

In reply to Thomas Petazzoni

External toolchain builds absolutely require the --sysroot option to be passed at link time.

---
 package/vpnc/vpnc.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
package/vpnc/vpnc.mk +2 -2
index 5d0f87a..c4f23fa 100644
@@ -26,7 +26,7 @@ $(VPNC_BINARY): $(VPNC_DIR)/.unpacked
 	rm -f $@
 	$(MAKE) $(TARGET_CONFIGURE_OPTS) INCLUDE=$(STAGING_DIR)/usr/include \
 		CFLAGS="$(TARGET_CFLAGS)" \
-		LDFLAGS+=-lgcrypt LDFLAGS+=-lgpg-error \
+		LDFLAGS+=-lgcrypt LDFLAGS+=-lgpg-error LDFLAGS+="$(TARGET_CFLAGS)" \
 		CC="$(TARGET_CC)" -C $(VPNC_DIR)
 
 $(VPNC_TARGET_BINARY): $(VPNC_BINARY)
@@ -38,7 +38,7 @@ $(VPNC_TARGET_BINARY): $(VPNC_BINARY)
 		MANDIR=/usr/share/man \
 		VERSION=$(VPNC_VERSION) \
 		INCLUDE=$(STAGING_DIR)/usr/include \
-		LDFLAGS="-lgcrypt -lgpg-error" \
+		LDFLAGS="-lgcrypt -lgpg-error $(TARGET_CFLAGS)" \
 		-C $(VPNC_DIR) install
 	$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(VPNC_TARGET_BINARY)
 
Signature · 1 line
1.6.3.3
#23 lore raw

PATCH 19/19 netsnmp: disable build with external toolchain

In reply to Thomas Petazzoni

There is a build problem with netsnmp on external toolchain that isn't easy to fix: libtool strips the --sysroot that we are passing it, which make the link step fail.

In preparation for the release, just make sure this package isn't visible to external toolchain users. Of course, on the long run, we should fix this.

We also disable the build of the Quagga SNMP support because it selects netsnmp.

---
 package/netsnmp/Config.in |    6 ++++++
 package/quagga/Config.in  |    4 ++++
 2 files changed, 10 insertions(+), 0 deletions(-)
package/netsnmp/Config.in +6 -0
index fd54eb4..810b654 100644
@@ -1,7 +1,13 @@
 config BR2_PACKAGE_NETSNMP
 	bool "netsnmp"
+	# Build with external toolchains is broken, libtool strips
+	# --sysroot at link time
+	depends on !BR2_TOOLCHAIN_EXTERNAL
 	help
 	  Suite of applications used to implement SNMP v1, SNMP v2c, and
 	  SNMP v3 using both IPv4 and IPv6.
 
 	  http://net-snmp.sourceforge.net/
+
+comment "lmbench is broken with external toolchains"
+        depends on BR2_TOOLCHAIN_EXTERNAL
package/quagga/Config.in +4 -0
index e540cc6..fb0d590 100644
@@ -59,8 +59,12 @@ config BR2_PACKAGE_QUAGGA_NETLINK
 
 config BR2_PACKAGE_QUAGGA_SNMP
 	bool "SNMP support"
+	depends on !BR2_TOOLCHAIN_EXTERNAL
 	select BR2_PACKAGE_NETSNMP
 
+comment "quagga snmp support broken with external toolchains"
+	depends on BR2_TOOLCHAIN_EXTERNAL
+
 config BR2_PACKAGE_QUAGGA_TCP_ZEBRA
 	bool "TCP/IP socket connection between zebra and proto daemon"
 
Signature · 1 line
1.6.3.3
#24 lore raw
In reply to Thomas Petazzoni
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> Hello,
Thomas> Here is a new pull request for the set of fixes I have for Thomas> 2010.05. This new pull request gathers changes from both of the Thomas> previous 2010-05-14-fixes and 2010-05-15-fixes pull requests.

Committed, thanks!

Signature · 1 line
Bye, Peter Korsgaard