Skip to content

Commit 1734414

Browse files
committed
test
1 parent 17fd4c3 commit 1734414

File tree

3 files changed

+102
-36
lines changed

3 files changed

+102
-36
lines changed

build-libass.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ echo -e "\n[Build fribidi]"
1717
cd $SRC_DIR/fribidi
1818
NOCONFIGURE=1 ./autogen.sh
1919
CFLAGS="$CFLAGS -DHAVE_STRINGIZE" ./configure "--host=${BUILD_ARCH}-windows" --prefix=$INSTALL_PREFIX --disable-shared --enable-static --disable-dependency-tracking
20-
make -C lib install -j1 CFLAGS="$CFLAGS -DHAVE_STRINGIZE"
20+
make -C lib install -j$(nproc) CFLAGS="$CFLAGS -DHAVE_STRINGIZE"
2121
make install-data-am
2222

2323

build.sh

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -45,38 +45,6 @@ apply-patch zlib zlib.patch
4545
apply-patch FFmpeg ffmpeg.patch
4646
apply-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"
9361
fi
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+
9571
if [ -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"
132108
fi
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"
138140
fi
139141

140142
./build-ffmpeg.sh FFmpeg $FF_ARGS

patches/fribidi.patch

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
diff --git a/Makefile.am b/Makefile.am
2+
index 8c516fb..88827ef 100644
3+
--- a/Makefile.am
4+
+++ b/Makefile.am
5+
@@ -4,11 +4,11 @@
6+
ACLOCAL_AMFLAGS = -I m4
7+
8+
## The order of subdirs is important, don't change without a reason.
9+
-SUBDIRS = gen.tab lib bin doc test
10+
+SUBDIRS = lib bin doc test
11+
12+
EXTRA_DIST = autogen.sh ChangeLog.old \
13+
meson.build meson_options.txt bin/meson.build doc/meson.build \
14+
- gen.tab/meson.build lib/meson.build test/meson.build \
15+
+ lib/meson.build test/meson.build \
16+
test/test-runner.py test/unicode-conformance/meson.build \
17+
README.md
18+
19+
diff --git a/configure.ac b/configure.ac
20+
index 9be44d0..7abb3d2 100644
21+
--- a/configure.ac
22+
+++ b/configure.ac
23+
@@ -168,7 +168,6 @@ AC_SUBST(ENABLE_SHARED_FALSE)
24+
AC_CONFIG_FILES([fribidi.pc
25+
lib/fribidi-config.h
26+
Makefile
27+
- gen.tab/Makefile
28+
lib/Makefile
29+
bin/Makefile
30+
doc/Makefile
31+
diff --git a/lib/Makefile.am b/lib/Makefile.am
32+
index 22b680a..8dcbfd0 100644
33+
--- a/lib/Makefile.am
34+
+++ b/lib/Makefile.am
35+
@@ -56,28 +56,11 @@ libfribidi_la_SOURCES = \
36+
37+
libfribidi_la_CPPFLAGS = @FRIBIDI_CPPFLAGS@ -DFRIBIDI_BUILD
38+
39+
-GENERATEDSOURCES = \
40+
- fribidi-unicode-version.h \
41+
- arabic-shaping.tab.i \
42+
- bidi-type.tab.i \
43+
- joining-type.tab.i \
44+
- mirroring.tab.i \
45+
- brackets.tab.i \
46+
- brackets-type.tab.i
47+
-
48+
-BUILT_SOURCES = \
49+
- $(GENERATEDSOURCES) \
50+
- fribidi-config.h
51+
52+
-$(GENERATEDSOURCES):
53+
- @(cd $(top_builddir)/gen.tab && \
54+
- $(MAKE) $(AM_MAKEFLAGS) $@) && \
55+
- (test -f $@ || mv $(top_builddir)/gen.tab/$@ .)
56+
+BUILT_SOURCES = fribidi-config.h
57+
58+
# re-generate all built sources:
59+
gen:
60+
- @(cd $(top_builddir)/gen.tab && \
61+
- $(MAKE) $(AM_MAKEFLAGS) $@) && \
62+
$(RM) $(BUILT_SOURCES)
63+
$(MAKE) $(AM_MAKEFLAGS) $(BUILT_SOURCES)
64+

0 commit comments

Comments
 (0)