Date: Fri, 21 Feb 2020 02:53:11 +0000 (UTC) From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r526601 - in head/security/palisade: . files Message-ID: <202002210253.01L2rBXn006854@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002210253.01L2rBXn006854>