Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0 of 2] ncurses: fix hanging installation due to old version of tic (series)
@ 2011-03-28 17:16 Thomas De Schampheleire
  2011-03-28 17:16 ` [Buildroot] [PATCH 1 of 2] GENTARGETS: Allow disabling host package installation Thomas De Schampheleire
  2011-03-28 17:16 ` [Buildroot] [PATCH 2 of 2] ncurses: fix hanging installation due to old version of tic Thomas De Schampheleire
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas De Schampheleire @ 2011-03-28 17:16 UTC (permalink / raw)
  To: buildroot

During installation of ncurses, the 'tic' program from the host is used. In
some cases, this version of tic is too old for the data to be processed, and
the installation hangs indefinitely (already reported in July 2010, see [1])

With this patch, a static version of tic is built and used during the
installation step of target ncurses. This method is based on a similar fix
in Gentoo Linux (see [2] for the report and [3] for the solution).

Note that in order to build a host version of tic, I used the 'host'
infrastructure of GENTARGETS. To avoid the install step (as it is also using
the wrong tic and is really not needed) I added the recognition of
HOST_PKGFOO_INSTALL_HOST to GENTARGETS, as a separate patch.

[1] http://lists.busybox.net/pipermail/buildroot/2010-July/036100.html
[2] http://bugs.gentoo.org/show_bug.cgi?id=249363#c25
[3] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-libs/ncurses/ncurses-5.7-r2.ebuild

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 package/Makefile.package.in |   6 +++++-
 package/ncurses/ncurses.mk  |  21 ++++++++++++++++++++-
 2 files changed, 25 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1 of 2] GENTARGETS: Allow disabling host package installation
  2011-03-28 17:16 [Buildroot] [PATCH 0 of 2] ncurses: fix hanging installation due to old version of tic (series) Thomas De Schampheleire
@ 2011-03-28 17:16 ` Thomas De Schampheleire
  2011-03-28 17:16 ` [Buildroot] [PATCH 2 of 2] ncurses: fix hanging installation due to old version of tic Thomas De Schampheleire
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas De Schampheleire @ 2011-03-28 17:16 UTC (permalink / raw)
  To: buildroot

For target builds, it's already possible to enable/disable installation in the
target and staging directories. Host builds, however, are installed
unconditionally.
In some cases, installation is not appropriate; building the package is
enough. This patch checks whether the new variable HOST_PKGFOO_INSTALL_HOST
equals NO, in which case the installation is not done.
This principle is inspired by the PKGFOO_INSTALL_STAGING and
PKGFOO_INSTALL_TARGET variables, but with negative logic to suit the common
case.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 package/Makefile.package.in |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -458,7 +458,11 @@
 $(1)-install-staging:
 endif
 
-$(1)-install-host:      $(1)-build $$($(2)_TARGET_INSTALL_HOST)
+ifneq ($$($(2)_INSTALL_HOST),NO)
+$(1)-install-host:	$(1)-build $$($(2)_TARGET_INSTALL_HOST)
+else
+$(1)-install-host:	$(1)-build
+endif
 
 $(1)-build:		$(1)-configure \
 			$$($(2)_TARGET_BUILD)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 2 of 2] ncurses: fix hanging installation due to old version of tic
  2011-03-28 17:16 [Buildroot] [PATCH 0 of 2] ncurses: fix hanging installation due to old version of tic (series) Thomas De Schampheleire
  2011-03-28 17:16 ` [Buildroot] [PATCH 1 of 2] GENTARGETS: Allow disabling host package installation Thomas De Schampheleire
@ 2011-03-28 17:16 ` Thomas De Schampheleire
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas De Schampheleire @ 2011-03-28 17:16 UTC (permalink / raw)
  To: buildroot

During installation of ncurses, the 'tic' program from the host is used. In
some cases, this version of tic is too old for the data to be processed, and
the installation hangs indefinitely (already reported in July 2010, see [1])

With this patch, a static version of tic is built and used during the
installation step of target ncurses. This method is based on a similar fix
in Gentoo Linux (see [2] for the report and [3] for the solution).

[1] http://lists.busybox.net/pipermail/buildroot/2010-July/036100.html
[2] http://bugs.gentoo.org/show_bug.cgi?id=249363#c25
[3] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-libs/ncurses/ncurses-5.7-r2.ebuild

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 package/ncurses/ncurses.mk |  21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk
--- a/package/ncurses/ncurses.mk
+++ b/package/ncurses/ncurses.mk
@@ -27,6 +27,7 @@
 NCURSES_SITE = $(BR2_GNU_MIRROR)/ncurses
 NCURSES_SOURCE = ncurses-$(NCURSES_VERSION).tar.gz
 NCURSES_INSTALL_STAGING = YES
+NCURSES_DEPENDENCIES = host-ncurses
 
 NCURSES_CONF_OPT = \
 	--with-shared \
@@ -118,6 +119,24 @@
 	cp -dpf $(STAGING_DIR)/usr/share/terminfo/l/linux $(TARGET_DIR)/usr/share/terminfo/l
 	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libncurses.so*
 	$(NCURSES_INSTALL_TARGET_DEVFILES)
-endef # NCURSES_INSTALL_TARGET_CMDS
+endef
+
+#
+# On systems with an older version of tic, the installation of ncurses hangs
+# forever. To resolve the problem, build a static version of tic on host
+# ourselves, and use that during installation.
+#
+define HOST_NCURSES_BUILD_CMDS
+	$(MAKE1) -C $(@D) sources
+	$(MAKE) -C $(@D)/progs tic
+endef
+
+HOST_NCURSES_CONF_OPT = \
+	--without-shared
+
+HOST_NCURSES_INSTALL_HOST = NO
+
+NCURSES_MAKE_ENV += PATH=$(HOST_NCURSES_DIR)/progs:$(PATH)
 
 $(eval $(call AUTOTARGETS,package,ncurses))
+$(eval $(call AUTOTARGETS,package,ncurses,host))

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-28 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 17:16 [Buildroot] [PATCH 0 of 2] ncurses: fix hanging installation due to old version of tic (series) Thomas De Schampheleire
2011-03-28 17:16 ` [Buildroot] [PATCH 1 of 2] GENTARGETS: Allow disabling host package installation Thomas De Schampheleire
2011-03-28 17:16 ` [Buildroot] [PATCH 2 of 2] ncurses: fix hanging installation due to old version of tic Thomas De Schampheleire

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox