noddos: Noddos v0.5.0 with mDNS / DNS-SD support
[feed/packages.git] / libs / pthsem / Makefile
1 #
2 # Copyright (C) 2008-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=pthsem
11 PKG_VERSION:=2.0.8
12 PKG_RELEASE:=5
13
14 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
15 PKG_LICENSE:=LGPL-2.1+
16 PKG_LICENSE_FILES:=COPYING
17
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
21
22 PKG_FIXUP:=autoreconf
23 PKG_BUILD_PARALLEL:=1
24 PKG_FORTIFY_SOURCE:=0
25 PKG_INSTALL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/pthsem
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=GNU pth extended with semaphore support
33 URL:=http://www.auto.tuwien.ac.at/~mkoegler/index.php/pth
34 endef
35
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.
39 endef
40
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)
44 CONFIGURE_VARS += \
45 ac_cv_check_sjlj=ssjlj
46 endif
47
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
52
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/
61 endef
62
63 define Package/pthsem/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpthsem.so.* $(1)/usr/lib/
66 endef
67
68 $(eval $(call BuildPackage,pthsem))