From 5c7a3bd647c2b7d8f06e9344241f0a7c5ae71734 Mon Sep 17 00:00:00 2001 From: simon987 Date: Fri, 14 Apr 2023 20:34:53 -0400 Subject: [PATCH] Update build image for 3.x --- Dockerfile | 37 ++--- patches/20439.patch | 263 ---------------------------------- patches/libraw.patch | 31 ---- patches/mongoose-master.patch | 12 -- patches/mongoose-nolog.patch | 10 -- patches/mupdf-curl-dep.patch | 18 --- 6 files changed, 9 insertions(+), 362 deletions(-) delete mode 100644 patches/20439.patch delete mode 100644 patches/libraw.patch delete mode 100644 patches/mongoose-master.patch delete mode 100644 patches/mongoose-nolog.patch delete mode 100644 patches/mupdf-curl-dep.patch diff --git a/Dockerfile b/Dockerfile index 6c04472..d60932f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,45 +1,26 @@ -FROM ubuntu:18.04 +FROM debian:10 MAINTAINER simon987 -RUN apt update -RUN apt install -y software-properties-common && add-apt-repository ppa:ubuntu-toolchain-r/test -y -RUN apt update && apt install -y gcc-7 g++-7 && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7 - -RUN apt install -y pkg-config python3 yasm ragel \ +RUN apt update && apt install -y build-essential pkg-config python3 yasm ragel \ automake autotools-dev wget libtool libssl-dev \ curl zip unzip tar xorg-dev libglu1-mesa-dev libxcursor-dev \ - libxml2-dev libxinerama-dev gettext bison \ - nasm git meson libmagic-dev \ + libxml2-dev libxinerama-dev gettext \ + nasm git libmagic-dev bison python3-setuptools \ && apt clean # cmake - -RUN wget https://github.com/Kitware/CMake/releases/download/v3.20.2/cmake-3.20.2.tar.gz && \ - tar -xzf cmake-*.tar.gz && cd cmake-* && ./bootstrap && make -j33 && make install && rm -rf /cmake-* +RUN curl -L https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3-linux-x86_64.tar.gz | tar -xzf - --strip-components=1 -C /usr/ # vcpkg -RUN git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 897ff93 - -ADD patches/* / -RUN cd /vcpkg/; patch -p1 < ../mupdf-curl-dep.patch -RUN cd /vcpkg/; patch -p1 < ../mongoose-master.patch -RUN cd /vcpkg/; patch -p1 < ../mongoose-nolog.patch -RUN cd /vcpkg/; patch -p1 < ../libraw.patch +RUN git clone --depth 1 https://github.com/simon987/vcpkg.git && cd vcpkg RUN cd /vcpkg/ && ./bootstrap-vcpkg.sh RUN ./vcpkg/vcpkg install \ - curl[core,openssl] \ + curl[core,openssl] sqlite3 cpp-jwt pcre cjson brotli libarchive[core,bzip2,libxml2,lz4,lzma,lzo] pthread tesseract libxml2 libmupdf gtest mongoose libmagic libraw gumbo ffmpeg[core,avcodec,avformat,swscale,swresample] \ && rm -rf /root/.cache/vcpkg /vcpkg/downloads /vcpkg/buildtrees /vcpkg/downloads -RUN ./vcpkg/vcpkg install \ - lmdb cjson glib brotli libarchive[core,bzip2,libxml2,lz4,lzma,lzo] pthread tesseract libxml2 libmupdf gtest mongoose libraw jasper lcms gumbo \ - && rm -rf /root/.cache/vcpkg /vcpkg/downloads /vcpkg/buildtrees /vcpkg/downloads - -RUN mkdir -p /debug/lib/ && mkdir -p /include && \ - cp -r /vcpkg/installed/x64-linux/include/cjson/ /include/ && \ - cp /vcpkg/installed/x64-linux/debug/lib/libcjson.a /debug/lib/ && \ - cp /vcpkg/installed/x64-linux/lib/libcjson.a /lib/ - +COPY patches/* ./ +RUN cd /vcpkg/ && patch -p1 < /fix-libraw.patch diff --git a/patches/20439.patch b/patches/20439.patch deleted file mode 100644 index cc84d57..0000000 --- a/patches/20439.patch +++ /dev/null @@ -1,263 +0,0 @@ -From 1850fd3203f171dba93e7bbdeaf2853731c8f820 Mon Sep 17 00:00:00 2001 -From: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com> -Date: Wed, 29 Sep 2021 19:51:04 -0700 -Subject: [PATCH 1/6] [vcpkg-cmake-config] fix up cmake_current_packages_dir - ---- - ports/vcpkg-cmake-config/vcpkg.json | 2 +- - ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake | 2 +- - versions/baseline.json | 2 +- - versions/v-/vcpkg-cmake-config.json | 5 +++++ - 4 files changed, 8 insertions(+), 3 deletions(-) - -diff --git a/ports/vcpkg-cmake-config/vcpkg.json b/ports/vcpkg-cmake-config/vcpkg.json -index 749114aa4d2a..cec8835d9875 100644 ---- a/ports/vcpkg-cmake-config/vcpkg.json -+++ b/ports/vcpkg-cmake-config/vcpkg.json -@@ -1,4 +1,4 @@ - { - "name": "vcpkg-cmake-config", -- "version-date": "2021-09-27" -+ "version-date": "2021-09-29" - } -diff --git a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -index 7a7a6c833b68..854cf3054b5c 100644 ---- a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -+++ b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -@@ -216,7 +216,7 @@ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)]] - - # Patch out any remaining absolute references - file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" cmake_current_packages_dir) -- string(REPLACE "${cmake_current_packages_dir}" [[${_IMPORT_PREFIX}]] contents "${contents}") -+ string(REPLACE "${cmake_current_packages_dir}" "\${CMAKE_CURRENT_LIST_DIR}/../.." contents "${contents}") - - file(WRITE "${main_cmake}" "${contents}") - endforeach() -diff --git a/versions/baseline.json b/versions/baseline.json -index 8c4ebc40d12a..46dc0ebef6ee 100644 ---- a/versions/baseline.json -+++ b/versions/baseline.json -@@ -6865,7 +6865,7 @@ - "port-version": 0 - }, - "vcpkg-cmake-config": { -- "baseline": "2021-09-27", -+ "baseline": "2021-09-29", - "port-version": 0 - }, - "vcpkg-gfortran": { -diff --git a/versions/v-/vcpkg-cmake-config.json b/versions/v-/vcpkg-cmake-config.json -index cff03bb75dca..8ac57aff5024 100644 ---- a/versions/v-/vcpkg-cmake-config.json -+++ b/versions/v-/vcpkg-cmake-config.json -@@ -1,5 +1,10 @@ - { - "versions": [ -+ { -+ "git-tree": "6ef57ed7342c118f3be50c56a2233384c433591d", -+ "version-date": "2021-09-29", -+ "port-version": 0 -+ }, - { - "git-tree": "9ae99981abcd01b092344f85ef6e1de3c1f9856a", - "version-date": "2021-09-27", - -From da9e981a8b14c1de960fff7cd84bb6c20febfa29 Mon Sep 17 00:00:00 2001 -From: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com> -Date: Wed, 29 Sep 2021 20:35:32 -0700 -Subject: [PATCH 2/6] Small changes - ---- - ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake | 2 +- - versions/v-/vcpkg-cmake-config.json | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -index 854cf3054b5c..b3c3f4cb235b 100644 ---- a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -+++ b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -@@ -216,7 +216,7 @@ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)]] - - # Patch out any remaining absolute references - file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" cmake_current_packages_dir) -- string(REPLACE "${cmake_current_packages_dir}" "\${CMAKE_CURRENT_LIST_DIR}/../.." contents "${contents}") -+ string(REPLACE "${cmake_current_packages_dir}" [[${CMAKE_CURRENT_LIST_DIR}/../..]] contents "${contents}") - - file(WRITE "${main_cmake}" "${contents}") - endforeach() -diff --git a/versions/v-/vcpkg-cmake-config.json b/versions/v-/vcpkg-cmake-config.json -index 8ac57aff5024..bd11173f5534 100644 ---- a/versions/v-/vcpkg-cmake-config.json -+++ b/versions/v-/vcpkg-cmake-config.json -@@ -1,7 +1,7 @@ - { - "versions": [ - { -- "git-tree": "6ef57ed7342c118f3be50c56a2233384c433591d", -+ "git-tree": "dbb5aa546f9d670f6fff6d063ccea8e958480f2c", - "version-date": "2021-09-29", - "port-version": 0 - }, - -From 981066d770f9275bfe908556f70dbbe41f406b9a Mon Sep 17 00:00:00 2001 -From: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com> -Date: Mon, 18 Oct 2021 19:05:13 -0700 -Subject: [PATCH 3/6] Address the review suggestion - ---- - .../vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake | 10 +++++++++- - versions/v-/vcpkg-cmake-config.json | 2 +- - 2 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -index b3c3f4cb235b..ce112beda0ee 100644 ---- a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -+++ b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -@@ -216,7 +216,15 @@ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)]] - - # Patch out any remaining absolute references - file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" cmake_current_packages_dir) -- string(REPLACE "${cmake_current_packages_dir}" [[${CMAKE_CURRENT_LIST_DIR}/../..]] contents "${contents}") -+ if (contents MATCHES ".*${cmake_current_packages_dir}.*") -+ string(PREPEND contents -+[[ -+get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}" PATH) -+get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) -+]] -+ ) -+ string(REPLACE "${cmake_current_packages_dir}" [[${_IMPORT_PREFIX}]] contents "${contents}") -+ endif() - - file(WRITE "${main_cmake}" "${contents}") - endforeach() -diff --git a/versions/v-/vcpkg-cmake-config.json b/versions/v-/vcpkg-cmake-config.json -index bd11173f5534..6b5d6782ff32 100644 ---- a/versions/v-/vcpkg-cmake-config.json -+++ b/versions/v-/vcpkg-cmake-config.json -@@ -1,7 +1,7 @@ - { - "versions": [ - { -- "git-tree": "dbb5aa546f9d670f6fff6d063ccea8e958480f2c", -+ "git-tree": "34d05637b537f2a7b665f767123c17823bc796aa", - "version-date": "2021-09-29", - "port-version": 0 - }, - -From 32b14db542ee50fb581de96286ed4e186e45a913 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= - <47264268+JackBoosY@users.noreply.github.com> -Date: Tue, 19 Oct 2021 10:15:29 +0800 -Subject: [PATCH 4/6] Update - ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake - ---- - ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -index ce112beda0ee..0fe2fe8fc3b2 100644 ---- a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -+++ b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -@@ -223,7 +223,7 @@ get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}" PATH) - get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) - ]] - ) -- string(REPLACE "${cmake_current_packages_dir}" [[${_IMPORT_PREFIX}]] contents "${contents}") -+ string(REPLACE "${cmake_current_packages_dir}" [[${_IMPORT_PREFIX}]] contents "${contents}") - endif() - - file(WRITE "${main_cmake}" "${contents}") - -From e8b7136d43e0e3340e6749737cf2c8a6af66eb0d Mon Sep 17 00:00:00 2001 -From: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com> -Date: Tue, 19 Oct 2021 19:11:57 -0700 -Subject: [PATCH 5/6] Update the baseline version - ---- - versions/v-/vcpkg-cmake-config.json | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/versions/v-/vcpkg-cmake-config.json b/versions/v-/vcpkg-cmake-config.json -index 6b5d6782ff32..59248ccaa390 100644 ---- a/versions/v-/vcpkg-cmake-config.json -+++ b/versions/v-/vcpkg-cmake-config.json -@@ -1,7 +1,7 @@ - { - "versions": [ - { -- "git-tree": "34d05637b537f2a7b665f767123c17823bc796aa", -+ "git-tree": "8a029a9c4c967f29abe2f3dd13f8bc47a62b396f", - "version-date": "2021-09-29", - "port-version": 0 - }, - -From dbac14188699c5f8c40eaceb8ae055bd6cf3ee6e Mon Sep 17 00:00:00 2001 -From: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com> -Date: Fri, 5 Nov 2021 02:38:19 -0700 -Subject: [PATCH 6/6] Address the review suggestions - ---- - ports/vcpkg-cmake-config/vcpkg.json | 2 +- - ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake | 6 +++--- - versions/baseline.json | 2 +- - versions/v-/vcpkg-cmake-config.json | 4 ++-- - 4 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/ports/vcpkg-cmake-config/vcpkg.json b/ports/vcpkg-cmake-config/vcpkg.json -index cec8835d9875..f8cfd3a3178b 100644 ---- a/ports/vcpkg-cmake-config/vcpkg.json -+++ b/ports/vcpkg-cmake-config/vcpkg.json -@@ -1,4 +1,4 @@ - { - "name": "vcpkg-cmake-config", -- "version-date": "2021-09-29" -+ "version-date": "2021-11-05" - } -diff --git a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -index 0fe2fe8fc3b2..12a329ac18b9 100644 ---- a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -+++ b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake -@@ -219,11 +219,11 @@ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)]] - if (contents MATCHES ".*${cmake_current_packages_dir}.*") - string(PREPEND contents - [[ --get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}" PATH) --get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) -+get_filename_component(_IMPORT_PACKAGE_PREFIX "${CMAKE_CURRENT_LIST_DIR}" PATH) -+get_filename_component(_IMPORT_PACKAGE_PREFIX "${_IMPORT_PACKAGE_PREFIX}" PATH) - ]] - ) -- string(REPLACE "${cmake_current_packages_dir}" [[${_IMPORT_PREFIX}]] contents "${contents}") -+ string(REPLACE "${cmake_current_packages_dir}" [[${_IMPORT_PACKAGE_PREFIX}]] contents "${contents}") - endif() - - file(WRITE "${main_cmake}" "${contents}") -diff --git a/versions/baseline.json b/versions/baseline.json -index 18bcb9bfb0cb..fb50c61b485f 100644 ---- a/versions/baseline.json -+++ b/versions/baseline.json -@@ -6993,7 +6993,7 @@ - "port-version": 0 - }, - "vcpkg-cmake-config": { -- "baseline": "2021-09-29", -+ "baseline": "2021-11-05", - "port-version": 0 - }, - "vcpkg-gfortran": { -diff --git a/versions/v-/vcpkg-cmake-config.json b/versions/v-/vcpkg-cmake-config.json -index 59248ccaa390..450c30409bc8 100644 ---- a/versions/v-/vcpkg-cmake-config.json -+++ b/versions/v-/vcpkg-cmake-config.json -@@ -1,8 +1,8 @@ - { - "versions": [ - { -- "git-tree": "8a029a9c4c967f29abe2f3dd13f8bc47a62b396f", -- "version-date": "2021-09-29", -+ "git-tree": "66d46c8862490290d423fbeb3ce97b8b5ab68242", -+ "version-date": "2021-11-05", - "port-version": 0 - }, - { diff --git a/patches/libraw.patch b/patches/libraw.patch deleted file mode 100644 index 94a6b94..0000000 --- a/patches/libraw.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/ports/libraw/portfile.cmake -+++ b/ports/libraw/portfile.cmake -@@ -1,23 +1,23 @@ - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO LibRaw/LibRaw -- REF d4f05dd1b9b2d44c8f7e82043cbad3c724db2416 -- SHA512 5794521f535163afd7815ad005295301c5e0e2f8b2f34ef0a911d9dd1572c1f456b292777548203f9767957a55782b5bc9041c033190d25d1e9b4240d7df32b9 -+ REF 693ce5ed17dc847965e6ea996be3a7cc34b26062 -+ SHA512 3924358a95641a907bffff7a44a78f1737f2f397bb9a832611379013a59b612b2715d9481f6c059ed745c872eedf0496d2b6952f849384367969926719c6ff70 - HEAD_REF master - ) - - vcpkg_from_github( - OUT_SOURCE_PATH LIBRAW_CMAKE_SOURCE_PATH - REPO LibRaw/LibRaw-cmake -- REF a71f3b83ee3dccd7be32f9a2f410df4d9bdbde0a -- SHA512 607e6f76bcb57534da4f0c864b7a421f1ed49244468b1b52abe77f65aa599cae80715520b3a951294321b812deffd4f163757c9949f337571aa54f414ccc58a5 -+ REF b82a1b0101b1e7264eb3113f1e6c1ba2372ebb7f -+ SHA512 b3f9807a902937db101c6e42b4275817420deed8774a05a68bca5a985cda688f27da3f473f55f2460af58bf1a2bf02578499e5401c8b7b677f46ca9f8f5faf9f - HEAD_REF master - PATCHES -- findlibraw_debug_fix.patch -+ #findlibraw_debug_fix.patch - lcms2_debug_fix.patch - # Move the non-thread-safe library to manual-link. This is unfortunately needed - # because otherwise libraries that build on top of libraw have to choose. -- fix-install.patch -+ # fix-install.patch - ) - diff --git a/patches/mongoose-master.patch b/patches/mongoose-master.patch deleted file mode 100644 index 0d61ce7..0000000 --- a/patches/mongoose-master.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/ports/mongoose/portfile.cmake -+++ b/ports/mongoose/portfile.cmake -@@ -5,8 +5,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO cesanta/mongoose -- REF 8e520756366ca5739f13dc6ad65fcf269dbbc994 #v7.1 -- SHA512 a966a8b4e47e36da0f630c3cf343c85a1c1138508a82e506b21e4b8bd72573d0e0145318f97b32a67f423e033b348de76a00b780430e4e69d1a98bd7494a3e0a -+ REF d5993ba27ece4b406c230eca63b76dd5d2c28a2d # 7.7 -+ SHA512 b5633ae2845d6000549f84dd4933064c8ba6eedc37004666fa2de428e31df2f2ba2422a4434b001629be7bb52b94c52ed62e904231f39fc12074158d85ed145d - HEAD_REF master - ) diff --git a/patches/mongoose-nolog.patch b/patches/mongoose-nolog.patch deleted file mode 100644 index d0a7e81..0000000 --- a/patches/mongoose-nolog.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/ports/mongoose/CMakeLists.txt -+++ b/ports/mongoose/CMakeLists.txt -@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.14) - - project(mongoose C) - -+add_compile_definitions("MG_ENABLE_LOG=0") -+ - include(GNUInstallDirs) - diff --git a/patches/mupdf-curl-dep.patch b/patches/mupdf-curl-dep.patch deleted file mode 100644 index 147f000..0000000 --- a/patches/mupdf-curl-dep.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/ports/libmupdf/vcpkg.json 2021-09-22 09:11:22.598136284 -0400 -+++ b/ports/libmupdf/vcpkg.json 2021-11-07 10:14:38.039574071 -0500 -@@ -5,7 +5,13 @@ - "homepage": "https://github.com/ArtifexSoftware/mupdf", - "supports": "!osx", - "dependencies": [ -- "curl", -+ { -+ "name": "curl", -+ "default-features": false, -+ "features": [ -+ "openssl" -+ ] -+ }, - "freetype", - "glfw3", - "gumbo", -