libupnp: update to 1.14.18
[feed/packages.git] / libs / libffi / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libffi
11 PKG_VERSION:=3.4.4
12 PKG_RELEASE:=1
13
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:=d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676
17
18 PKG_LICENSE:=MIT
19 PKG_LICENSE_FILES:=LICENSE
20 PKG_CPE_ID:=cpe:/a:libffi_project:libffi
21
22 PKG_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25 PKG_BUILD_FLAGS:=no-mips16
26
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/host-build.mk
29
30 define Package/libffi
31 SECTION:=libs
32 CATEGORY:=Libraries
33 TITLE:=Foreign Function Interface (FFI) library
34 URL:=https://sourceware.org/libffi/
35 MAINTAINER:=Peter Wagner <tripolar@gmx.at>
36 endef
37
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.
42
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.
49 endef
50
51 HOST_CONFIGURE_ARGS += \
52 --disable-shared \
53 --disable-docs \
54 --disable-multi-os-directory \
55 --disable-raw-api \
56 --disable-structs \
57 --with-pic
58
59 CONFIGURE_ARGS += \
60 --disable-docs \
61 --disable-multi-os-directory \
62 --disable-raw-api \
63 --disable-structs
64
65 define Build/InstallDev
66 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
67 $(CP) \
68 $(PKG_INSTALL_DIR)/usr/lib/libffi.{so*,a,la} \
69 $(1)/usr/lib/
70 $(CP) \
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
74
75 $(INSTALL_DIR) $(1)/usr/include
76 $(CP) \
77 $(PKG_INSTALL_DIR)/usr/include/*.h \
78 $(1)/usr/include/
79 endef
80
81 define Package/libffi/install
82 $(INSTALL_DIR) $(1)/usr/lib
83 $(CP) \
84 $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* \
85 $(1)/usr/lib/
86 endef
87
88 $(eval $(call HostBuild))
89 $(eval $(call BuildPackage,libffi))