Skip to content

Commit fdc324b

Browse files
committed
karchive, kimageformats, kcodecs: add and build qttools dependency
1 parent 6e793de commit fdc324b

File tree

6 files changed

+41
-42
lines changed

6 files changed

+41
-42
lines changed

projects/karchive/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RUN git clone --depth 1 https://github.com/openssl/openssl.git
2222
RUN wget https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz
2323
RUN git clone https://github.com/tukaani-project/xz.git
2424
RUN git clone --depth 1 --branch=dev git://code.qt.io/qt/qtbase.git
25+
RUN git clone --depth 1 --branch=dev git://code.qt.io/qt/qttools.git
2526
RUN git clone --depth 1 -b master https://invent.kde.org/frameworks/extra-cmake-modules.git
2627
RUN git clone --depth 1 -b master https://invent.kde.org/frameworks/karchive.git
2728
COPY build.sh karchive_fuzzer.cc $SRC/

projects/karchive/build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ cd $SRC/qtbase
7676
cmake --build . --parallel $(nproc)
7777
cmake --install .
7878

79+
# Build qttools
80+
cd $SRC/qttools
81+
cmake . -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr
82+
cmake --build . --parallel $(nproc)
83+
cmake --install .
7984

8085
# Build karchive
8186
cd $SRC/karchive

projects/kcodecs/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ FROM gcr.io/oss-fuzz-base/base-builder
1818
RUN apt-get update && apt-get install --yes cmake ninja-build
1919
RUN curl -L http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz -O
2020
RUN git clone --depth 1 --branch=dev git://code.qt.io/qt/qtbase.git
21+
RUN git clone --depth 1 --branch=dev git://code.qt.io/qt/qttools.git
2122
RUN git clone --depth 1 -b master https://invent.kde.org/frameworks/extra-cmake-modules.git
2223
RUN git clone --depth 1 -b master https://invent.kde.org/frameworks/kcodecs.git
2324
RUN git clone --depth 1 https://gitlab.freedesktop.org/uchardet/uchardet.git

projects/kcodecs/build.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,21 @@ export CFLAGS="${FUZZ_CFLAGS}"
2929
export CXXFLAGS="${FUZZ_CXXFLAGS}"
3030

3131

32-
cd $SRC
33-
cd extra-cmake-modules
32+
cd $SRC/extra-cmake-modules
3433
cmake -DBUILD_TESTING=OFF .
3534
make install
3635

37-
cd $SRC
38-
cd qtbase
36+
cd $SRC/qtbase
3937
./configure -no-glib -qt-libpng -qt-pcre -qt-zlib -opensource -confirm-license -static -no-opengl -no-icu -platform linux-clang-libc++ -debug -prefix /usr -no-feature-gui -no-feature-sql -no-feature-network -no-feature-xml -no-feature-dbus -no-feature-printsupport
4038
cmake --build . --parallel $(nproc)
4139
cmake --install .
4240

43-
cd $SRC
44-
cd kcodecs
41+
cd $SRC/qttools
42+
cmake . -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr
43+
cmake --build . --parallel $(nproc)
44+
cmake --install .
45+
46+
cd $SRC/kcodecs
4547
rm -rf poqm
4648
cmake . -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Debug
4749
make -j$(nproc) VERBOSE=1

projects/kimageformats/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ RUN git clone https://github.com/tukaani-project/xz.git
2424
RUN git clone --depth 1 --branch=RB-3.3 https://github.com/AcademySoftwareFoundation/openexr.git
2525
RUN git clone --depth 1 -b master https://invent.kde.org/frameworks/extra-cmake-modules.git
2626
RUN git clone --depth 1 --branch=dev git://code.qt.io/qt/qtbase.git
27+
RUN git clone --depth 1 --branch=dev git://code.qt.io/qt/qttools.git
2728
RUN git clone --depth 1 -b master https://invent.kde.org/frameworks/karchive.git
2829
RUN git clone --depth 1 -b master https://invent.kde.org/frameworks/kimageformats.git
2930
RUN git clone --depth 1 -b v3.12.0 https://aomedia.googlesource.com/aom

projects/kimageformats/build.sh

Lines changed: 25 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,17 @@
1616
################################################################################
1717

1818
# build zstd
19-
cd $SRC
20-
cd zstd
19+
cd $SRC/zstd
2120
cmake -S build/cmake -DBUILD_SHARED_LIBS=OFF
2221
make install -j$(nproc)
2322

2423
# Build zlib
25-
cd $SRC
26-
cd zlib
24+
cd $SRC/zlib
2725
./configure --static
2826
make install -j$(nproc)
2927

3028
# Build libzip
31-
cd $SRC
32-
cd libzip
29+
cd $SRC/libzip
3330
cmake . -DBUILD_SHARED_LIBS=OFF
3431
make install -j$(nproc)
3532

@@ -54,40 +51,41 @@ export ORIG_CFLAGS="${CFLAGS}"
5451
export ORIG_CXXFLAGS="${CXXFLAGS}"
5552
unset CFLAGS
5653
unset CXXFLAGS
57-
cd $SRC
58-
cd xz
54+
cd $SRC/xz
5955
./autogen.sh --no-po4a --no-doxygen
6056
./configure --enable-static --disable-debug --disable-shared --disable-xz --disable-xzdec --disable-lzmainfo
6157
make install -j$(nproc)
6258
export CFLAGS="${ORIG_CFLAGS}"
6359
export CXXFLAGS="${ORIG_CXXFLAGS}"
6460

65-
cd $SRC
66-
cd qtbase
61+
# Build qt
62+
cd $SRC/qtbase
6763
./configure -no-glib -qt-libpng -qt-pcre -opensource -confirm-license -static -no-opengl -no-icu -platform linux-clang-libc++ -debug -prefix /usr -no-feature-widgets -no-feature-sql -no-feature-network -no-feature-xml -no-feature-dbus -no-feature-printsupport
6864
cmake --build . --parallel $(nproc)
6965
cmake --install .
7066

67+
# Build qttools
68+
cd $SRC/qttools
69+
cmake . -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr
70+
cmake --build . --parallel $(nproc)
71+
cmake --install .
72+
7173
# Build extra-cmake-modules
72-
cd $SRC
73-
cd extra-cmake-modules
74+
cd $SRC/extra-cmake-modules
7475
cmake . -DBUILD_TESTING=OFF
7576
make install -j$(nproc)
7677

77-
cd $SRC
78-
cd karchive
78+
cd $SRC/karchive
7979
rm -rf poqm
8080
cmake . -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr/local
8181
make install -j$(nproc)
8282

8383
# Build JXRlib
84-
cd $SRC
85-
cd jxrlib
84+
cd $SRC/jxrlib
8685
make -j$(nproc)
8786

8887
# Build LibRaw
89-
cd $SRC
90-
cd LibRaw
88+
cd $SRC/LibRaw
9189
TMP_CFLAGS=$CFLAGS
9290
TMP_CXXFLAGS=$CXXFLAGS
9391
CFLAGS="$CFLAGS -fno-sanitize=function,vptr"
@@ -101,8 +99,7 @@ CXXFLAGS=$TMP_CXXFLAGS
10199

102100

103101
# Build aom
104-
cd $SRC
105-
cd aom
102+
cd $SRC/aom
106103
mkdir build.libavif
107104
cd build.libavif
108105
extra_libaom_flags='-DAOM_MAX_ALLOCABLE_MEMORY=536870912 -DDO_RANGE_CHECK_CLAMP=1'
@@ -111,47 +108,41 @@ make -j$(nproc)
111108
make install -j$(nproc)
112109

113110
# Build libavif
114-
cd $SRC
111+
cd $SRC/libavif
115112
ln -s "$SRC/aom" "$SRC/libavif/ext/"
116-
cd libavif
117113
mkdir build
118114
cd build
119115
CFLAGS="$CFLAGS -fPIC" cmake -DBUILD_SHARED_LIBS=OFF -DAVIF_ENABLE_WERROR=OFF -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=OFF ..
120116
make -j$(nproc)
121117

122118
# Build libde265
123-
cd $SRC
124-
cd libde265
119+
cd $SRC/libde265
125120
cmake -DBUILD_SHARED_LIBS=OFF -DDISABLE_SSE=ON .
126121
make -j$(nproc)
127122
make install -j$(nproc)
128123

129124
# Build openjpeg
130-
cd $SRC
131-
cd openjpeg
125+
cd $SRC/openjpeg
132126
mkdir build
133127
cd build
134128
cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_CODEC=OFF ..
135129
make -j$(nproc)
136130
make install -j$(nproc)
137131

138132
# build openh264
139-
cd $SRC
140-
cd openh264
133+
cd $SRC/openh264
141134
make USE_ASM=No BUILDTYPE=Debug install-static -j$(nproc)
142135

143136
# Build openexr
144-
cd $SRC
145-
cd openexr
137+
cd $SRC/openexr
146138
mkdir _build
147139
cd _build
148140
cmake -DBUILD_SHARED_LIBS=OFF ..
149141
make -j$(nproc)
150142
make install -j$(nproc)
151143

152144
# Build libheif
153-
cd $SRC
154-
cd libheif
145+
cd $SRC/libheif
155146
#Reduce max width and height to avoid allocating too much memory
156147
sed -i "s/static const int MAX_IMAGE_WIDTH = 32768;/static const int MAX_IMAGE_WIDTH = 8192;/g" libheif/security_limits.h
157148
sed -i "s/static const int MAX_IMAGE_HEIGHT = 32768;/static const int MAX_IMAGE_HEIGHT = 8192;/g" libheif/security_limits.h
@@ -162,15 +153,13 @@ make -j$(nproc)
162153
make install -j$(nproc)
163154

164155
# Build libjxl
165-
cd $SRC
166-
cd libjxl
156+
cd $SRC/libjxl
167157
mkdir build
168158
cd build
169159
CXXFLAGS="$CXXFLAGS -DHWY_COMPILE_ONLY_SCALAR" cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_DOXYGEN=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF -DJPEGXL_ENABLE_JNI=OFF -DJPEGXL_ENABLE_JPEGLI=OFF -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=OFF -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_ENABLE_OPENEXR=OFF -DJPEGXL_ENABLE_PLUGINS=OFF -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_SKCMS=ON -DJPEGXL_ENABLE_TCMALLOC=OFF -DJPEGXL_ENABLE_TOOLS=OFF -DJPEGXL_ENABLE_FUZZERS=OFF ..
170160
make -j$(nproc) jxl jxl_cms jxl_threads
171161

172-
cd $SRC
173-
cd kimageformats
162+
cd $SRC/kimageformats
174163
HANDLER_TYPES="ANIHandler ani
175164
QAVIFHandler avif
176165
QDDSHandler dds

0 commit comments

Comments
 (0)