From 3dc4ff36fc7b448901d4af2a410e7d9e733fa861 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Fri, 14 May 2021 22:36:43 +0200 Subject: [PATCH] Add OpenSSL lib, add snes lib --- .github/workflows/main.yml | 4 ++-- .gitmodules | 3 +++ common.lib | 24 +++++++++++++++++++----- linux-armv6-musl/Dockerfile.in | 14 +------------- linux-armv6-rpi1/Dockerfile.in | 3 +++ linux-armv7-rpi2/Dockerfile.in | 3 +++ linux-armv7/Dockerfile.in | 3 +++ linux-armv7a/Dockerfile.in | 5 +++++ linux-armv8-rpi3/Dockerfile.in | 3 +++ linux-armv8-rpi4/Dockerfile.in | 3 +++ linux-armv8/Dockerfile.in | 3 +++ pvsneslib | 1 + 12 files changed, 49 insertions(+), 20 deletions(-) create mode 100644 .gitmodules create mode 160000 pvsneslib diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4d10a65..49200ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ on: branches: - '*' schedule: - - cron: '0 0 * * 2' # every tuesday at 00:00 https://crontab.guru/#0_7_*_*_1 + - cron: '0 0 * * 2' # Every tuesday at 00:00 https://crontab.guru/#0_7_*_*_1 jobs: base: name: base @@ -45,7 +45,7 @@ jobs: runs-on: ubuntu-20.04 strategy: fail-fast: false - max-parallel: 4 + max-parallel: 3 # manylinux2014-aarch64 matrix: arch_name: [android-arm, android-arm64, android-x86, android-x86_64, web-wasm, linux-armv8, linux-armv8-musl, linux-armv8-rpi3, linux-armv8-rpi4, linux-armv5, linux-armv5-musl, linux-armv6-rpi1, linux-armv7-rpi2, linux-armv6-musl, linux-armv6-rpi-old, linux-armv7, linux-armv7a, linux-armv7l-musl, linux-mips, linux-mips64, linux-mipsel, linux-m68k, linux-ppc32, linux-ppc64, linux-s390x, linux-x64, linux-x64-clang, linux-x86, linux-riscv64, manylinux2014-x64, manylinux2014-x86, windows-static-x64, windows-static-x64-posix, windows-static-x86, windows-shared-x64, windows-shared-x64-posix, windows-shared-x86] diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c508c2d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "pvsneslib"] + path = pvsneslib + url = https://github.com/Bensuperpc/pvsneslib-docker.git diff --git a/common.lib b/common.lib index 0bda940..0a527b8 100644 --- a/common.lib +++ b/common.lib @@ -4,14 +4,15 @@ RUN cd /tmp/ && git clone https://github.com/boostorg/boost.git && cd boost && git checkout boost-1.76.0 && git submodule update --init && \ cd /tmp/boost/ && ./bootstrap.sh --without-libraries=mpi,python,regex,iostreams && \ cd /tmp/boost/ && echo "using gcc : 8.4 : ${CXX} ; " >> tools/build/src/user-config.jam && \ - cd /tmp/boost/ && ./b2 install --toolset=gcc-8.4 --prefix=/usr/local/boost threading=multi link=static && \ + cd /tmp/boost/ && ./b2 install --toolset=gcc-8.4 --prefix=/usr/${CROSS_TRIPLE}/boost/ threading=multi link=static && \ + export PATH="/usr/${CROSS_TRIPLE}/boost/bin:$PATH" && \ rm -rf /tmp/boost/ # OpenCV lib RUN cd /tmp/ && git clone https://github.com/opencv/opencv.git && git clone https://github.com/opencv/opencv_contrib.git && \ cd /tmp/ && git -C opencv checkout 4.5.2 && git -C opencv_contrib checkout 4.5.2 && \ cd /tmp/opencv/ && mkdir -p build && cmake -Bbuild -H. \ - -GNinja \ + -G Ninja \ -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \ -D CMAKE_BUILD_TYPE=RELEASE \ -D OPENCV_ENABLE_NONFREE=ON \ @@ -27,11 +28,24 @@ RUN cd /tmp/ && git clone https://github.com/opencv/opencv.git && git clone http -D BUILD_NEW_PYTHON_SUPPORT=OFF \ -D BUILD_opencv_python3=OFF \ -D HAVE_opencv_python3=OFF \ - -D PYTHON_DEFAULT_EXECUTABLE="" && \ + -D PYTHON_DEFAULT_EXECUTABLE="" \ + -D CMAKE_PREFIX_PATH="/usr/${CROSS_TRIPLE}/opencv" &&\ cd /tmp/opencv && ninja -Cbuild && \ cd /tmp/opencv/build && \ ninja install && \ + export PATH="/usr/${CROSS_TRIPLE}/opencv/bin:$PATH" && \ rm -rf /tmp/opencv/ && rm -rf /tmp/opencv_contrib - - +# OpenSSL lib +ENV OPENSSL_VERSION="1.1.1k" +RUN set -x \ + && wget --no-check-certificate -O /tmp/openssl-${OPENSSL_VERSION}.tar.gz "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" \ + && tar -xvf /tmp/openssl-${OPENSSL_VERSION}.tar.gz -C /tmp/ \ + && rm -rf /tmp/openssl-${OPENSSL_VERSION}.tar.gz \ + && cd /tmp/openssl-${OPENSSL_VERSION} \ + && ./Configure -static -fPIC ${OPENSSL_ARCH} -march=${OPENSSL_TARGET} no-asm --cross-compile-prefix="" --prefix=/usr/${CROSS_TRIPLE}/ssl --openssldir=/usr/${CROSS_TRIPLE}/ssl \ + && make -j$(nproc) \ + && make install \ + && export PATH="/usr/${CROSS_TRIPLE}/ssl/bin:$PATH" \ + && cd .. \ + && rm -rf openssl-${OPENSSL_VERSION} \ No newline at end of file diff --git a/linux-armv6-musl/Dockerfile.in b/linux-armv6-musl/Dockerfile.in index a043a6d..51bae2e 100644 --- a/linux-armv6-musl/Dockerfile.in +++ b/linux-armv6-musl/Dockerfile.in @@ -26,16 +26,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/linux-armv6-musl -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/linux-armv6-rpi1/Dockerfile.in b/linux-armv6-rpi1/Dockerfile.in index 89335f3..7c05a00 100644 --- a/linux-armv6-rpi1/Dockerfile.in +++ b/linux-armv6-rpi1/Dockerfile.in @@ -37,6 +37,9 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm +ENV OPENSSL_ARCH linux-armv4 +ENV OPENSSL_TARGET armv6 + #include "common.lib" #include "common.label-and-env" diff --git a/linux-armv7-rpi2/Dockerfile.in b/linux-armv7-rpi2/Dockerfile.in index 5da52ca..7d97ae5 100644 --- a/linux-armv7-rpi2/Dockerfile.in +++ b/linux-armv7-rpi2/Dockerfile.in @@ -37,6 +37,9 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm +ENV OPENSSL_ARCH linux-armv4 +ENV OPENSSL_TARGET armv7-a + #include "common.lib" #include "common.label-and-env" diff --git a/linux-armv7/Dockerfile.in b/linux-armv7/Dockerfile.in index 70c7a90..b9ca8d6 100644 --- a/linux-armv7/Dockerfile.in +++ b/linux-armv7/Dockerfile.in @@ -37,6 +37,9 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm +ENV OPENSSL_ARCH linux-armv4 +ENV OPENSSL_TARGET armv7-a + #include "common.lib" #include "common.label-and-env" diff --git a/linux-armv7a/Dockerfile.in b/linux-armv7a/Dockerfile.in index 441615f..81acf02 100644 --- a/linux-armv7a/Dockerfile.in +++ b/linux-armv7a/Dockerfile.in @@ -37,4 +37,9 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm +ENV OPENSSL_ARCH linux-armv4 +ENV OPENSSL_TARGET armv7-a + +#include "common.lib" + #include "common.label-and-env" diff --git a/linux-armv8-rpi3/Dockerfile.in b/linux-armv8-rpi3/Dockerfile.in index 6a0cea4..f386c60 100644 --- a/linux-armv8-rpi3/Dockerfile.in +++ b/linux-armv8-rpi3/Dockerfile.in @@ -38,6 +38,9 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm64 +ENV OPENSSL_ARCH linux-aarch64 +ENV OPENSSL_TARGET armv8-a + #include "common.lib" #include "common.label-and-env" diff --git a/linux-armv8-rpi4/Dockerfile.in b/linux-armv8-rpi4/Dockerfile.in index 1496e25..a61761f 100644 --- a/linux-armv8-rpi4/Dockerfile.in +++ b/linux-armv8-rpi4/Dockerfile.in @@ -38,6 +38,9 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm64 +ENV OPENSSL_ARCH linux-aarch64 +ENV OPENSSL_TARGET armv8-a + #include "common.lib" #include "common.label-and-env" diff --git a/linux-armv8/Dockerfile.in b/linux-armv8/Dockerfile.in index d19569e..6553d0d 100644 --- a/linux-armv8/Dockerfile.in +++ b/linux-armv8/Dockerfile.in @@ -38,6 +38,9 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm64 +ENV OPENSSL_ARCH linux-aarch64 +ENV OPENSSL_TARGET armv8-a + #include "common.lib" #include "common.label-and-env" diff --git a/pvsneslib b/pvsneslib new file mode 160000 index 0000000..3be0a8e --- /dev/null +++ b/pvsneslib @@ -0,0 +1 @@ +Subproject commit 3be0a8e58351833a801082acea83108dc5121989