Reviewed-on: https://git.avroid.tech/Docker/tavro-build-linux/pulls/3 Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech> Co-committed-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
78 lines
2.5 KiB
Docker
78 lines
2.5 KiB
Docker
ARG DOCKER_REGISTRY=harbor.avroid.tech
|
|
|
|
# https://hub.docker.com/_/ubuntu
|
|
FROM ${DOCKER_REGISTRY}/all/base-build-image:1.8
|
|
LABEL description="Linux image for Tavro build" \
|
|
tools.qt.version="5.15.14"
|
|
|
|
###QT BUILD###
|
|
ARG NEXUS_QT_REPO="qt_repo" \
|
|
VERSION=5.15.14
|
|
|
|
# Install packages for qt and dependencies
|
|
RUN apt update && \
|
|
apt install -y \
|
|
gperf \
|
|
libasound2-dev \
|
|
libavcodec-dev \
|
|
libavformat-dev \
|
|
libegl1-mesa-dev \
|
|
libgbm-dev \
|
|
libgles2-mesa-dev \
|
|
libglib2.0-dev \
|
|
libgstreamer1.0-dev \
|
|
libgstreamer-plugins-base1.0-dev \
|
|
libharfbuzz-dev \
|
|
libjpeg8-dev \
|
|
libopus-dev \
|
|
libopenh264-dev \
|
|
libpipewire-0.3-dev \
|
|
libpulse-dev \
|
|
libswscale-dev \
|
|
libssl-dev \
|
|
libvpx-dev \
|
|
libfontconfig1-dev \
|
|
libfreetype6-dev \
|
|
libx11-dev \
|
|
libx11-xcb-dev \
|
|
'^libxcb*' \
|
|
libxcomposite-dev \
|
|
libxdamage-dev \
|
|
libxext-dev \
|
|
libxfixes-dev \
|
|
libxi-dev \
|
|
libxkbcommon-dev \
|
|
libxkbcommon-x11-dev \
|
|
libxrender-dev \
|
|
libxtst-dev \
|
|
perl \
|
|
yasm && \
|
|
apt clean && \
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
#download, configure and build qt
|
|
COPY ./* /tmp/patches/
|
|
|
|
RUN wget ${NEXUS_URL}/repository/${NEXUS_QT_REPO}/v${VERSION}/qt-everywhere-opensource-src-${VERSION}.tar.xz && tar -xJf qt-everywhere-opensource-src-${VERSION}.tar.xz && \
|
|
ln -sf /usr/bin/python3 /usr/bin/python && rm qt-everywhere-opensource-src-${VERSION}.tar.xz && cd qt-everywhere* && \
|
|
#install patches \
|
|
patch -p1 < /tmp/patches/0015-remove-detected-xkb-keys.patch && \
|
|
sed -i '6i #include <cstdint>' qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp && \
|
|
sed -i '7i #include <cstdint>' qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp && \
|
|
sed -i '4i #include <cstdint>' qtlocation/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp && \
|
|
#configure and build qt \
|
|
./configure -release -opensource -confirm-license -nomake tests -nomake examples -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtdoc -skip qtmacextras -skip qtscript -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtwinextras -skip qtserialbus -xkbcommon -system-harfbuzz -system-libjpeg -no-openssl && \
|
|
make -j$(nproc) && make install -j$(nproc) && cd .. && rm -rf qt-everywhere* /tmp/patches
|
|
|
|
# Personalization
|
|
#-------------------------------------------------------------------------------
|
|
#
|
|
ARG USER=ubuntu
|
|
ARG USER_HOME=/home/${USER}
|
|
|
|
|
|
USER ${USER}
|
|
WORKDIR ${USER_HOME}
|
|
|
|
CMD ["/bin/bash"]
|