diff --git a/media-libs/kvazaar/kvazaar-2.1.0.recipe b/media-libs/kvazaar/kvazaar-2.1.0.recipe new file mode 100644 index 000000000..1bea8b23e --- /dev/null +++ b/media-libs/kvazaar/kvazaar-2.1.0.recipe @@ -0,0 +1,104 @@ +SUMMARY="An open-source HEVC encoder" +DESCRIPTION="The Scalable Video Technology for AV1 (SVT-AV1 Encoder and \ +Decoder) is an AV1-compliant encoder/decoder library core. The SVT-AV1 encoder\ + development is a work-in-progress targeting performance levels applicable to \ +both VOD and Live encoding / transcoding video applications. The SVT-AV1 \ +decoder implementation is targeting future codec research activities." +HOMEPAGE="https://ultravideo.cs.tut.fi/#encoder" +COPYRIGHT="2019, Alliance for Open Media" +LICENSE="BSD (3-clause)" +REVISION="1" +SOURCE_URI="https://github.com/ultravideo/kvazaar/releases/download/v$portVersion/kvazaar-$portVersion.tar.xz" +CHECKSUM_SHA256="a76998462924ab8409cf8de4947ba5a5023daa33207676e9c4eefc2bbd46c834" +SOURCE_URI_2="https://vcgit.hhi.fraunhofer.de/jct-vc/HM/-/archive/HM-16.24/HM-HM-16.24.tar.bz2" +CHECKSUM_SHA256_2="560e750cefe2ad0edae0687735ae3a4d8f34d033809775af70efdbfcf85fcba2" +SOURCE_DIR_2="HM-HM-16.24" +#PATCHES="kvazaar-$portVersion.patchset" +PATCHES_2="kvazaar-$portVersion-source2.patchset" + +ARCHITECTURES="all !x86_gcc2 ?x86" +SECONDARY_ARCHITECTURES="?x86" + +commandBinDir=$binDir +commandSuffix=$secondaryArchSuffix +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin +fi + +libVersion="6.6.0" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +PROVIDES=" + kvazaar$secondaryArchSuffix = $portVersion + cmd:kvazaar + lib:libkvazaar$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcryptopp$secondaryArchSuffix + " + +PROVIDES_devel=" + kvazaar${secondaryArchSuffix}_devel = $portVersion + devel:libkvazaar$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + kvazaar$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libcryptopp$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmp + cmd:diff + cmd:find + cmd:gawk + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:yasm + " +TEST_REQUIRES=" + cmd:cmake + cmd:ffmpeg + " + + +defineDebugInfoPackage kvazaar$secondaryArchSuffix \ + "$libDir"/libkvazaar.so.$libVersion + +BUILD() +{ + mkdir -p build && cd build + export CPPFLAGS=-DPIC + ACLOCAL=: AUTOCONF=: AUTOMAKE=: AUTOHEADER=: \ + runConfigure --omit-dirs binDir ../configure --bindir="$commandBinDir" \ + --with-cryptopp + make $jobArgs +} + +INSTALL() +{ + make -C build install + + rm -f $libDir/lib*.la $libDir/lib*.a + prepareInstalledDevelLibs libkvazaar + fixPkgconfig + packageEntries devel $developDir +} + +TEST() +{ + cd $sourceDir2 + cmake -B build -S . -DCMAKE_BUILD_TYPE=Release + make -C build VERBOSE=1 $jobArgs + + PATH=$PATH:$sourceDir2/bin/umake/gcc-11.2/x86_64/release/ + ln -srf $sourceDir2/bin/umake/gcc-11.2/x86_64/release/TAppDecoder \ + $sourceDir2/bin/umake/gcc-11.2/x86_64/release/TAppDecoderStatic + cd $sourceDir + make -C build check +} diff --git a/media-libs/kvazaar/patches/kvazaar-2.1.0-source2.patchset b/media-libs/kvazaar/patches/kvazaar-2.1.0-source2.patchset new file mode 100644 index 000000000..67a96d586 --- /dev/null +++ b/media-libs/kvazaar/patches/kvazaar-2.1.0-source2.patchset @@ -0,0 +1,31 @@ +From 4c12c1501fd0192fdd494f391b3394be0b8c3809 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Sat, 11 Dec 2021 12:16:32 +0100 +Subject: fix build + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 79bf8b6..09e1e4a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,7 +41,7 @@ set( CMAKE_CXX_STANDARD 11 ) + set( CMAKE_CXX_STANDARD_REQUIRED ON ) + + # compile everything position independent (even static libraries) +-set( CMAKE_POSITION_INDEPENDENT_CODE TRUE ) ++set( CMAKE_POSITION_INDEPENDENT_CODE FALSE ) + + # set verbose compile options + #set( CMAKE_VERBOSE_MAKEFILE ON ) +@@ -68,7 +68,7 @@ endif() + # bb_enable_warnings( gcc -Wno-unused-variable ) + # bb_enable_warnings( gcc-4.8 warnings-as-errors -Wno-unused-variable ) + # for gcc 8.2: +-bb_enable_warnings( gcc warnings-as-errors -Wno-sign-compare -Wno-class-memaccess) ++bb_enable_warnings( gcc -Wno-sign-compare -Wno-class-memaccess) + + if( XCODE ) + bb_enable_warnings( clang warnings-as-errors +-- +2.30.2 +