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.

96 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2015-2016 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:=ply
  9. PKG_VERSION:=3.9
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.dabeaz.com/ply
  13. PKG_HASH:=0d7e2940b9c57151392fceaa62b0865c45e06ce1e36687fd8d03f011a907f43e
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  16. HOST_BUILD_DEPENDS:=
  17. ifdef CONFIG_PACKAGE_python-ply
  18. HOST_BUILD_DEPENDS+=python/host
  19. endif
  20. ifdef CONFIG_PACKAGE_python3-ply
  21. HOST_BUILD_DEPENDS+=python3/host
  22. endif
  23. PKG_LICENSE:=BSD-3-Clause
  24. PKG_LICENSE_FILES:=README.md
  25. PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
  26. include $(INCLUDE_DIR)/host-build.mk
  27. include $(INCLUDE_DIR)/package.mk
  28. $(call include_mk, python-package.mk)
  29. $(call include_mk, python3-package.mk)
  30. define Package/python-ply/Default
  31. SECTION:=lang
  32. CATEGORY:=Languages
  33. SUBMENU:=Python
  34. URL:=http://www.dabeaz.com/ply/
  35. endef
  36. define Package/python-ply
  37. $(call Package/python-ply/Default)
  38. TITLE:=python-ply
  39. DEPENDS:=+python-light
  40. VARIANT:=python
  41. endef
  42. define Package/python3-ply
  43. $(call Package/python-ply/Default)
  44. TITLE:=python3-ply
  45. DEPENDS:=+python3-light
  46. VARIANT:=python3
  47. endef
  48. define Package/python-ply/description
  49. PLY is a 100% Python implementation of the common parsing tools lex
  50. and yacc.
  51. endef
  52. define Package/python3-ply/description
  53. $(call Package/python-ply/description)
  54. .
  55. (Variant for Python3)
  56. endef
  57. ifdef CONFIG_PACKAGE_python-ply
  58. define Host/Compile/python-ply
  59. $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
  60. endef
  61. endif
  62. ifdef CONFIG_PACKAGE_python3-ply
  63. define Host/Compile/python3-ply
  64. $(call Build/Compile/HostPy3Mod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
  65. endef
  66. endif
  67. define Host/Compile
  68. $(call Host/Compile/python-ply)
  69. $(call Host/Compile/python3-ply)
  70. endef
  71. define Host/Install
  72. endef
  73. $(eval $(call HostBuild))
  74. $(eval $(call PyPackage,python-ply))
  75. $(eval $(call BuildPackage,python-ply))
  76. $(eval $(call Py3Package,python3-ply))
  77. $(eval $(call BuildPackage,python3-ply))