diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2023-06-18 18:52:44 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2023-06-18 18:52:44 +0000 |
commit | fb1a3b688a473e392317c80915fee5f01e3d392e (patch) | |
tree | 072aaf4c939cf3199e88efa4d66124f1cc9ebda5 /science | |
parent | 119327eb7616f45b8d947eae875bb4087a5390a7 (diff) | |
download | ports-fb1a3b688a473e392317c80915fee5f01e3d392e.tar.gz ports-fb1a3b688a473e392317c80915fee5f01e3d392e.zip |
Diffstat (limited to 'science')
5 files changed, 42 insertions, 27 deletions
diff --git a/science/dwave-preprocessing/Makefile b/science/dwave-preprocessing/Makefile index 193999807000..59b943e612d6 100644 --- a/science/dwave-preprocessing/Makefile +++ b/science/dwave-preprocessing/Makefile @@ -1,5 +1,5 @@ PORTNAME= dwave-preprocessing -DISTVERSION= 0.4.0 +DISTVERSION= 0.5.4 CATEGORIES= science # quantum-computing MAINTAINER= yuri@FreeBSD.org @@ -10,13 +10,17 @@ LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= dimod>0:science/dimod -TEST_DEPENDS= catch>0:devel/catch +TEST_DEPENDS= catch>0:devel/catch \ + spdlog>0:devel/spdlog USES= compiler:c++11-lang pkgconfig USE_GITHUB= yes GH_ACCOUNT= dwavesystems +CXXFLAGS+= `pkg-config --cflags catch2 spdlog` +LDFLAGS+= `pkg-config --libs catch2 spdlog` + NO_BUILD= yes NO_ARCH= yes @@ -34,7 +38,7 @@ do-install: cd ${WRKSRC}/dwave/preprocessing/include && \ ${COPYTREE_SHARE} dwave-preprocessing ${STAGEDIR}${PREFIX}/include -do-test: +do-test: # tests fail to link, see https://github.com/dwavesystems/dwave-preprocessing/issues/119 @cd ${WRKSRC}/testscpp && ${SETENV} ${MAKE_ENV} ${MAKE} DIMOD="-I${LOCALBASE}/include" .include <bsd.port.mk> diff --git a/science/dwave-preprocessing/distinfo b/science/dwave-preprocessing/distinfo index a83055cb266e..3856873fccd3 100644 --- a/science/dwave-preprocessing/distinfo +++ b/science/dwave-preprocessing/distinfo @@ -1,3 +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 +TIMESTAMP = 1687113085 +SHA256 (dwavesystems-dwave-preprocessing-0.5.4_GH0.tar.gz) = 864ec18a8f14a83f0439d3cb6a9006c0d9577012f2cab14b622dc715bac17b24 +SIZE (dwavesystems-dwave-preprocessing-0.5.4_GH0.tar.gz) = 104138 diff --git a/science/dwave-preprocessing/files/patch-dwave_preprocessing_include_dwave_presolve.h b/science/dwave-preprocessing/files/patch-dwave_preprocessing_include_dwave_presolve.h new file mode 100644 index 000000000000..729aad02ae68 --- /dev/null +++ b/science/dwave-preprocessing/files/patch-dwave_preprocessing_include_dwave_presolve.h @@ -0,0 +1,11 @@ +--- dwave/preprocessing/include/dwave/presolve.h.orig 2023-06-18 18:36:53 UTC ++++ dwave/preprocessing/include/dwave/presolve.h +@@ -19,7 +19,7 @@ + #include <utility> + #include <vector> + +-#include "spdlog/spdlog.h" ++#include <spdlog/spdlog.h> + #include "dimod/constrained_quadratic_model.h" + + namespace dwave { diff --git a/science/dwave-preprocessing/files/patch-testscpp_Makefile b/science/dwave-preprocessing/files/patch-testscpp_Makefile index 35530211b3d6..e8c4e6997413 100644 --- a/science/dwave-preprocessing/files/patch-testscpp_Makefile +++ b/science/dwave-preprocessing/files/patch-testscpp_Makefile @@ -1,32 +1,32 @@ ---- testscpp/Makefile.orig 2022-05-07 23:28:35 UTC +--- testscpp/Makefile.orig 2022-12-19 19:58:20 UTC +++ testscpp/Makefile -@@ -1,22 +1,22 @@ - ROOT := ../ +@@ -1,10 +1,10 @@ + ROOT := .. SRC := $(ROOT)/dwave/preprocessing/ + CATCH2 := $(ROOT)/testscpp/Catch2/single_include/ -DIMOD := $(shell python -c 'import dimod; print(dimod.get_include())') +#DIMOD := $(shell python -c 'import dimod; print(dimod.get_include())') + SPDLOG := $(ROOT)/extern/spdlog/include/ + INCLUDES := -I $(SRC)/include/ -I $(DIMOD) -I $(CATCH2) -I $(SPDLOG) +-FLAGS := -std=c++17 -Wall -Wno-unknown-pragmas -Wno-sign-compare -Wno-deprecated-declarations -fcompare-debug-second -O3 ++FLAGS := ${CXXFLAGS} -std=c++17 -Wall -Wno-unknown-pragmas -Wno-sign-compare -Wno-deprecated-declarations - all: catch2 test_main test_main_parallel tests tests_parallel + all: update 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 +@@ -15,12 +15,12 @@ tests_parallel: test_main_parallel.out ./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) +- g++ $(FLAGS) -c test_main.cpp +- g++ $(FLAGS) test_main.o tests/*.cpp -o test_main $(INCLUDES) ++ ${CXX} $(FLAGS) -c test_main.cpp ++ ${CXX} $(FLAGS) ${LDFLAGS} test_main.o tests/*.cpp -o test_main $(INCLUDES) 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) +- g++ $(FLAGS) -fopenmp -c test_main.cpp -o test_main_parallel.o +- g++ $(FLAGS) -fopenmp test_main_parallel.o tests/*.cpp -o test_main_parallel $(INCLUDES) ++ ${CXX} $(FLAGS) -fopenmp -c test_main.cpp -o test_main_parallel.o ++ ${CXX} $(FLAGS) ${LDFLAGS} -fopenmp test_main_parallel.o tests/*.cpp -o test_main_parallel $(INCLUDES) - catch2: + update: git submodule init 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 index 01a4bff4b58c..e679ab3df1c0 100644 --- a/science/dwave-preprocessing/files/patch-testscpp_tests_test__roof__duality.cpp +++ b/science/dwave-preprocessing/files/patch-testscpp_tests_test__roof__duality.cpp @@ -1,10 +1,10 @@ ---- testscpp/tests/test_roof_duality.cpp.orig 2022-08-28 01:26:12 UTC +--- testscpp/tests/test_roof_duality.cpp.orig 2022-12-19 19:58:20 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 "catch2/catch.hpp" +#include <catch2/catch.hpp> #include <dimod/quadratic_model.h> |