From nobody Sun Aug 28 02:35:10 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MFd2k4YNlz4ZX5r; Sun, 28 Aug 2022 02:35:10 +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 4MFd2k433bz3WWk; Sun, 28 Aug 2022 02:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661654110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NwlOEBqc/O70kz/e2WBqOqagNyqJ5ikB/mwUzvEPZUY=; b=mAb10pLGIdlal+i7v+UgbvsW3eMQjFCcMg8RmbDzBr49ffO1hodJ/dtx6GsGzD06YRZYSz U/y1DKpg+SrQ8oOtE1cSgrFT6bATkRRuxXr/j02CLCiVJKTzu36NE/GOuabrU08AHuwTJG 1Gp166pXo8cxuDmiybWK7MLuujp7Xq8i6ajEqb+50W0LmOOtaEH7sjekxNW3tz7gy3DnJ9 +zDPRRrMfB59VHB19cL8Oe7VX+gbmZ9JYVAeZ8751SV1udDJd4ACSo6hmWg9qqN5pH1GUN qIU39d9Lwuheta1mBRHkTlh4ZDor3mrq7CyIQAxeJ9OHyc/76kcjA4KaDT60hw== 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 4MFd2k36Nszx50; Sun, 28 Aug 2022 02:35:10 +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 27S2ZAFT046438; Sun, 28 Aug 2022 02:35:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27S2ZALp046437; Sun, 28 Aug 2022 02:35:10 GMT (envelope-from git) Date: Sun, 28 Aug 2022 02:35:10 GMT Message-Id: <202208280235.27S2ZALp046437@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: 999d53d6e9c7 - main - science/dwave-preprocessing: New port: DWave: Preprocessing tools to aid in solving binary quadratic models List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org 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: 999d53d6e9c79c4d3e8017ec6466cfabc46248c2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661654110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NwlOEBqc/O70kz/e2WBqOqagNyqJ5ikB/mwUzvEPZUY=; b=ysv/FBpgmZow9oGkqZfR7eppT6WuD9S6HU9jo703lVIn3g6ULuNN5Dzk48WBWanNBvE/iJ kQcwKvJrn8YYDSOrzagVJo2tsqZF/jfODRMfrvYUW0QH7uJaE2X/umlpo4Zmj+mpB3eKN6 OXs4/RpDGuKVe27afgSYLWThDzthtuJ7ZkgufnOiwwV4FFF4THV2Luml4Shxt1XMa4B3C1 qUAmf/VF65lPCyff761l3uhG+0EEQ0mblzqt6ewvuJDFFNgww6XcBh3i6UvQd6gmQRtX8+ /oUy53nd7P/LCXKgRW9VwEIfieREZ8Z6lg8DVKcZioWx0slcac5AJE1zMt4Ckw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661654110; a=rsa-sha256; cv=none; b=MAvCxZw04U582QJLKLabchDh5Zoo67ZfTp/GFg+/M6JE4SowRyrRfg1rQza4Tz0WUzMTy4 CeCA0UjAJi6KHJv+YLIAevt/SYzErDBwxxjdO+lxhaUXfLVuqsr1E1lB7knc2R1ieL9qf7 10GmdGKFIlol+JIzc62Di5Gzk1o6TW85q/IEA/3zW+j7se++rXfmjjm2nf+hhfjPJf/dcN iMHbWu9uYrV43PbK0ArcSr8FhmRVhToyzyDficdFwkcs7cbqRUwQ0PNhZnUXnPL8MZu/uG z07SWP9+Mbm3DCrV0a5/rkK7RcwIPLGb8OdoIVHN3LcBtWAUSFEWLthqhus1Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=999d53d6e9c79c4d3e8017ec6466cfabc46248c2 commit 999d53d6e9c79c4d3e8017ec6466cfabc46248c2 Author: Yuri Victorovich AuthorDate: 2022-08-28 02:34:12 +0000 Commit: Yuri Victorovich CommitDate: 2022-08-28 02:35:08 +0000 science/dwave-preprocessing: New port: DWave: Preprocessing tools to aid in solving binary quadratic models --- science/Makefile | 1 + science/dwave-preprocessing/Makefile | 39 ++++++++++++++++++++++ science/dwave-preprocessing/distinfo | 3 ++ .../files/patch-testscpp_Makefile | 32 ++++++++++++++++++ .../files/patch-testscpp_test__main.cpp | 9 +++++ .../patch-testscpp_tests_test__roof__duality.cpp | 11 ++++++ science/dwave-preprocessing/pkg-descr | 4 +++ 7 files changed, 99 insertions(+) diff --git a/science/Makefile b/science/Makefile index 28e271d2ba1b..f41ec7bd287d 100644 --- a/science/Makefile +++ b/science/Makefile @@ -75,6 +75,7 @@ SUBDIR += dlib-cpp SUBDIR += drawxtl SUBDIR += dvc + SUBDIR += dwave-preprocessing SUBDIR += dynare SUBDIR += eccodes SUBDIR += elk diff --git a/science/dwave-preprocessing/Makefile b/science/dwave-preprocessing/Makefile new file mode 100644 index 000000000000..e6f53ef8c8e8 --- /dev/null +++ b/science/dwave-preprocessing/Makefile @@ -0,0 +1,39 @@ +PORTNAME= dwave-preprocessing +DISTVERSION= 0.4.0 +CATEGORIES= science # quantum-computing + +MAINTAINER= yuri@FreeBSD.org +COMMENT= DWave: Preprocessing tools to aid in solving binary quadratic models + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= dimod>0:science/dimod +TEST_DEPENDS= catch>0:devel/catch + +USES= compiler:c++11-lang pkgconfig + +USE_GITHUB= yes +GH_ACCOUNT= dwavesystems + +NO_BUILD= yes +NO_ARCH= yes + +PLIST_FILES= include/dwave-preprocessing/fix_variables.hpp \ + include/dwave-preprocessing/helper_data_structures.hpp \ + include/dwave-preprocessing/helper_graph_algorithms.hpp \ + include/dwave-preprocessing/implication_network.hpp \ + include/dwave-preprocessing/mapping_policy.hpp \ + include/dwave-preprocessing/posiform_info.hpp \ + include/dwave-preprocessing/push_relabel.hpp + +BINARY_ALIAS= git=true + +do-install: + cd ${WRKSRC}/dwave/preprocessing/include && \ + ${COPYTREE_SHARE} dwave-preprocessing ${STAGEDIR}${PREFIX}/include + +do-test: + @cd ${WRKSRC}/testscpp && ${SETENV} ${MAKE_ENV} ${MAKE} DIMOD="-I${LOCALBASE}/include" + +.include diff --git a/science/dwave-preprocessing/distinfo b/science/dwave-preprocessing/distinfo new file mode 100644 index 000000000000..a83055cb266e --- /dev/null +++ b/science/dwave-preprocessing/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1660494073 +SHA256 (dwavesystems-dwave-preprocessing-0.4.0_GH0.tar.gz) = 04ff8937b131af3520d4197f256c4ba68cad0783af131c57ce20083d3f36fad3 +SIZE (dwavesystems-dwave-preprocessing-0.4.0_GH0.tar.gz) = 80577 diff --git a/science/dwave-preprocessing/files/patch-testscpp_Makefile b/science/dwave-preprocessing/files/patch-testscpp_Makefile new file mode 100644 index 000000000000..35530211b3d6 --- /dev/null +++ b/science/dwave-preprocessing/files/patch-testscpp_Makefile @@ -0,0 +1,32 @@ +--- testscpp/Makefile.orig 2022-05-07 23:28:35 UTC ++++ testscpp/Makefile +@@ -1,22 +1,22 @@ + ROOT := ../ + SRC := $(ROOT)/dwave/preprocessing/ +-DIMOD := $(shell python -c 'import dimod; print(dimod.get_include())') ++#DIMOD := $(shell python -c 'import dimod; print(dimod.get_include())') + + all: catch2 test_main test_main_parallel tests tests_parallel + +-tests: test_main.out ++tests: test_main + ./test_main + +-tests_parallel: test_main_parallel.out ++tests_parallel: test_main_parallel + ./test_main_parallel + + test_main: test_main.cpp +- g++ -std=c++11 -Wall -c test_main.cpp +- g++ -std=c++11 -Wall test_main.o tests/*.cpp -o test_main -I $(SRC)/include/ -I $(DIMOD) ++ ${CXX} `pkg-config --cflags catch2` -std=c++11 -Wall -c test_main.cpp ++ ${CXX} `pkg-config --cflags catch2` -std=c++11 -Wall test_main.o tests/*.cpp -o test_main -I $(SRC)/include/ -I $(DIMOD) + + test_main_parallel: test_main.cpp +- g++ -std=c++11 -fopenmp -Wall -c test_main.cpp -o test_main_parallel.o +- g++ -std=c++11 -fopenmp -Wall test_main_parallel.o tests/*.cpp -o test_main_parallel -I $(SRC)/include/ -I $(DIMOD) ++ ${CXX} `pkg-config --cflags catch2` -std=c++11 -fopenmp -Wall -c test_main.cpp -o test_main_parallel.o ++ ${CXX} `pkg-config --cflags catch2` -std=c++11 -fopenmp -Wall test_main_parallel.o tests/*.cpp -o test_main_parallel -I $(SRC)/include/ -I $(DIMOD) + + catch2: + git submodule init diff --git a/science/dwave-preprocessing/files/patch-testscpp_test__main.cpp b/science/dwave-preprocessing/files/patch-testscpp_test__main.cpp new file mode 100644 index 000000000000..1fce02ce2668 --- /dev/null +++ b/science/dwave-preprocessing/files/patch-testscpp_test__main.cpp @@ -0,0 +1,9 @@ +--- testscpp/test_main.cpp.orig 2022-08-27 22:08:08 UTC ++++ testscpp/test_main.cpp +@@ -1,5 +1,5 @@ + #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file +-#include "Catch2/single_include/catch2/catch.hpp" ++#include + + /* + The purpose of this file is to include Catch's main(). Tests can be found inside tests directory. diff --git a/science/dwave-preprocessing/files/patch-testscpp_tests_test__roof__duality.cpp b/science/dwave-preprocessing/files/patch-testscpp_tests_test__roof__duality.cpp new file mode 100644 index 000000000000..01a4bff4b58c --- /dev/null +++ b/science/dwave-preprocessing/files/patch-testscpp_tests_test__roof__duality.cpp @@ -0,0 +1,11 @@ +--- testscpp/tests/test_roof_duality.cpp.orig 2022-08-28 01:26:12 UTC ++++ testscpp/tests/test_roof_duality.cpp +@@ -12,7 +12,7 @@ + // See the License for the specific language governing permissions and + // limitations under the License. + +-#include "../Catch2/single_include/catch2/catch.hpp" ++#include + #include + + #include "dwave-preprocessing/fix_variables.hpp" diff --git a/science/dwave-preprocessing/pkg-descr b/science/dwave-preprocessing/pkg-descr new file mode 100644 index 000000000000..602f35493d33 --- /dev/null +++ b/science/dwave-preprocessing/pkg-descr @@ -0,0 +1,4 @@ +dwave-preprocessing is a package of common preprocessing tools that can aid in +solving binary quadratic models (BQM). + +WWW: https://github.com/dwavesystems/dwave-preprocessing