From 3b3bd424827a1f7f4813216f6b32b6c61e386b2e Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Mon, 28 Mar 2022 20:45:40 +0200 Subject: [PATCH] [openssl] Don't switch from jom to nmake, fix cflags (#23726) * Don't switch from jom to nmake * Use CFLAGS for build type * Update versions * Fix flags for clang * Update versions --- ports/openssl/unix/CMakeLists.txt | 7 ++++--- ports/openssl/vcpkg.json | 1 + ports/openssl/windows/portfile.cmake | 8 ++++---- versions/baseline.json | 2 +- versions/o-/openssl.json | 5 +++++ 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ports/openssl/unix/CMakeLists.txt b/ports/openssl/unix/CMakeLists.txt index 7bf45e27bb..52bfcfff3c 100644 --- a/ports/openssl/unix/CMakeLists.txt +++ b/ports/openssl/unix/CMakeLists.txt @@ -60,9 +60,10 @@ message("CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}") message("CMAKE_INCLUDE_SYSTEM_FLAG_C=${CMAKE_INCLUDE_SYSTEM_FLAG_C}") message("CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG=${CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG}") -set(CFLAGS "${CMAKE_C_FLAGS}") -if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}") +string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE) +set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BUILD_TYPE}}") +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + set(CFLAGS "${CFLAGS} -Wno-error=unused-command-line-argument") endif() if(CMAKE_C_COMPILER_TARGET AND CMAKE_C_COMPILE_OPTIONS_TARGET) set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET}") diff --git a/ports/openssl/vcpkg.json b/ports/openssl/vcpkg.json index 22c64c1d9c..beb5807743 100644 --- a/ports/openssl/vcpkg.json +++ b/ports/openssl/vcpkg.json @@ -1,6 +1,7 @@ { "name": "openssl", "version-string": "1.1.1n", + "port-version": 1, "description": "OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.", "homepage": "https://www.openssl.org", "license": "OpenSSL", diff --git a/ports/openssl/windows/portfile.cmake b/ports/openssl/windows/portfile.cmake index e4469ef326..5a0dec0b73 100644 --- a/ports/openssl/windows/portfile.cmake +++ b/ports/openssl/windows/portfile.cmake @@ -76,13 +76,13 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") # This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build. make_directory(${SOURCE_PATH_RELEASE}/inc32/openssl) execute_process( - COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} + COMMAND "${JOM}" -k -j "${VCPKG_CONCURRENCY}" -f "${OPENSSL_MAKEFILE}" WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log ) vcpkg_execute_required_process( - COMMAND nmake -f ${OPENSSL_MAKEFILE} install_sw install_ssldirs + COMMAND "${JOM}" -j 1 -f "${OPENSSL_MAKEFILE}" install_sw install_ssldirs WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} LOGNAME build-${TARGET_TRIPLET}-rel-1) @@ -113,13 +113,13 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") message(STATUS "Build ${TARGET_TRIPLET}-dbg") make_directory(${SOURCE_PATH_DEBUG}/inc32/openssl) execute_process( - COMMAND "${JOM}" -k -j ${VCPKG_CONCURRENCY} -f "${OPENSSL_MAKEFILE}" + COMMAND "${JOM}" -k -j "${VCPKG_CONCURRENCY}" -f "${OPENSSL_MAKEFILE}" WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log ) vcpkg_execute_required_process( - COMMAND nmake -f "${OPENSSL_MAKEFILE}" install_sw install_ssldirs + COMMAND "${JOM}" -j 1 -f "${OPENSSL_MAKEFILE}" install_sw install_ssldirs WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} LOGNAME build-${TARGET_TRIPLET}-dbg-1) diff --git a/versions/baseline.json b/versions/baseline.json index 76f925e07f..ddbbe52a3f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5130,7 +5130,7 @@ }, "openssl": { "baseline": "1.1.1n", - "port-version": 0 + "port-version": 1 }, "openssl-unix": { "baseline": "1.1.1h", diff --git a/versions/o-/openssl.json b/versions/o-/openssl.json index 38142e831a..7a4a3ffabb 100644 --- a/versions/o-/openssl.json +++ b/versions/o-/openssl.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "06b9e0464af9c7c73227ba9f0fa93c77ef62496e", + "version-string": "1.1.1n", + "port-version": 1 + }, { "git-tree": "7e4d802e3bde4154c227c0dd1da75c719be9f07a", "version-string": "1.1.1n",