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.

90 lines
2.4 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:=2
  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-shared \
  42. --disable-debug \
  43. --disable-docs \
  44. --disable-multi-os-directory \
  45. --disable-raw-api \
  46. --disable-structs \
  47. --with-pic
  48. CONFIGURE_ARGS += \
  49. --disable-debug \
  50. --disable-docs \
  51. --disable-multi-os-directory \
  52. --disable-raw-api \
  53. --disable-structs
  54. define Build/InstallDev
  55. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  56. $(CP) \
  57. $(PKG_INSTALL_DIR)/usr/lib/libffi.{so*,a,la} \
  58. $(1)/usr/lib/
  59. $(CP) \
  60. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
  61. $(1)/usr/lib/pkgconfig/
  62. $(SED) 's,includedir=.*,includedir=$$$${prefix}/include,' $(1)/usr/lib/pkgconfig/libffi.pc
  63. $(INSTALL_DIR) $(1)/usr/include
  64. $(CP) \
  65. $(PKG_INSTALL_DIR)/usr/include/*.h \
  66. $(1)/usr/include/
  67. endef
  68. define Package/libffi/install
  69. $(INSTALL_DIR) $(1)/usr/lib
  70. $(CP) \
  71. $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* \
  72. $(1)/usr/lib/
  73. endef
  74. $(eval $(call HostBuild))
  75. $(eval $(call BuildPackage,libffi))