libffi: bump version to 3.0.11
[openwrt/svn-archive/archive.git] / libs / libffi / Makefile
1 #
2 # Copyright (C) 2009-2012 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.0.11
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=ftp://sourceware.org/pub/libffi/
16 PKG_MD5SUM:=f69b9693227d976835b4857b1ba7d0e3
17
18 PKG_LICENSE:=MIT
19 PKG_LICENSE_FILES:=LICENSE
20
21 PKG_FIXUP:=autoreconf
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/libffi
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=Foreign Function Interface (FFI) library
30 URL:=http://sourceware.org/libffi/
31 endef
32
33 define Package/libffi/description
34 The libffi library provides a portable, high level programming interface to
35 various calling conventions. This allows a programmer to call any function
36 specified by a call interface description at run-time.
37
38 FFI stands for Foreign Function Interface. A foreign function interface is the
39 popular name for the interface that allows code written in one language to call
40 code written in another language. The libffi library really only provides the
41 lowest, machine dependent layer of a fully featured foreign function interface.
42 A layer must exist above libffi that handles type conversions for values passed
43 between the two languages.
44 endef
45
46 CONFIGURE_PATH = build
47 CONFIGURE_CMD = ../configure
48 MAKE_PATH = build
49
50 define Build/Configure
51 mkdir -p $(PKG_BUILD_DIR)/build
52 $(Build/Configure/Default)
53 endef
54
55 define Build/InstallDev
56 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
57 $(CP) \
58 $(PKG_INSTALL_DIR)/usr/lib/libffi.{so*,a,la} \
59 $(1)/usr/lib/
60 $(CP) \
61 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
62 $(1)/usr/lib/pkgconfig/
63
64 $(INSTALL_DIR) $(1)/usr/include
65 $(CP) \
66 $(PKG_INSTALL_DIR)/usr/lib/libffi-$(PKG_VERSION)/include/*.h \
67 $(1)/usr/include/
68 endef
69
70 define Package/libffi/install
71 $(INSTALL_DIR) $(1)/usr/lib
72 $(CP) \
73 $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* \
74 $(1)/usr/lib/
75 endef
76
77 $(eval $(call BuildPackage,libffi))