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.

72 lines
2.1 KiB

  1. #
  2. # Copyright (C) 2015-2018 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:=python-pycparser
  9. PKG_VERSION:=2.18
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=pycparser-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://pypi.python.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed
  13. PKG_HASH:=99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pycparser-$(PKG_VERSION)
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
  18. HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="ply==3.10"
  19. HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="ply==3.10"
  20. include $(INCLUDE_DIR)/package.mk
  21. include ../python-package.mk
  22. include ../python3-package.mk
  23. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  24. define Package/python-pycparser/Default
  25. SECTION:=lang
  26. CATEGORY:=Languages
  27. SUBMENU:=Python
  28. URL:=https://github.com/eliben/pycparser
  29. endef
  30. define Package/python-pycparser
  31. $(call Package/python-pycparser/Default)
  32. TITLE:=python-pycparser
  33. DEPENDS:=+PACKAGE_python-pycparser:python-light +PACKAGE_python-pycparser:python-ply
  34. VARIANT:=python
  35. endef
  36. define Package/python3-pycparser
  37. $(call Package/python-pycparser/Default)
  38. TITLE:=python3-pycparser
  39. DEPENDS:=+PACKAGE_python3-pycparser:python3-light +PACKAGE_python3-pycparser:python3-ply
  40. VARIANT:=python3
  41. endef
  42. define Package/python-pycparser/description
  43. pycparser is a parser for the C language, written in pure Python. It is a
  44. module designed to be easily integrated into applications that need to parse
  45. C source code.
  46. endef
  47. define Package/python3-pycparser/description
  48. $(call Package/python-pycparser/description)
  49. .
  50. (Variant for Python3)
  51. endef
  52. $(eval $(call PyPackage,python-pycparser))
  53. $(eval $(call BuildPackage,python-pycparser))
  54. $(eval $(call BuildPackage,python-pycparser-src))
  55. $(eval $(call Py3Package,python3-pycparser))
  56. $(eval $(call BuildPackage,python3-pycparser))
  57. $(eval $(call BuildPackage,python3-pycparser-src))