qt6: update recipe pins, NDK, SDK, Ant, use venv for buildozer/p4a, add tomli recipe
This commit is contained in:
@@ -31,12 +31,12 @@ RUN apt -y update -qq \
|
||||
|
||||
|
||||
ENV ANDROID_NDK_HOME="${ANDROID_HOME}/android-ndk"
|
||||
ENV ANDROID_NDK_VERSION="22b"
|
||||
ENV ANDROID_NDK_HASH="ac3a0421e76f71dd330d0cd55f9d99b9ac864c4c034fc67e0d671d022d4e806b"
|
||||
ENV ANDROID_NDK_VERSION="23b"
|
||||
ENV ANDROID_NDK_HASH="c6e97f9c8cfe5b7be0a9e6c15af8e7a179475b7ded23e2d1c1fa0945d6fb4382"
|
||||
ENV ANDROID_NDK_HOME_V="${ANDROID_NDK_HOME}-r${ANDROID_NDK_VERSION}"
|
||||
|
||||
# get the latest version from https://developer.android.com/ndk/downloads/index.html
|
||||
ENV ANDROID_NDK_ARCHIVE="android-ndk-r${ANDROID_NDK_VERSION}-linux-x86_64.zip"
|
||||
ENV ANDROID_NDK_ARCHIVE="android-ndk-r${ANDROID_NDK_VERSION}-linux.zip"
|
||||
ENV ANDROID_NDK_DL_URL="https://dl.google.com/android/repository/${ANDROID_NDK_ARCHIVE}"
|
||||
|
||||
# download and install Android NDK
|
||||
@@ -53,9 +53,8 @@ RUN curl --location --progress-bar \
|
||||
ENV ANDROID_SDK_HOME="${ANDROID_HOME}/android-sdk"
|
||||
|
||||
# get the latest version from https://developer.android.com/studio/index.html
|
||||
ENV ANDROID_SDK_TOOLS_VERSION="8092744"
|
||||
ENV ANDROID_SDK_BUILD_TOOLS_VERSION="30.0.3"
|
||||
ENV ANDROID_SDK_HASH="d71f75333d79c9c6ef5c39d3456c6c58c613de30e6a751ea0dbd433e8f8b9cbf"
|
||||
ENV ANDROID_SDK_TOOLS_VERSION="9477386"
|
||||
ENV ANDROID_SDK_HASH="bd1aa17c7ef10066949c88dc6c9c8d536be27f992a1f3b5a584f9bd2ba5646a0"
|
||||
ENV ANDROID_SDK_TOOLS_ARCHIVE="commandlinetools-linux-${ANDROID_SDK_TOOLS_VERSION}_latest.zip"
|
||||
ENV ANDROID_SDK_TOOLS_DL_URL="https://dl.google.com/android/repository/${ANDROID_SDK_TOOLS_ARCHIVE}"
|
||||
ENV ANDROID_SDK_MANAGER="${ANDROID_SDK_HOME}/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_HOME}"
|
||||
@@ -77,19 +76,22 @@ RUN mkdir --parents "${ANDROID_SDK_HOME}/.android/" \
|
||||
# accept Android licenses (JDK necessary!)
|
||||
RUN apt -y update -qq \
|
||||
&& apt -y install -qq --no-install-recommends --allow-downgrades \
|
||||
openjdk-11-jdk-headless \
|
||||
openjdk-17-jdk-headless \
|
||||
&& apt -y autoremove
|
||||
RUN yes | ${ANDROID_SDK_MANAGER} --licenses > /dev/null
|
||||
|
||||
|
||||
ENV ANDROID_SDK_BUILD_TOOLS_VERSION="31.0.0"
|
||||
|
||||
# download platforms, API, build tools
|
||||
RUN ${ANDROID_SDK_MANAGER} "platforms;android-30" > /dev/null && \
|
||||
RUN ${ANDROID_SDK_MANAGER} "platforms;android-31" > /dev/null && \
|
||||
${ANDROID_SDK_MANAGER} "build-tools;${ANDROID_SDK_BUILD_TOOLS_VERSION}" > /dev/null && \
|
||||
${ANDROID_SDK_MANAGER} "extras;android;m2repository" > /dev/null && \
|
||||
chmod +x "${ANDROID_SDK_HOME}/cmdline-tools/bin/avdmanager"
|
||||
|
||||
# download ANT
|
||||
ENV APACHE_ANT_VERSION="1.9.4"
|
||||
ENV APACHE_ANT_HASH="66d3edcbb0eba11387705cd89178ffb65e55cd53f13ca35c1bb983c0f9992540"
|
||||
ENV APACHE_ANT_VERSION="1.10.13"
|
||||
ENV APACHE_ANT_HASH="776be4a5704158f00ef3f23c0327546e38159389bc8f39abbfe114913f88bab1"
|
||||
ENV APACHE_ANT_ARCHIVE="apache-ant-${APACHE_ANT_VERSION}-bin.tar.gz"
|
||||
ENV APACHE_ANT_DL_URL="https://archive.apache.org/dist/ant/binaries/${APACHE_ANT_ARCHIVE}"
|
||||
ENV APACHE_ANT_HOME="${ANDROID_HOME}/apache-ant"
|
||||
@@ -139,6 +141,15 @@ RUN apt -y update -qq \
|
||||
&& apt -y autoremove \
|
||||
&& apt -y clean
|
||||
|
||||
# cross compile deps for Qt6
|
||||
RUN apt -y update -qq \
|
||||
&& apt -y install -qq --no-install-recommends --allow-downgrades \
|
||||
libopengl-dev \
|
||||
libegl-dev \
|
||||
dos2unix \
|
||||
&& apt -y autoremove \
|
||||
&& apt -y clean
|
||||
|
||||
|
||||
# create new user to avoid using root; but with sudo access and no password for convenience.
|
||||
ARG UID=1000
|
||||
@@ -154,12 +165,16 @@ RUN chown --recursive ${USER} ${WORK_DIR} ${ANDROID_SDK_HOME}
|
||||
RUN chown ${USER} /opt
|
||||
USER ${USER}
|
||||
|
||||
# venv, VIRTUAL_ENV is used by buildozer to indicate a venv environemnt
|
||||
ENV VIRTUAL_ENV=/opt/venv
|
||||
RUN python3 -m venv ${VIRTUAL_ENV}
|
||||
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
|
||||
|
||||
COPY contrib/deterministic-build/requirements-build-base.txt /opt/deterministic-build/
|
||||
COPY contrib/deterministic-build/requirements-build-android.txt /opt/deterministic-build/
|
||||
RUN python3 -m pip install --no-build-isolation --no-dependencies --user \
|
||||
RUN /opt/venv/bin/python3 -m pip install --no-build-isolation --no-dependencies \
|
||||
-r /opt/deterministic-build/requirements-build-base.txt
|
||||
RUN python3 -m pip install --no-build-isolation --no-dependencies --no-binary :all: --user \
|
||||
RUN /opt/venv/bin/python3 -m pip install --no-build-isolation --no-dependencies --no-binary :all: \
|
||||
-r /opt/deterministic-build/requirements-build-android.txt
|
||||
|
||||
# install buildozer
|
||||
@@ -168,9 +183,10 @@ RUN cd /opt \
|
||||
&& cd buildozer \
|
||||
&& git remote add sombernight https://github.com/SomberNight/buildozer \
|
||||
&& git fetch --all \
|
||||
# commit: from branch sombernight/electrum_20210421 (note: careful with force-pushing! see #8162)
|
||||
&& git checkout "6f03256e8312f8d1e5a6da3a2a1bf06e2738325e^{commit}" \
|
||||
&& python3 -m pip install --no-build-isolation --no-dependencies --user -e .
|
||||
# commit: from branch sombernight/electrum_20210421 (note: careful with force-pushing! see #8162) \
|
||||
# no, this is master
|
||||
&& git checkout "10f9c8b789f4f4cb020356bdb50607eceae10493^{commit}" \
|
||||
&& /opt/venv/bin/python3 -m pip install --no-build-isolation --no-dependencies -e .
|
||||
|
||||
# install python-for-android
|
||||
RUN cd /opt \
|
||||
@@ -179,9 +195,10 @@ RUN cd /opt \
|
||||
&& git remote add sombernight https://github.com/SomberNight/python-for-android \
|
||||
&& git remote add accumulator https://github.com/accumulator/python-for-android \
|
||||
&& git fetch --all \
|
||||
# commit: from branch accumulator/electrum_20210421d (note: careful with force-pushing! see #8162)
|
||||
&& git checkout "052b9f7945bae557347fa4a4b418040d9da9eaff^{commit}" \
|
||||
&& python3 -m pip install --no-build-isolation --no-dependencies --user -e .
|
||||
# commit: from branch accumulator/electrum_20210421d (note: careful with force-pushing! see #8162) \
|
||||
#
|
||||
&& git checkout "710cc81d9cdcdcef910547074f031e8a3f102d63^{commit}" \
|
||||
&& /opt/venv/bin/python3 -m pip install --no-build-isolation --no-dependencies -e .
|
||||
|
||||
# build env vars
|
||||
ENV USE_SDK_WRAPPER=1
|
||||
|
||||
Reference in New Issue
Block a user