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.

97 lines
2.5 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:=pycparser
  9. PKG_VERSION:=2.14
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pycparser
  13. PKG_HASH:=7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73
  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:=python-ply/host
  17. ifdef CONFIG_PACKAGE_python-pycparser
  18. HOST_BUILD_DEPENDS+=python/host
  19. endif
  20. ifdef CONFIG_PACKAGE_python3-pycparser
  21. HOST_BUILD_DEPENDS+=python3/host
  22. endif
  23. PKG_LICENSE:=BSD-3-Clause
  24. PKG_LICENSE_FILES:=LICENSE
  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-pycparser/Default
  31. SECTION:=lang
  32. CATEGORY:=Languages
  33. SUBMENU:=Python
  34. URL:=https://github.com/eliben/pycparser
  35. endef
  36. define Package/python-pycparser
  37. $(call Package/python-pycparser/Default)
  38. TITLE:=python-pycparser
  39. DEPENDS:=+python-light +python-ply
  40. VARIANT:=python
  41. endef
  42. define Package/python3-pycparser
  43. $(call Package/python-pycparser/Default)
  44. TITLE:=python3-pycparser
  45. DEPENDS:=+python3-light +python3-ply
  46. VARIANT:=python3
  47. endef
  48. define Package/python-pycparser/description
  49. pycparser is a parser for the C language, written in pure Python. It is a
  50. module designed to be easily integrated into applications that need to parse
  51. C source code.
  52. endef
  53. define Package/python3-pycparser/description
  54. $(call Package/python-pycparser/description)
  55. .
  56. (Variant for Python3)
  57. endef
  58. ifdef CONFIG_PACKAGE_python-pycparser
  59. define Host/Compile/python-pycparser
  60. $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
  61. endef
  62. endif
  63. ifdef CONFIG_PACKAGE_python3-pycparser
  64. define Host/Compile/python3-pycparser
  65. $(call Build/Compile/HostPy3Mod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
  66. endef
  67. endif
  68. define Host/Compile
  69. $(call Host/Compile/python-pycparser)
  70. $(call Host/Compile/python3-pycparser)
  71. endef
  72. define Host/Install
  73. endef
  74. $(eval $(call HostBuild))
  75. $(eval $(call PyPackage,python-pycparser))
  76. $(eval $(call BuildPackage,python-pycparser))
  77. $(eval $(call Py3Package,python3-pycparser))
  78. $(eval $(call BuildPackage,python3-pycparser))