diff --git a/lang/solidity/Makefile b/lang/solidity/Makefile index fafc81b169db..523ebe84c177 100644 --- a/lang/solidity/Makefile +++ b/lang/solidity/Makefile @@ -1,54 +1,55 @@ PORTNAME= solidity -PORTVERSION= 0.8.25 +PORTVERSION= 0.8.26 CATEGORIES= lang MASTER_SITES= https://github.com/ethereum/solidity/releases/download/v${PORTVERSION}/ DISTNAME= ${PORTNAME}_${PORTVERSION} MAINTAINER= ale@FreeBSD.org COMMENT= Solidity Contract-Oriented Programming Language WWW= https://github.com/ethereum/solidity LICENSE= GPLv3 NOT_FOR_ARCHS= powerpc powerpc64 powerpcspe NOT_FOR_ARCHS_REASON= solidity currently does not support big endian systems BUILD_DEPENDS= boost-libs>=0:devel/boost-libs \ libfmt>=0:devel/libfmt \ + nlohmann-json>=0:devel/nlohmann-json \ range-v3>=0:devel/range-v3 -LIB_DEPENDS= libjsoncpp.so:devel/jsoncpp USES= cmake compiler:c++14-lang cpe CPE_VENDOR= ${PORTNAME}lang OPTIONS_DEFINE= Z3 CVC4 OPTIONS_DEFAULT=Z3 #CVC4 OPTIONS_EXCLUDE_i386= Z3 Z3_DESC= SMT Checker via Z3 CVC4_DESC= SMT Checker via CVC4 Z3_LIB_DEPENDS= libz3.so:math/z3 CVC4_LIB_DEPENDS= libcvc5.so:math/cvc5 libgmp.so:math/gmp 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 \ -DRANGE_V3_INCLUDE_DIR="${LOCALBASE}/include" \ - -DJSONCPP_INCLUDE_DIR:STRING="${LOCALBASE}/include/jsoncpp" \ - -DJSONCPP_LIB_DIR:STRING="${LOCALBASE}/lib" \ + -DNLOHMANN_JSON_INCLUDE_DIR="${LOCALBASE}/include" \ + -DSTRICT_NLOHMANN_JSON_VERSION=OFF \ -DSTRICT_Z3_VERSION=OFF PLIST_FILES= bin/solc \ bin/yul-phaser .include .if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400079 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 )) CXXFLAGS+= -Wno-unqualified-std-cast-call .endif pre-patch: - @${CP} ${FILESDIR}/fmtlib.cmake ${FILESDIR}/jsoncpp.cmake ${WRKSRC}/cmake/ - @${REINPLACE_CMD} '/EthCcache/d' ${WRKSRC}/CMakeLists.txt + @${CP} ${FILESDIR}/fmtlib.cmake ${WRKSRC}/cmake/ + #@${REINPLACE_CMD} '/EthCcache/d' ${WRKSRC}/CMakeLists.txt .include diff --git a/lang/solidity/distinfo b/lang/solidity/distinfo index 49e1f199473b..4cb79c2542bc 100644 --- a/lang/solidity/distinfo +++ b/lang/solidity/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1710488506 -SHA256 (solidity_0.8.25.tar.gz) = def54b5f8385ef70e102d28321d074e7f3798e9688586452c7939e6733ab273f -SIZE (solidity_0.8.25.tar.gz) = 3404228 +TIMESTAMP = 1716285738 +SHA256 (solidity_0.8.26.tar.gz) = 5d48c9a38e101eb494bc58e20cf3786a8910d89c2ca0073ab04738edd30cf03a +SIZE (solidity_0.8.26.tar.gz) = 3211986 diff --git a/lang/solidity/files/jsoncpp.cmake b/lang/solidity/files/jsoncpp.cmake deleted file mode 100644 index 20695766aabd..000000000000 --- a/lang/solidity/files/jsoncpp.cmake +++ /dev/null @@ -1,2 +0,0 @@ -include_directories(${JSONCPP_INCLUDE_DIR}) -link_directories(${JSONCPP_LIB_DIR}) diff --git a/lang/solidity/files/patch-CMakeLists.txt b/lang/solidity/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..10c9cdbbc0e1 --- /dev/null +++ b/lang/solidity/files/patch-CMakeLists.txt @@ -0,0 +1,16 @@ +--- CMakeLists.txt.orig 2024-05-21 09:44:13 UTC ++++ CMakeLists.txt +@@ -44,12 +44,9 @@ mark_as_advanced(STRICT_NLOHMANN_JSON_VERSION) + 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) + include(fmtlib) + include(nlohmann-json) + include(range-v3) diff --git a/lang/solidity/files/patch-cmake_nlohmann-json.cmake b/lang/solidity/files/patch-cmake_nlohmann-json.cmake new file mode 100644 index 000000000000..5c04956c04de --- /dev/null +++ b/lang/solidity/files/patch-cmake_nlohmann-json.cmake @@ -0,0 +1,28 @@ +--- 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 "\$<\$:/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-libevmasm_Assembly.cpp b/lang/solidity/files/patch-libevmasm_Assembly.cpp index e82803281e1e..21c549fb8adc 100644 --- a/lang/solidity/files/patch-libevmasm_Assembly.cpp +++ b/lang/solidity/files/patch-libevmasm_Assembly.cpp @@ -1,11 +1,11 @@ ---- libevmasm/Assembly.cpp.orig 2023-07-19 09:24:46 UTC +--- libevmasm/Assembly.cpp.orig 2024-05-21 09:44:13 UTC +++ libevmasm/Assembly.cpp -@@ -47,6 +47,8 @@ using namespace solidity::evmasm; - using namespace solidity::langutil; - using namespace solidity::util; +@@ -54,6 +54,8 @@ std::map> Assembly::s_sharedSourceNames; +#undef MSIZE // remove MSIZE definition from , included by boost 1.66.0 + AssemblyItem const& Assembly::append(AssemblyItem _i) { assertThrow(m_deposit >= 0, AssemblyException, "Stack underflow."); diff --git a/lang/solidity/files/patch-libsolutil_JSON.cpp b/lang/solidity/files/patch-libsolutil_JSON.cpp deleted file mode 100644 index 2e3b0ebb87a2..000000000000 --- a/lang/solidity/files/patch-libsolutil_JSON.cpp +++ /dev/null @@ -1,15 +0,0 @@ ---- libsolutil/JSON.cpp.orig 2020-12-16 17:41:40 UTC -+++ libsolutil/JSON.cpp -@@ -32,10 +32,12 @@ - - using namespace std; - -+/* - static_assert( - (JSONCPP_VERSION_MAJOR == 1) && (JSONCPP_VERSION_MINOR == 9) && (JSONCPP_VERSION_PATCH == 3), - "Unexpected jsoncpp version: " JSONCPP_VERSION_STRING ". Expecting 1.9.3." - ); -+*/ - - namespace solidity::util - {