mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 15:08:57 +02:00
94 lines
2.5 KiB
Bash
94 lines
2.5 KiB
Bash
SUMMARY="The fastest and safest AV1 encoder"
|
|
DESCRIPTION="rav1e is an AV1 video encoder. It is designed to eventually cover all use cases, \
|
|
though in its current form it is most suitable for cases where libaom (the reference encoder) is \
|
|
too slow."
|
|
HOMEPAGE="https://github.com/xiph/rav1e/"
|
|
COPYRIGHT="2017-2021, the rav1e contributors"
|
|
LICENSE="BSD (2-clause)"
|
|
REVISION="1"
|
|
SOURCE_URI="$HOMEPAGE/archive/refs/tags/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="da7ae0df2b608e539de5d443c096e109442cdfa6c5e9b4014361211cf61d030c"
|
|
SOURCE_FILENAME="rav1e-v$portVersion.tar.gz"
|
|
SOURCE_URI_2="$HOMEPAGE/releases/download/v$portVersion/Cargo.lock#noarchive"
|
|
CHECKSUM_SHA256_2="4482976bfb7647d707f9a01fa1a3848366988f439924b5c8ac7ab085fba24240"
|
|
# Fedora: https://src.fedoraproject.org/rpms/rust-rav1e/blob/rawhide/f/rust-rav1e.spec#_28
|
|
PATCHES="0001-remove-references-to-removed-built-and-profiling-cra.patch"
|
|
|
|
ARCHITECTURES="?all !x86_gcc2 x86_64"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="$portVersion"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%.*}"
|
|
|
|
PROVIDES="
|
|
rav1e$secondaryArchSuffix =$portVersion
|
|
cmd:rav1e = $portVersion
|
|
lib:librav1e$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
rav1e${secondaryArchSuffix}_devel = $portVersion
|
|
devel:librav1e$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
rav1e$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libgit2$secondaryArchSuffix
|
|
devel:libssh2$secondaryArchSuffix
|
|
devel:libssl$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cargo$secondaryArchSuffix >= 0.74
|
|
cmd:cargo_cbuild
|
|
cmd:cargo_cinstall
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:nasm
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
defineDebugInfoPackage rav1e$secondaryArchSuffix \
|
|
$prefix/bin/rav1e \
|
|
$libDir/librav1e.so.$libVersion
|
|
|
|
BUILD()
|
|
{
|
|
cp $sourceDir2/Cargo.lock Cargo.lock
|
|
cargo fetch
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
|
export LIBSSH2_SYS_USE_PKG_CONFIG=1
|
|
export LIBGIT2_SYS_USE_PKG_CONFIG=1
|
|
export PKG_CONFIG_ALLOW_CROSS=1
|
|
|
|
cargo install --locked --root $prefix --path .
|
|
cargo cinstall --release --prefix=$prefix \
|
|
--libdir=$libDir \
|
|
--pkgconfigdir=$libDir/pkgconfig \
|
|
--includedir=$includeDir
|
|
|
|
rm -f $libDir/*.a
|
|
rm -f $prefix/{.crates.toml,.crates2.json}
|
|
|
|
prepareInstalledDevelLib librav1e
|
|
fixPkgconfig
|
|
|
|
#package devel
|
|
packageEntries devel \
|
|
$developDir
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
cargo test --release
|
|
}
|