libvpx: new package at version 1.3.0
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Sat, 6 Dec 2014 05:25:18 +0000 (03:25 -0200)
committerLuiz Angelo Daros de Luca <luizluca@gmail.com>
Sun, 14 Dec 2014 05:08:23 +0000 (03:08 -0200)
libvpx provides VP8/VP9 Codec SDK, "a high quality,
royalty free, open source codec deployed on millions
of computers and devices worldwide."

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
libs/libvpx/Makefile [new file with mode: 0644]
libs/libvpx/patches/001-remove_Wl.patch [new file with mode: 0644]

diff --git a/libs/libvpx/Makefile b/libs/libvpx/Makefile
new file mode 100644 (file)
index 0000000..58ad08f
--- /dev/null
@@ -0,0 +1,76 @@
+#
+# Copyright (C) 2008-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libvpx
+PKG_VERSION:=1.3.0
+PKG_RELEASE:=1
+
+PKG_REV:=v$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
+PKG_SOURCE_URL:=https://chromium.googlesource.com/webm/libvpx
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+#PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libvpx
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=libvpx
+  URL:=http://www.webmproject.org/
+  DEPENDS:=+libpthread
+endef
+
+define Package/libvpx/description
+   libvpx is a VP8/VP9 Codec SDK.
+endef
+
+CONFIGURE_ARGS = \
+               --target=generic-gnu \
+               --prefix=$(CONFIGURE_PREFIX) \
+               --libdir=/usr/lib \
+               --enable-static \
+               --enable-shared \
+        --disable-examples \
+        --disable-docs \
+        --disable-unit-tests \
+
+# Add --enable-small as openwrt gcc flags are overwritten
+ifneq ($(findstring -Os,$(TARGET_CFLAGS)),)
+CONFIGURE_ARGS += --enable-small
+endif
+
+CONFIGURE_VARS += \
+    CROSS=$(GNU_TARGET_NAME)\
+    extralibs="-lc -lgcc_s"
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/vpx/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/vpx/* $(1)/usr/include/vpx/
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libvpx/install
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libvpx))
diff --git a/libs/libvpx/patches/001-remove_Wl.patch b/libs/libvpx/patches/001-remove_Wl.patch
new file mode 100644 (file)
index 0000000..cac3d84
--- /dev/null
@@ -0,0 +1,12 @@
+--- libvpx-1.3.0/build/make/Makefile.old       2014-12-06 02:17:06.648714353 -0200
++++ libvpx-1.3.0/build/make/Makefile   2014-12-06 02:17:16.096555499 -0200
+@@ -268,8 +268,8 @@
+ $(1):
+       $(if $(quiet),@echo "    [LD] $$@")
+       $(qexec)$$(LD) -shared $$(LDFLAGS) \
+-            -Wl,--no-undefined -Wl,-soname,$$(SONAME) \
+-            -Wl,--version-script,$$(EXPORTS_FILE) -o $$@ \
++            --no-undefined -soname $$(SONAME) \
++            --version-script $$(EXPORTS_FILE) -o $$@ \
+             $$(filter %.o,$$^) $$(extralibs)
+ endef