Merge pull request #4708 from commodo/python-cffi-fix
[feed/packages.git] / libs / liboil / Makefile
1 #
2 # Copyright (C) 2007-2014 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:=liboil
11 PKG_VERSION:=0.3.17
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://liboil.freedesktop.org/download/
16 PKG_HASH:=105f02079b0b50034c759db34b473ecb5704ffa20a5486b60a8b7698128bfc69
17
18 PKG_LICENSE:=FREE
19 PKG_LICENSE_FILES:=COPYING
20
21 PKG_FIXUP:=autoreconf
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25 include $(INCLUDE_DIR)/nls.mk
26
27 define Package/liboil
28 SECTION:=libs
29 CATEGORY:=Libraries
30 TITLE:=simple functions optimized for various CPUs
31 URL:=http://liboil.freedesktop.org/wiki/
32 MAINTAINER:=W. Michael Petullo <mike@flyn.org>
33 DEPENDS:=+librt $(ICONV_DEPENDS) $(INTL_DEPENDS)
34 endef
35
36 define Package/liboil/description
37 Liboil is a library of simple functions that are optimized for various CPUs.
38 These functions are generally loops implementing simple algorithms, such as
39 converting an array of N integers to floating-point numbers or multiplying
40 and summing an array of N numbers. Such functions are candidates for significant
41 optimization using various techniques, especially by using extended instructions
42 provided by modern CPUs (Altivec, MMX, SSE, etc.).
43 endef
44
45 CONFIGURE_ARGS += \
46 --enable-shared \
47 --enable-static \
48
49 TARGET_CFLAGS += $(FPIC) $(if $(ICONV_FULL),-liconv) $(if $(INTL_FULL),-lintl)
50
51 # XXX: VFP_CFLAGS is set to '-mfpu=vfp' on arm by configure, but that breaks
52 # final linking stages, so override it until we find why
53 MAKE_FLAGS += \
54 VFP_CFLAGS="" \
55
56 define Build/InstallDev
57 $(INSTALL_DIR) $(1)/usr/include
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/liboil-0.3/* $(1)/usr/include/
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liboil-0.3.{a,so*} $(1)/usr/lib/
61 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/liboil-0.3.pc $(1)/usr/lib/pkgconfig/
63 endef
64
65 define Package/liboil/install
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liboil-0.3.so.* $(1)/usr/lib/
68 endef
69
70 $(eval $(call BuildPackage,liboil))