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
:=ftp
://sourceware.org
/pub
/libffi
/
16 PKG_MD5SUM
:=83b89587607e3eb65c70d361f13bab43
19 PKG_LICENSE_FILES
:=LICENSE
25 include $(INCLUDE_DIR
)/package.mk
26 include $(INCLUDE_DIR
)/host-build.mk
31 TITLE
:=Foreign Function Interface
(FFI
) library
32 URL
:=http
://sourceware.org
/libffi
/
33 MAINTAINER
:=Peter Wagner
<tripolar@gmx.at
>
36 define Package
/libffi
/description
37 The libffi library provides a portable
, high level programming interface to
38 various calling conventions. This allows a programmer to call any function
39 specified by a call interface description at run-time.
41 FFI stands for Foreign Function Interface. A foreign function interface is the
42 popular name for the interface that allows code written in one language to call
43 code written in another language. The libffi library really only provides the
44 lowest
, machine dependent layer of a fully featured foreign function interface.
45 A layer must exist above libffi that handles type conversions for values passed
46 between the two languages.
49 CONFIGURE_PATH
= build
50 CONFIGURE_CMD
= ..
/configure
53 define Build
/Configure
54 mkdir
-p
$(PKG_BUILD_DIR
)/build
55 $(Build
/Configure
/Default
)
58 define Build
/InstallDev
59 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
61 $(PKG_INSTALL_DIR
)/usr
/lib
/libffi.
{so
*,a
,la
} \
64 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
65 $(1)/usr
/lib
/pkgconfig
/
66 sed
-i
-e
's,includedir=.*,includedir=$$$${prefix}/include,' $(1)/usr
/lib
/pkgconfig
/libffi.
pc
68 $(INSTALL_DIR
) $(1)/usr
/include
70 $(PKG_INSTALL_DIR
)/usr
/lib
/$(PKG_NAME
)-$(PKG_VERSION
)/include/*.h \
74 define Package
/libffi
/install
75 $(INSTALL_DIR
) $(1)/usr
/lib
77 $(PKG_INSTALL_DIR
)/usr
/lib
/libffi.so.
* \
81 $(eval
$(call HostBuild
))
82 $(eval
$(call BuildPackage
,libffi
))