diff options
author | ryoon <ryoon> | 2011-01-19 21:15:51 +0000 |
---|---|---|
committer | ryoon <ryoon> | 2011-01-19 21:15:51 +0000 |
commit | 26ced2bcfee5d5af29ab8b3982b1a4ca6366f447 (patch) | |
tree | 6f5ec41b19e42efe771de44539cbd0a4c9c90328 /multimedia | |
parent | d2b958e8ea35724060af80de4d703cd7ec06160e (diff) | |
download | pkgsrc-26ced2bcfee5d5af29ab8b3982b1a4ca6366f447.tar.gz |
mport libvpx 0.9.5 as multimedia/libvpx.
The On2 VP8 Sodec SDK from Google.
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/libvpx/DESCR | 1 | ||||
-rw-r--r-- | multimedia/libvpx/Makefile | 44 | ||||
-rw-r--r-- | multimedia/libvpx/PLIST | 16 | ||||
-rw-r--r-- | multimedia/libvpx/buildlink3.mk | 15 | ||||
-rw-r--r-- | multimedia/libvpx/distinfo | 9 | ||||
-rw-r--r-- | multimedia/libvpx/files/strip_fPIC.sh | 18 | ||||
-rw-r--r-- | multimedia/libvpx/patches/patch-aa | 68 | ||||
-rw-r--r-- | multimedia/libvpx/patches/patch-ab | 15 | ||||
-rw-r--r-- | multimedia/libvpx/patches/patch-ac | 12 | ||||
-rw-r--r-- | multimedia/libvpx/patches/patch-ad | 25 |
10 files changed, 223 insertions, 0 deletions
diff --git a/multimedia/libvpx/DESCR b/multimedia/libvpx/DESCR new file mode 100644 index 00000000000..d0b2ae37926 --- /dev/null +++ b/multimedia/libvpx/DESCR @@ -0,0 +1 @@ +The VP8 Codec SDK. diff --git a/multimedia/libvpx/Makefile b/multimedia/libvpx/Makefile new file mode 100644 index 00000000000..cb3a21adafb --- /dev/null +++ b/multimedia/libvpx/Makefile @@ -0,0 +1,44 @@ +# $NetBSD: Makefile,v 1.1.1.1 2011/01/19 21:15:51 ryoon Exp $ +# + +DISTNAME= libvpx-v0.9.5 +PKGNAME= ${DISTNAME:S/-v/-/} +CATEGORIES= multimedia +MASTER_SITES= http://webm.googlecode.com/files/ +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= ryoon@NetBSD.org +HOMEPAGE= http://code.google.com/p/webm/ +COMMENT= On2 VP8 library from Google +LICENSE= modified-bsd + +PKG_DESTDIR_SUPPORT= user-destdir + +USE_LIBTOOL= YES +USE_TOOLS+= gmake bash:build perl:build + +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" +BUILD_DEPENDS+= yasm-[0-9]*:../../devel/yasm +.endif + +HAS_CONFIGURE= YES +USE_LANGUAGES= c c++ + +REPLACE_BASH= configure \ + build/make/version.sh \ + build/make/gen_asm_deps.sh \ + examples/gen_example_text.sh \ + examples/gen_example_code.sh + +CONFIGURE_ARGS+= --enable-pic \ + --disable-postproc \ + --enable-runtime-cpu-detect \ + --prefix=${PREFIX} + +BUILD_TARGET= # none + +post-extract: + ${CP} ${FILESDIR}/strip_fPIC.sh ${WRKSRC} + +.include "../../mk/pthread.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/multimedia/libvpx/PLIST b/multimedia/libvpx/PLIST new file mode 100644 index 00000000000..8fa1c297abc --- /dev/null +++ b/multimedia/libvpx/PLIST @@ -0,0 +1,16 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2011/01/19 21:15:51 ryoon Exp $ +bin/vpxdec +bin/vpxenc +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.la diff --git a/multimedia/libvpx/buildlink3.mk b/multimedia/libvpx/buildlink3.mk new file mode 100644 index 00000000000..5d248f9727c --- /dev/null +++ b/multimedia/libvpx/buildlink3.mk @@ -0,0 +1,15 @@ +# $NetBSD: buildlink3.mk,v 1.1.1.1 2011/01/19 21:15:51 ryoon Exp $ + +BUILDLINK_TREE+= libvpx + +.if !defined(LIBVPX_BUILDLINK3_MK) +LIBVPX_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.libvpx+= libvpx>=0.9.2 +BUILDLINK_ABI_DEPENDS.libvpx+= libvpx>=0.9.2 +BUILDLINK_PKGSRCDIR.libvpx?= ../../multimedia/libvpx + +.include "../../mk/pthread.buildlink3.mk" +.endif # LIBVPX_BUILDLINK3_MK + +BUILDLINK_TREE+= -libvpx diff --git a/multimedia/libvpx/distinfo b/multimedia/libvpx/distinfo new file mode 100644 index 00000000000..ba7fafb36e5 --- /dev/null +++ b/multimedia/libvpx/distinfo @@ -0,0 +1,9 @@ +$NetBSD: distinfo,v 1.1.1.1 2011/01/19 21:15:51 ryoon Exp $ + +SHA1 (libvpx-v0.9.5.tar.bz2) = 223965ff16737251afb3377c0800d1f8b5f84379 +RMD160 (libvpx-v0.9.5.tar.bz2) = e90652a84e6047f5d5f8a0a110b07a324742a74c +Size (libvpx-v0.9.5.tar.bz2) = 1250422 bytes +SHA1 (patch-aa) = d6d968fddf826284f49eb907182012e57935c25f +SHA1 (patch-ab) = bd8cc8cf876eb3a8c6dbc317fb9eba3867f2cf2b +SHA1 (patch-ac) = e41b971e300a108beb5ae717ab6a57abc25318d9 +SHA1 (patch-ad) = 82b2e70518042a55efb0f400a8f4be6d99bcd50e diff --git a/multimedia/libvpx/files/strip_fPIC.sh b/multimedia/libvpx/files/strip_fPIC.sh new file mode 100644 index 00000000000..007c94fb0a5 --- /dev/null +++ b/multimedia/libvpx/files/strip_fPIC.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# +# libtool assumes that the compiler can handle the -fPIC flag +# This isn't always true (for example, nasm can't handle it) +command="" +while [ $# -gt 0 ]; do + case "$1" in + -?PIC) + # Ignore -fPIC and -DPIC options + ;; + *) + command="$command $1" + ;; + esac + shift +done +echo $command +exec $command diff --git a/multimedia/libvpx/patches/patch-aa b/multimedia/libvpx/patches/patch-aa new file mode 100644 index 00000000000..f60e77d6430 --- /dev/null +++ b/multimedia/libvpx/patches/patch-aa @@ -0,0 +1,68 @@ +$NetBSD: patch-aa,v 1.1.1.1 2011/01/19 21:15:51 ryoon Exp $ + +--- build/make/Makefile.orig 2010-10-28 13:14:14.000000000 +0000 ++++ build/make/Makefile +@@ -102,7 +102,7 @@ $(BUILD_PFX)%.c.d: %.c + + $(BUILD_PFX)%.c.o: %.c + $(if $(quiet),@echo " [CC] $@") +- $(qexec)$(CC) $(CFLAGS) -c -o $@ $< ++ $(qexec)${LIBTOOL} --mode=compile $(CC) $(CFLAGS) -c -o $@ $< + + $(BUILD_PFX)%.asm.d: %.asm + $(if $(quiet),@echo " [DEP] $@") +@@ -112,7 +112,8 @@ $(BUILD_PFX)%.asm.d: %.asm + + $(BUILD_PFX)%.asm.o: %.asm + $(if $(quiet),@echo " [AS] $@") +- $(qexec)$(AS) $(ASFLAGS) -o $@ $< ++ $(qexec)${LIBTOOL} --mode=compile --tag=CC sh strip_fPIC.sh \ ++ $(AS) $(ASFLAGS) -o $@ $< + + $(BUILD_PFX)%.s.d: %.s + $(if $(quiet),@echo " [DEP] $@") +@@ -188,7 +189,8 @@ define linker_template + $(1): $(filter-out -%,$(2)) + $(1): + $(if $(quiet),@echo " [LD] $$@") +- $(qexec)$$(LD) $$(strip $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs)) ++ $(qexec)${LIBTOOL} --mode=link $(CC) -o $$@ $$(filter-out -lvpx,$(2)) \ ++ libvpx.la $$(extralibs) + endef + # make-3.80 has a bug with expanding large input strings to the eval function, + # which was triggered in some cases by the following component of +@@ -201,8 +203,12 @@ endef + define install_map_template + $(DIST_DIR)/$(1): $(2) + $(if $(quiet),@echo " [INSTALL] $$@") +- $(qexec)mkdir -p $$(dir $$@) +- $(qexec)cp -p $$< $$@ ++ $(qexec)${BSD_INSTALL_DATA} -d -m 755 $$(dir $$@) ++ $$(if $$(filter %.a,$$<), \ ++ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} -c $$(patsubst %.a,%.la,$$<) $$(dir $$@), \ ++ $$(if $$(filter %.h,$$<), \ ++ ${BSD_INSTALL_DATA} -c -m 644 $$< $$(dir $$@), \ ++ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} -c -s $$< $$(dir $$@))) + endef + + define archive_template +@@ -211,7 +217,9 @@ define archive_template + # for creating them. + $(1): + $(if $(quiet),@echo " [AR] $$@") +- $(qexec)$$(AR) $$(ARFLAGS) $$@ $$? ++ $(qexec)${LIBTOOL} --mode=link $(CC) -o $$(patsubst %.a,%.la,$$@) \ ++ $$(patsubst %.o,%.lo,$$?) -rpath $(DIST_DIR)/lib $$(extralibs) \ ++ -version-info $(VERSION_MINOR):$(VERSION_PATCH):$(VERSION_MINOR) + endef + + define so_template +@@ -290,7 +298,7 @@ clean:: + LIBS=$(call enabled,LIBS) + .libs: $(LIBS) + @touch $@ +-$(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib)))) ++$(foreach lib,$(filter %.a,$(LIBS)),$(eval $(call archive_template,$(lib)))) + $(foreach lib,$(filter %so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib)))) + + INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS) diff --git a/multimedia/libvpx/patches/patch-ab b/multimedia/libvpx/patches/patch-ab new file mode 100644 index 00000000000..25aa8f2b8ca --- /dev/null +++ b/multimedia/libvpx/patches/patch-ab @@ -0,0 +1,15 @@ +$NetBSD: patch-ab,v 1.1.1.1 2011/01/19 21:15:51 ryoon Exp $ + +--- libs.mk.orig 2010-10-28 13:14:14.000000000 +0000 ++++ libs.mk +@@ -176,8 +176,8 @@ endif + else + LIBVPX_OBJS=$(call objs,$(CODEC_SRCS)) + OBJS-$(BUILD_LIBVPX) += $(LIBVPX_OBJS) +-LIBS-$(BUILD_LIBVPX) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a +-$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS) ++LIBS-$(BUILD_LIBVPX) += $(BUILD_PFX)libvpx.a ++$(BUILD_PFX)libvpx.a: $(LIBVPX_OBJS) + + BUILD_LIBVPX_SO := $(if $(BUILD_LIBVPX),$(CONFIG_SHARED)) + LIBVPX_SO := libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH) diff --git a/multimedia/libvpx/patches/patch-ac b/multimedia/libvpx/patches/patch-ac new file mode 100644 index 00000000000..7db81719e5b --- /dev/null +++ b/multimedia/libvpx/patches/patch-ac @@ -0,0 +1,12 @@ +$NetBSD: patch-ac,v 1.1.1.1 2011/01/19 21:15:51 ryoon Exp $ + +--- examples.mk.orig 2010-10-28 13:14:14.000000000 +0000 ++++ examples.mk +@@ -153,7 +153,6 @@ BINS-$(NOT_MSVS) += $(addprefi + # Instantiate linker template for all examples. + CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx) + $(foreach bin,$(BINS-yes),\ +- $(if $(BUILD_OBJS),$(eval $(bin): $(LIB_PATH)/lib$(CODEC_LIB).a))\ + $(if $(BUILD_OBJS),$(eval $(call linker_template,$(bin),\ + $(call objs,$($(notdir $(bin)).SRCS)) \ + -l$(CODEC_LIB) $(addprefix -l,$(CODEC_EXTRA_LIBS))\ diff --git a/multimedia/libvpx/patches/patch-ad b/multimedia/libvpx/patches/patch-ad new file mode 100644 index 00000000000..fab80f19e47 --- /dev/null +++ b/multimedia/libvpx/patches/patch-ad @@ -0,0 +1,25 @@ +$NetBSD: patch-ad,v 1.1.1.1 2011/01/19 21:15:51 ryoon Exp $ + +*BSD are identified as linux. + +--- build/make/configure.sh.orig 2010-10-28 13:14:14.000000000 +0000 ++++ build/make/configure.sh +@@ -956,6 +956,18 @@ EOF + esac + fi + ++ case ${tgt_os} in ++ darwin*) ++ add_extralibs -lm -lrt ++ ;; ++ solaris*) ++ add_extralibs -lm -lrt ++ ;; ++ linux*) ++ add_extralibs -lm -lrt ++ ;; ++ esac ++ + # glibc needs these + if enabled linux; then + add_cflags -D_LARGEFILE_SOURCE |