Patchwork [1/2] xlib_libpthread-stubs: Rename package to libpthread-stubs

login
register
mail settings
Submitter Paul Cercueil
Date Dec. 20, 2013, 3:33 p.m.
Message ID <1387553624-6780-2-git-send-email-paul@crapouillou.net>
Download mbox | patch
Permalink /patch/304117/
State Superseded
Headers show

Comments

Paul Cercueil - Dec. 20, 2013, 3:33 p.m.
While libpthread-stubs is part of the X libraries, it does not
depend upon X11 or any other X library. On the current architecture,
X11 must be enabled for this package to be selectionned; this commit
aims to address this problem.

Signed-Off-By: Paul Cercueil <paul@crapouillou.net>
---
 Config.in.legacy                                     | 15 ++++++++++++---
 package/Config.in                                    |  1 +
 package/libpthread-stubs/Config.in                   | 11 +++++++++++
 package/libpthread-stubs/libpthread-stubs.mk         | 20 ++++++++++++++++++++
 package/x11r7/Config.in                              |  1 -
 package/x11r7/libxcb/Config.in                       |  2 +-
 package/x11r7/libxcb/libxcb.mk                       |  2 +-
 package/x11r7/xlib_libpthread-stubs/Config.in        | 11 -----------
 .../xlib_libpthread-stubs/xlib_libpthread-stubs.mk   | 20 --------------------
 9 files changed, 46 insertions(+), 37 deletions(-)
 create mode 100644 package/libpthread-stubs/Config.in
 create mode 100644 package/libpthread-stubs/libpthread-stubs.mk
 delete mode 100644 package/x11r7/xlib_libpthread-stubs/Config.in
 delete mode 100644 package/x11r7/xlib_libpthread-stubs/xlib_libpthread-stubs.mk

Patch

diff --git a/Config.in.legacy b/Config.in.legacy
index 09935f1..97edb01 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -382,11 +382,20 @@  config BR2_PACKAGE_XSERVER_tinyx
 config BR2_PACKAGE_PTHREAD_STUBS
 	bool "pthread-stubs option has been renamed"
 	select BR2_LEGACY
-	select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
-	depends on BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_LIBPTHREAD_STUBS
 	help
 	  For consistency reason, the pthread-stubs package has been
-	  renamed to xlib_libpthread-stubs.
+	  renamed to libpthread-stubs.
+
+config BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
+	bool "xlib-libpthread-stubs option has been renamed"
+	depends on BR2_PACKAGE_XORG7
+	select BR2_LEGACY
+	select BR2_PACKAGE_LIBPTHREAD_STUBS
+	help
+	  The pthread stubs do not depend on X11 nor Xlib. Thus the
+	  package has been renamed
+	  BR2_PACKAGE_LIBPTHREAD_STUBS
 
 ###############################################################################
 comment "Legacy options removed in 2012.08"
diff --git a/package/Config.in b/package/Config.in
index 311cc6c..e6ccc6a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -698,6 +698,7 @@  source "package/libical/Config.in"
 source "package/liblog4c-localtime/Config.in"
 source "package/libnspr/Config.in"
 source "package/libpfm4/Config.in"
+source "package/libpthread-stubs/Config.in"
 source "package/libpthsem/Config.in"
 source "package/libseccomp/Config.in"
 source "package/libsigc/Config.in"
diff --git a/package/libpthread-stubs/Config.in b/package/libpthread-stubs/Config.in
new file mode 100644
index 0000000..a4ce1cb
--- /dev/null
+++ b/package/libpthread-stubs/Config.in
@@ -0,0 +1,11 @@ 
+config BR2_PACKAGE_LIBPTHREAD_STUBS
+	bool "libpthread-stubs"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	help
+	  This library provides weak aliases for pthread functions not
+	  provided in libc or otherwise available by default.
+
+	  http://xcb.freedesktop.org/
+
+comment "libpthread-stubs needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/libpthread-stubs/libpthread-stubs.mk b/package/libpthread-stubs/libpthread-stubs.mk
new file mode 100644
index 0000000..b72e5a6
--- /dev/null
+++ b/package/libpthread-stubs/libpthread-stubs.mk
@@ -0,0 +1,20 @@ 
+################################################################################
+#
+# libpthread-stubs
+#
+################################################################################
+
+LIBPTHREAD_STUBS_VERSION = 0.3
+LIBPTHREAD_STUBS_SOURCE = libpthread-stubs-$(LIBPTHREAD_STUBS_VERSION).tar.bz2
+LIBPTHREAD_STUBS_SITE = http://xcb.freedesktop.org/dist/
+LIBPTHREAD_STUBS_LICENSE = MIT
+LIBPTHREAD_STUBS_LICENSE_FILES = COPYING
+
+LIBPTHREAD_STUBS_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+LIBPTHREAD_STUBS_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -pthread"
+endif
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
diff --git a/package/x11r7/Config.in b/package/x11r7/Config.in
index a534df9..fb0f8ed 100644
--- a/package/x11r7/Config.in
+++ b/package/x11r7/Config.in
@@ -52,7 +52,6 @@  if BR2_PACKAGE_XORG7
 		source package/x11r7/xlib_libxkbfile/Config.in
 		source package/x11r7/xlib_xtrans/Config.in
 		source package/x11r7/xlib_libpciaccess/Config.in
-		source package/x11r7/xlib_libpthread-stubs/Config.in
 	endmenu
 	menu "X11R7 Applications"
 		source package/x11r7/xapp_appres/Config.in
diff --git a/package/x11r7/libxcb/Config.in b/package/x11r7/libxcb/Config.in
index 1e1afb4..32569f7 100644
--- a/package/x11r7/libxcb/Config.in
+++ b/package/x11r7/libxcb/Config.in
@@ -1,6 +1,6 @@ 
 config BR2_PACKAGE_LIBXCB
 	bool "libxcb"
-	select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
+	select BR2_PACKAGE_LIBPTHREAD_STUBS
 	select BR2_PACKAGE_XCB_PROTO
 	select BR2_PACKAGE_XLIB_LIBXDMCP
 	select BR2_PACKAGE_XLIB_LIBXAU
diff --git a/package/x11r7/libxcb/libxcb.mk b/package/x11r7/libxcb/libxcb.mk
index dfcf6fa..22197e3 100644
--- a/package/x11r7/libxcb/libxcb.mk
+++ b/package/x11r7/libxcb/libxcb.mk
@@ -13,7 +13,7 @@  LIBXCB_LICENSE_FILES = COPYING
 LIBXCB_INSTALL_STAGING = YES
 
 LIBXCB_DEPENDENCIES = \
-	host-libxslt xlib_libpthread-stubs xcb-proto xlib_libXdmcp xlib_libXau \
+	host-libxslt libpthread-stubs xcb-proto xlib_libXdmcp xlib_libXau \
 	host-xcb-proto host-python host-pkgconf
 LIBXCB_CONF_ENV = STAGING_DIR="$(STAGING_DIR)"
 LIBXCB_MAKE_OPT = XCBPROTO_XCBINCLUDEDIR=$(STAGING_DIR)/usr/share/xcb \
diff --git a/package/x11r7/xlib_libpthread-stubs/Config.in b/package/x11r7/xlib_libpthread-stubs/Config.in
deleted file mode 100644
index 6ce1b94..0000000
--- a/package/x11r7/xlib_libpthread-stubs/Config.in
+++ /dev/null
@@ -1,11 +0,0 @@ 
-config BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
-	bool "libpthread-stubs"
-	depends on BR2_TOOLCHAIN_HAS_THREADS
-	help
-	  This library provides weak aliases for pthread functions not
-	  provided in libc or otherwise available by default.
-
-	  http://xcb.freedesktop.org/
-
-comment "libpthread-stubs needs a toolchain w/ threads"
-	depends on !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/x11r7/xlib_libpthread-stubs/xlib_libpthread-stubs.mk b/package/x11r7/xlib_libpthread-stubs/xlib_libpthread-stubs.mk
deleted file mode 100644
index 6343691..0000000
--- a/package/x11r7/xlib_libpthread-stubs/xlib_libpthread-stubs.mk
+++ /dev/null
@@ -1,20 +0,0 @@ 
-################################################################################
-#
-# xlib_libpthread-stubs
-#
-################################################################################
-
-XLIB_LIBPTHREAD_STUBS_VERSION = 0.3
-XLIB_LIBPTHREAD_STUBS_SOURCE = libpthread-stubs-$(XLIB_LIBPTHREAD_STUBS_VERSION).tar.bz2
-XLIB_LIBPTHREAD_STUBS_SITE = http://xcb.freedesktop.org/dist/
-XLIB_LIBPTHREAD_STUBS_LICENSE = MIT
-XLIB_LIBPTHREAD_STUBS_LICENSE_FILES = COPYING
-
-XLIB_LIBPTHREAD_STUBS_INSTALL_STAGING = YES
-
-ifeq ($(BR2_PREFER_STATIC_LIB),y)
-XLIB_LIBPTHREAD_STUBS_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -pthread"
-endif
-
-$(eval $(autotools-package))
-$(eval $(host-autotools-package))