You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.5 KiB

  1. #
  2. # Copyright (C) 2011 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:=luaposix
  9. PKG_VERSION:=v33.2.1
  10. PKG_RELEASE:=5
  11. PKG_SOURCE:=release-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/luaposix/luaposix/archive/
  13. PKG_HASH:=4fb34dfea67f4cf3194cdecc6614c9aea67edc3c4093d34137669ea869c358e1
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
  15. PKG_REMOVE_FILES:=aclocal.m4
  16. PKG_FIXUP:=autoreconf
  17. PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
  18. PKG_LICENSE:=MIT
  19. PKG_LICENSE_FILES:=COPYING
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/luaposix
  22. SUBMENU:=Lua
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. TITLE:=luaposix
  26. URL:=http://luaforge.net/projects/luaposix/
  27. DEPENDS:=+lua +librt
  28. PKG_BUILD_DEPENDS:=+lua/host
  29. endef
  30. define Package/luaposix/description
  31. luaposix is a general POSIX library for Lua providing access
  32. to various low level libc functions.
  33. endef
  34. CONFIGURE_VARS += ac_cv_path_LDOC="true"
  35. TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99
  36. ifeq ($(CONFIG_USE_MUSL),y)
  37. TARGET_CFLAGS += -D_POSIX_PRIORITY_SCHEDULING
  38. endif
  39. ifneq ($(CONFIG_USE_GLIBC),)
  40. ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),)
  41. TARGET_CFLAGS += -DNO_GETLOGIN
  42. endif
  43. endif
  44. define Package/luaposix/install
  45. $(INSTALL_DIR) $(1)/usr/lib/lua/posix
  46. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ext/posix/.libs/posix.so $(1)/usr/lib/lua
  47. $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix.lua $(1)/usr/lib/lua
  48. endef
  49. $(eval $(call BuildPackage,luaposix))