Merge pull request #2126 from lynxis/libmicrohttpd
[feed/packages.git] / libs / libvpx / Makefile
1 #
2 # Copyright (C) 2008-2015 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:=libvpx
11 PKG_VERSION:=1.5.0
12 PKG_RELEASE:=1
13
14 PKG_REV:=v$(PKG_VERSION)
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
16 PKG_SOURCE_URL:=https://chromium.googlesource.com/webm/libvpx
17 PKG_SOURCE_PROTO:=git
18 PKG_SOURCE_VERSION:=$(PKG_REV)
19 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20
21 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
22
23 PKG_LICENSE:=BSD-3-Clause
24 PKG_LICENSE_FILES:=LICENSE
25
26 PKG_INSTALL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/libvpx
31 SECTION:=libs
32 CATEGORY:=Libraries
33 TITLE:=libvpx
34 URL:=http://www.webmproject.org/
35 DEPENDS:=+libpthread
36 ABI_VERSION:=$(PKG_VERSION)
37 endef
38
39 define Package/libvpx/description
40 libvpx is a VP8/VP9 Codec SDK.
41 endef
42
43 CONFIGURE_ARGS = \
44 --target=generic-gnu \
45 --prefix=$(CONFIGURE_PREFIX) \
46 --libdir=/usr/lib \
47 --enable-static \
48 --enable-shared \
49 --disable-examples \
50 --disable-docs \
51 --disable-unit-tests \
52
53 # Add --enable-small as openwrt gcc flags are overwritten
54 ifneq ($(findstring -Os,$(TARGET_CFLAGS)),)
55 CONFIGURE_ARGS += --enable-small
56 endif
57
58 # libvpx expects gcc as linker but uses $LD if provided
59 # However, OpenWRT defines LD as *-uclibc-ld and not *-gcc
60 CONFIGURE_VARS += \
61 CROSS=$(GNU_TARGET_NAME) \
62 LD="$(TARGET_CC)" \
63
64 MAKE_FLAGS += \
65 LD="$(TARGET_CC)" \
66
67 define Build/InstallDev
68 $(INSTALL_DIR) $(1)/usr/include/vpx/
69 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/vpx/* $(1)/usr/include/vpx/
70 $(INSTALL_DIR) $(1)/usr/lib/
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} $(1)/usr/lib/
72 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
73 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
74 endef
75
76 define Package/libvpx/install
77 $(INSTALL_DIR) $(1)/usr/lib/
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
79 endef
80
81 $(eval $(call BuildPackage,libvpx))