mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
libvpx: convert recipe to an actual recipe
This commit is contained in:
@@ -1,26 +1,79 @@
|
||||
DESCRIPTION="libvpx - WebM VP8 Codec SDK"
|
||||
HOMEPAGE="http://www.webmproject.org"
|
||||
SRC_URI="http://webm.googlecode.com/files/libvpx-v1.0.0.tar.bz2"
|
||||
CHECKSUM_MD5="d987b5140412edd37d2c6b10c29ad484"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND=""
|
||||
BUILD()
|
||||
{
|
||||
cd libvpx-v1.0.0
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
|
||||
--enable-pic \
|
||||
--enable-vp8
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd libvpx-v1.0.0
|
||||
make install
|
||||
}
|
||||
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"
|
||||
LICENSE="BSD (3-clause)"
|
||||
COPYRIGHT="2009-2012 Google Inc.,
|
||||
The Mozilla Foundation and
|
||||
The Xiph.Org Foundation"
|
||||
SRC_URI="http://webm.googlecode.com/files/libvpx-v1.0.0.tar.bz2"
|
||||
CHECKSUM_MD5="d987b5140412edd37d2c6b10c29ad484"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86_gcc2 ?x86"
|
||||
|
||||
PATCHES="libvpx-1.0.0.patchset"
|
||||
|
||||
PROVIDES="
|
||||
libvpx = $portVersion
|
||||
cmd:vp8_scalable_patterns = $portVersion
|
||||
cmd:vpxdec = $portVersion compat >= 1
|
||||
cmd:vpxenc = $portVersion compat >= 1
|
||||
lib:libvpx = $portVersion compat >= 1
|
||||
"
|
||||
REQUIRES="
|
||||
haiku >= $haikuVersion
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
cmd:gcc
|
||||
cmd:ld
|
||||
cmd:make
|
||||
cmd:perl
|
||||
cmd:yasm
|
||||
"
|
||||
# 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="
|
||||
haiku_devel >= $haikuVersion
|
||||
"
|
||||
|
||||
SOURCE_DIR="libvpx-v1.0.0"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# not an auto tools configure
|
||||
./configure \
|
||||
--prefix="$prefix" \
|
||||
--as=yasm \
|
||||
--enable-pic \
|
||||
--enable-shared \
|
||||
--enable-vp8
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
prepareInstalledDevelLibs libvpx
|
||||
fixPkgconfig
|
||||
|
||||
mv $prefix/include $includeDir
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
|
||||
# ----- devel package -------------------------------------------------------
|
||||
|
||||
SUMMARY_devel="The libvpx development files"
|
||||
PROVIDES_devel="
|
||||
libvpx_devel = $portVersion
|
||||
devel:libvpx = $portVersion compat >= 1
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libvpx == $portVersion
|
||||
"
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
diff -ruN libvpx-v1.0.0/build/make/configure.sh libvpx-v1.0.0-haiku/build/make/configure.sh
|
||||
--- libvpx-v1.0.0/build/make/configure.sh 2012-01-27 18:36:39.038535168 +0000
|
||||
+++ libvpx-v1.0.0-haiku/build/make/configure.sh 2012-03-14 00:47:54.780926976 +0000
|
||||
@@ -579,6 +579,9 @@
|
||||
*solaris2.10)
|
||||
tgt_os=solaris
|
||||
;;
|
||||
+ *haiku*)
|
||||
+ tgt_os=haiku
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
if [ -n "$tgt_isa" ] && [ -n "$tgt_os" ]; then
|
||||
@@ -909,8 +912,8 @@
|
||||
esac
|
||||
;;
|
||||
gcc*)
|
||||
- add_cflags -m${bits}
|
||||
- add_ldflags -m${bits}
|
||||
+ enabled haiku || add_cflags -m${bits}
|
||||
+ enabled haiku || add_ldflags -m${bits}
|
||||
link_with_cc=gcc
|
||||
tune_cflags="-march="
|
||||
setup_gnu_toolchain
|
||||
@@ -939,7 +942,7 @@
|
||||
add_asflags -f x64
|
||||
enabled debug && add_asflags -g cv8
|
||||
;;
|
||||
- linux*|solaris*)
|
||||
+ linux*|solaris*|haiku*)
|
||||
add_asflags -f elf${bits}
|
||||
enabled debug && [ "${AS}" = yasm ] && add_asflags -g dwarf2
|
||||
enabled debug && [ "${AS}" = nasm ] && add_asflags -g
|
||||
@@ -1019,6 +1022,7 @@
|
||||
case ${toolchain} in
|
||||
*-win*);;
|
||||
*-android-gcc);;
|
||||
+ *-haiku*);;
|
||||
*) check_header pthread.h && add_extralibs -lpthread
|
||||
esac
|
||||
fi
|
||||
diff -ruN libvpx-v1.0.0/configure libvpx-v1.0.0-haiku/configure
|
||||
--- libvpx-v1.0.0/configure 2012-01-27 18:36:39.039583744 +0000
|
||||
+++ libvpx-v1.0.0-haiku/configure 2012-03-14 00:46:37.182976512 +0000
|
||||
@@ -107,6 +107,7 @@
|
||||
all_platforms="${all_platforms} x86-darwin9-gcc"
|
||||
all_platforms="${all_platforms} x86-darwin9-icc"
|
||||
all_platforms="${all_platforms} x86-darwin10-gcc"
|
||||
+all_platforms="${all_platforms} x86-haiku-gcc"
|
||||
all_platforms="${all_platforms} x86-linux-gcc"
|
||||
all_platforms="${all_platforms} x86-linux-icc"
|
||||
all_platforms="${all_platforms} x86-solaris-gcc"
|
||||
diff -ruN libvpx-v1.0.0/examples.mk libvpx-v1.0.0-haiku/examples.mk
|
||||
--- libvpx-v1.0.0/examples.mk 2012-01-27 18:36:39.040108032 +0000
|
||||
+++ libvpx-v1.0.0-haiku/examples.mk 2012-03-14 00:46:37.187432960 +0000
|
||||
@@ -113,7 +113,9 @@
|
||||
# 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
|
||||
+ ifneq ($(TOOLCHAIN),x86-haiku-gcc)
|
||||
+ CODEC_EXTRA_LIBS-$(CONFIG_VP8) += m
|
||||
+ endif
|
||||
else
|
||||
ifeq ($(CONFIG_GCC), yes)
|
||||
CODEC_EXTRA_LIBS-$(CONFIG_VP8) += m
|
||||
132
media-libs/libvpx/patches/libvpx-1.0.0.patchset
Normal file
132
media-libs/libvpx/patches/libvpx-1.0.0.patchset
Normal file
@@ -0,0 +1,132 @@
|
||||
From 0c31cfc2c7429f81129c3403d9bc03bd245db71c Mon Sep 17 00:00:00 2001
|
||||
From: korli <jerome.duval@gmail.com>
|
||||
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 cbf000b..4222e52 100755
|
||||
--- a/build/make/configure.sh
|
||||
+++ b/build/make/configure.sh
|
||||
@@ -579,6 +579,9 @@ process_common_toolchain() {
|
||||
*solaris2.10)
|
||||
tgt_os=solaris
|
||||
;;
|
||||
+ *haiku*)
|
||||
+ tgt_os=haiku
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
if [ -n "$tgt_isa" ] && [ -n "$tgt_os" ]; then
|
||||
@@ -909,8 +912,8 @@ process_common_toolchain() {
|
||||
esac
|
||||
;;
|
||||
gcc*)
|
||||
- add_cflags -m${bits}
|
||||
- add_ldflags -m${bits}
|
||||
+ enabled haiku || add_cflags -m${bits}
|
||||
+ enabled haiku || add_ldflags -m${bits}
|
||||
link_with_cc=gcc
|
||||
tune_cflags="-march="
|
||||
setup_gnu_toolchain
|
||||
@@ -939,7 +942,7 @@ process_common_toolchain() {
|
||||
add_asflags -f x64
|
||||
enabled debug && add_asflags -g cv8
|
||||
;;
|
||||
- linux*|solaris*)
|
||||
+ linux*|solaris*|haiku*)
|
||||
add_asflags -f elf${bits}
|
||||
enabled debug && [ "${AS}" = yasm ] && add_asflags -g dwarf2
|
||||
enabled debug && [ "${AS}" = nasm ] && add_asflags -g
|
||||
@@ -1019,6 +1022,7 @@ EOF
|
||||
case ${toolchain} in
|
||||
*-win*);;
|
||||
*-android-gcc);;
|
||||
+ *-haiku*);;
|
||||
*) check_header pthread.h && add_extralibs -lpthread
|
||||
esac
|
||||
fi
|
||||
diff --git a/configure b/configure
|
||||
index 6195b2d..eb8a359 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -107,6 +107,7 @@ all_platforms="${all_platforms} x86-darwin8-icc"
|
||||
all_platforms="${all_platforms} x86-darwin9-gcc"
|
||||
all_platforms="${all_platforms} x86-darwin9-icc"
|
||||
all_platforms="${all_platforms} x86-darwin10-gcc"
|
||||
+all_platforms="${all_platforms} x86-haiku-gcc"
|
||||
all_platforms="${all_platforms} x86-linux-gcc"
|
||||
all_platforms="${all_platforms} x86-linux-icc"
|
||||
all_platforms="${all_platforms} x86-solaris-gcc"
|
||||
diff --git a/examples.mk b/examples.mk
|
||||
index f6c9045..ab9657f 100644
|
||||
--- a/examples.mk
|
||||
+++ b/examples.mk
|
||||
@@ -113,7 +113,9 @@ vp8_multi_resolution_encoder.DESCRIPTION = VP8 Multiple-resolution Encoding
|
||||
# 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
|
||||
+ ifneq ($(TOOLCHAIN),x86-haiku-gcc)
|
||||
+ CODEC_EXTRA_LIBS-$(CONFIG_VP8) += m
|
||||
+ endif
|
||||
else
|
||||
ifeq ($(CONFIG_GCC), yes)
|
||||
CODEC_EXTRA_LIBS-$(CONFIG_VP8) += m
|
||||
--
|
||||
1.7.5
|
||||
|
||||
|
||||
From dd76984687465e457d9e3dcd0b4bdc4bd46225dd Mon Sep 17 00:00:00 2001
|
||||
From: Ingo Weinhold <ingo_weinhold@gmx.de>
|
||||
Date: Tue, 11 Jun 2013 21:09:11 +0200
|
||||
Subject: configure: enable shared library building for Haiku
|
||||
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index eb8a359..a2ef98d 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -438,7 +438,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.
|
||||
- enabled linux || die "--enable-shared only supported on ELF for now"
|
||||
+ enabled linux || enabled haiku || die "--enable-shared only supported on ELF for now"
|
||||
fi
|
||||
if [ -z "$CC" ]; then
|
||||
echo "Bypassing toolchain for environment detection."
|
||||
--
|
||||
1.7.5
|
||||
|
||||
|
||||
From 87b2816834bb2bbfc1e13765084a0c21eb46cf13 Mon Sep 17 00:00:00 2001
|
||||
From: Ingo Weinhold <ingo_weinhold@gmx.de>
|
||||
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 79a1d00..d88cfa7 100644
|
||||
--- a/libs.mk
|
||||
+++ b/libs.mk
|
||||
@@ -196,7 +196,6 @@ LIBVPX_SO := libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION
|
||||
LIBS-$(BUILD_LIBVPX_SO) += $(BUILD_PFX)$(LIBVPX_SO)\
|
||||
$(notdir $(LIBVPX_SO_SYMLINKS))
|
||||
$(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) libvpx.ver
|
||||
-$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm
|
||||
$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(VERSION_MAJOR)
|
||||
$(BUILD_PFX)$(LIBVPX_SO): SO_VERSION_SCRIPT = libvpx.ver
|
||||
LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \
|
||||
@@ -398,7 +397,7 @@ $(foreach bin,$(LIBVPX_TEST_BINS),\
|
||||
$(if $(BUILD_LIBVPX),$(eval $(bin): libvpx.a libgtest.a ))\
|
||||
$(if $(BUILD_LIBVPX),$(eval $(call linkerxx_template,$(bin),\
|
||||
$(bin).cc.o \
|
||||
- -L. -lvpx -lgtest -lpthread -lm)\
|
||||
+ -L. -lvpx -lgtest)\
|
||||
)))\
|
||||
$(if $(LIPO_LIBS),$(eval $(call lipo_bin_template,$(bin))))\
|
||||
|
||||
--
|
||||
1.7.5
|
||||
|
||||
Reference in New Issue
Block a user