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.

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