2 # Copyright (C) 2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=libpthread-stubs
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=http
://xcb.freedesktop.org
/dist/
16 PKG_MD5SUM
:=774eabaf33440d534efe108ef9130a7d
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/libpthread-stubs
24 TITLE
:=libpthread-stubs
25 URL
:=http
://xcb.freedesktop.org
/
28 define Package
/libpthread-stubs
/description
29 This library provides weak aliases for pthread functions not provided in libc
30 or otherwise available by default. Libraries like libxcb rely on pthread
31 stubs to use pthreads optionally
, becoming thread-safe when linked to
32 libpthread
, while avoiding any performance hit when running single-threaded.
33 libpthread-stubs supports this behavior even on platforms which do not supply
34 all the necessary pthread stubs. On platforms which already supply
all the
35 necessary pthread stubs
, this package ships only the pkg-config file
36 pthread-stubs.
pc, to allow libraries to unconditionally express a dependency
37 on pthread-stubs and still obtain correct behavior.
40 define Build
/InstallDev
41 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
43 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
44 $(1)/usr
/lib
/pkgconfig
/
47 define Package
/libpthread-stubs
/install
51 $(eval
$(call BuildPackage
,libpthread-stubs
))