git: bbe1b5a49b0e - main - lang/solidity: update to 0.8.27 release.

From: Alex Dupre <ale_at_FreeBSD.org>
Date: Thu, 05 Sep 2024 13:27:25 UTC
The branch main has been updated by ale:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bbe1b5a49b0e0e70c38653f86237e1630c3d58bb

commit bbe1b5a49b0e0e70c38653f86237e1630c3d58bb
Author:     Alex Dupre <ale@FreeBSD.org>
AuthorDate: 2024-09-05 13:26:55 +0000
Commit:     Alex Dupre <ale@FreeBSD.org>
CommitDate: 2024-09-05 13:27:22 +0000

    lang/solidity: update to 0.8.27 release.
---
 lang/solidity/Makefile                             | 19 ++++-------
 lang/solidity/distinfo                             |  6 ++--
 lang/solidity/files/fmtlib.cmake                   |  1 -
 lang/solidity/files/patch-CMakeLists.txt           | 21 +++++++++---
 .../solidity/files/patch-cmake_nlohmann-json.cmake | 28 ----------------
 lang/solidity/files/patch-cmake_range-v3.cmake     | 39 ----------------------
 6 files changed, 25 insertions(+), 89 deletions(-)

diff --git a/lang/solidity/Makefile b/lang/solidity/Makefile
index 523ebe84c177..a9e685ebf1c4 100644
--- a/lang/solidity/Makefile
+++ b/lang/solidity/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	solidity
-PORTVERSION=	0.8.26
+PORTVERSION=	0.8.27
 CATEGORIES=	lang
 MASTER_SITES=	https://github.com/ethereum/solidity/releases/download/v${PORTVERSION}/
 DISTNAME=	${PORTNAME}_${PORTVERSION}
@@ -21,21 +21,18 @@ BUILD_DEPENDS=	boost-libs>=0:devel/boost-libs \
 USES=		cmake compiler:c++14-lang cpe
 CPE_VENDOR=	${PORTNAME}lang
 
-OPTIONS_DEFINE=	Z3 CVC4
-OPTIONS_DEFAULT=Z3 #CVC4
+OPTIONS_DEFINE=	Z3 CVC5
+OPTIONS_DEFAULT=Z3
 OPTIONS_EXCLUDE_i386=	Z3
 Z3_DESC=	SMT Checker via Z3
-CVC4_DESC=	SMT Checker via CVC4
+CVC5_DESC=	SMT Checker via CVC5
 Z3_LIB_DEPENDS=		libz3.so:math/z3
-CVC4_LIB_DEPENDS=	libcvc5.so:math/cvc5 libgmp.so:math/gmp
+CVC5_RUN_DEPENDS=	cvc5:math/cvc5
 Z3_CMAKE_OFF=	USE_Z3
-CVC4_CMAKE_OFF=	USE_CVC4
-CVC4_BROKEN=	solidity uses cvc4 which has been succeeded by cvc5
 
 CMAKE_ARGS+=	-DUSE_LD_GOLD=OFF -DTESTS=OFF \
-		-DUSE_SYSTEM_LIBRARIES=ON \
+		-DIGNORE_VENDORED_DEPENDENCIES=ON \
 		-DRANGE_V3_INCLUDE_DIR="${LOCALBASE}/include" \
-		-DNLOHMANN_JSON_INCLUDE_DIR="${LOCALBASE}/include" \
 		-DSTRICT_NLOHMANN_JSON_VERSION=OFF \
 		-DSTRICT_Z3_VERSION=OFF
 
@@ -48,8 +45,4 @@ PLIST_FILES=	bin/solc \
 CXXFLAGS+=	-Wno-unqualified-std-cast-call
 .endif
 
-pre-patch:
-		@${CP} ${FILESDIR}/fmtlib.cmake ${WRKSRC}/cmake/
-		#@${REINPLACE_CMD} '/EthCcache/d' ${WRKSRC}/CMakeLists.txt
-
 .include <bsd.port.mk>
diff --git a/lang/solidity/distinfo b/lang/solidity/distinfo
index 4cb79c2542bc..ec2be3e84ea4 100644
--- a/lang/solidity/distinfo
+++ b/lang/solidity/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1716285738
-SHA256 (solidity_0.8.26.tar.gz) = 5d48c9a38e101eb494bc58e20cf3786a8910d89c2ca0073ab04738edd30cf03a
-SIZE (solidity_0.8.26.tar.gz) = 3211986
+TIMESTAMP = 1725531164
+SHA256 (solidity_0.8.27.tar.gz) = b015e05468f3da791c8b252eb201fa5cb1f62642d6285ed2a845b142f96fc8a6
+SIZE (solidity_0.8.27.tar.gz) = 12616162
diff --git a/lang/solidity/files/fmtlib.cmake b/lang/solidity/files/fmtlib.cmake
deleted file mode 100644
index c6d3a73d00fb..000000000000
--- a/lang/solidity/files/fmtlib.cmake
+++ /dev/null
@@ -1 +0,0 @@
-find_package(fmt REQUIRED)
diff --git a/lang/solidity/files/patch-CMakeLists.txt b/lang/solidity/files/patch-CMakeLists.txt
index 10c9cdbbc0e1..b1905e3dd572 100644
--- a/lang/solidity/files/patch-CMakeLists.txt
+++ b/lang/solidity/files/patch-CMakeLists.txt
@@ -1,16 +1,27 @@
---- CMakeLists.txt.orig	2024-05-21 09:44:13 UTC
+--- CMakeLists.txt.orig	2024-09-04 09:02:02 UTC
 +++ CMakeLists.txt
-@@ -44,12 +44,9 @@ mark_as_advanced(STRICT_NLOHMANN_JSON_VERSION)
+@@ -52,15 +52,21 @@ mark_as_advanced(ONLY_BUILD_SOLIDITY_LIBRARIES)
+ mark_as_advanced(IGNORE_VENDORED_DEPENDENCIES)
  mark_as_advanced(ONLY_BUILD_SOLIDITY_LIBRARIES)
- mark_as_advanced(STRICT_NLOHMANN_JSON_VERSION)
  
 -# Setup cccache.
 -include(EthCcache)
 -
  # Let's find our dependencies
  include(EthDependencies)
--if (NOT USE_SYSTEM_LIBRARIES)
-+if (USE_SYSTEM_LIBRARIES)
+ if (NOT IGNORE_VENDORED_DEPENDENCIES)
    include(fmtlib)
    include(nlohmann-json)
    include(range-v3)
++else()
++  # fmtlib
++  find_package(fmt REQUIRED)
++  # nlohmann-json
++  find_package(nlohmann_json REQUIRED)
++  # range-v3
++  add_library(range-v3 INTERFACE IMPORTED)
++  set_target_properties(range-v3 PROPERTIES
++    INTERFACE_INCLUDE_DIRECTORIES ${RANGE_V3_INCLUDE_DIR})
+ endif()
+ 
+ find_package(Threads)
diff --git a/lang/solidity/files/patch-cmake_nlohmann-json.cmake b/lang/solidity/files/patch-cmake_nlohmann-json.cmake
deleted file mode 100644
index 5c04956c04de..000000000000
--- a/lang/solidity/files/patch-cmake_nlohmann-json.cmake
+++ /dev/null
@@ -1,28 +0,0 @@
---- cmake/nlohmann-json.cmake.orig	2024-05-23 11:23:51 UTC
-+++ cmake/nlohmann-json.cmake
-@@ -1,21 +1,7 @@
--include(ExternalProject)
--
--ExternalProject_Add(nlohmann-json-project
--        DOWNLOAD_DIR "${CMAKE_SOURCE_DIR}/deps/nlohmann/nlohmann"
--        DOWNLOAD_NAME json.hpp
--        DOWNLOAD_NO_EXTRACT 1
--        URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.hpp
--        URL_HASH SHA256=9bea4c8066ef4a1c206b2be5a36302f8926f7fdc6087af5d20b417d0cf103ea6
--        CMAKE_COMMAND true
--        BUILD_COMMAND true
--        INSTALL_COMMAND true
--)
--
- # Create nlohmann-json imported library
- add_library(nlohmann-json INTERFACE IMPORTED)
--file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/deps/nlohmann)  # Must exist.
- set_target_properties(nlohmann-json PROPERTIES
-         INTERFACE_COMPILE_OPTIONS "\$<\$<CXX_COMPILER_ID:MSVC>:/permissive->"
--        INTERFACE_SYSTEM_INCLUDE_DIRECTORIES  ${CMAKE_SOURCE_DIR}/deps/nlohmann
--        INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/deps/nlohmann)
--add_dependencies(nlohmann-json nlohmann-json-project)
-\ No newline at end of file
-+        INTERFACE_SYSTEM_INCLUDE_DIRECTORIES  ${NLOHMANN_JSON_INCLUDE_DIR}
-+        INTERFACE_INCLUDE_DIRECTORIES ${NLOHMANN_JSON_INCLUDE_DIR})
-+add_dependencies(nlohmann-json nlohmann-json-project)
diff --git a/lang/solidity/files/patch-cmake_range-v3.cmake b/lang/solidity/files/patch-cmake_range-v3.cmake
deleted file mode 100644
index cff65acdb261..000000000000
--- a/lang/solidity/files/patch-cmake_range-v3.cmake
+++ /dev/null
@@ -1,39 +0,0 @@
---- cmake/range-v3.cmake.orig	2023-07-19 09:24:46 UTC
-+++ cmake/range-v3.cmake
-@@ -1,36 +1,11 @@
--include(ExternalProject)
--
- if (${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
-     set(RANGE_V3_CMAKE_COMMAND emcmake cmake)
- else()
-     set(RANGE_V3_CMAKE_COMMAND ${CMAKE_COMMAND})
- endif()
- 
--set(prefix "${PROJECT_BINARY_DIR}/deps")
--set(RANGE_V3_INCLUDE_DIR "${prefix}/include")
--
--ExternalProject_Add(range-v3-project
--    PREFIX "${prefix}"
--    DOWNLOAD_DIR "${PROJECT_SOURCE_DIR}/deps/downloads"
--    DOWNLOAD_NAME range-v3-0.12.0.tar.gz
--    URL https://github.com/ericniebler/range-v3/archive/0.12.0.tar.gz
--    URL_HASH SHA256=015adb2300a98edfceaf0725beec3337f542af4915cec4d0b89fa0886f4ba9cb
--    CMAKE_COMMAND ${RANGE_V3_CMAKE_COMMAND}
--    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
--               -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
--               -DBUILD_TESTING=OFF
--               -DRANGES_CXX_STD=${CMAKE_CXX_STANDARD}
--               -DRANGE_V3_DOCS=OFF
--               -DRANGE_V3_EXAMPLES=OFF
--               -DRANGE_V3_TESTS=OFF
--               -DRANGES_BUILD_CALENDAR_EXAMPLE=OFF
--               -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
--    BUILD_BYPRODUCTS "${RANGE_V3_INCLUDE_DIR}/range/v3/all.hpp"
--)
--
- # Create range-v3 imported library
- add_library(range-v3 INTERFACE IMPORTED)
--file(MAKE_DIRECTORY ${RANGE_V3_INCLUDE_DIR})  # Must exist.
- set_target_properties(range-v3 PROPERTIES
-     INTERFACE_COMPILE_OPTIONS "\$<\$<CXX_COMPILER_ID:MSVC>:/permissive->"
-     INTERFACE_SYSTEM_INCLUDE_DIRECTORIES ${RANGE_V3_INCLUDE_DIR}