import of the Google/ON2 VP8 codec, from brad

This commit is contained in:
ckuethe 2010-10-04 23:56:16 +00:00
parent 66b4f9421b
commit c5ea56e937
18 changed files with 303 additions and 0 deletions

View File

@ -0,0 +1,73 @@
# $OpenBSD: Makefile,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
COMMENT= Google VP8 video codec
V= 0.9.2
DISTNAME= libvpx-v${V}
PKGNAME= libvpx-${V}
CATEGORIES= multimedia
MASTER_SITES= http://webm.googlecode.com/files/
EXTRACT_SUFX= .tar.bz2
SHARED_LIBS= vpx 0.0
HOMEPAGE= http://www.webmproject.org/
MAINTAINER= Brad Smith <brad@comstyle.com>
# BSD
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c m pthread
BUILD_DEPENDS+= ::shells/bash
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
BUILD_DEPENDS+= ::devel/yasm
.endif
BASH= ${LOCALBASE}/bin/bash
SUBST_VARS= BASH
MAKE_FLAGS= LIBVPX_VERSION=${LIBvpx_VERSION} verbose=yes
USE_GMAKE= Yes
CONFIGURE_STYLE= simple
CONFIGURE_ARGS+=--prefix=${PREFIX} \
--disable-optimizations
NO_REGRESS= Yes
WRKDIST= ${WRKDIR}/libvpx-${V}
ALL_TARGET=
SUBST_FILES= build/make/armlink_adapter.sh \
build/make/configure.sh \
build/make/gen_asm_deps.sh \
build/make/gen_msvs_def.sh \
build/make/gen_msvs_proj.sh \
build/make/gen_msvs_sln.sh \
build/make/version.sh \
configure \
examples/gen_example_code.sh \
examples/gen_example_text.sh \
release.sh
pre-configure:
@cd ${WRKDIST} && ${SUBST_CMD} ${SUBST_FILES}
post-install:
@chown ${BINOWN}:${BINGRP} ${PREFIX}/bin/*
@chown ${SHAREOWN}:${SHAREGRP} ${PREFIX}/include/vpx/*.h
@chown ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/lib*
.include <bsd.port.mk>
.if ${NO_SHARED_LIBS:L} == "no"
CONFIGURE_ENV+= CFLAGS+=-fPIC
CONFIGURE_ARGS+=--enable-shared \
--enable-pic
.endif

View File

@ -0,0 +1,5 @@
MD5 (libvpx-v0.9.2.tar.bz2) = YJNwklsnSuqinpT8NMdJVw==
RMD160 (libvpx-v0.9.2.tar.bz2) = WCCvP/Z2tVf3OjAPab1mB2Co98w=
SHA1 (libvpx-v0.9.2.tar.bz2) = 07OGdzqhHiOFgpwHjVKzo5gtESI=
SHA256 (libvpx-v0.9.2.tar.bz2) = dCWFPQZEOgzo6c/HzTsKQyKLIsENyoE9por5sRRRCzs=
SIZE (libvpx-v0.9.2.tar.bz2) = 1197094

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-build_make_Makefile,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
--- build/make/Makefile.orig Thu Sep 2 14:56:47 2010
+++ build/make/Makefile Sat Sep 25 16:48:26 2010
@@ -222,8 +222,7 @@ define so_template
# This needs further abstraction for dealing with non-GNU linkers.
$(1):
$(if $(quiet),@echo " [LD] $$@")
- $(qexec)$$(LD) -shared $$(LDFLAGS) \
- -Wl,--no-undefined -Wl,-soname,$$(SONAME) \
+ $(qexec)$$(CC) -shared -fPIC $$(LDFLAGS) \
-Wl,--version-script,$$(SO_VERSION_SCRIPT) -o $$@ \
$$(filter %.o,$$?) $$(extralibs)
endef
@@ -291,7 +290,7 @@ LIBS=$(call enabled,LIBS)
.libs: $(LIBS)
@touch $@
$(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib))))
-$(foreach lib,$(filter %so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib))))
+$(foreach lib,$(filter %so.$(LIBVPX_VERSION),$(LIBS)),$(eval $(call so_template,$(lib))))
INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS)
ifeq ($(MAKECMDGOALS),dist)

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-build_make_armlink_adapter_sh,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
--- build/make/armlink_adapter.sh.orig Thu Sep 2 11:56:47 2010
+++ build/make/armlink_adapter.sh Wed Sep 22 15:04:39 2010
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!${BASH}
##
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
##

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-build_make_configure_sh,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
--- build/make/configure.sh.orig Thu Sep 2 14:56:47 2010
+++ build/make/configure.sh Sat Sep 25 17:14:07 2010
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!${BASH}
##
## configure.sh
##
@@ -812,8 +812,6 @@ process_common_toolchain() {
esac
;;
gcc*)
- add_cflags -m${bits}
- add_ldflags -m${bits}
link_with_cc=gcc
tune_cflags="-march="
setup_gnu_toolchain
@@ -896,7 +894,7 @@ EOF
if enabled multithread; then
case ${toolchain} in
*-win*);;
- *) check_header pthread.h && add_extralibs -lpthread
+ *) check_header pthread.h && add_extralibs -pthread
esac
fi

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-build_make_gen_asm_deps_sh,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
--- build/make/gen_asm_deps.sh.orig Thu Sep 2 11:56:47 2010
+++ build/make/gen_asm_deps.sh Wed Sep 22 19:27:34 2010
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!${BASH}
##
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
##
@@ -42,7 +42,7 @@ done
[ -n "$srcfile" ] || show_help
sfx=${sfx:-asm}
-includes=$(egrep -i "include +\"?+[a-z0-9_/]+\.${sfx}" $srcfile |
+includes=$(egrep -i "include +\"*[a-z0-9_/]+\.${sfx}" $srcfile |
perl -p -e "s;.*?([a-z0-9_/]+.${sfx}).*;\1;")
#" restore editor state
for inc in ${includes}; do

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-build_make_gen_msvs_def_sh,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
--- build/make/gen_msvs_def.sh.orig Thu Sep 2 11:56:47 2010
+++ build/make/gen_msvs_def.sh Wed Sep 22 15:04:39 2010
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!${BASH}
##
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
##

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-build_make_gen_msvs_proj_sh,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
--- build/make/gen_msvs_proj.sh.orig Thu Sep 2 11:56:47 2010
+++ build/make/gen_msvs_proj.sh Wed Sep 22 15:04:39 2010
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!${BASH}
##
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
##

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-build_make_gen_msvs_sln_sh,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
--- build/make/gen_msvs_sln.sh.orig Thu Sep 2 11:56:47 2010
+++ build/make/gen_msvs_sln.sh Wed Sep 22 15:04:39 2010
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!${BASH}
##
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
##

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-build_make_version_sh,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
--- build/make/version.sh.orig Thu Sep 2 11:56:47 2010
+++ build/make/version.sh Wed Sep 22 15:04:39 2010
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!${BASH}
##
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
##

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-configure,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
--- configure.orig Thu Sep 2 14:56:47 2010
+++ configure Sat Sep 25 14:53:47 2010
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!${BASH}
##
## configure
##
@@ -408,12 +408,6 @@ EOF
}
process_detect() {
- if enabled shared; then
- # Can only build shared libs on a subset of platforms. Doing this check
- # here rather than at option parse time because the target auto-detect
- # magic happens after the command line has been parsed.
- enabled linux || die "--enable-shared only supported on ELF for now"
- fi
if [ -z "$CC" ]; then
echo "Bypassing toolchain for environment detection."
enable external_build

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-examples_gen_example_code_sh,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
--- examples/gen_example_code.sh.orig Thu Sep 2 11:56:47 2010
+++ examples/gen_example_code.sh Wed Sep 22 15:04:39 2010
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!${BASH}
##
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
##
@@ -49,7 +49,7 @@ include_block() {
*)
if [ "x$on_block" == "xyes" ]; then
local rem
- (( rem = 78 - indent ))
+ rem=$(expr 78 - $indent )
case "$block_name" in
\**) printf "%${indent}s * %s\n" "" "$t_line" ;;
*)

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-examples_gen_example_text_sh,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
--- examples/gen_example_text.sh.orig Thu Sep 2 11:56:47 2010
+++ examples/gen_example_text.sh Wed Sep 22 15:04:39 2010
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!${BASH}
##
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
##

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-libs_mk,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
--- libs.mk.orig Thu Sep 2 14:56:47 2010
+++ libs.mk Sat Sep 25 16:40:26 2010
@@ -178,15 +178,11 @@ LIBS-$(BUILD_LIBVPX) += $(BUILD_PFX)libvpx.a $(BUILD_P
$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
BUILD_LIBVPX_SO := $(if $(BUILD_LIBVPX),$(CONFIG_SHARED))
-LIBVPX_SO := libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)
+LIBVPX_SO := libvpx.so.$(LIBVPX_VERSION)
LIBS-$(BUILD_LIBVPX_SO) += $(BUILD_PFX)$(LIBVPX_SO)
$(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) libvpx.ver
$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm -pthread
-$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(VERSION_MAJOR)
$(BUILD_PFX)$(LIBVPX_SO): SO_VERSION_SCRIPT = libvpx.ver
-LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \
- libvpx.so libvpx.so.$(VERSION_MAJOR) \
- libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR))
libvpx.ver: $(call enabled,CODEC_EXPORTS)
@echo " [CREATE] $@"
@@ -199,7 +195,6 @@ $(addprefix $(DIST_DIR)/,$(LIBVPX_SO_SYMLINKS)):
@echo " [LN] $@"
$(qexec)ln -sf $(LIBVPX_SO) $@
-INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBVPX_SO_SYMLINKS)
INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBVPX_SO)
endif

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-release_sh,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
--- release.sh.orig Thu Sep 2 11:56:47 2010
+++ release.sh Wed Sep 22 15:04:39 2010
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!${BASH}
##
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
##

View File

@ -0,0 +1,7 @@
VP8 delivers high quality video while efficiently adapting to the varying
processing and bandwidth conditions found on today¿s broad range of
web-connected devices. VP8's efficient bandwidth usage will mean lower
serving costs for content publishers and high quality video for end-users.
The codec's relative simplicity makes it easy to integrate into existing
environments and requires less manual tuning to produce high quality
results.

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
@lib lib/libvpx.so.${LIBvpx_VERSION}

View File

@ -0,0 +1,18 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2010/10/04 23:56:16 ckuethe Exp $
%%SHARED%%
@bin bin/ivfdec
@bin bin/ivfenc
include/vpx/
include/vpx/vp8.h
include/vpx/vp8cx.h
include/vpx/vp8dx.h
include/vpx/vp8e.h
include/vpx/vpx_codec.h
include/vpx/vpx_codec_impl_bottom.h
include/vpx/vpx_codec_impl_top.h
include/vpx/vpx_decoder.h
include/vpx/vpx_decoder_compat.h
include/vpx/vpx_encoder.h
include/vpx/vpx_image.h
include/vpx/vpx_integer.h
lib/libvpx.a