diff --git a/CMakeLists.txt b/CMakeLists.txt index 16b831974..7b4bbb909 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16.3) project(koreader LANGUAGES C CXX) include(${CMAKE_KOVARS}) diff --git a/Makefile.defs b/Makefile.defs index 27ac50dbf..349e07c49 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -802,7 +802,7 @@ endif # Native & cross definitions. define cmake_toolchain -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16.3) # CMake Cross ToolChain config file. Adapted from Debian's dpkg-cross ;). # c.f., https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-toolchain diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index dbfa16e03..1b841aeb8 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16.3) project(koreader-base LANGUAGES C CXX) include(CheckFunctionExists) @@ -172,7 +172,7 @@ set(crengine_BINARY_DIR ${crengine_CMAKE_BINARY_DIR}/build) declare_project(thirdparty/cpu_features EXCLUDE_FROM_ALL) # curl -declare_project(thirdparty/curl DEPENDS openssl zlib EXCLUDE_FROM_ALL) +declare_project(thirdparty/curl DEPENDS libressl zlib EXCLUDE_FROM_ALL) # czmq if(NOT WIN32) @@ -264,6 +264,10 @@ declare_project(thirdparty/libk2pdfopt DEPENDS leptonica libpng tesseract zlib) # libpng declare_project(thirdparty/libpng DEPENDS zlib EXCLUDE_FROM_ALL) +# libressl +# NOTE: `EXCLUDE_FROM_ALL` is not used because `ffi/crypto` needs `libcrypto`. +declare_project(thirdparty/libressl) + # libunibreak declare_project(thirdparty/libunibreak EXCLUDE_FROM_ALL) @@ -314,7 +318,7 @@ declare_project(thirdparty/luajson) declare_project(thirdparty/luarocks DEPENDS luajit EXCLUDE_FROM_ALL) # luasec -declare_project(thirdparty/luasec DEPENDS luajit luasocket openssl) +declare_project(thirdparty/luasec DEPENDS luajit luasocket libressl) # luasocket declare_project(thirdparty/luasocket DEPENDS luajit) @@ -350,9 +354,6 @@ else() endif() declare_project(thirdparty/openssh ${EXCLUDE_FROM_ALL}) -# openssl -declare_project(thirdparty/openssl) - # pcre2 declare_project(thirdparty/pcre2 EXCLUDE_FROM_ALL) @@ -392,7 +393,7 @@ endif() declare_project(thirdparty/tesseract DEPENDS ${DEPENDS}) # turbo -declare_project(thirdparty/turbo DEPENDS openssl) +declare_project(thirdparty/turbo DEPENDS libressl) # utf8proc declare_project(thirdparty/utf8proc) @@ -409,7 +410,7 @@ if(CERVANTES OR KINDLE OR KOBO OR POCKETBOOK OR REMARKABLE OR SONY_PRSTUX) else() set(EXCLUDE_FROM_ALL EXCLUDE_FROM_ALL) endif() -declare_project(thirdparty/zsync2 DEPENDS curl openssl zlib ${EXCLUDE_FROM_ALL}) +declare_project(thirdparty/zsync2 DEPENDS curl libressl zlib ${EXCLUDE_FROM_ALL}) # }}} diff --git a/ffi/crypto.lua b/ffi/crypto.lua index 98ec990aa..f506f6503 100644 --- a/ffi/crypto.lua +++ b/ffi/crypto.lua @@ -7,7 +7,7 @@ LuaJIT FFI wrapper for libcrypto (OpenSSL). local ffi = require("ffi") require("ffi/crypto_h") -local libcrypto = ffi.loadlib("crypto", "1.1") +local libcrypto = ffi.loadlib("crypto", "55") local crypto = {} function crypto.pbkdf2_hmac_sha1(pass, salt, iterations, key_len) diff --git a/thirdparty/cmake_modules/koreader_targets.cmake b/thirdparty/cmake_modules/koreader_targets.cmake index c792c4c57..543d8fe34 100644 --- a/thirdparty/cmake_modules/koreader_targets.cmake +++ b/thirdparty/cmake_modules/koreader_targets.cmake @@ -297,6 +297,8 @@ if(MONOLIBTIC) leptonica::leptonica libjpeg-turbo::turbojpeg libk2pdfopt::k2pdfopt + libressl::crypto + libressl::ssl libzmq::zmq lodepng::lodepng lpeg::lpeg @@ -305,8 +307,6 @@ if(MONOLIBTIC) luasocket::luasocket luasocket::mcore luasocket::score - openssl::crypto - openssl::ssl pthread sqlite::sqlite3 turbo::tffi_wrap diff --git a/thirdparty/cmake_modules/koreader_thirdparty_libs.cmake b/thirdparty/cmake_modules/koreader_thirdparty_libs.cmake index 51a4c17fb..532aae6b0 100644 --- a/thirdparty/cmake_modules/koreader_thirdparty_libs.cmake +++ b/thirdparty/cmake_modules/koreader_thirdparty_libs.cmake @@ -101,6 +101,20 @@ declare_dependency(libk2pdfopt::k2pdfopt INCLUDES k2pdfopt leptonica MONOLIBTIC # libpng declare_dependency(libpng::png16 MONOLIBTIC png16) +# libressl +set(CRYPTO_LIBS) +set(SSL_LIBS) +if(MONOLIBTIC) + list(APPEND CRYPTO_LIBS pthread) + list(APPEND SSL_LIBS pthread) + if(NOT ANDROID) + list(APPEND CRYPTO_LIBS rt) + list(APPEND SSL_LIBS rt) + endif() +endif() +declare_dependency(libressl::crypto MONOLIBTIC crypto LIBRARIES ${CRYPTO_LIBS}) +declare_dependency(libressl::ssl MONOLIBTIC ssl LIBRARIES ${SSL_LIBS}) + # libunibreak declare_dependency(libunibreak::unibreak MONOLIBTIC unibreak) @@ -175,16 +189,6 @@ if(MONOLIBTIC) declare_dependency(openlipclua::libopenlipclua SHARED lipc STATIC openlipclua) endif() -# openssl -set(CRYPTO_LIBS) -set(SSL_LIBS) -if(MONOLIBTIC) - list(APPEND CRYPTO_LIBS dl pthread) - list(APPEND SSL_LIBS pthread) -endif() -declare_dependency(openssl::crypto MONOLIBTIC crypto LIBRARIES ${CRYPTO_LIBS}) -declare_dependency(openssl::ssl MONOLIBTIC ssl LIBRARIES ${SSL_LIBS}) - # nanosvg declare_dependency(nanosvg::nanosvg LIBRARIES m) diff --git a/thirdparty/czmq/cmake_tweaks.patch b/thirdparty/czmq/cmake_tweaks.patch index 59695c767..3da014b1c 100644 --- a/thirdparty/czmq/cmake_tweaks.patch +++ b/thirdparty/czmq/cmake_tweaks.patch @@ -5,7 +5,7 @@ # Project setup ######################################################################## -cmake_minimum_required(VERSION 2.8.12) -+cmake_minimum_required(VERSION 3.15) ++cmake_minimum_required(VERSION 3.16.3) project(czmq) enable_language(C) enable_testing() diff --git a/thirdparty/giflib/overlay/CMakeLists.txt b/thirdparty/giflib/overlay/CMakeLists.txt index d6f176249..216f732f3 100644 --- a/thirdparty/giflib/overlay/CMakeLists.txt +++ b/thirdparty/giflib/overlay/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16.3) project(giflib LANGUAGES C) add_library(gif) diff --git a/thirdparty/kpvcrlib/CMakeLists.txt b/thirdparty/kpvcrlib/CMakeLists.txt index 476c1110f..ec2988dde 100644 --- a/thirdparty/kpvcrlib/CMakeLists.txt +++ b/thirdparty/kpvcrlib/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16.3) project(koreader LANGUAGES C CXX) include(${CMAKE_KOVARS}) diff --git a/thirdparty/leptonica/cmake_tweaks.patch b/thirdparty/leptonica/cmake_tweaks.patch index f1c3dd19b..a830104c6 100644 --- a/thirdparty/leptonica/cmake_tweaks.patch +++ b/thirdparty/leptonica/cmake_tweaks.patch @@ -6,7 +6,7 @@ -cmake_minimum_required(VERSION 3.5) -cmake_policy(SET CMP0054 NEW) -+cmake_minimum_required(VERSION 3.15) ++cmake_minimum_required(VERSION 3.16.3) # In-source builds are disabled. if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") diff --git a/thirdparty/libressl/CMakeLists.txt b/thirdparty/libressl/CMakeLists.txt new file mode 100644 index 000000000..f26f707ef --- /dev/null +++ b/thirdparty/libressl/CMakeLists.txt @@ -0,0 +1,30 @@ +list(APPEND PATCH_FILES + cmake_tweaks.patch +) + +list(APPEND CMAKE_ARGS + -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} + -DBUILD_SHARED_LIBS=$> + # Project options. + -DLIBRESSL_APPS=OFF + -DLIBRESSL_TESTS=OFF + -DENABLE_ASM=${WANT_SIMD} +) + +list(APPEND BUILD_CMD COMMAND ninja) + +list(APPEND INSTALL_CMD COMMAND ${CMAKE_COMMAND} --install .) + +if(NOT MONOLIBTIC) + append_shared_lib_install_commands(INSTALL_CMD crypto VERSION 55) + append_shared_lib_install_commands(INSTALL_CMD ssl VERSION 58) +endif() + +external_project( + DOWNLOAD URL 4775b6b187a93c527eeb95a13e6ebd64 + https://cdn.openbsd.org/pub/OpenBSD/LibreSSL/libressl-4.0.0.tar.gz + PATCH_FILES ${PATCH_FILES} + CMAKE_ARGS ${CMAKE_ARGS} + BUILD_COMMAND ${BUILD_CMD} + INSTALL_COMMAND ${INSTALL_CMD} +) diff --git a/thirdparty/libressl/cmake_tweaks.patch b/thirdparty/libressl/cmake_tweaks.patch new file mode 100644 index 000000000..b078ad5a4 --- /dev/null +++ b/thirdparty/libressl/cmake_tweaks.patch @@ -0,0 +1,19 @@ +--- i/CMakeLists.txt ++++ w/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.16.4) ++cmake_minimum_required (VERSION 3.16.3) + if(MSVC) + cmake_policy(SET CMP0091 NEW) + endif() +@@ -516,8 +516,8 @@ + # Create pkgconfig files. + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix \${prefix}) +- set(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) +- set(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) ++ set(libdir \${exec_prefix}/lib) ++ set(includedir \${prefix}/include) + if(PLATFORM_LIBS) + string(REGEX REPLACE ";" " -l" PLATFORM_LDADD ";${PLATFORM_LIBS}") + endif() diff --git a/thirdparty/libzmq/cmake_tweaks.patch b/thirdparty/libzmq/cmake_tweaks.patch index af386870e..a950d7623 100644 --- a/thirdparty/libzmq/cmake_tweaks.patch +++ b/thirdparty/libzmq/cmake_tweaks.patch @@ -5,7 +5,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL Darwin) - cmake_minimum_required(VERSION 3.0.2) -+ cmake_minimum_required(VERSION 3.15) ++ cmake_minimum_required(VERSION 3.16.3) else() - cmake_minimum_required(VERSION 2.8.12) + cmake_minimum_required(VERSION 2.15) diff --git a/thirdparty/lodepng/overlay/CMakeLists.txt b/thirdparty/lodepng/overlay/CMakeLists.txt index 0da5c5577..fa49a4cf4 100644 --- a/thirdparty/lodepng/overlay/CMakeLists.txt +++ b/thirdparty/lodepng/overlay/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16.3) project(lodepng LANGUAGES C) file(WRITE lodepng.c "#include \"lodepng.cpp\"\n") diff --git a/thirdparty/lpeg/overlay/CMakeLists.txt b/thirdparty/lpeg/overlay/CMakeLists.txt index ab2129027..b19a743b1 100644 --- a/thirdparty/lpeg/overlay/CMakeLists.txt +++ b/thirdparty/lpeg/overlay/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16.3) project(lpeg LANGUAGES C) find_package(PkgConfig REQUIRED) diff --git a/thirdparty/luasec/overlay/CMakeLists.txt b/thirdparty/luasec/overlay/CMakeLists.txt index 221e3ed62..7b83bc048 100644 --- a/thirdparty/luasec/overlay/CMakeLists.txt +++ b/thirdparty/luasec/overlay/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16.3) project(luasec LANGUAGES C) find_package(OpenSSL REQUIRED) diff --git a/thirdparty/luasocket/overlay/CMakeLists.txt b/thirdparty/luasocket/overlay/CMakeLists.txt index 5fcc179b5..9691ae152 100644 --- a/thirdparty/luasocket/overlay/CMakeLists.txt +++ b/thirdparty/luasocket/overlay/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16.3) project(luasocket LANGUAGES C) find_package(PkgConfig REQUIRED) diff --git a/thirdparty/md4c/cmake_tweaks.patch b/thirdparty/md4c/cmake_tweaks.patch index 8ff87c155..c24fbc191 100644 --- a/thirdparty/md4c/cmake_tweaks.patch +++ b/thirdparty/md4c/cmake_tweaks.patch @@ -3,7 +3,7 @@ @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.5) -+cmake_minimum_required(VERSION 3.15) ++cmake_minimum_required(VERSION 3.16.3) project(MD4C C) set(MD_VERSION_MAJOR 0) diff --git a/thirdparty/minizip/overlay/CMakeLists.txt b/thirdparty/minizip/overlay/CMakeLists.txt index 97d028439..03d47d9f0 100644 --- a/thirdparty/minizip/overlay/CMakeLists.txt +++ b/thirdparty/minizip/overlay/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16.3) project(minizip LANGUAGES C) file(GLOB AES_SRC aes/*.c) diff --git a/thirdparty/openssl/CMakeLists.txt b/thirdparty/openssl/CMakeLists.txt deleted file mode 100644 index b5b0928be..000000000 --- a/thirdparty/openssl/CMakeLists.txt +++ /dev/null @@ -1,123 +0,0 @@ -list(APPEND PATCH_FILES - openssl-1.1.0j-parallel_install_fix.patch - reduce_build_verbosity.patch - macos_rpath.patch -) -if(MONOLIBTIC) - list(APPEND PATCH_FILES fix_libcrypto_pkg-config_entry.patch) -endif() - -list(APPEND CFG_ENV_VAR - CC=${HOSTCC} - CXX=${HOSTCXX} - # NOTE: Disable https://github.com/openssl/openssl/pull/9595 as it's causing - # stalls long after the early boot on devices without the getrandom() syscall, - # which is pretty much all of them, because it's a Linux 3.17+ & glibc 2.25+ - # feature. This is most easily reproduced with scp transfers that will block - # on the initial select on /dev/random. Since those devices are low-power, UP, - # and mostly idle, it can take a fairly noticeable amount of time for entropy - # to be generated... - CPPFLAGS=-DOPENSSL_RAND_SEED_DEVRANDOM_SHM_ID=-1 - CFLAGS=${CFLAGS} - CXXFLAGS=${CXXFLAGS} - LDFLAGS=${LDFLAGS} -) -# If we have a CHOST set, use it. -if(CHOST) - list(APPEND CFG_ENV_VAR CROSS_COMPILE=${CHOST}-) -endif() - -set(CFG_OPTS shared) - -if(ANDROID) - assert_var_defined(ENV{NDKABI}) - set(CFG_OPTS -D__ANDROID_API__=$ENV{NDKABI} ${CFG_OPTS}) - # If we're on ARM, make it so - if(CHOST MATCHES "^armv7a-.*") - set(CFG_OPTS android-arm ${CFG_OPTS}) - elseif(CHOST MATCHES "^aarch64-.*") - set(CFG_OPTS android-arm64 ${CFG_OPTS}) - elseif(CHOST MATCHES "^x86_64-.*") - set(CFG_OPTS android-x86_64 ${CFG_OPTS}) - else() - set(CFG_OPTS android-x86 ${CFG_OPTS}) - endif() -else() - # If we're on ARM, make it so - if(CHOST MATCHES "^arm-.*") - # Yes, OpenSSL's preset names make no sense. - set(CFG_OPTS linux-armv4 -DL_ENDIAN ${CFG_OPTS}) - elseif(CHOST MATCHES "^aarch64-.*") - set(CFG_OPTS linux-aarch64 -DL_ENDIAN ${CFG_OPTS}) - endif() -endif() - -# Do we support SIMD? -if(WANT_SIMD) - set(ASM_OPT enable-asm) -else() - set(ASM_OPT no-asm) -endif() - -if(APPLE) - list(APPEND CONFIGURE_CMD ${SOURCE_DIR}/Configure) - if(DARWIN_AARCH64) - list(APPEND CONFIGURE_CMD darwin64-arm64-cc) - else() - list(APPEND CONFIGURE_CMD darwin64-x86_64-cc) - endif() -elseif(WIN32) - list(APPEND CONFIGURE_CMD ${SOURCE_DIR}/Configure mingw) -elseif(EMULATE_READER) - list(APPEND CONFIGURE_CMD ${SOURCE_DIR}/config) -else() - list(APPEND CONFIGURE_CMD ${SOURCE_DIR}/Configure) -endif() - -set(CFG_OPTS ${CFG_OPTS} ${ASM_OPT} no-async no-idea no-mdc2 no-rc5 no-tests) -list(APPEND CFG_CMD COMMAND - env ${CFG_ENV_VAR} - ${CONFIGURE_CMD} - --prefix=${STAGING_DIR} - ${CFG_OPTS} -) -if(ANDROID) - # Disable versioning of shared objects. - list(APPEND CFG_CMD COMMAND ${ISED} "s|^SHLIB_EXT=.*|SHLIB_EXT=${LIB_EXT}|" Makefile) -endif() - -set(MAKE_CMD - make - AR=${AR} - CC=${CC} - CXX=${CXX} - LD=${LD} - MAKEDEPEND=${CC} - RANLIB=${RANLIB} - # Reproducible builds. - SOURCE_DATE_EPOCH=1694383200 -) - -list(APPEND BUILD_CMD COMMAND ${MAKE_CMD} build_libs) - -list(APPEND INSTALL_CMD COMMAND ${MAKE_CMD} install_dev) - -if(MONOLIBTIC) - list(APPEND INSTALL_CMD COMMAND sh -c "rm -v \"$1\"* \"$2\"*" -- - ${STAGING_DIR}/lib/libcrypto${LIB_EXT} - ${STAGING_DIR}/lib/libssl${LIB_EXT} - ) -else() - append_shared_lib_install_commands(INSTALL_CMD crypto VERSION 1.1) - append_shared_lib_install_commands(INSTALL_CMD ssl VERSION 1.1) -endif() - -external_project( - DOWNLOAD URL 3f76825f195e52d4b10c70040681a275 - https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz - https://www.openssl.org/source/old/1.1.1/openssl-1.1.1w.tar.gz - PATCH_FILES ${PATCH_FILES} - CONFIGURE_COMMAND ${CFG_CMD} - BUILD_COMMAND ${BUILD_CMD} - INSTALL_COMMAND ${INSTALL_CMD} -) diff --git a/thirdparty/openssl/fix_libcrypto_pkg-config_entry.patch b/thirdparty/openssl/fix_libcrypto_pkg-config_entry.patch deleted file mode 100644 index b8c201b72..000000000 --- a/thirdparty/openssl/fix_libcrypto_pkg-config_entry.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/Configurations/unix-Makefile.tmpl -+++ b/Configurations/unix-Makefile.tmpl -@@ -974,8 +974,8 @@ - echo 'Name: OpenSSL-libcrypto'; \ - echo 'Description: OpenSSL cryptography library'; \ - echo 'Version: '$(VERSION); \ -- echo 'Libs: -L$${libdir} -lcrypto'; \ -- echo 'Libs.private: $(LIB_EX_LIBS)'; \ -+ echo 'Libs: -L$${libdir} -lcrypto $(LIB_EX_LIBS)'; \ -+ echo 'Libs.private:'; \ - echo 'Cflags: -I$${includedir}' ) > libcrypto.pc - - libssl.pc: diff --git a/thirdparty/openssl/macos_rpath.patch b/thirdparty/openssl/macos_rpath.patch deleted file mode 100644 index 9736d41b9..000000000 --- a/thirdparty/openssl/macos_rpath.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- i/Configurations/shared-info.pl -+++ w/Configurations/shared-info.pl -@@ -44,7 +44,7 @@ my %shared_info; - 'darwin-shared' => { - module_ldflags => '-bundle', - shared_ldflag => '-dynamiclib -current_version $(SHLIB_VERSION_NUMBER) -compatibility_version $(SHLIB_VERSION_NUMBER)', -- shared_sonameflag => '-install_name $(INSTALLTOP)/$(LIBDIR)/', -+ shared_sonameflag => '-install_name @rpath/', - }, - 'cygwin-shared' => { - shared_ldflag => '-shared -Wl,--enable-auto-image-base', diff --git a/thirdparty/openssl/openssl-1.1.0j-parallel_install_fix.patch b/thirdparty/openssl/openssl-1.1.0j-parallel_install_fix.patch deleted file mode 100644 index c837e208c..000000000 --- a/thirdparty/openssl/openssl-1.1.0j-parallel_install_fix.patch +++ /dev/null @@ -1,21 +0,0 @@ -https://github.com/openssl/openssl/issues/7679 - ---- a/Configurations/unix-Makefile.tmpl -+++ b/Configurations/unix-Makefile.tmpl -@@ -77,8 +77,14 @@ - # to. You're welcome. - sub dependmagic { - my $target = shift; -- -- return "$target: build_generated\n\t\$(MAKE) depend && \$(MAKE) _$target\n_$target"; -+ my $magic = <<"_____"; -+$target: build_generated depend -+ \$(MAKE) _$target -+_$target -+_____ -+ # Remove line ending -+ $magic =~ s|\R$||; -+ return $magic; - } - ''; - -} diff --git a/thirdparty/openssl/reduce_build_verbosity.patch b/thirdparty/openssl/reduce_build_verbosity.patch deleted file mode 100644 index 9068659b7..000000000 --- a/thirdparty/openssl/reduce_build_verbosity.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- i/Configurations/unix-Makefile.tmpl -+++ w/Configurations/unix-Makefile.tmpl -@@ -291,7 +291,11 @@ - HTMLSUFFIX=html - - # For "optional" echo messages, to get "real" silence -+ifeq (,$(findstring s,$(firstword -$(MAKEFLAGS)))) - ECHO = echo -+else -+ECHO = : -+endif - - ##### User defined commands and flags ################################ - -@@ -1123,6 +1127,7 @@ - bin => '$(BIN_CFLAGS) $(BIN_CPPFLAGS)' - } -> {$args{intent}}; - } -+ $cmd = '@$(ECHO) $@; '.$cmd; - my $recipe; - # extension-specific rules - if (grep /\.s$/, @srcs) { diff --git a/thirdparty/popen-noshell/overlay/CMakeLists.txt b/thirdparty/popen-noshell/overlay/CMakeLists.txt index 4deb4e7d1..d248ec1ac 100644 --- a/thirdparty/popen-noshell/overlay/CMakeLists.txt +++ b/thirdparty/popen-noshell/overlay/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16.3) project(popen-noshell LANGUAGES C) add_library(popen_noshell STATIC popen_noshell.c) diff --git a/thirdparty/sdl2/appimage.patch b/thirdparty/sdl2/appimage.patch index 0363ea262..415dc2457 100644 --- a/thirdparty/sdl2/appimage.patch +++ b/thirdparty/sdl2/appimage.patch @@ -1,7 +1,7 @@ --- i/CMakeLists.txt +++ w/CMakeLists.txt @@ -8,6 +8,13 @@ - cmake_minimum_required(VERSION 3.15) + cmake_minimum_required(VERSION 3.16.3) project(SDL2 C CXX) +execute_process(COMMAND pkg-config --variable pc_path pkg-config RESULT_VARIABLE RET OUTPUT_VARIABLE OUT OUTPUT_STRIP_TRAILING_WHITESPACE) diff --git a/thirdparty/sdl2/cmake_tweaks.patch b/thirdparty/sdl2/cmake_tweaks.patch index b16df26b4..cf5c0db3d 100644 --- a/thirdparty/sdl2/cmake_tweaks.patch +++ b/thirdparty/sdl2/cmake_tweaks.patch @@ -5,7 +5,7 @@ set(CMAKE_POLICY_DEFAULT_CMP0091 NEW) -cmake_minimum_required(VERSION 3.0.0...3.5) -+cmake_minimum_required(VERSION 3.15) ++cmake_minimum_required(VERSION 3.16.3) project(SDL2 C CXX) execute_process(COMMAND pkg-config --variable pc_path pkg-config RESULT_VARIABLE RET OUTPUT_VARIABLE OUT OUTPUT_STRIP_TRAILING_WHITESPACE) diff --git a/thirdparty/tesseract/cmake_tweaks.patch b/thirdparty/tesseract/cmake_tweaks.patch index 7a8fdb302..f80c81738 100644 --- a/thirdparty/tesseract/cmake_tweaks.patch +++ b/thirdparty/tesseract/cmake_tweaks.patch @@ -5,7 +5,7 @@ # ############################################################################## -cmake_minimum_required(VERSION 3.10 FATAL_ERROR) -+cmake_minimum_required(VERSION 3.15 FATAL_ERROR) ++cmake_minimum_required(VERSION 3.16.3 FATAL_ERROR) # In-source builds are disabled. if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") diff --git a/thirdparty/turbo/overlay/CMakeLists.txt b/thirdparty/turbo/overlay/CMakeLists.txt index 071c47cec..953df7eef 100644 --- a/thirdparty/turbo/overlay/CMakeLists.txt +++ b/thirdparty/turbo/overlay/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16.3) project(turbo LANGUAGES C) find_package(OpenSSL REQUIRED)