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
://codeload.github.com
/libffi
/libffi
/tar.gz
/v
$(PKG_VERSION
)?
16 PKG_HASH
:=0acbca9fd9c0eeed7e5d9460ae2ea945d3f1f3d48e13a4c54da12c7e0d23c313
19 PKG_LICENSE_FILES
:=LICENSE
24 PKG_BUILD_FLAGS
:=no-mips16
26 include $(INCLUDE_DIR
)/package.mk
27 include $(INCLUDE_DIR
)/host-build.mk
32 TITLE
:=Foreign Function Interface
(FFI
) library
33 URL
:=http
://sourceware.org
/libffi
/
34 MAINTAINER
:=Peter Wagner
<tripolar@gmx.at
>
37 define Package
/libffi
/description
38 The libffi library provides a portable
, high level programming interface to
39 various calling conventions. This allows a programmer to call any function
40 specified by a call interface description at run-time.
42 FFI stands for Foreign Function Interface. A foreign function interface is the
43 popular name for the interface that allows code written in one language to call
44 code written in another language. The libffi library really only provides the
45 lowest
, machine dependent layer of a fully featured foreign function interface.
46 A layer must exist above libffi that handles type conversions for values passed
47 between the two languages.
50 HOST_CONFIGURE_ARGS
+= \
54 --disable-multi-os-directory \
62 --disable-multi-os-directory \
66 define Build
/InstallDev
67 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
69 $(PKG_INSTALL_DIR
)/usr
/lib
/libffi.
{so
*,a
,la
} \
72 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
73 $(1)/usr
/lib
/pkgconfig
/
74 $(SED
) 's,includedir=.*,includedir=$$$${prefix}/include,' $(1)/usr
/lib
/pkgconfig
/libffi.
pc
76 $(INSTALL_DIR
) $(1)/usr
/include
78 $(PKG_INSTALL_DIR
)/usr
/include/*.h \
82 define Package
/libffi
/install
83 $(INSTALL_DIR
) $(1)/usr
/lib
85 $(PKG_INSTALL_DIR
)/usr
/lib
/libffi.so.
* \
89 $(eval
$(call HostBuild
))
90 $(eval
$(call BuildPackage
,libffi
))