From: florian Date: Sun, 11 Nov 2007 20:01:52 +0000 (+0000) Subject: Add liboil X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=b9cbe894a1f0d3d6edd0147c935f0c988fe04ef4;p=packages.git Add liboil git-svn-id: svn://svn.openwrt.org/openwrt/packages@9541 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/libs/liboil/Makefile b/libs/liboil/Makefile new file mode 100644 index 000000000..7722e3ec5 --- /dev/null +++ b/libs/liboil/Makefile @@ -0,0 +1,78 @@ +# +# Copyright (C) 2007 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:=liboil +PKG_VERSION:=0.3.12 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://liboil.freedesktop.org/download/ +PKG_MD5SUM:=96ee4c627ffb0db3999cef3c7454b1d9 + +include $(INCLUDE_DIR)/package.mk + +define Package/liboil + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libnotimpl + TITLE:=simple functions optimized for various CPUs + URL:=http://liboil.freedesktop.org/wiki/ +endef + +define Package/liboil/description + Liboil is a library of simple functions that are optimized for various CPUs. + These functions are generally loops implementing simple algorithms, such as + converting an array of N integers to floating-point numbers or multiplying + and summing an array of N numbers. Such functions are candidates for significant + optimization using various techniques, especially by using extended instructions + provided by modern CPUs (Altivec, MMX, SSE, etc.). +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + +define Build/Configure + $(call Build/Configure/Default, \ + , \ + LIBS="-lnotimpl" \ + ac_cv_lib_m_rintf=no \ + ) + $(call libtool_disable_rpath) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) all + $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR)) + $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install +endef + +define Build/InstallDev + mkdir -p $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/liboil-0.3/ $(1)/usr/include/ + mkdir -p $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liboil-0.3.{a,so*} $(1)/usr/lib/ + mkdir -p $(1)/usr/lib/pkgconfig + $(CP) $(PKG_BUILD_DIR)/liboil.pc $(1)/usr/lib/pkgconfig/ + $(SED) 's,$(TARGET_LDFLAGS),,g' $(1)/usr/lib/pkgconfig/liboil.pc +endef + +define Build/UninstallDev + rm -rf $(STAGING_DIR)/usr/include/liboil-0.3 \ + $(STAGING_DIR)/usr/lib/liboil-0.3.{a,so*} \ + $(STAGING_DIR)/usr/lib/pkgconfig/liboil.pc +endef + +define Package/liboil/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liboil-0.3.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,liboil))