2 # Copyright (C) 2008-2015 OpenWrt.org
3 # Copyright (C) 2016 Luiz Angelo Daros de Luca
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_REV
:=v
$(PKG_VERSION
)
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_REV
).
tar.gz
17 PKG_SOURCE_URL
:=https
://chromium.googlesource.com
/webm
/libvpx
19 PKG_SOURCE_VERSION
:=$(PKG_REV
)
20 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
22 PKG_MAINTAINER
:=Luiz Angelo Daros de Luca
<luizluca@gmail.com
>
24 PKG_LICENSE
:=BSD-3-Clause
25 PKG_LICENSE_FILES
:=LICENSE
27 PKG_ABI_VERSION
:=$(subst $(space
),.
,$(wordlist
1, 2, $(subst .
,$(space
),$(PKG_VERSION
))))
31 include $(INCLUDE_DIR
)/package.mk
37 URL
:=http
://www.webmproject.org
/
39 ABI_VERSION
:=$(PKG_ABI_VERSION
)
42 define Package
/libvpx
/description
43 libvpx is a VP8
/VP9 Codec SDK.
47 --target
=generic-gnu \
48 --prefix=$(CONFIGURE_PREFIX
) \
54 --disable-unit-tests \
56 # Add --enable-small as openwrt gcc flags are overwritten
57 ifneq ($(findstring -Os
,$(TARGET_CFLAGS
)),)
58 CONFIGURE_ARGS
+= --enable-small
61 # libvpx expects gcc as linker but uses $LD if provided
62 # However, OpenWRT defines LD as *-uclibc-ld and not *-gcc
64 CROSS
=$(GNU_TARGET_NAME
) \
70 define Build
/InstallDev
71 $(INSTALL_DIR
) $(1)/usr
/include/vpx
/
72 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/include/vpx
/* $(1)/usr
/include/vpx
/
73 $(INSTALL_DIR
) $(1)/usr
/lib
/
74 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.
{so
*,a
} $(1)/usr
/lib
/
75 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
/
76 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* $(1)/usr
/lib
/pkgconfig
/
79 define Package
/libvpx
/install
80 $(INSTALL_DIR
) $(1)/usr
/lib
/
81 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.so.
* $(1)/usr
/lib
/
84 $(eval
$(call BuildPackage
,libvpx
))