From owner-svn-ports-head@freebsd.org Fri Feb 21 02:53:11 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA23A24E7C3; Fri, 21 Feb 2020 02:53:11 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Nwxg4f7yz45nr; Fri, 21 Feb 2020 02:53:11 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9831541E6; Fri, 21 Feb 2020 02:53:11 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01L2rBWY006857; Fri, 21 Feb 2020 02:53:11 GMT (envelope-from yuri@FreeBSD.org) Received: (from yuri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L2rBXn006854; Fri, 21 Feb 2020 02:53:11 GMT (envelope-from yuri@FreeBSD.org) Message-Id: <202002210253.01L2rBXn006854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuri set sender to yuri@FreeBSD.org using -f From: Yuri Victorovich Date: Fri, 21 Feb 2020 02:53:11 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r526601 - in head/security/palisade: . files X-SVN-Group: ports-head X-SVN-Commit-Author: yuri X-SVN-Commit-Paths: in head/security/palisade: . files X-SVN-Commit-Revision: 526601 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 02:53:11 -0000 Author: yuri Date: Fri Feb 21 02:53:10 2020 New Revision: 526601 URL: https://svnweb.freebsd.org/changeset/ports/526601 Log: security/palisade: Remove the dependency on gcc by using the WITH_NTL=Y option libntl contains a replacement of the quadmath.h header that is missing in clang, which necessitated the use of gcc. Also update COMMENT and WWW. Modified: head/security/palisade/Makefile head/security/palisade/files/patch-CMakeLists.txt head/security/palisade/pkg-descr Modified: head/security/palisade/Makefile ============================================================================== --- head/security/palisade/Makefile Fri Feb 21 02:05:59 2020 (r526600) +++ head/security/palisade/Makefile Fri Feb 21 02:53:10 2020 (r526601) @@ -3,10 +3,11 @@ PORTNAME= palisade DISTVERSIONPREFIX= v DISTVERSION= 1.8.0 +PORTREVISION= 1 CATEGORIES= security math MAINTAINER= yuri@FreeBSD.org -COMMENT= PALISADE lattice cryptography library +COMMENT= PALISADE lattice cryptography library for Fully Homomorphic Encryption LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/License.md @@ -15,6 +16,7 @@ BROKEN_i386= fails to build: a declaration of 'Mul128' BROKEN_powerpc64= fails to build: math/native_int/binint.h:510:11: error: Architecture not supported for MultD() BUILD_DEPENDS= autoconf:devel/autoconf # possibly a mistake in the project +LIB_DEPENDS= libntl.so:math/ntl USES= cmake:noninja compiler:c++11-lang localbase USE_GITLAB= yes @@ -26,10 +28,12 @@ GH_TUPLE= \ google:benchmark:daff5fea:benchmark/third-party/google-benchmark \ google:googletest:8b4817e3:google_test/third-party/google-test \ gperftools:gperftools:c1d546d7:gperftools/third-party/gperftools -USE_GCC= any # clang fails: fatal error: 'quadmath.h' file not found USE_LDCONFIG= yes CMAKE_OFF= BUILD_UNITTESTS +CMAKE_ARGS= -DWITH_NTL=Y + +LDFLAGS+= ${LOCALBASE}/lib/libntl.so # libntl is optional in palisade but is necessary in FreeBSD because is has an equivalent of quadmath.h that is missing in FreeBSD. -DWITH_NTL should be added by users to the compiler command lines. CXXFLAGS+= -I${WRKSRC}/third-party/google-test/googletest Modified: head/security/palisade/files/patch-CMakeLists.txt ============================================================================== --- head/security/palisade/files/patch-CMakeLists.txt Fri Feb 21 02:05:59 2020 (r526600) +++ head/security/palisade/files/patch-CMakeLists.txt Fri Feb 21 02:53:10 2020 (r526601) @@ -1,11 +1,61 @@ ---- CMakeLists.txt.orig 2019-12-27 18:44:46 UTC +--- CMakeLists.txt.orig 2020-01-30 18:15:11 UTC +++ CMakeLists.txt -@@ -183,7 +183,7 @@ set(COMPILEFLAGS "-Wall -Werror -O3 -DPALISADE_VERSION - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILEFLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILEFLAGS}") +@@ -185,7 +185,7 @@ set(CXXCOMPILEFLAGS "-Wall -Werror -O3 -DPALISADE_VERS + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CCOMPILEFLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXXCOMPILEFLAGS}") -find_package (Git REQUIRED) +find_package (Git) find_package (Doxygen QUIET COMPONENTS dot) if (DOXYGEN_FOUND) +@@ -262,7 +262,7 @@ else() + set_target_properties(gmp PROPERTIES IMPORTED_LOCATION ${GMPLIBFILE}) + endif() + +-if("${WITH_NTL}" STREQUAL "Y") ++if(FALSE AND "${WITH_NTL}" STREQUAL "Y") + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/third-party/lib/ DESTINATION lib + FILES_MATCHING PATTERN "libgmp.*" ) + # also copies the gmp dll file +@@ -389,15 +389,15 @@ if("${WITH_TCM}" STREQUAL "Y") + endif() + + if("${WITH_NTL}" STREQUAL "Y") +- set(THIRDPARTYLIBS "${THIRDPARTYLIBS}" PUBLIC ntl PUBLIC gmp ) +- set(THIRDPARTYSTATICLIBS "${THIRDPARTYSTATICLIBS}" PUBLIC ntl PUBLIC gmp ) ++ #set(THIRDPARTYLIBS "${THIRDPARTYLIBS}" PUBLIC ntl PUBLIC gmp ) ++ #set(THIRDPARTYSTATICLIBS "${THIRDPARTYSTATICLIBS}" PUBLIC ntl PUBLIC gmp ) + add_definitions(-DWITH_NTL) + else() + set(THIRDPARTYLIBS "${THIRDPARTYLIBS}" "${QUADMATHLIB}") + set(THIRDPARTYSTATICLIBS "${THIRDPARTYSTATICLIBS}" "${QUADMATHLIB}") + endif() + +-if("${WITH_NTL}" STREQUAL "Y" OR "${WITH_TCM}" STREQUAL "Y") ++if(FALSE AND "${WITH_NTL}" STREQUAL "Y" OR "${WITH_TCM}" STREQUAL "Y") + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/third-party/include/ DESTINATION include/palisade) + endif() + +@@ -406,7 +406,7 @@ set(BINDEMODATAPATH ${CMAKE_CURRENT_BINARY_DIR}/demoDa + + # copies demoData folder from the root of the repo to build/demoData if the folder does not exist + # also checks whether NTL and GMP have been installed if the user chose to use NTL by setting WITH_NTL=Y +-if("${WITH_NTL}" STREQUAL "Y") ++if(FALSE AND "${WITH_NTL}" STREQUAL "Y") + add_custom_target(third-party ALL + COMMAND [ ! -f ${GMPLIBFILE} ] && echo ***ERROR*** Be sure to run \"make gmp_unpack\" and \"make gmp_all\" || [ ! -f ${NTLLIBFILE} ] && echo ***ERROR*** Be sure to run \"make ntl_unpack\" and \"make ntl_all\" || echo "-- NTL/GMP is already installed" + COMMAND [ ! -d ${BINDEMODATAPATH} ] && cp -R ${DEMODATAPATH} ${BINDEMODATAPATH} && echo "-- Copied demoData files" || echo "-- demoData folder already exists" +@@ -438,9 +438,11 @@ endif() + set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Enable testing of the benchmark library." FORCE) + set(BENCHMARK_ENABLE_INSTALL OFF CACHE BOOL "Enable installation of benchmark. (Projects embedding benchmark may want to turn this OFF.)" FORCE) + set(BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE BOOL "Enable building the unit tests which depend on gtest" FORCE) +-add_subdirectory(third-party/google-benchmark EXCLUDE_FROM_ALL) ++#add_subdirectory(third-party/google-benchmark EXCLUDE_FROM_ALL) + ++if (BUILD_TESTING) + add_subdirectory(benchmark) ++endif() + + ## clobber cleans AND cleans the third-party stuff + add_custom_target( clobber DEPENDS gmp_clobber ntl_clobber Modified: head/security/palisade/pkg-descr ============================================================================== --- head/security/palisade/pkg-descr Fri Feb 21 02:05:59 2020 (r526600) +++ head/security/palisade/pkg-descr Fri Feb 21 02:53:10 2020 (r526601) @@ -8,4 +8,4 @@ efficient implementations of the following lattice cry * Identity-Based Encryption * Ciphertext-Policy Attribute-Based Encryption -WWW: https://gitlab.com/palisade/palisade-release +WWW: https://palisade-crypto.org