build and instruction fixes
This commit is contained in:
3 files changed
+99
-2
No files matched your search
@@ -55,6 +55,37 @@ RUN git clone --depth 1 https://gitlab.freedesktop.org/uchardet/uchardet.git /tm
|
||||
cmake --install /tmp/uchardet-build && \
|
||||
rm -rf /tmp/uchardet /tmp/uchardet-build
|
||||
|
||||
# ── zlib + minizip for MinGW (static, cross-compiled) ─────────────────────────
|
||||
RUN wget -q https://zlib.net/zlib-1.3.1.tar.gz -O /tmp/zlib.tar.gz && \
|
||||
tar -xf /tmp/zlib.tar.gz -C /tmp && \
|
||||
\
|
||||
# Build zlib static lib using the MinGW-specific Makefile
|
||||
cd /tmp/zlib-1.3.1 && \
|
||||
make -f win32/Makefile.gcc \
|
||||
PREFIX=x86_64-w64-mingw32- \
|
||||
BINARY_PATH=/opt/mingw-sysroot/bin \
|
||||
INCLUDE_PATH=/opt/mingw-sysroot/include \
|
||||
LIBRARY_PATH=/opt/mingw-sysroot/lib \
|
||||
SHARED_MODE=0 install && \
|
||||
\
|
||||
# Build minizip static lib from contrib/minizip
|
||||
cd /tmp/zlib-1.3.1/contrib/minizip && \
|
||||
x86_64-w64-mingw32-gcc -c \
|
||||
-I/opt/mingw-sysroot/include \
|
||||
-DNOUNCRYPT -DNOCRYPT \
|
||||
ioapi.c unzip.c zip.c && \
|
||||
x86_64-w64-mingw32-ar rcs libminizip.a ioapi.o unzip.o zip.o && \
|
||||
cp libminizip.a /opt/mingw-sysroot/lib/ && \
|
||||
mkdir -p /opt/mingw-sysroot/include/minizip && \
|
||||
cp ioapi.h unzip.h zip.h /opt/mingw-sysroot/include/minizip/ && \
|
||||
\
|
||||
# Write pkg-config file
|
||||
mkdir -p /opt/mingw-sysroot/lib/pkgconfig && \
|
||||
printf 'prefix=/opt/mingw-sysroot\nlibdir=${prefix}/lib\nincludedir=${prefix}/include/minizip\n\nName: minizip\nDescription: Minizip zip/unzip library\nVersion: 1.3.1\nLibs: -L${libdir} -lminizip -lz\nCflags: -I${includedir}\n' \
|
||||
> /opt/mingw-sysroot/lib/pkgconfig/minizip.pc && \
|
||||
\
|
||||
rm -rf /tmp/zlib-1.3.1 /tmp/zlib.tar.gz
|
||||
|
||||
ENV QT_LINUX_DIR=${QT_INSTALL_DIR}/${QT_VERSION}/gcc_64
|
||||
ENV QT_WINDOWS_DIR=${QT_INSTALL_DIR}/${QT_VERSION}/mingw_64
|
||||
ENV MINGW_SYSROOT=/opt/mingw-sysroot
|
||||
|
||||
Reference in new issue
Block a user