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.

81 lines
2.1 KiB

  1. #
  2. # Copyright (C) 2009-2012 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.0.13
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=ftp://sourceware.org/pub/libffi/
  13. PKG_MD5SUM:=45f3b6dbc9ee7c7dfbbbc5feba571529
  14. PKG_LICENSE:=MIT
  15. PKG_LICENSE_FILES:=LICENSE
  16. PKG_FIXUP:=autoreconf
  17. PKG_INSTALL:=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. CONFIGURE_PATH = build
  40. CONFIGURE_CMD = ../configure
  41. MAKE_PATH = build
  42. define Build/Configure
  43. mkdir -p $(PKG_BUILD_DIR)/build
  44. $(Build/Configure/Default)
  45. endef
  46. define Build/InstallDev
  47. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  48. $(CP) \
  49. $(PKG_INSTALL_DIR)/usr/lib/libffi.{so*,a,la} \
  50. $(1)/usr/lib/
  51. $(CP) \
  52. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
  53. $(1)/usr/lib/pkgconfig/
  54. $(INSTALL_DIR) $(1)/usr/include
  55. $(CP) \
  56. $(PKG_INSTALL_DIR)/usr/lib/libffi-$(PKG_VERSION)/include/*.h \
  57. $(1)/usr/include/
  58. endef
  59. define Package/libffi/install
  60. $(INSTALL_DIR) $(1)/usr/lib
  61. $(CP) \
  62. $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* \
  63. $(1)/usr/lib/
  64. endef
  65. $(eval $(call HostBuild))
  66. $(eval $(call BuildPackage,libffi))