2 # Copyright (C) 2008-2015 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
14 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
15 PKG_LICENSE:=LGPL-2.1+
16 PKG_LICENSE_FILES:=COPYING
18 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
19 PKG_SOURCE_URL:=http://www.auto.tuwien.ac.at/~mkoegler/pth/
20 PKG_MD5SUM:=9144b26dcc27e67498d63dd5456f934c
27 include $(INCLUDE_DIR)/package.mk
32 TITLE:=GNU pth extended with semaphore support
33 URL:=http://www.auto.tuwien.ac.at/~mkoegler/index.php/pth
36 define Package/pthsem/description
37 GNU pth is a user mode multi threading library.
38 pthsem is an extend version, with support for semaphores added. It can be installed parallel to a normal pth.
41 # The musl libc provides a proper implementation of sigaltstack() so
42 # prevent configure from wrongly assuming a broken Linux platform
43 ifeq ($(CONFIG_USE_MUSL),y)
45 ac_cv_check_sjlj=ssjlj
48 define Build/InstallDev
49 $(INSTALL_DIR) $(1)/usr/bin
50 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pthsem-config $(1)/usr/bin/
51 $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/pthsem-config
53 $(INSTALL_DIR) $(1)/usr/include
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
55 $(INSTALL_DIR) $(1)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpthsem.{a,la,so*} $(1)/usr/lib/
57 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/pthsem.pc $(1)/usr/lib/pkgconfig/
59 $(INSTALL_DIR) $(2)/bin
60 $(LN) ../../usr/bin/pthsem-config $(2)/bin/
63 define Package/pthsem/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpthsem.so.* $(1)/usr/lib/
68 $(eval $(call BuildPackage,pthsem))