Index: head/games/leela-zero/Makefile =================================================================== --- head/games/leela-zero/Makefile (revision 505452) +++ head/games/leela-zero/Makefile (revision 505453) @@ -1,36 +1,36 @@ # $FreeBSD$ PORTNAME= leela-zero DISTVERSIONPREFIX= v DISTVERSION= 0.17 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games MAINTAINER= yuri@FreeBSD.org COMMENT= Go engine without human-provided knowledge based on AlphaGo Zero paper LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= cblas>0:math/cblas \ opencl>0:devel/opencl LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs \ libopenblas.so:math/openblas \ libOpenCL.so:devel/ocl-icd USES= cmake compiler:c++14-lang eigen:3 localbase qt:5 USE_GITHUB= yes GH_TUPLE= google:googletest:cafa9e5:gtest/gtest USE_QT= core widgets buildtools_build qmake_build CMAKE_ON= USE_BLAS BUILD_TESTING CMAKE_ARGS= -DBLAS_INCLUDE_DIRS:STRING=${LOCALBASE}/include PLIST_FILES= bin/autogtp \ bin/leelaz \ bin/validation do-test: @cd ${WRKSRC} && ${MKDIR} .build && ${CP} ../.build/tests .build && cd .build && ./tests .include Index: head/games/leela-zero/files/patch-CMakeLists.txt =================================================================== --- head/games/leela-zero/files/patch-CMakeLists.txt (revision 505452) +++ head/games/leela-zero/files/patch-CMakeLists.txt (revision 505453) @@ -1,52 +1,52 @@ --- CMakeLists.txt.orig 2019-04-04 06:38:39 UTC +++ CMakeLists.txt @@ -20,6 +20,8 @@ include(GNUInstallDirs) project(leelaz) add_subdirectory(gtest EXCLUDE_FROM_ALL) # We don't want to install gtest, exclude it from `all` +link_directories(${CMAKE_INSTALL_PREFIX}/lib) + # Required Packages set(Boost_MIN_VERSION "1.58.0") set(Boost_USE_MULTITHREADED ON) @@ -70,13 +72,13 @@ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_T endif(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) if(GccSpecificFlags) - set(GCC_COMPILE_FLAGS "-Wall -Wextra -ffast-math -flto -march=native") -+ set(GCC_COMPILE_FLAGS "-Wall -Wextra -ffast-math -march=native") # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238514 ++ set(GCC_COMPILE_FLAGS "-Wall -Wextra -ffast-math") # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238514 set(GCC_DISABLED_WARNING_COMPILE_FLAGS "-Wno-ignored-attributes -Wno-maybe-uninitialized \ -Wno-mismatched-tags") set(GCC_FLAGS "${GCC_COMPILE_FLAGS} ${GCC_DISABLED_WARNING_COMPILE_FLAGS}") set(CMAKE_CXX_FLAGS_DEBUG "${GCC_FLAGS} -g -Og") set(CMAKE_CXX_FLAGS_RELEASE "${GCC_FLAGS} -g -O3 -DNDEBUG") - set(CMAKE_EXE_LINKER_FLAGS "-flto -g") + set(CMAKE_EXE_LINKER_FLAGS "-g") # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238514 endif(GccSpecificFlags) if(USE_CPU_ONLY) @@ -86,7 +88,7 @@ if(USE_HALF) add_definitions(-DUSE_HALF) endif() -set(IncludePath "${CMAKE_CURRENT_SOURCE_DIR}/src" "${CMAKE_CURRENT_SOURCE_DIR}/src/Eigen") +set(IncludePath "${CMAKE_CURRENT_SOURCE_DIR}/src" "${CMAKE_INSTALL_PREFIX}/include/eigen3") set(SrcPath "${CMAKE_CURRENT_SOURCE_DIR}/src") include_directories(${IncludePath}) @@ -130,6 +132,7 @@ else() endif() # Google Test below +if (BUILD_TESTING) file(GLOB tests_SRC "${SrcPath}/tests/*.cpp") add_executable(tests ${tests_SRC} $) @@ -142,6 +145,7 @@ target_link_libraries(tests ${BLAS_LIBRARIES}) target_link_libraries(tests ${OpenCL_LIBRARIES}) target_link_libraries(tests ${ZLIB_LIBRARIES}) target_link_libraries(tests gtest_main ${CMAKE_THREAD_LIBS_INIT}) +endif(BUILD_TESTING) include(GetGitRevisionDescription) git_describe(VERSION --tags)