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