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.

88 lines
2.3 KiB

  1. #
  2. # Copyright (C) 2009-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:=libffi
  9. PKG_VERSION:=3.4.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/libffi/libffi/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=0acbca9fd9c0eeed7e5d9460ae2ea945d3f1f3d48e13a4c54da12c7e0d23c313
  14. PKG_LICENSE:=MIT
  15. PKG_LICENSE_FILES:=LICENSE
  16. PKG_FIXUP:=autoreconf
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_USE_MIPS16:=0
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/host-build.mk
  22. define Package/libffi
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=Foreign Function Interface (FFI) library
  26. URL:=http://sourceware.org/libffi/
  27. MAINTAINER:=Peter Wagner <tripolar@gmx.at>
  28. endef
  29. define Package/libffi/description
  30. The libffi library provides a portable, high level programming interface to
  31. various calling conventions. This allows a programmer to call any function
  32. specified by a call interface description at run-time.
  33. FFI stands for Foreign Function Interface. A foreign function interface is the
  34. popular name for the interface that allows code written in one language to call
  35. code written in another language. The libffi library really only provides the
  36. lowest, machine dependent layer of a fully featured foreign function interface.
  37. A layer must exist above libffi that handles type conversions for values passed
  38. between the two languages.
  39. endef
  40. HOST_CONFIGURE_ARGS += \
  41. --disable-debug \
  42. --disable-docs \
  43. --disable-multi-os-directory \
  44. --disable-raw-api \
  45. --disable-structs
  46. CONFIGURE_ARGS += \
  47. --disable-debug \
  48. --disable-docs \
  49. --disable-multi-os-directory \
  50. --disable-raw-api \
  51. --disable-structs
  52. define Build/InstallDev
  53. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  54. $(CP) \
  55. $(PKG_INSTALL_DIR)/usr/lib/libffi.{so*,a,la} \
  56. $(1)/usr/lib/
  57. $(CP) \
  58. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
  59. $(1)/usr/lib/pkgconfig/
  60. $(SED) 's,includedir=.*,includedir=$$$${prefix}/include,' $(1)/usr/lib/pkgconfig/libffi.pc
  61. $(INSTALL_DIR) $(1)/usr/include
  62. $(CP) \
  63. $(PKG_INSTALL_DIR)/usr/include/*.h \
  64. $(1)/usr/include/
  65. endef
  66. define Package/libffi/install
  67. $(INSTALL_DIR) $(1)/usr/lib
  68. $(CP) \
  69. $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* \
  70. $(1)/usr/lib/
  71. endef
  72. $(eval $(call HostBuild))
  73. $(eval $(call BuildPackage,libffi))