void-packages/srcpkgs/x265/template
Jürgen Buchmüller 0b5c97ab6a
x265: fix cross build
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2018-06-22 12:46:10 +02:00

35 lines
892 B
Bash

# Template file for 'x265'
pkgname=x265
version=2.8
revision=2
build_wrksrc="source"
wrksrc="x265_${version}"
build_style=cmake
configure_args="-DENABLE_PIC=1"
hostmakedepends="yasm"
short_desc="Open Source H.265/HEVC video encoder"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2.0-or-later"
homepage="http://x265.org/"
distfiles="https://bitbucket.org/multicoreware/x265/downloads/x265_${version}.tar.gz"
checksum=6e59f9afc0c2b87a46f98e33b5159d56ffb3558a49d8e3d79cb7fdc6b7aaa863
case "$XBPS_TARGET_MACHINE" in
mips*) configure_args+=" -DCMAKE_SYSTEM_PROCESSOR=mips32r2" ;;
esac
pre_configure() {
if [ "$CROSS_BUILD" ]; then
sed -i CMakeLists.txt -e "s; -mcpu=native;;"
fi
}
x265-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
}
}