@@ -45,38 +45,6 @@ apply-patch zlib zlib.patch
4545apply-patch FFmpeg ffmpeg.patch
4646apply-patch harfbuzz harfbuzz.patch
4747
48- if [ " $BUILD_LICENSE " == " gpl" ]; then
49-
50- apply-patch x265_git x265_git-${BUILD_TYPE} .patch
51-
52- if [ " $BUILD_TYPE " == " static" ]; then
53- X265_ARGS=" -DSTATIC_LINK_CRT=ON"
54- ENABLE_SHARED=OFF
55- else
56- X265_ARGS=" -DSTATIC_LINK_CRT=OFF"
57- ENABLE_SHARED=ON
58- fi
59-
60- if [ " $BUILD_ARCH " == arm ]; then
61- apply-patch x265_git x265_git-arm.patch
62- fi
63-
64- git -C x265_git fetch --tags
65- ./build-cmake-dep.sh x265_git/source -DCMAKE_SYSTEM_NAME=Windows -DENABLE_SHARED=$ENABLE_SHARED -DENABLE_CLI=OFF $X265_ARGS
66- add_ffargs " --enable-libx265"
67-
68- if [ " $BUILD_TYPE " == " shared" ]; then
69- apply-patch x264 x264-${BUILD_TYPE} .patch
70- fi
71- if [[ " $BUILD_ARCH " =~ arm ]]; then
72- X264_ARGS=" --disable-asm"
73- fi
74-
75- INSTALL_TARGET=install-lib-${BUILD_TYPE} ./build-make-dep.sh x264 --enable-${BUILD_TYPE} $X264_ARGS
76- add_ffargs " --enable-libx264"
77-
78- fi
79-
8048./build-make-dep.sh nv-codec-headers
8149
8250./build-cmake-dep.sh zlib -DZLIB_BUILD_EXAMPLES=OFF
@@ -92,6 +60,14 @@ if [ -n "$ENABLE_LIBHARFBUZZ" ]; then
9260 add_ffargs " --enable-libharfbuzz"
9361fi
9462
63+ if [ -n " $ENABLE_LIBASS " ]; then
64+ apply-patch fribidi fribidi.patch
65+ ./build-libass.sh
66+ add_ffargs " --enable-libass"
67+ fi
68+
69+
70+
9571if [ -n " $ENABLE_SDL " ]; then
9672 ./build-cmake-dep.sh SDL
9773 add_ffargs " --enable-sdl"
@@ -131,10 +107,36 @@ if [ -n "$ENABLE_LIBWEBP" ]; then
131107 add_ffargs " --enable-libwebp"
132108fi
133109
110+ if [ " $BUILD_LICENSE " == " gpl" ]; then
111+
112+ apply-patch x265_git x265_git-${BUILD_TYPE} .patch
113+
114+ if [ " $BUILD_TYPE " == " static" ]; then
115+ X265_ARGS=" -DSTATIC_LINK_CRT=ON"
116+ ENABLE_SHARED=OFF
117+ else
118+ X265_ARGS=" -DSTATIC_LINK_CRT=OFF"
119+ ENABLE_SHARED=ON
120+ fi
121+
122+ if [ " $BUILD_ARCH " == arm ]; then
123+ apply-patch x265_git x265_git-arm.patch
124+ fi
125+
126+ git -C x265_git fetch --tags
127+ ./build-cmake-dep.sh x265_git/source -DCMAKE_SYSTEM_NAME=Windows -DENABLE_SHARED=$ENABLE_SHARED -DENABLE_CLI=OFF $X265_ARGS
128+ add_ffargs " --enable-libx265"
129+
130+ if [ " $BUILD_TYPE " == " shared" ]; then
131+ apply-patch x264 x264-${BUILD_TYPE} .patch
132+ fi
133+ if [[ " $BUILD_ARCH " =~ arm ]]; then
134+ X264_ARGS=" --disable-asm"
135+ fi
136+
137+ INSTALL_TARGET=install-lib-${BUILD_TYPE} ./build-make-dep.sh x264 --enable-${BUILD_TYPE} $X264_ARGS
138+ add_ffargs " --enable-libx264"
134139
135- if [ -n " $ENABLE_LIBASS " ]; then
136- ./build-libass.sh
137- add_ffargs " --enable-libass"
138140fi
139141
140142./build-ffmpeg.sh FFmpeg $FF_ARGS
0 commit comments