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