Skip to contentSkip to conversation

Pull-request: A few fixes and conversions to new package infrastructure

PATCH New llandwerlin at gmail.com 4 participants 15 messages Feb 7, 2010 – Feb 20, 2010

lore
Share & tools
lore
#0 lore raw

cover Pull-request: A few fixes and conversions to new package infrastructure

Last fixes for 2010.02, I don't know if conversions are relevant so close of the release...

Available at :
git://git.potipota.net/buildroot various-fixes

The list :
[PATCH 01/10] ncurses: convert to autotools infrastructure
[PATCH 02/10] ncurses: fix path to patch ncurses5-config
[PATCH 03/10] lua: conversion to new package infrastructure
[PATCH 04/10] package: Add $(HOST_DIR)/usr/lib to LD_LIBRARY_PATH for make & configure env variables [PATCH 05/10] Rework icu package on top of the generic infrastructure
[PATCH 06/10] package: Added post uninstall hooks
[PATCH 07/10] package: fix install without strip
[PATCH 08/10] external toolchain: fix strip of libraries
[PATCH 09/10] ext-toolchain: remove pkgconfig files from the external toolchain [PATCH 10/10] scripts: force copy of files to erase already present and readonly files

Regards,

--
Lionel Landwerlin

#1 lore raw

PATCH 1/10 ncurses: convert to autotools infrastructure

From: Lionel Landwerlin <[email protected]>

---
 package/ncurses/ncurses.mk |  188 +++++++++++++++-----------------------------
 1 files changed, 65 insertions(+), 123 deletions(-)
package/ncurses/ncurses.mk +65 -123
index fb22c6c..a19e6c8 100644
@@ -23,99 +23,84 @@
 # USA
 
 # TARGETS
-NCURSES_VERSION:=5.6
-NCURSES_SITE:=$(BR2_GNU_MIRROR)/ncurses
-NCURSES_DIR:=$(BUILD_DIR)/ncurses-$(NCURSES_VERSION)
-NCURSES_SOURCE:=ncurses-$(NCURSES_VERSION).tar.gz
-NCURSES_CAT:=$(ZCAT)
+NCURSES_VERSION = 5.6
+NCURSES_SITE = $(BR2_GNU_MIRROR)/ncurses
+NCURSES_SOURCE = ncurses-$(NCURSES_VERSION).tar.gz
+NCURSES_INSTALL_STAGING = YES
+NCURSES_INSTALL_TARGET = YES
+
+NCURSES_CONF_OPT = \
+	--with-shared \
+	--without-cxx \
+	--without-cxx-binding \
+	--without-ada \
+	--without-progs \
+	--disable-big-core \
+	--without-profile \
+	--disable-rpath \
+	--enable-echo \
+	--enable-const \
+	--enable-overwrite \
+	--enable-broken_linker
 
 ifneq ($(BR2_PACKAGE_NCURSES_TARGET_HEADERS),y)
-NCURSES_WANT_STATIC=--disable-static
+NCURSES_CONF_OPT += --disable-static
 endif
 
-$(DL_DIR)/$(NCURSES_SOURCE):
-	$(call DOWNLOAD,$(NCURSES_SITE),$(NCURSES_SOURCE))
-
-$(NCURSES_DIR)/.patched: $(DL_DIR)/$(NCURSES_SOURCE)
-	$(NCURSES_CAT) $(DL_DIR)/$(NCURSES_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	#use the local tic and not whatever the build system was going to find.
-	$(SED) 's~\$$srcdir/shlib tic\$$suffix~/usr/bin/tic~' \
-		$(NCURSES_DIR)/misc/run_tic.in
-	toolchain/patch-kernel.sh $(NCURSES_DIR) package/ncurses/ ncurses\*.patch
-	$(CONFIG_UPDATE) $(NCURSES_DIR)
-	touch $@
-
-$(NCURSES_DIR)/.configured: $(NCURSES_DIR)/.patched
-	(cd $(NCURSES_DIR); rm -rf config.cache; \
-		BUILD_CC="$(HOSTCC)" \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(REAL_GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/usr \
-		--exec-prefix=/usr \
-		--bindir=/usr/bin \
-		--sbindir=/usr/sbin \
-		--libdir=/usr/lib \
-		--libexecdir=/usr/lib \
-		--sysconfdir=/etc \
-		--datadir=/usr/share \
-		--localstatedir=/var \
-		--includedir=/usr/include \
-		--mandir=/usr/man \
-		--infodir=/usr/info \
-		--with-terminfo-dirs=/usr/share/terminfo \
-		--with-default-terminfo-dir=/usr/share/terminfo \
-		--with-shared --without-cxx --without-cxx-binding \
-		--without-ada --without-progs --disable-big-core \
-		$(DISABLE_NLS) $(DISABLE_LARGEFILE) \
-		--without-profile --without-debug --disable-rpath \
-		--enable-echo --enable-const --enable-overwrite \
-		--enable-broken_linker \
-		$(NCURSES_WANT_STATIC) \
-	)
-	touch $@
-
-$(NCURSES_DIR)/lib/libncurses.so.$(NCURSES_VERSION): $(NCURSES_DIR)/.configured
-	$(MAKE1) DESTDIR=$(STAGING_DIR) -C $(NCURSES_DIR) \
-		libs panel menu form headers
+ifneq ($(BR2_ENABLE_DEBUG),y)
+NCURSES_CONF_OPT += --without-debug
+endif
 
-$(STAGING_DIR)/usr/lib/libncurses.so.$(NCURSES_VERSION): $(NCURSES_DIR)/lib/libncurses.so.$(NCURSES_VERSION)
-	$(MAKE1) \
-	    prefix=$(STAGING_DIR)/usr/ \
-	    exec_prefix=$(STAGING_DIR) \
-	    bindir=$(STAGING_DIR)/bin \
-	    sbindir=$(STAGING_DIR)/sbin \
-	    libexecdir=$(STAGING_DIR)/usr/lib \
-	    datadir=$(STAGING_DIR)/usr/share \
-	    sysconfdir=$(STAGING_DIR)/etc \
-	    localstatedir=$(STAGING_DIR)/var \
-	    libdir=$(STAGING_DIR)/usr/lib \
-	    infodir=$(STAGING_DIR)/usr/info \
-	    mandir=$(STAGING_DIR)/usr/man \
-	    includedir=$(STAGING_DIR)/usr/include \
-	    gxx_include_dir=$(STAGING_DIR)/usr/include/c++ \
-	    ticdir=$(STAGING_DIR)/usr/share/terminfo \
-	    -C $(NCURSES_DIR) install
-	chmod a-x $(NCURSES_DIR)/lib/libncurses.so*
+define NCURSES_PATCH_NCURSES_CONFIG
 	$(SED) 's^prefix="^prefix="$(STAGING_DIR)^' \
 		$(STAGING_DIR)/bin/ncurses5-config
-	touch -c $@
+endef
+
+NCURSES_POST_BUILD_HOOKS += NCURSES_PATCH_NCURSES_CONFIG
+
+ifeq ($(BR2_HAVE_DEVFILES),y)
+define NCURSES_INSTALL_TARGET_DEVFILES
+	mkdir -p $(TARGET_DIR)/usr/include
+	cp -dpf $(NCURSES_DIR)/include/curses.h $(TARGET_DIR)/usr/include/curses.h
+	cp -dpf $(NCURSES_DIR)/include/ncurses_dll.h $(TARGET_DIR)/usr/include/ncurses_dll.h
+	cp -dpf $(NCURSES_DIR)/include/term.h $(TARGET_DIR)/usr/include/
+	cp -dpf $(NCURSES_DIR)/include/unctrl.h $(TARGET_DIR)/usr/include/
+	cp -dpf $(NCURSES_DIR)/include/termcap.h $(TARGET_DIR)/usr/include/
+	cp -dpf $(NCURSES_DIR)/lib/libncurses.a $(TARGET_DIR)/usr/lib/
+	(cd $(TARGET_DIR)/usr/lib; \
+	 ln -fs libncurses.a libcurses.a; \
+	 ln -fs libncurses.a libtermcap.a; \
+	)
+	(cd $(TARGET_DIR)/usr/include; ln -fs curses.h ncurses.h)
+	rm -f $(TARGET_DIR)/usr/lib/libncurses.so
+	(cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.so.$(NCURSES_VERSION) libncurses.so)
+endef
+endif
 
-$(TARGET_DIR)/usr/lib/libncurses.so.$(NCURSES_VERSION): $(STAGING_DIR)/usr/lib/libncurses.so.$(NCURSES_VERSION)
-	mkdir -p $(TARGET_DIR)/usr/lib
-	cp -dpf $(NCURSES_DIR)/lib/libncurses.so* $(TARGET_DIR)/usr/lib/
 ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PANEL),y)
+define NCURSES_INSTALL_TARGET_PANEL
 	cp -dpf $(NCURSES_DIR)/lib/libpanel.so* $(TARGET_DIR)/usr/lib/
+endef
 endif
+
 ifeq ($(BR2_PACKAGE_NCURSES_TARGET_FORM),y)
+define NCURSES_INSTALL_TARGET_FORM
 	cp -dpf $(NCURSES_DIR)/lib/libform.so* $(TARGET_DIR)/usr/lib/
+endef
 endif
+
 ifeq ($(BR2_PACKAGE_NCURSES_TARGET_MENU),y)
+define NCURSES_INSTALL_TARGET_MENU
 	cp -dpf $(NCURSES_DIR)/lib/libmenu.so* $(TARGET_DIR)/usr/lib/
+endef
 endif
+
+define NCURSES_INSTALL_TARGET_CMDS
+	mkdir -p $(TARGET_DIR)/usr/lib
+	cp -dpf $(NCURSES_DIR)/lib/libncurses.so* $(TARGET_DIR)/usr/lib/
+	$(NCURSES_INSTALL_TARGET_PANEL)
+	$(NCURSES_INSTALL_TARGET_FORM)
+	$(BR2_PACKAGE_NCURSES_TARGET_MENU)
 	ln -snf /usr/share/terminfo $(TARGET_DIR)/usr/lib/terminfo
 	mkdir -p $(TARGET_DIR)/usr/share/terminfo/x
 	cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm $(TARGET_DIR)/usr/share/terminfo/x
@@ -130,51 +115,8 @@ endif
 	cp -dpf $(STAGING_DIR)/usr/share/terminfo/a/ansi $(TARGET_DIR)/usr/share/terminfo/a
 	mkdir -p $(TARGET_DIR)/usr/share/terminfo/l
 	cp -dpf $(STAGING_DIR)/usr/share/terminfo/l/linux $(TARGET_DIR)/usr/share/terminfo/l
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
-	touch -c $@
-
-$(NCURSES_DIR)/lib/libncurses.a: $(NCURSES_DIR)/lib/libncurses.so.$(NCURSES_VERSION)
+	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libncurses.so*
+	$(NCURSES_INSTALL_TARGET_DEVFILES)
+endef # NCURSES_INSTALL_TARGET_CMDS
 
-$(TARGET_DIR)/usr/lib/libncurses.a: $(NCURSES_DIR)/lib/libncurses.a
-	mkdir -p $(TARGET_DIR)/usr/include
-	cp -dpf $(NCURSES_DIR)/include/curses.h $(TARGET_DIR)/usr/include/curses.h
-	cp -dpf $(NCURSES_DIR)/include/ncurses_dll.h $(TARGET_DIR)/usr/include/ncurses_dll.h
-	cp -dpf $(NCURSES_DIR)/include/term.h $(TARGET_DIR)/usr/include/
-	cp -dpf $(NCURSES_DIR)/include/unctrl.h $(TARGET_DIR)/usr/include/
-	cp -dpf $(NCURSES_DIR)/include/termcap.h $(TARGET_DIR)/usr/include/
-	cp -dpf $(NCURSES_DIR)/lib/libncurses.a $(TARGET_DIR)/usr/lib/
-	(cd $(TARGET_DIR)/usr/lib; \
-	 ln -fs libncurses.a libcurses.a; \
-	 ln -fs libncurses.a libtermcap.a; \
-	)
-	(cd $(TARGET_DIR)/usr/include; ln -fs curses.h ncurses.h)
-	rm -f $(TARGET_DIR)/usr/lib/libncurses.so
-	(cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.so.$(NCURSES_VERSION) libncurses.so)
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libncurses.so.$(NCURSES_VERSION)
-	touch -c $@
-
-ncurses: $(TARGET_DIR)/usr/lib/libncurses.so.$(NCURSES_VERSION) \
-	$(if $(BR2_HAVE_DEVFILES),$(TARGET_DIR)/usr/lib/libncurses.a)
-
-ncurses-unpacked: $(NCURSES_DIR)/.patched
-
-ncurses-source: $(DL_DIR)/$(NCURSES_SOURCE)
-
-ncurses-clean:
-	rm -f $(STAGING_DIR)/usr/lib/libncurses.so* $(TARGET_DIR)/usr/lib/libncurses.so*
-	rm -rf $(STAGING_DIR)/usr/share/tabset $(TARGET_DIR)/usr/share/tabset
-	rm -rf $(STAGING_DIR)/usr/share/terminfo $(TARGET_DIR)/usr/share/terminfo
-	rm -rf $(TARGET_DIR)/usr/lib/terminfo
-	-$(MAKE) -C $(NCURSES_DIR) clean
-
-ncurses-dirclean:
-	rm -rf $(NCURSES_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_NCURSES),y)
-TARGETS+=ncurses
-endif
+$(eval $(call AUTOTARGETS,package,ncurses))
Signature · 1 line
1.6.6
#2 lore raw

PATCH 2/10 ncurses: fix path to patch ncurses5-config

In reply to llandwerlin at gmail.com

From: Lionel Landwerlin <[email protected]>

---
 package/ncurses/ncurses.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
package/ncurses/ncurses.mk +2 -2
index a19e6c8..0568954 100644
@@ -53,10 +53,10 @@ endif
 
 define NCURSES_PATCH_NCURSES_CONFIG
 	$(SED) 's^prefix="^prefix="$(STAGING_DIR)^' \
-		$(STAGING_DIR)/bin/ncurses5-config
+		$(STAGING_DIR)/usr/bin/ncurses5-config
 endef
 
-NCURSES_POST_BUILD_HOOKS += NCURSES_PATCH_NCURSES_CONFIG
+NCURSES_POST_STAGING_INSTALL_HOOKS += NCURSES_PATCH_NCURSES_CONFIG
 
 ifeq ($(BR2_HAVE_DEVFILES),y)
 define NCURSES_INSTALL_TARGET_DEVFILES
Signature · 1 line
1.6.6
#3 lore raw

PATCH 3/10 lua: conversion to new package infrastructure

In reply to llandwerlin at gmail.com

From: Lionel Landwerlin <[email protected]>

Also install development files to staging by default and to target if requested.

---
 package/lua/lua.mk |  124 +++++++++++++++++++++++++--------------------------
 1 files changed, 61 insertions(+), 63 deletions(-)
package/lua/lua.mk +61 -63
index aeb6c82..9cb1675 100644
@@ -5,77 +5,75 @@
 #############################################################
 
 LUA_VERSION=5.1.4
-
 LUA_SOURCE=lua-$(LUA_VERSION).tar.gz
-LUA_CAT:=$(ZCAT)
 LUA_SITE=http://www.lua.org/ftp
+LUA_INSTALL_STAGING=YES
+LUA_DEPENDENCIES = readline ncurses
 
-LUA_DIR=$(BUILD_DIR)/lua-$(LUA_VERSION)
-
+#
 LUA_CFLAGS=-DLUA_USE_LINUX
 LUA_MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
 
-$(DL_DIR)/$(LUA_SOURCE):
-	$(call DOWNLOAD,$(LUA_SITE),$(LUA_SOURCE))
-
-$(LUA_DIR)/.unpacked: $(DL_DIR)/$(LUA_SOURCE)
-	$(LUA_CAT) $(DL_DIR)/$(LUA_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	touch $(LUA_DIR)/.unpacked
-
-$(LUA_DIR)/src/lua: $(LUA_DIR)/.unpacked
-	rm -f $@
+define LUA_BUILD_CMDS
 	$(MAKE) $(TARGET_CONFIGURE_OPTS) \
 		MYCFLAGS=$(LUA_CFLAGS) \
 		MYLIBS=$(LUA_MYLIBS) \
 		AR="$(TARGET_CROSS)ar rcu" \
-		-C $(LUA_DIR)/src all
-
-$(LUA_DIR)/src/luac: $(LUA_DIR)/src/lua
-
-$(LUA_DIR)/src/liblua.a: $(LUA_DIR)/src/lua
-
-$(STAGING_DIR)/usr/lib/liblua.a: $(LUA_DIR)/src/liblua.a
-	cp -dpf $(LUA_DIR)/src/liblua.a $(STAGING_DIR)/usr/lib/liblua.a
-
-$(STAGING_DIR)/usr/bin/lua: $(LUA_DIR)/src/lua
-	cp -dpf $(LUA_DIR)/src/lua $(STAGING_DIR)/usr/bin/lua
-
-$(STAGING_DIR)/usr/bin/luac: $(LUA_DIR)/src/luac
-	cp -dpf $(LUA_DIR)/src/luac $(STAGING_DIR)/usr/bin/luac
-
-$(TARGET_DIR)/usr/lib/liblua.a: $(STAGING_DIR)/usr/lib/liblua.a
-	cp -dpf $(STAGING_DIR)/usr/lib/liblua.a $(TARGET_DIR)/usr/lib/liblua.a
-
-$(TARGET_DIR)/usr/bin/lua: $(STAGING_DIR)/usr/bin/lua
-	cp -dpf $(STAGING_DIR)/usr/bin/lua $(TARGET_DIR)/usr/bin/lua
-
-$(TARGET_DIR)/usr/bin/luac: $(STAGING_DIR)/usr/bin/luac
-	cp -dpf $(STAGING_DIR)/usr/bin/luac $(TARGET_DIR)/usr/bin/luac
-
-
-lua-bins:	$(TARGET_DIR)/usr/bin/lua $(TARGET_DIR)/usr/bin/luac
-
-lua-libs: $(if $(BR2_HAVE_DEVFILES),$(TARGET_DIR)/usr/lib/liblua.a)
-
-lua: readline ncurses lua-bins lua-libs
-
-lua-source: $(DL_DIR)/$(LUA_SOURCE)
-
-lua-clean:
-	rm -f $(STAGING_DIR)/usr/bin/lua $(TARGET_DIR)/usr/bin/luac
-	rm -f $(STAGING_DIR)/usr/lib/liblua.a
-	rm -f $(TARGET_DIR)/usr/bin/lua $(TARGET_DIR)/usr/bin/luac
-	rm -f $(TARGET_DIR)/usr/lib/liblua.a
-	-$(MAKE) -C $(LUA_DIR) clean
-
-lua-dirclean:
-	rm -rf $(LUA_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_LUA),y)
-TARGETS+=lua
+		-C $(@D)/src all
+endef
+
+define LUA_INSTALL_STAGING_CMDS
+	cat $(@D)/etc/lua.pc | sed -e s/\\/usr\\/local/\\/usr/ > $(STAGING_DIR)/usr/lib/pkgconfig/lua.pc
+	$(INSTALL) $(@D)/src/liblua.a $(STAGING_DIR)/usr/lib
+	$(INSTALL) $(@D)/src/lua $(STAGING_DIR)/usr/bin
+	$(INSTALL) $(@D)/src/luac $(STAGING_DIR)/usr/bin
+	$(INSTALL) $(@D)/src/lua.h $(STAGING_DIR)/usr/include
+	$(INSTALL) $(@D)/src/luaconf.h $(STAGING_DIR)/usr/include
+	$(INSTALL) $(@D)/src/lualib.h $(STAGING_DIR)/usr/include
+	$(INSTALL) $(@D)/src/lauxlib.h $(STAGING_DIR)/usr/include
+endef
+
+ifeq ($(BR2_HAVE_DEVFILES),y)
+define LUA_INSTALL_TARGET_HEADERS
+	install -D $(STAGING_DIR)/usr/lib/pkgconfig/lua.pc $(TARGET_DIR)/usr/lib/pkgconfig/lua.pc
+	$(INSTALL) $(@D)/src/lua.h $(TARGET_DIR)/usr/include
+	$(INSTALL) $(@D)/src/luaconf.h $(TARGET_DIR)/usr/include
+	$(INSTALL) $(@D)/src/lualib.h $(TARGET_DIR)/usr/include
+	$(INSTALL) $(@D)/src/lauxlib.h $(TARGET_DIR)/usr/include
+endef
 endif
+
+define LUA_INSTALL_TARGET_CMDS
+	$(INSTALL) $(@D)/src/lua $(STAGING_DIR)/usr/bin
+	$(INSTALL) $(@D)/src/luac $(STAGING_DIR)/usr/bin
+	$(INSTALL) -D $(@D)/src/liblua.a $(STAGING_DIR)/usr/lib/liblua.a
+	$(LUA_INSTALL_TARGET_HEADERS)
+endef
+
+LUA_INSTALLED_FILES = \
+	/usr/include/lua.h \
+	/usr/include/luaconf.h \
+	/usr/include/lualib.h \
+	/usr/include/lauxlib.h \
+	/usr/lib/pkgconfig/lua.pc \
+	/usr/bin/lua \
+	/usr/bin/luac \
+	/usr/lib/liblua.a
+
+define LUA_UNINSTALL_STAGING_CMDS
+	for i in $(LUA_INSTALLED_FILES); do \
+		rm -f $(STAGING_DIR)$$i; \
+	done
+endef
+
+define LUA_UNINSTALL_TARGET_CMDS
+	for i in $(LUA_INSTALLED_FILES); do \
+		rm -f $(TARGET_DIR)$$i; \
+	done
+endef
+
+define LUA_CLEAN_CMDS
+	-$(MAKE) $(@D) clean
+endef
+
+$(eval $(call GENTARGETS,package,lua))
Signature · 1 line
1.6.6
#4 lore raw

PATCH 3/10 lua: conversion to new package infrastructure

Quoted 6 lines · llandwerlin at gmail.com

From: Lionel Landwerlin <[email protected]>

Also install development files to staging by default and to target if requested.

Did you see https://bugs.busybox.net/show_bug.cgi?id=803 ? Your patch lacks some modularity (ability to disable lua and luac installation, install shared liblua, disable readline support) and module loading support (-DLUA_USE_DLOPEN).
Regards.

#5 lore raw

PATCH 4/10 package: Add $(HOST_DIR)/usr/lib to LD_LIBRARY_PATH for make & configure env variables

In reply to llandwerlin at gmail.com

From: Lionel Landwerlin <[email protected]>

Some packages like icu requires to be compiled against the host system first to be able to compile against the target. This is due to the usage of self generated binaries by the package to build itself. When the generated tools also depends on generated libraries it is required to add the path to these libraries in the library path (LD_LIBRARY_PATH).

---
 package/Makefile.in |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
package/Makefile.in +9 -4
index bc0ac7c..242ebfc 100644
@@ -228,15 +228,18 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
 		PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
 		PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
 		PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \
-		STAGING_DIR="$(STAGING_DIR)"
+		STAGING_DIR="$(STAGING_DIR)" \
+		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)"
 
 TARGET_CONFIGURE_ENV=\
 	CFLAGS="$(TARGET_CFLAGS)" \
 	CXXFLAGS="$(TARGET_CXXFLAGS)" \
 	LDFLAGS="$(TARGET_LDFLAGS)" \
 	FCFLAGS="$(TARGET_FCFLAGS)" \
+	LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)"
 
-TARGET_MAKE_ENV=PATH=$(TARGET_PATH)
+TARGET_MAKE_ENV=PATH=$(TARGET_PATH) \
+		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)"
 
 HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \
 		AR="$(HOSTAR)" \
@@ -274,11 +277,13 @@ HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \
 		ORIGINAL_NM_FOR_TARGET="$(TARGET_NM)" \
 		ORIGINAL_OBJDUMP_FOR_TARGET="$(TARGET_OBJDUMP)" \
 		PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
-		PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig"
+		PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig" \
+		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)"
 
 HOST_MAKE_ENV=PATH=$(HOST_PATH) \
 		PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
-		PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig"
+		PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig" \
+		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)"
 
 
 #######################################################################
Signature · 1 line
1.6.6
#6 lore raw

PATCH 5/10 Rework icu package on top of the generic infrastructure

In reply to llandwerlin at gmail.com

From: Thomas Petazzoni <[email protected]>

This patch is based on a previous attempt by Thomas Petazzoni.

---
 ...icu-4c-3_8_1-fix-compilation-with-gcc-4.4.patch |   77 +++
 .../icu/icu-4c-3_8_1-fix-cross-compilation.patch   |  383 +++++++++++
 package/icu/icu-4c-3_8_1-lsupc++.patch             |   24 +-
 package/icu/icu-config                             |  684 ++++++++++++++++++++
 package/icu/icu-cross-compile.patch                |  314 ---------
 package/icu/icu.mk                                 |  112 ++--
 6 files changed, 1215 insertions(+), 379 deletions(-)
 create mode 100644 package/icu/icu-4c-3_8_1-fix-compilation-with-gcc-4.4.patch
 create mode 100644 package/icu/icu-4c-3_8_1-fix-cross-compilation.patch
 create mode 100755 package/icu/icu-config
 delete mode 100644 package/icu/icu-cross-compile.patch
package/icu/icu-4c-3_8_1-fix-compilation-with-gcc-4.4.patch new file +77 -0
new file mode 100644
index 0000000..8c88f1c
@@ -0,0 +1,77 @@
+From b515227d0ca1ca61e033645cd2a99e829574c31a Mon Sep 17 00:00:00 2001
+From: Lionel Landwerlin <[email protected]>
+Date: Tue, 5 Jan 2010 16:24:57 +0100
+Subject: [PATCH] icu: fix compilation with gcc 4.4
+
+Signed-off-by: Lionel Landwerlin <[email protected]>
+---
+ source/layoutex/ParagraphLayout.cpp |   14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/source/layoutex/ParagraphLayout.cpp b/source/layoutex/ParagraphLayout.cpp
+index 5b07e54..62c794b 100644
+--- a/source/layoutex/ParagraphLayout.cpp
++++ b/source/layoutex/ParagraphLayout.cpp
+@@ -326,12 +326,12 @@ ParagraphLayout::ParagraphLayout(const LEUnicode chars[], le_int32 count,
+     le_int32  styleCount = sizeof styleRunArrays / sizeof styleRunArrays[0];
+     StyleRuns styleRuns(styleRunArrays, styleCount);
+     LEErrorCode layoutStatus = LE_NO_ERROR;
+-    
++
+     fStyleRunCount = styleRuns.getRuns(NULL, NULL);
+ 
+     fStyleRunLimits = LE_NEW_ARRAY(le_int32, fStyleRunCount);
+     fStyleIndices   = LE_NEW_ARRAY(le_int32, fStyleRunCount * styleCount);
+-    
++
+     styleRuns.getRuns(fStyleRunLimits, fStyleIndices);
+ 
+     // now build a LayoutEngine for each style run...
+@@ -362,7 +362,7 @@ ParagraphLayout::ParagraphLayout(const LEUnicode chars[], le_int32 count,
+     }
+ 
+     // Make big arrays for the glyph widths, glyph-to-char and char-to-glyph maps,
+-    // in logical order. (Both maps need an extra entry for the end of the text.) 
++    // in logical order. (Both maps need an extra entry for the end of the text.)
+     //
+     // For each layout get the positions and convert them into glyph widths, in
+     // logical order. Get the glyph-to-char mapping, offset by starting index in the
+@@ -509,7 +509,7 @@ ParagraphLayout::~ParagraphLayout()
+     }
+ }
+ 
+-    
++
+ le_bool ParagraphLayout::isComplex(const LEUnicode chars[], le_int32 count)
+ {
+     UErrorCode scriptStatus = U_ZERO_ERROR;
+@@ -813,7 +813,7 @@ le_int32 ParagraphLayout::getLanguageCode(const Locale *locale)
+ 
+     return nullLanguageCode;
+ }
+-#elif
++#else
+ 
+ // TODO - dummy implementation for right now...
+ le_int32 ParagraphLayout::getLanguageCode(const Locale *locale)
+@@ -943,7 +943,7 @@ void ParagraphLayout::appendRun(ParagraphLayout::Line *line, le_int32 run, le_in
+     // previous run, even though this glyph may be in the middle of the
+     // run.
+     fVisualRunLastX -= fStyleRunInfo[run].positions[leftGlyph * 2];
+- 
++
+     // Make rightGlyph be the glyph just to the right of
+     // the run's glyphs
+     rightGlyph += 1;
+@@ -1057,7 +1057,7 @@ le_int32 ParagraphLayout::Line::getWidth() const
+ 
+     le_int32 glyphCount = lastRun->getGlyphCount();
+     const float *positions = lastRun->getPositions();
+-    
++
+     return (le_int32) positions[glyphCount * 2];
+ }
+ 
+-- 
+1.6.5.7
+
package/icu/icu-4c-3_8_1-fix-cross-compilation.patch new file +383 -0

383 lines not on this page · raw message

package/icu/icu-4c-3_8_1-lsupc++.patch +12 -12
index 891ddce..8f5d72b 100644
@@ -1,5 +1,5 @@
---- source/tools/genccode/Makefile.in	2007-12-12 13:57:28.000000000 -0500
-+++ source/tools/genccode/Makefile.in	2008-02-07 14:37:56.000000000 -0500
+--- a/source/tools/genccode/Makefile.in	2007-12-12 13:57:28.000000000 -0500
++++ b/source/tools/genccode/Makefile.in	2008-02-07 14:37:56.000000000 -0500
 @@ -31,7 +31,7 @@ ifneq ($(top_builddir),$(top_srcdir))
  CPPFLAGS += -I$(top_builddir)/common
  endif
@@ -9,8 +9,8 @@
  
  OBJECTS = genccode.o
  
---- source/tools/gencmn/Makefile.in	2007-12-12 13:57:28.000000000 -0500
-+++ source/tools/gencmn/Makefile.in	2008-02-07 14:37:56.000000000 -0500
+--- a/source/tools/gencmn/Makefile.in	2007-12-12 13:57:28.000000000 -0500
++++ b/source/tools/gencmn/Makefile.in	2008-02-07 14:37:56.000000000 -0500
 @@ -31,7 +31,7 @@ ifneq ($(top_builddir),$(top_srcdir))
  CPPFLAGS += -I$(top_builddir)/common
  endif
@@ -20,8 +20,8 @@
  
  OBJECTS = gencmn.o
 
---- source/tools/genrb/Makefile.in	2007-12-12 13:57:28.000000000 -0500
-+++ source/tools/genrb/Makefile.in	2008-02-07 14:37:56.000000000 -0500
+--- a/source/tools/genrb/Makefile.in	2007-12-12 13:57:28.000000000 -0500
++++ b/source/tools/genrb/Makefile.in	2008-02-07 14:37:56.000000000 -0500
 @@ -55,7 +55,7 @@ ifneq ($(top_builddir),$(top_srcdir))
  CPPFLAGS += -I$(top_builddir)/common
  endif
@@ -32,8 +32,8 @@
  OBJECTS = errmsg.o genrb.o parse.o read.o reslist.o ustr.o rbutil.o \
  wrtjava.o rle.o wrtxml.o prscmnts.o
 
---- source/tools/pkgdata/Makefile.in	2007-12-12 13:57:28.000000000 -0500
-+++ source/tools/pkgdata/Makefile.in	2008-02-07 14:37:56.000000000 -0500
+--- a/source/tools/pkgdata/Makefile.in	2007-12-12 13:57:28.000000000 -0500
++++ b/source/tools/pkgdata/Makefile.in	2008-02-07 14:37:56.000000000 -0500
 @@ -35,7 +35,7 @@ CPPFLAGS += -I$(top_builddir)/common
  endif
  CPPFLAGS += -I$(top_srcdir)/common -I$(srcdir)/../toolutil
@@ -43,8 +43,8 @@
  
  OBJECTS = pkgdata.o pkgtypes.o make.o dllmode.o cmnmode.o filemode.o sttcmode.o winmode.o
  
---- source/samples/date/Makefile.in	2007-12-12 13:57:28.000000000 -0500
-+++ source/samples/date/Makefile.in	2008-02-07 14:37:56.000000000 -0500
+--- a/source/samples/date/Makefile.in	2007-12-12 13:57:28.000000000 -0500
++++ b/source/samples/date/Makefile.in	2008-02-07 14:37:56.000000000 -0500
 @@ -21,7 +21,7 @@ CLEANFILES = *~ $(DEPS)
  TARGET = icudate$(EXEEXT)
  
@@ -54,8 +54,8 @@
  
  OBJECTS = uprint.o date.o
  
---- source/samples/cal/Makefile.in	2007-12-12 13:57:28.000000000 -0500
-+++ source/samples/cal/Makefile.in	2008-02-07 14:37:56.000000000 -0500
+--- a/source/samples/cal/Makefile.in	2007-12-12 13:57:28.000000000 -0500
++++ b/source/samples/cal/Makefile.in	2008-02-07 14:37:56.000000000 -0500
 @@ -21,7 +21,7 @@ CLEANFILES = *~ $(DEPS)
  TARGET = icucal$(EXEEXT)
  
package/icu/icu-config new file +684 -0

684 lines not on this page · raw message

package/icu/icu-cross-compile.patch deleted +0 -314

314 lines not on this page · raw message

package/icu/icu.mk +59 -53

132 lines not on this page · raw message

Signature · 1 line
1.6.6
#7 lore raw

PATCH 6/10 package: Added post uninstall hooks

In reply to llandwerlin at gmail.com

From: Lionel Landwerlin <[email protected]>

$(PKG)_POST_UNINSTALL_STAGING_HOOKS and $(PKG)_POST_UNINSTALL_TARGET_HOOKS

---
 package/Makefile.package.in |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)
package/Makefile.package.in +11 -7
index fbd7f69..d02706d 100644
@@ -192,8 +192,10 @@ $(BUILD_DIR)/%/.stamp_cleaned:
 $(BUILD_DIR)/%/.stamp_uninstalled:
 	@$(call MESSAGE,"Uninstalling")
 	$($(PKG)_UNINSTALL_STAGING_CMDS)
+	$(foreach hook,$($(PKG)_POST_UNINSTALL_STAGING_HOOKS),$(call $(hook))$(sep))
 	rm -f $($(PKG)_TARGET_INSTALL_STAGING)
 	$($(PKG)_UNINSTALL_TARGET_CMDS)
+	$(foreach hook,$($(PKG)_POST_UNINSTALL_TARGET_HOOKS),$(call $(hook))$(sep))
 	rm -f $($(PKG)_TARGET_INSTALL_TARGET) $($(PKG)_HOOK_POST_INSTALL)
 
 # Remove package sources
@@ -277,13 +279,15 @@ $(2)_TARGET_CLEAN =		$$($(2)_DIR)/.stamp_cleaned
 $(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
 
 # new-style hooks
-$(2)_POST_EXTRACT_HOOKS         ?=
-$(2)_POST_PATCH_HOOKS           ?=
-$(2)_POST_CONFIGURE_HOOKS       ?=
-$(2)_POST_BUILD_HOOKS           ?=
-$(2)_POST_INSTALL_HOOKS         ?=
-$(2)_POST_INSTALL_STAGING_HOOKS ?=
-$(2)_POST_INSTALL_TARGET_HOOKS  ?=
+$(2)_POST_EXTRACT_HOOKS           ?=
+$(2)_POST_PATCH_HOOKS             ?=
+$(2)_POST_CONFIGURE_HOOKS         ?=
+$(2)_POST_BUILD_HOOKS             ?=
+$(2)_POST_INSTALL_HOOKS           ?=
+$(2)_POST_INSTALL_STAGING_HOOKS   ?=
+$(2)_POST_INSTALL_TARGET_HOOKS    ?=
+$(2)_POST_UNINSTALL_STAGING_HOOKS ?=
+$(2)_POST_UNINSTALL_TARGET_HOOKS  ?=
 
 # old-style hooks
 $(2)_HOOK_POST_EXTRACT =	$$($(2)_DIR)/.stamp_hook_post_extract
Signature · 1 line
1.6.6
#8 lore raw

PATCH 7/10 package: fix install without strip

In reply to llandwerlin at gmail.com

From: Lionel Landwerlin <[email protected]>

---
 package/Makefile.autotools.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
package/Makefile.autotools.in +1 -1
index 7114bba..96ea453 100644
@@ -60,7 +60,7 @@ $(2)_LIBTOOL_PATCH		?= YES
 $(2)_USE_CONFIG_CACHE           ?= $(if $(BR2_CONFIG_CACHE),YES,NO)
 $(2)_INSTALL_STAGING_OPT	?= DESTDIR=$$(STAGING_DIR) install
 ifeq ($(BR2_ENABLE_DEBUG),y)
-$(2)_INSTALL_TARGET_OPT		?= DESTDIR=$$(TARGET_DIR)  install-exec
+$(2)_INSTALL_TARGET_OPT		?= DESTDIR=$$(TARGET_DIR)  install-strip
 else
 $(2)_INSTALL_TARGET_OPT		?= DESTDIR=$$(TARGET_DIR)  install-strip
 endif
Signature · 1 line
1.6.6
#9 lore raw

PATCH 7/10 package: fix install without strip

Quoted 12 lines · llandwerlin at gmail.com

From: Lionel Landwerlin<[email protected]>

---
  package/Makefile.autotools.in |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
package/Makefile.autotools.in +0 -0
index 7114bba..96ea453 100644

package/Makefile.autotools.in $(2)_LIBTOOL_PATCH ?= YES · line 63

Quoted 5 lines
package/Makefile.autotools.in +1 -1
@@ -60,7 +60,7 @@ $(2)_LIBTOOL_PATCH		?= YES
  $(2)_USE_CONFIG_CACHE           ?= $(if $(BR2_CONFIG_CACHE),YES,NO)
  $(2)_INSTALL_STAGING_OPT	?= DESTDIR=$$(STAGING_DIR) install
  ifeq ($(BR2_ENABLE_DEBUG),y)
-$(2)_INSTALL_TARGET_OPT		?= DESTDIR=$$(TARGET_DIR)  install-exec
+$(2)_INSTALL_TARGET_OPT		?= DESTDIR=$$(TARGET_DIR)  install-strip

I think you want just simple install instead of install-strip here. And if you insist on keeping install-strip then you should remove ifeq-else-endif since it is not needed anymore.

Quoted 3 lines
package/Makefile.autotools.in +0 -0
  else
  $(2)_INSTALL_TARGET_OPT		?= DESTDIR=$$(TARGET_DIR)  install-strip
  endif
#10 lore raw

PATCH 8/10 external toolchain: fix strip of libraries

In reply to llandwerlin at gmail.com

From: Lionel Landwerlin <[email protected]>

---
 toolchain/external-toolchain/ext-tool.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
toolchain/external-toolchain/ext-tool.mk +2 -2
index 1f5aa19..39faf84 100644
@@ -56,9 +56,9 @@ copy_toolchain_lib_root = \
 			elif test -f $${LIB_DIR}/$${LIB}; then \
 				$(INSTALL) -D -m0755 $${LIB_DIR}/$${LIB} $(TARGET_DIR)$${DST}/$${LIB}; \
 				case "$${STRIP}" in \
-				(0 | n | no) \
-;; \
 				(*) \
+;; \
+				(y) \
 					$(TARGET_CROSS)strip "$(TARGET_DIR)$${DST}/$${LIB}"; \
 ;; \
 				esac; \
Signature · 1 line
1.6.6
#11 lore raw

PATCH 8/10 external toolchain: fix strip of libraries

This is needed and should be included in 2010.02.

Lionel, for your next patches, would it be possible to give a slightly more detailed commit message ? Just "fix strip of libraries" is not enough to understand what you are fixing, and therefore does not make the review of your patches easy. Thanks! :-)

Quoted 24 lines · On Sun, 7 Feb 2010 17:55:40 +0100 llandwerlin at gmail.com wrote:

From: Lionel Landwerlin <[email protected]>

---
 toolchain/external-toolchain/ext-tool.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/toolchain/external-toolchain/ext-tool.mk index 1f5aa19..39faf84 100644 --- a/toolchain/external-toolchain/ext-tool.mk +++ b/toolchain/external-toolchain/ext-tool.mk

(quoted diff) +0 -0
@@ -56,9 +56,9 @@ copy_toolchain_lib_root = \
 			elif test -f $${LIB_DIR}/$${LIB}; then \
 				$(INSTALL) -D -m0755

$${LIB_DIR}/$${LIB} $(TARGET_DIR)$${DST}/$${LIB}; \ case "$${STRIP}" in \

toolchain/external-toolchain/ext-tool.mk +2 -2
-				(0 | n | no) \
-;; \
 				(*) \
+;; \
+				(y) \
 					$(TARGET_CROSS)strip

"$(TARGET_DIR)$${DST}/$${LIB}"; \ ;; \
esac; \

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

PATCH 8/10 external toolchain: fix strip of libraries

Le samedi 20 f?vrier 2010 ? 16:20 +0100, Thomas Petazzoni a ?crit :

Quoted 9 lines

This is needed and should be included in 2010.02.

Lionel, for your next patches, would it be possible to give a slightly more detailed commit message ? Just "fix strip of libraries" is not enough to understand what you are fixing, and therefore does not make the review of your patches easy. Thanks! :-)

I will, thanks for the review.

Regards,

Signature · 1 line
Lionel Landwerlin
#13 lore raw

PATCH 9/10 ext-toolchain: remove pkgconfig files from the external toolchain

In reply to llandwerlin at gmail.com

From: Lionel Landwerlin <[email protected]>

---
 toolchain/external-toolchain/ext-tool.mk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
toolchain/external-toolchain/ext-tool.mk +2 -1
index 39faf84..e72329b 100644
@@ -80,7 +80,8 @@ copy_toolchain_lib_root = \
 copy_toolchain_sysroot = \
 	SYSROOT_DIR="$(strip $1)"; \
 	cp -a $${SYSROOT_DIR}/* $(STAGING_DIR)/ ; \
-	find $(STAGING_DIR) -type d | xargs chmod 755
+	find $(STAGING_DIR) -type d | xargs chmod 755; \
+	rm -rf $(STAGING_DIR)/usr/lib/pkgconfig
 
 #
 # Check the availability of a particular glibc feature. We assume that
Signature · 1 line
1.6.6
#14 lore raw

PATCH 10/10 scripts: force copy of files to erase already present and readonly files

In reply to llandwerlin at gmail.com

From: Lionel Landwerlin <[email protected]>

---
 scripts/copy.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
scripts/copy.sh +2 -2
index 410606d..508ed56 100755
@@ -5,7 +5,7 @@ TARGET_DIR=$2
 
 echo "Copying development files to target..."
 
-cp -a ${STAGING_DIR}/usr/include ${TARGET_DIR}/usr
+cp -af ${STAGING_DIR}/usr/include ${TARGET_DIR}/usr
 
 for LIBSDIR in /lib /usr/lib; do
 	for WILDCARD in *.a *.la; do
@@ -13,7 +13,7 @@ for LIBSDIR in /lib /usr/lib; do
 			STAGING_STRIPPED=${FILE_PATH##${STAGING_DIR}}
 			EXTENDED_DIR=${STAGING_STRIPPED%/${WILDCARD}}
 			mkdir -p ${TARGET_DIR}${EXTENDED_DIR}
-			cp ${FILE_PATH} ${TARGET_DIR}${STAGING_STRIPPED}
+			cp -fa ${FILE_PATH} ${TARGET_DIR}${STAGING_STRIPPED}
 			#echo ${TARGET_DIR}${STAGING_STRIPPED}
 		done
 	done
Signature · 1 line
1.6.6