aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-10-01 00:45:35 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-10-01 01:04:40 +0200
commit6f1f75d9abe7879fa130973eab254a107c667270 (patch)
tree0d6cb91455019aa0ac887f2ffb86e919ef61a42b /main
parentd940613ae9511db4a0f13bec6c79e1bc1e4097ed (diff)
downloadaports-6f1f75d9abe7879fa130973eab254a107c667270.tar.bz2
aports-6f1f75d9abe7879fa130973eab254a107c667270.tar.xz
main/x265: fix and improve abuild
Diffstat (limited to 'main')
-rw-r--r--main/x265/APKBUILD29
1 files changed, 18 insertions, 11 deletions
diff --git a/main/x265/APKBUILD b/main/x265/APKBUILD
index 8ecb316542..4d1a181078 100644
--- a/main/x265/APKBUILD
+++ b/main/x265/APKBUILD
@@ -7,26 +7,33 @@ pkgdesc="Open Source H265/HEVC video encoder"
url="https://bitbucket.org/multicoreware/x265"
arch="all"
license="GPL"
-makedepends="$depends_dev cmake yasm"
+makedepends="cmake yasm"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://bitbucket.org/multicoreware/$pkgname/downloads/${pkgname}_${pkgver}.tar.gz"
-builddir="$srcdir"/x265_$pkgver
+builddir="$srcdir/${pkgname}_$pkgver"
build() {
cd "$builddir"/build/linux
- local CMAKE_OPS="-DCMAKE_INSTALL_PREFIX=/usr"
- # has textrel on x86 so we disable asm
- if [ "$CARCH" = x86 ] ; then
- CMAKE_OPS="$CMAKE_OPS -DENABLE_ASSEMBLY=OFF"
- fi
- if [ "$CARCH" = ppc64le ] ; then
- CMAKE_OPS="$CMAKE_OPS -DENABLE_ALTIVEC=OFF"
- fi
- cmake -G "Unix Makefiles" $CMAKE_OPS ../../source
+
+ # It has textrel on x86 so we disable asm.
+ local cmake_opts=""
+ case "$CARCH" in
+ x86) cmake_opts="-DENABLE_ASSEMBLY=OFF";;
+ ppc64le) cmake_opts="-DENABLE_ALTIVEC=OFF";;
+ esac
+
+ cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ $cmake_opts \
+ ../../source
+ make
}
package() {
cd "$builddir"/build/linux
+
make DESTDIR="$pkgdir" install
}