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.3 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:=cffi
  9. PKG_VERSION:=1.8.3
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://pypi.python.org/packages/0a/f3/686af8873b70028fccf67b15c78fd4e4667a3da995007afc71e786d61b0a
  13. PKG_HASH:=c321bd46faa7847261b89c0469569530cad5a41976bb6dba8202c0159f476568
  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:=libffi/host python-pycparser/host
  17. ifdef CONFIG_PACKAGE_python-cffi
  18. HOST_BUILD_DEPENDS+=python/host
  19. endif
  20. ifdef CONFIG_PACKAGE_python3-cffi
  21. HOST_BUILD_DEPENDS+=python3/host
  22. endif
  23. PKG_LICENSE:=MIT
  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-cffi/Default
  31. SECTION:=lang
  32. CATEGORY:=Languages
  33. SUBMENU:=Python
  34. URL:=http://cffi.readthedocs.org/
  35. DEPENDS:=+libffi
  36. endef
  37. define Package/python-cffi
  38. $(call Package/python-cffi/Default)
  39. TITLE:=python-cffi
  40. DEPENDS+=+python-light +python-pycparser
  41. VARIANT:=python
  42. endef
  43. define Package/python3-cffi
  44. $(call Package/python-cffi/Default)
  45. TITLE:=python3-cffi
  46. DEPENDS+=+python3-light +python3-pycparser
  47. VARIANT:=python3
  48. endef
  49. define Package/python-cffi/description
  50. Foreign Function Interface for Python calling C code.
  51. endef
  52. define Package/python3-cffi/description
  53. $(call Package/python-cffi/description)
  54. .
  55. (Variant for Python3)
  56. endef
  57. ifdef CONFIG_PACKAGE_python-cffi
  58. define Host/Compile/python-cffi
  59. $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
  60. endef
  61. endif
  62. ifdef CONFIG_PACKAGE_python3-cffi
  63. define Host/Compile/python3-cffi
  64. $(call Build/Compile/HostPy3Mod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
  65. endef
  66. endif
  67. define Host/Compile
  68. $(call Host/Compile/python-cffi)
  69. $(call Host/Compile/python3-cffi)
  70. endef
  71. define Host/Install
  72. endef
  73. $(eval $(call HostBuild))
  74. $(eval $(call PyPackage,python-cffi))
  75. $(eval $(call BuildPackage,python-cffi))
  76. $(eval $(call Py3Package,python3-cffi))
  77. $(eval $(call BuildPackage,python3-cffi))