2 # Copyright (C) 2009-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://github.com
/libffi
/libffi
/releases
/download
/v
$(PKG_VERSION
)
16 PKG_HASH
:=b0dea9df23c863a7a50e825440f3ebffabd65df1497108e5d437747843895a4e
19 PKG_LICENSE_FILES
:=LICENSE
20 PKG_CPE_ID
:=cpe
:/a
:libffi_project
:libffi
25 PKG_BUILD_FLAGS
:=no-mips16
27 include $(INCLUDE_DIR
)/package.mk
28 include $(INCLUDE_DIR
)/host-build.mk
33 TITLE
:=Foreign Function Interface
(FFI
) library
34 URL
:=https
://sourceware.org
/libffi
/
35 MAINTAINER
:=Peter Wagner
<tripolar@gmx.at
>
38 define Package
/libffi
/description
39 The libffi library provides a portable
, high level programming interface to
40 various calling conventions. This allows a programmer to call any function
41 specified by a call interface description at run-time.
43 FFI stands for Foreign Function Interface. A foreign function interface is the
44 popular name for the interface that allows code written in one language to call
45 code written in another language. The libffi library really only provides the
46 lowest
, machine dependent layer of a fully featured foreign function interface.
47 A layer must exist above libffi that handles type conversions for values passed
48 between the two languages.
51 HOST_CONFIGURE_ARGS
+= \
54 --disable-multi-os-directory \
61 --disable-multi-os-directory \
65 define Build
/InstallDev
66 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
68 $(PKG_INSTALL_DIR
)/usr
/lib
/libffi.
{so
*,a
,la
} \
71 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
72 $(1)/usr
/lib
/pkgconfig
/
73 $(SED
) 's,includedir=.*,includedir=$$$${prefix}/include,' $(1)/usr
/lib
/pkgconfig
/libffi.
pc
75 $(INSTALL_DIR
) $(1)/usr
/include
77 $(PKG_INSTALL_DIR
)/usr
/include/*.h \
81 define Package
/libffi
/install
82 $(INSTALL_DIR
) $(1)/usr
/lib
84 $(PKG_INSTALL_DIR
)/usr
/lib
/libffi.so.
* \
88 $(eval
$(call HostBuild
))
89 $(eval
$(call BuildPackage
,libffi
))