From: Lars-Peter Clausen Date: Tue, 6 Jan 2009 18:33:00 +0000 (+0000) Subject: Add libffi. X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;hb=68cafee55431ae15653a01c0027b77223cab421d Add libffi. SVN-Revision: 13900 --- diff --git a/libs/libffi/Makefile b/libs/libffi/Makefile new file mode 100644 index 0000000000..36e38fc4eb --- /dev/null +++ b/libs/libffi/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libffi +PKG_VERSION:=3.0.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://sourceware.org/pub/libffi/ +PKG_MD5SUM:=188a4f79fdac2310044b44b7d3918ef9 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libffi + SECTION:=libs + CATEGORY:=Libraries + TITLE:=libffi + URL:=http://sourceware.org/libffi/ +endef + +define Package/libffi/description +The libffi library provides a portable, high level programming interface to +various calling conventions. This allows a programmer to call any function +specified by a call interface description at run-time. + +FFI stands for Foreign Function Interface. A foreign function interface is the +popular name for the interface that allows code written in one language to call +code written in another language. The libffi library really only provides the +lowest, machine dependent layer of a fully featured foreign function interface. +A layer must exist above libffi that handles type conversions for values passed +between the two languages. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libffi.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + + $(INSTALL_DIR) $(1)/usr/include + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/libffi-3.0.8/include/*.h \ + $(1)/usr/include/ +endef + +define Package/libffi/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libffi.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libffi))