50 lines
1.4 KiB
Bash
50 lines
1.4 KiB
Bash
# Template file for 'x264'
|
|
pkgname=x264
|
|
_snap_date=20180307
|
|
_snap_rev=2245
|
|
version="${_snap_date}.${_snap_rev}"
|
|
revision=1
|
|
wrksrc="x264-snapshot-${_snap_date}-${_snap_rev}-stable"
|
|
hostmakedepends="nasm perl"
|
|
short_desc="Free library for encoding H264/AVC video streams"
|
|
maintainer="Juan RP <xtraeme@voidlinux.org>"
|
|
homepage="http://www.videolan.org/developers/x264.html"
|
|
license="GPL-2.0-or-later"
|
|
distfiles="http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-${_snap_date}-${_snap_rev}-stable.tar.bz2"
|
|
checksum=56d4ced6395b8ba30d87498668b155f2529c2f1af9bd0aa9cb7685873c88ec9a
|
|
|
|
do_configure() {
|
|
local args
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
armv5*|mips*|ppc*) args+=" --disable-asm";;
|
|
aarch64*|armv[67]*) export AS=$CC;;
|
|
*) export AS=nasm;;
|
|
esac
|
|
if [ "$CROSS_BUILD" ]; then
|
|
args+=" --host=$XBPS_CROSS_TRIPLET"
|
|
fi
|
|
./configure --prefix=/usr --disable-swscale --enable-static \
|
|
--enable-pic --enable-shared ${args}
|
|
}
|
|
|
|
do_build() {
|
|
make ${makejobs}
|
|
}
|
|
do_install() {
|
|
make DESTDIR=${DESTDIR} \
|
|
bindir=/usr/bin libdir=/usr/lib includedir=/usr/include install
|
|
# Set version as x.x.0 in pkg-config file.
|
|
sed -i -e "s|0.142.x|0.142.0|" ${DESTDIR}/usr/lib/pkgconfig/x264.pc
|
|
}
|
|
|
|
x264-devel_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|