Makefile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=pthsem
  9. PKG_VERSION:=2.0.8
  10. PKG_RELEASE:=5
  11. PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
  12. PKG_LICENSE:=LGPL-2.1+
  13. PKG_LICENSE_FILES:=COPYING
  14. PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=http://www.auto.tuwien.ac.at/~mkoegler/pth/
  16. PKG_MD5SUM:=9144b26dcc27e67498d63dd5456f934c
  17. PKG_FIXUP:=autoreconf
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_FORTIFY_SOURCE:=0
  20. PKG_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/pthsem
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=GNU pth extended with semaphore support
  26. URL:=http://www.auto.tuwien.ac.at/~mkoegler/index.php/pth
  27. endef
  28. define Package/pthsem/description
  29. GNU pth is a user mode multi threading library.
  30. pthsem is an extend version, with support for semaphores added. It can be installed parallel to a normal pth.
  31. endef
  32. # The musl libc provides a proper implementation of sigaltstack() so
  33. # prevent configure from wrongly assuming a broken Linux platform
  34. ifeq ($(CONFIG_USE_MUSL),y)
  35. CONFIGURE_VARS += \
  36. ac_cv_check_sjlj=ssjlj
  37. endif
  38. define Build/InstallDev
  39. $(INSTALL_DIR) $(1)/usr/bin
  40. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pthsem-config $(1)/usr/bin/
  41. $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/pthsem-config
  42. $(INSTALL_DIR) $(1)/usr/include
  43. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  44. $(INSTALL_DIR) $(1)/usr/lib
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpthsem.{a,la,so*} $(1)/usr/lib/
  46. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/pthsem.pc $(1)/usr/lib/pkgconfig/
  48. $(INSTALL_DIR) $(2)/bin
  49. $(LN) ../../usr/bin/pthsem-config $(2)/bin/
  50. endef
  51. define Package/pthsem/install
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpthsem.so.* $(1)/usr/lib/
  54. endef
  55. $(eval $(call BuildPackage,pthsem))