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
/
29 define Package
/libpthread-stubs
/description
30 This library provides weak aliases for pthread functions not provided in libc
31 or otherwise available by default. Libraries like libxcb rely on pthread
32 stubs to use pthreads optionally
, becoming thread-safe when linked to
33 libpthread
, while avoiding any performance hit when running single-threaded.
34 libpthread-stubs supports this behavior even on platforms which do not supply
35 all the necessary pthread stubs. On platforms which already supply
all the
36 necessary pthread stubs
, this package ships only the pkg-config file
37 pthread-stubs.
pc, to allow libraries to unconditionally express a dependency
38 on pthread-stubs and still obtain correct behavior.
41 define Build
/InstallDev
42 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
44 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
45 $(1)/usr
/lib
/pkgconfig
/
48 $(eval
$(call BuildPackage
,libpthread-stubs
))