-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild-x265
executable file
·67 lines (56 loc) · 1.57 KB
/
build-x265
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env bash -e
#
# x265
# https://bitbucket.org/multicoreware/x265_git.git
#
cd "$(dirname "$0")"
set -a; source build.env; set +a
pkgname="x265"
pkgdir="${STOWDIR}/${pkgname}"
srcdir="src/x265_git/source"
builddir="${TMPDIR:-/tmp}/build.${pkgname}"
rm -rf "${builddir}"{,-10,-12}
cmake -B "${builddir}"-10 -S "${srcdir}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DNATIVE_BUILD=ON \
-DHIGH_BIT_DEPTH=ON \
-DEXPORT_C_API=OFF \
-DENABLE_CLI=OFF \
-DENABLE_SHARED=OFF \
-Wno-dev
cmake --build "${builddir}"-10
cmake -B "${builddir}"-12 -S "${srcdir}" \
-DCMAKE_INSTALL_NAME_DIR="${pkgdir}/lib" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DNATIVE_BUILD=ON \
-DHIGH_BIT_DEPTH=ON \
-DMAIN12=ON \
-DEXPORT_C_API=OFF \
-DENABLE_CLI=OFF \
-DENABLE_SHARED=OFF \
-Wno-dev
cmake --build "${builddir}"-12
cmake -B "${builddir}" -S "${srcdir}" \
-DCMAKE_INSTALL_PREFIX="${pkgdir}" \
-DCMAKE_INSTALL_NAME_DIR="${pkgdir}/lib" \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_SHARED=ON \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DNATIVE_BUILD=ON \
-DEXTRA_LIB='x265_main10.a;x265_main12.a' \
-DEXTRA_LINK_FLAGS='-L.' \
-DLINKED_10BIT=ON \
-DLINKED_12BIT=ON \
-DENABLE_CLI=OFF \
-Wno-dev \
"$@"
ln -s "${builddir}"-10/libx265.a "${builddir}"/libx265_main10.a
ln -s "${builddir}"-12/libx265.a "${builddir}"/libx265_main12.a
cmake --build "${builddir}"
rm -rf "${pkgdir}"
cmake --install "${builddir}"
rm -f "${pkgdir}"/lib/*.a
stow -Rd "${STOWDIR}" "${pkgname}"
rm -rf "${builddir}"{,-10,-12}