From owner-dev-commits-ports-main@freebsd.org Thu Sep 9 15:53:07 2021 Return-Path: Delivered-To: dev-commits-ports-main@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 66AC3672ACF; Thu, 9 Sep 2021 15:53:07 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H53SM2NTMz3Mxj; Thu, 9 Sep 2021 15:53:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 318F01C357; Thu, 9 Sep 2021 15:53:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 189Fr7HO050580; Thu, 9 Sep 2021 15:53:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 189Fr7vV050579; Thu, 9 Sep 2021 15:53:07 GMT (envelope-from git) Date: Thu, 9 Sep 2021 15:53:07 GMT Message-Id: <202109091553.189Fr7vV050579@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: e311713eb28f - main - math/munkres-cpp: New port: Kuhn-Munkres (Hungarian) algorithm in C++ MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e311713eb28f47100c69755b58ec203d39a73248 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2021 15:53:07 -0000 The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=e311713eb28f47100c69755b58ec203d39a73248 commit e311713eb28f47100c69755b58ec203d39a73248 Author: Yuri Victorovich AuthorDate: 2021-09-09 06:53:10 +0000 Commit: Yuri Victorovich CommitDate: 2021-09-09 15:52:02 +0000 math/munkres-cpp: New port: Kuhn-Munkres (Hungarian) algorithm in C++ --- math/Makefile | 1 + math/munkres-cpp/Makefile | 30 +++++++++++++++++++++ math/munkres-cpp/distinfo | 3 +++ math/munkres-cpp/files/patch-CMakeLists.txt | 11 ++++++++ math/munkres-cpp/files/patch-tests_CMakeLists.txt | 31 ++++++++++++++++++++++ .../patch-tests_adapters_std__2d__arraytest.cpp | 11 ++++++++ math/munkres-cpp/pkg-descr | 7 +++++ 7 files changed, 94 insertions(+) diff --git a/math/Makefile b/math/Makefile index e86508142732..5090666a3da5 100644 --- a/math/Makefile +++ b/math/Makefile @@ -463,6 +463,7 @@ SUBDIR += multichoose SUBDIR += mumps SUBDIR += mumps4 + SUBDIR += munkres-cpp SUBDIR += muparser SUBDIR += muparserx SUBDIR += nanoflann diff --git a/math/munkres-cpp/Makefile b/math/munkres-cpp/Makefile new file mode 100644 index 000000000000..0b54987a2479 --- /dev/null +++ b/math/munkres-cpp/Makefile @@ -0,0 +1,30 @@ +PORTNAME= munkres-cpp +DISTVERSIONPREFIX= v +DISTVERSION= 1.0.0-6 +DISTVERSIONSUFFIX= -g61086fc +CATEGORIES= math + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Kuhn-Munkres (Hungarian) algorithm in C++ + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +USES= cmake:testing localbase +USE_LDCONFIG= yes + +USE_GITHUB= yes +GH_ACCOUNT= saebyn + +CMAKE_ON= BUILD_SHARED_LIBS +CMAKE_TESTING_ON= MUNKRESCPP_DEVEL_MODE + +CMAKE_TESTING_TARGET= tests # tests are broken, see https://github.com/saebyn/munkres-cpp/issues/31 + +PLIST_FILES= include/munkres/adapters/adapter.h \ + include/munkres/matrix.cpp \ + include/munkres/matrix.h \ + include/munkres/munkres.h \ + lib/libmunkres.so + +.include diff --git a/math/munkres-cpp/distinfo b/math/munkres-cpp/distinfo new file mode 100644 index 000000000000..4d3fe79c2334 --- /dev/null +++ b/math/munkres-cpp/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1631157520 +SHA256 (saebyn-munkres-cpp-v1.0.0-6-g61086fc_GH0.tar.gz) = 608d2032b0fe1592085df501248b9e46c5da6a3de863092daafa64f2cb8b46d3 +SIZE (saebyn-munkres-cpp-v1.0.0-6-g61086fc_GH0.tar.gz) = 25937 diff --git a/math/munkres-cpp/files/patch-CMakeLists.txt b/math/munkres-cpp/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..b07f69867b3a --- /dev/null +++ b/math/munkres-cpp/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2021-09-09 03:19:37 UTC ++++ CMakeLists.txt +@@ -31,7 +31,7 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/src/adapters) + + # Library. + add_library ( +- munkres STATIC ++ munkres + ${MunkresCppLib_SOURCES} + ) + diff --git a/math/munkres-cpp/files/patch-tests_CMakeLists.txt b/math/munkres-cpp/files/patch-tests_CMakeLists.txt new file mode 100644 index 000000000000..3f046d82927d --- /dev/null +++ b/math/munkres-cpp/files/patch-tests_CMakeLists.txt @@ -0,0 +1,31 @@ +--- tests/CMakeLists.txt.orig 2021-09-09 05:45:47 UTC ++++ tests/CMakeLists.txt +@@ -3,6 +3,7 @@ find_package (Boost COMPONENTS system RE + enable_testing () + + # Framework for writing tests. ++if (FALSE) + ExternalProject_Add ( + googletest + GIT_REPOSITORY "https://github.com/google/googletest.git" +@@ -23,6 +24,11 @@ set (GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_M + + include_directories (${GTEST_INCLUDE_DIRS}) + ++endif() ++ ++find_package(GTest REQUIRED) ++ ++ + # Special flags fo generating code coverage. + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") + set (CMAKE_SHARED_LINKER_FLAGS "-fprofile-arcs -ftest-coverage") +@@ -52,7 +58,7 @@ set ( + ${PROJECT_SOURCE_DIR}/tests/adapters/boost_matrixtest.cpp + ) + add_executable (munkrestest EXCLUDE_FROM_ALL ${MunkresCppLib_SOURCES} ${MunkresCppTest_SOURCES}) +-target_link_libraries (munkrestest ${GTEST_BOTH_LIBRARIES} gcov pthread) ++target_link_libraries (munkrestest ${GTest} gcov pthread) + add_custom_target (tests) + add_dependencies (tests munkrestest) + add_dependencies (munkrestest googletest) diff --git a/math/munkres-cpp/files/patch-tests_adapters_std__2d__arraytest.cpp b/math/munkres-cpp/files/patch-tests_adapters_std__2d__arraytest.cpp new file mode 100644 index 000000000000..bdbac7f54854 --- /dev/null +++ b/math/munkres-cpp/files/patch-tests_adapters_std__2d__arraytest.cpp @@ -0,0 +1,11 @@ +--- tests/adapters/std_2d_arraytest.cpp.orig 2021-09-09 05:59:29 UTC ++++ tests/adapters/std_2d_arraytest.cpp +@@ -3,7 +3,7 @@ + #include + #include + +- ++#include + + class Adapters_std_2d_array_Test : public ::testing::Test + { diff --git a/math/munkres-cpp/pkg-descr b/math/munkres-cpp/pkg-descr new file mode 100644 index 000000000000..c07dcdf3018a --- /dev/null +++ b/math/munkres-cpp/pkg-descr @@ -0,0 +1,7 @@ +munkres-cpp is an implementation of the Kuhn-Munkres algorithm in C++. + +The Kuhn-Munkres algorithm, also called the Hungarian method, is a combinatorial +optimization algorithm that solves the assignment problem in polynomial time and +which anticipated later primal-dual methods. + +WWW: https://github.com/saebyn/munkres-cpp