From 2e609db31327207aed863472fc8c446d9b516551 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Tue, 8 Dec 2015 21:39:59 +0000 Subject: [PATCH] libvpx: added recipe for version 1.5.0. * soname is 3: we use libvpx3 as recipe name. * devel package conflicts with 1.0.0 devel package. --- media-libs/libvpx/libvpx3-1.5.0.recipe | 101 +++++++++ .../libvpx/patches/libvpx-1.5.0.patchset | 195 ++++++++++++++++++ 2 files changed, 296 insertions(+) create mode 100644 media-libs/libvpx/libvpx3-1.5.0.recipe create mode 100644 media-libs/libvpx/patches/libvpx-1.5.0.patchset diff --git a/media-libs/libvpx/libvpx3-1.5.0.recipe b/media-libs/libvpx/libvpx3-1.5.0.recipe new file mode 100644 index 000000000..4aaa92b03 --- /dev/null +++ b/media-libs/libvpx/libvpx3-1.5.0.recipe @@ -0,0 +1,101 @@ +SUMMARY="WebM VP8 video codec library" +DESCRIPTION="The WebM VP8 SDK allows you to integrate your applications with \ +the VP8 video codec, a high quality, royalty free, open source codec deployed \ +on millions of computers and devices worldwide. + +This distribution of the WebM VP8 Codec SDK includes the following support: +- WebM VP8 Encoder +- WebM VP8 Decoder" +HOMEPAGE="http://www.webmproject.org" +COPYRIGHT="2009-2012 Google Inc., + The Mozilla Foundation and + The Xiph.Org Foundation" +LICENSE="BSD (3-clause)" +REVISION="1" +SOURCE_URI="http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-$portVersion.tar.bz2" +CHECKSUM_SHA256="306d67908625675f8e188d37a81fbfafdf5068b09d9aa52702b6fbe601c76797" +SOURCE_DIR="libvpx-$portVersion" +PATCHES="libvpx-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="!x86_gcc2 x86" + +PROVIDES=" + libvpx3$secondaryArchSuffix = $portVersion + lib:libvpx$secondaryArchSuffix = 3.0.0 compat >= 3 + " +if [ -z "$secondaryArchSuffix" ]; then + PROVIDES="$PROVIDES + cmd:vp8_scalable_patterns = $portVersion + cmd:vpxdec = $portVersion compat >= 1 + cmd:vpxenc = $portVersion compat >= 1 + " +fi + +REQUIRES=" + haiku$secondaryArchSuffix + " + +PROVIDES_devel=" + libvpx3${secondaryArchSuffix}_devel = $portVersion + devel:libvpx$secondaryArchSuffix = 3.0.0 compat >= 3 + " +REQUIRES_devel=" + libvpx3$secondaryArchSuffix == $portVersion + " +CONFLICTS_devel=" + libvpx${secondaryArchSuffix}_devel + " +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " + # Note: The build system also looks for libvorbis and SDL, but that seems + # to be needed only for building the sample player, which we don't need. +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:awk + cmd:make + cmd:perl + cmd:yasm + cmd:egrep + cmd:grep + cmd:sed + cmd:find + cmd:xargs + cmd:diff + " + +BUILD() +{ + # not an auto tools configure + ./configure \ + --prefix="$prefix" \ + --libdir="$libDir" \ + --as=yasm \ + --enable-pic \ + --enable-shared \ + --enable-vp8 + make $jobArgs +} + +INSTALL() +{ + make install + + prepareInstalledDevelLibs libvpx + fixPkgconfig + + mkdir -p $includeDir + mv $prefix/include/* $includeDir + rmdir $prefix/include + + # devel package + packageEntries devel \ + $developDir + + # Remove stuff we don't need in the secondary architecture base package. + if [ -n "$secondaryArchSuffix" ]; then + rm -rf $prefix/bin + fi +} diff --git a/media-libs/libvpx/patches/libvpx-1.5.0.patchset b/media-libs/libvpx/patches/libvpx-1.5.0.patchset new file mode 100644 index 000000000..1f0b950d1 --- /dev/null +++ b/media-libs/libvpx/patches/libvpx-1.5.0.patchset @@ -0,0 +1,195 @@ +From 2614519ff81fc4cb8c9079ca806184cf57af7bf7 Mon Sep 17 00:00:00 2001 +From: korli +Date: Wed, 14 Mar 2012 00:15:38 +0000 +Subject: patch for 1.0.0 + + +diff --git a/build/make/configure.sh b/build/make/configure.sh +index c592b63..916636f 100644 +--- a/build/make/configure.sh ++++ b/build/make/configure.sh +@@ -704,6 +704,9 @@ process_common_toolchain() { + *os2*) + tgt_os=os2 + ;; ++ *haiku*) ++ tgt_os=haiku ++ ;; + esac + + if [ -n "$tgt_isa" ] && [ -n "$tgt_os" ]; then +@@ -1190,8 +1193,8 @@ EOF + EOF + case ${tgt_cc} in + gcc*) +- add_cflags -m${bits} +- add_ldflags -m${bits} ++ enabled haiku || add_cflags -m${bits} ++ enabled haiku || add_ldflags -m${bits} + ;; + esac + +@@ -1238,7 +1241,7 @@ EOF + enabled debug && add_asflags -g cv8 + EXE_SFX=.exe + ;; +- linux*|solaris*|android*) ++ linux*|solaris*|android*|haiku*) + add_asflags -f elf${bits} + enabled debug && [ "${AS}" = yasm ] && add_asflags -g dwarf2 + enabled debug && [ "${AS}" = nasm ] && add_asflags -g +@@ -1353,6 +1356,8 @@ EOF + ;; + *-android-gcc) + ;; ++ *-haiku*) ++ ;; + *) + check_header pthread.h && add_extralibs -lpthread + ;; +diff --git a/configure b/configure +index a40f3ab..d836421 100755 +--- a/configure ++++ b/configure +@@ -122,6 +122,7 @@ all_platforms="${all_platforms} x86-darwin11-gcc" + all_platforms="${all_platforms} x86-darwin12-gcc" + all_platforms="${all_platforms} x86-darwin13-gcc" + all_platforms="${all_platforms} x86-darwin14-gcc" ++all_platforms="${all_platforms} x86-haiku-gcc" + all_platforms="${all_platforms} x86-iphonesimulator-gcc" + all_platforms="${all_platforms} x86-linux-gcc" + all_platforms="${all_platforms} x86-linux-icc" +diff --git a/examples.mk b/examples.mk +index f10bec6..ee454dd 100644 +--- a/examples.mk ++++ b/examples.mk +@@ -223,8 +223,10 @@ endif + # We should not link to math library (libm) on RVCT + # when building for bare-metal targets + ifeq ($(CONFIG_OS_SUPPORT), yes) +-CODEC_EXTRA_LIBS-$(CONFIG_VP8) += m +-CODEC_EXTRA_LIBS-$(CONFIG_VP9) += m ++ ifneq ($(TOOLCHAIN),x86-haiku-gcc) ++ CODEC_EXTRA_LIBS-$(CONFIG_VP8) += m ++ CODEC_EXTRA_LIBS-$(CONFIG_VP9) += m ++ endif + else + ifeq ($(CONFIG_GCC), yes) + CODEC_EXTRA_LIBS-$(CONFIG_VP8) += m +-- +2.2.2 + + +From cdbf2455ecd1835f50b58ede50749291292d9aae Mon Sep 17 00:00:00 2001 +From: Ingo Weinhold +Date: Tue, 11 Jun 2013 21:09:11 +0200 +Subject: configure: enable shared library building for Haiku + + +diff --git a/configure b/configure +index d836421..16d0a69 100755 +--- a/configure ++++ b/configure +@@ -508,7 +508,7 @@ process_detect() { + # 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. +- if ! enabled linux && ! enabled os2; then ++ if ! enabled linux && ! enabled os2 && ! enabled haiku; then + if enabled gnu; then + echo "--enable-shared is only supported on ELF; assuming this is OK" + else +-- +2.2.2 + + +From b09eddbbca0f76239e8e505aedad73ec2cbc2905 Mon Sep 17 00:00:00 2001 +From: Ingo Weinhold +Date: Tue, 11 Jun 2013 21:09:28 +0200 +Subject: libs.mk: no -lm or -lpthread on Haiku + + +diff --git a/libs.mk b/libs.mk +index f28d84a..ab2baf0 100644 +--- a/libs.mk ++++ b/libs.mk +@@ -290,7 +290,6 @@ LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBVPX_SO)\ + $(notdir $(LIBVPX_SO_SYMLINKS)) \ + $(if $(LIBVPX_SO_IMPLIB), $(BUILD_PFX)$(LIBVPX_SO_IMPLIB)) + $(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) $(EXPORT_FILE) +-$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm + $(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(SO_VERSION_MAJOR) + $(BUILD_PFX)$(LIBVPX_SO): EXPORTS_FILE = $(EXPORT_FILE) + +@@ -353,11 +352,11 @@ vpx.pc: config.mk libs.mk + $(qexec)echo 'Version: $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)' >> $@ + $(qexec)echo 'Requires:' >> $@ + $(qexec)echo 'Conflicts:' >> $@ +- $(qexec)echo 'Libs: -L$${libdir} -lvpx -lm' >> $@ ++ $(qexec)echo 'Libs: -L$${libdir} -lvpx' >> $@ + ifeq ($(HAVE_PTHREAD_H),yes) +- $(qexec)echo 'Libs.private: -lm -lpthread' >> $@ ++ $(qexec)echo 'Libs.private: -lpthread' >> $@ + else +- $(qexec)echo 'Libs.private: -lm' >> $@ ++ $(qexec)echo 'Libs.private: ' >> $@ + endif + $(qexec)echo 'Cflags: -I$${includedir}' >> $@ + INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc +@@ -522,7 +521,7 @@ TEST_LIBS := lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a + $(LIBVPX_TEST_BIN): $(TEST_LIBS) + $(eval $(call linkerxx_template,$(LIBVPX_TEST_BIN), \ + $(LIBVPX_TEST_OBJS) \ +- -L. -lvpx -lgtest $(extralibs) -lm)) ++ -L. -lvpx -lgtest $(extralibs))) + + ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),) + $(TEST_INTRA_PRED_SPEED_OBJS) $(TEST_INTRA_PRED_SPEED_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) +@@ -532,7 +531,7 @@ BINS-yes += $(TEST_INTRA_PRED_SPEED_BIN) + $(TEST_INTRA_PRED_SPEED_BIN): $(TEST_LIBS) + $(eval $(call linkerxx_template,$(TEST_INTRA_PRED_SPEED_BIN), \ + $(TEST_INTRA_PRED_SPEED_OBJS) \ +- -L. -lvpx -lgtest $(extralibs) -lm)) ++ -L. -lvpx -lgtest $(extralibs))) + endif # TEST_INTRA_PRED_SPEED + + endif # CONFIG_UNIT_TESTS +-- +2.2.2 + + +From 7096ec35f15cf19b9388e4fa405461f49d4fbf86 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= +Date: Tue, 3 Dec 2013 22:18:36 +0000 +Subject: x86_64 support + +* configure, amples.mk + +diff --git a/configure b/configure +index 16d0a69..105fdbb 100755 +--- a/configure ++++ b/configure +@@ -143,6 +143,7 @@ all_platforms="${all_platforms} x86_64-darwin11-gcc" + all_platforms="${all_platforms} x86_64-darwin12-gcc" + all_platforms="${all_platforms} x86_64-darwin13-gcc" + all_platforms="${all_platforms} x86_64-darwin14-gcc" ++all_platforms="${all_platforms} x86_64-haiku-gcc" + all_platforms="${all_platforms} x86_64-iphonesimulator-gcc" + all_platforms="${all_platforms} x86_64-linux-gcc" + all_platforms="${all_platforms} x86_64-linux-icc" +diff --git a/examples.mk b/examples.mk +index ee454dd..e567cda 100644 +--- a/examples.mk ++++ b/examples.mk +@@ -223,7 +223,7 @@ endif + # We should not link to math library (libm) on RVCT + # when building for bare-metal targets + ifeq ($(CONFIG_OS_SUPPORT), yes) +- ifneq ($(TOOLCHAIN),x86-haiku-gcc) ++ ifeq (,$(findstring haiku,$(TOOLCHAIN))) + CODEC_EXTRA_LIBS-$(CONFIG_VP8) += m + CODEC_EXTRA_LIBS-$(CONFIG_VP9) += m + endif +-- +2.2.2 +