summaryrefslogtreecommitdiff
path: root/math/cimod
diff options
context:
space:
mode:
Diffstat (limited to 'math/cimod')
-rw-r--r--math/cimod/Makefile9
-rw-r--r--math/cimod/distinfo6
-rw-r--r--math/cimod/files/patch-external_googletest.cmake47
-rw-r--r--math/cimod/pkg-descr9
4 files changed, 64 insertions, 7 deletions
diff --git a/math/cimod/Makefile b/math/cimod/Makefile
index da6b482a1457..811099f57455 100644
--- a/math/cimod/Makefile
+++ b/math/cimod/Makefile
@@ -1,11 +1,12 @@
PORTNAME= cimod
DISTVERSIONPREFIX= v
-DISTVERSION= 1.6.2
+DISTVERSION= 1.7.3
CATEGORIES= math
MAINTAINER= yuri@FreeBSD.org
COMMENT= C++ header-only library for a binary quadratic models
-WWW= https://github.com/OpenJij/cimod
+WWW= https://www.openjij.org/ \
+ https://github.com/Jij-Inc/cimod
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
@@ -17,7 +18,7 @@ TEST_DEPENDS= googletest>0:devel/googletest
USES= cmake:testing compiler:c++17-lang eigen:3,build,run
USE_GITHUB= yes
-GH_ACCOUNT= OpenJij
+GH_ACCOUNT= Jij-Inc
CMAKE_ON= CIMOD_INSTALL # doesn't do anything, see https://github.com/OpenJij/cimod/issues/103
CMAKE_OFF= CIMOD_TEST CIMOD_DOCS
@@ -28,4 +29,6 @@ NO_ARCH= yes
do-install: # see https://github.com/OpenJij/cimod/issues/103
cd ${WRKSRC}/include && ${COPYTREE_SHARE} ${PORTNAME} ${STAGEDIR}${PREFIX}/include
+# tests as of 1.7.3: 100% tests passed, 0 tests failed out of 79
+
.include <bsd.port.mk>
diff --git a/math/cimod/distinfo b/math/cimod/distinfo
index e344c4bc92de..785fc5b72f5c 100644
--- a/math/cimod/distinfo
+++ b/math/cimod/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1709938110
-SHA256 (OpenJij-cimod-v1.6.2_GH0.tar.gz) = 732c10f68d90c9292b411c1148cf0be54b0fb812ec4aa4ba1102514486113ae1
-SIZE (OpenJij-cimod-v1.6.2_GH0.tar.gz) = 139864
+TIMESTAMP = 1760174868
+SHA256 (Jij-Inc-cimod-v1.7.3_GH0.tar.gz) = 066fe6187124da8a7ee250c060bce883828ae33f6e38a3525f72c71a6de44510
+SIZE (Jij-Inc-cimod-v1.7.3_GH0.tar.gz) = 341035
diff --git a/math/cimod/files/patch-external_googletest.cmake b/math/cimod/files/patch-external_googletest.cmake
new file mode 100644
index 000000000000..4a37cdd349ff
--- /dev/null
+++ b/math/cimod/files/patch-external_googletest.cmake
@@ -0,0 +1,47 @@
+--- external/googletest.cmake.orig 2025-01-27 12:00:00 UTC
++++ external/googletest.cmake
+@@ -14,38 +14,11 @@
+
+ include(FetchContent)
+
+-message(CHECK_START "Fetching GoogleTest")
+-list(APPEND CMAKE_MESSAGE_INDENT " ")
+-
+-set(CMAKE_CXX_STANDARD 17)
+-set(FETCHCONTENT_QUIET OFF)
+-
+-#### Google test ####
+-FetchContent_Declare(
+- googletest
+- GIT_REPOSITORY https://github.com/google/googletest
+- GIT_TAG v1.17.0
+- GIT_SHALLOW TRUE
+-)
+-
+-if(WIN32)
+- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+-endif()
+-
+-# Prevent googletest from being installed by using FetchContent_Populate + add_subdirectory with EXCLUDE_FROM_ALL
+-FetchContent_GetProperties(googletest)
+-if(NOT googletest_POPULATED)
+- FetchContent_Populate(googletest)
+- add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL)
+-endif()
+-
++# Try to find pre-installed GoogleTest first
+ find_package(GTest)
+
+-#FetchContent_GetProperties(googletest)
+-
+-#message(STATUS "gtest_SOURCE_DIR = ${gtest_SOURCE_DIR}")
+-#message(STATUS "gmock_SOURCE_DIR = ${gmock_SOURCE_DIR}")
+-
+-
+-list(POP_BACK CMAKE_MESSAGE_INDENT)
+-message(CHECK_PASS "fetched")
++if(NOT GTest_FOUND)
++ message(FATAL_ERROR "GoogleTest not found. Please install googletest package.")
++else()
++ message(STATUS "Found pre-installed GoogleTest")
++endif()
diff --git a/math/cimod/pkg-descr b/math/cimod/pkg-descr
index f588a9340f2f..eb48d39c4b1e 100644
--- a/math/cimod/pkg-descr
+++ b/math/cimod/pkg-descr
@@ -1 +1,8 @@
-cmod is a C++ library for a binary quadratic model.
+Cimod is a C++ header-only library for a binary quadratic model (BQM),
+which is a model of variables that can be in one of two states (0 or 1,
+or -1 or 1). BQMs are used to represent a wide range of optimization
+problems, and are particularly important in the context of quantum
+annealing and other heuristic optimization algorithms.
+
+This library provides tools to create and manipulate BQM instances,
+making it easier to work with these models in C++ applications.