diff --git a/science/Makefile b/science/Makefile index 28e271d2ba1b..f41ec7bd287d 100644 --- a/science/Makefile +++ b/science/Makefile @@ -1,464 +1,465 @@ COMMENT = Scientific ports SUBDIR += 2d-rewriter SUBDIR += ALPSCore SUBDIR += ChipmunkPhysics SUBDIR += InsightToolkit SUBDIR += PETSc SUBDIR += R-cran-AMORE SUBDIR += R-cran-DCluster SUBDIR += R-cran-Epi SUBDIR += R-cran-FAdist SUBDIR += R-cran-bayesm SUBDIR += R-cran-cmprsk SUBDIR += R-cran-e1071 SUBDIR += R-cran-eco SUBDIR += R-cran-epicalc SUBDIR += R-cran-etm SUBDIR += R-cran-fastICA SUBDIR += R-cran-kernlab SUBDIR += R-cran-ks SUBDIR += R-cran-snow SUBDIR += R-cran-som SUBDIR += R-cran-udunits2 SUBDIR += abinit SUBDIR += afni SUBDIR += agrum SUBDIR += aircraft-datcom SUBDIR += antioch SUBDIR += apbs SUBDIR += ascent SUBDIR += atompaw SUBDIR += avogadro2 SUBDIR += avogadrolibs SUBDIR += axom SUBDIR += bagel SUBDIR += bddsolve SUBDIR += berkeleygw SUBDIR += bodr SUBDIR += buddy SUBDIR += cantera SUBDIR += cardioid SUBDIR += cdcl SUBDIR += cdf SUBDIR += cdk SUBDIR += cdo SUBDIR += cgnslib SUBDIR += cgribex SUBDIR += checkmol SUBDIR += chemical-mime-data SUBDIR += chemicalfun SUBDIR += chemps2 SUBDIR += chemtool SUBDIR += chemtool-devel SUBDIR += chimes-calculator SUBDIR += chrono SUBDIR += clhep SUBDIR += clipper SUBDIR += code_saturne SUBDIR += colt SUBDIR += conduit SUBDIR += coordgenlibs SUBDIR += cp2k SUBDIR += cp2k-data SUBDIR += crf++ SUBDIR += csvtk SUBDIR += dakota SUBDIR += dalton SUBDIR += dcl SUBDIR += devisor SUBDIR += dftbplus SUBDIR += dftd4 SUBDIR += dimod SUBDIR += dirac SUBDIR += dkh SUBDIR += dlib-cpp SUBDIR += drawxtl SUBDIR += dvc + SUBDIR += dwave-preprocessing SUBDIR += dynare SUBDIR += eccodes SUBDIR += elk SUBDIR += elmerfem SUBDIR += epte SUBDIR += erd SUBDIR += ergo SUBDIR += erkale SUBDIR += erkale-pseudopotentials SUBDIR += fastcap SUBDIR += fasthenry SUBDIR += fastjet SUBDIR += fisicalab SUBDIR += fleur SUBDIR += frontistr SUBDIR += fsom SUBDIR += fvcom SUBDIR += fvcom-mpi SUBDIR += gabedit SUBDIR += gamess-us SUBDIR += gbtolib SUBDIR += gchemutils SUBDIR += gdma SUBDIR += getdp SUBDIR += ghemical SUBDIR += ghmm SUBDIR += gnudatalanguage SUBDIR += gpaw-setups SUBDIR += gramps SUBDIR += grib_api SUBDIR += gromacs SUBDIR += gsmc SUBDIR += gtamsanalyzer SUBDIR += h5utils SUBDIR += h5z-zfp SUBDIR += harminv SUBDIR += hdf SUBDIR += hdf5 SUBDIR += hdf5-110 SUBDIR += hdf5-18 SUBDIR += healpix SUBDIR += helfem SUBDIR += hepmc3 SUBDIR += highfive SUBDIR += hypre SUBDIR += iboview SUBDIR += isaac-cfd SUBDIR += jdftx SUBDIR += jmol SUBDIR += jstrack SUBDIR += kalzium SUBDIR += kim-api SUBDIR += kplib SUBDIR += kst2 SUBDIR += lammps SUBDIR += lamprop SUBDIR += latte SUBDIR += libaec SUBDIR += libccp4 SUBDIR += libcint SUBDIR += libctl SUBDIR += libecpint SUBDIR += libefp SUBDIR += libgeodecomp SUBDIR += libgetar SUBDIR += libghemical SUBDIR += libgridxc SUBDIR += libint SUBDIR += libint2 SUBDIR += libkml SUBDIR += liblinear SUBDIR += libmbd SUBDIR += libmsym SUBDIR += libnegf SUBDIR += liboglappth SUBDIR += libquantum SUBDIR += libssm SUBDIR += libsvm SUBDIR += libsvm-python SUBDIR += libtensorflow1 SUBDIR += libvdwxc SUBDIR += libxc SUBDIR += liggghts SUBDIR += linux-zotero SUBDIR += luscus SUBDIR += madness SUBDIR += maeparser SUBDIR += massxpert SUBDIR += mbdyn SUBDIR += mcstas SUBDIR += mcstas-comps SUBDIR += mctc-lib SUBDIR += mcxtrace SUBDIR += mcxtrace-comps SUBDIR += mdynamix SUBDIR += medit SUBDIR += meep SUBDIR += metaphysicl SUBDIR += minc2 SUBDIR += mmdb2 SUBDIR += mmtf-cpp SUBDIR += mol2ps SUBDIR += molgif SUBDIR += molscript SUBDIR += molsketch SUBDIR += mopac SUBDIR += mpb SUBDIR += mpqc SUBDIR += msms SUBDIR += mstore SUBDIR += multicharge SUBDIR += multiwfn SUBDIR += namd SUBDIR += nest SUBDIR += netcdf SUBDIR += netcdf-cxx SUBDIR += netcdf-fortran SUBDIR += nifticlib SUBDIR += nlcglib SUBDIR += nwchem SUBDIR += nwchem-data SUBDIR += octopus SUBDIR += openbabel SUBDIR += openems SUBDIR += openkim-models SUBDIR += openmc SUBDIR += openmolcas SUBDIR += openmx SUBDIR += opensim-core SUBDIR += opensph SUBDIR += opsin SUBDIR += orthanc SUBDIR += orthanc-dicomweb SUBDIR += orthanc-mysql SUBDIR += orthanc-postgresql SUBDIR += orthanc-webviewer SUBDIR += p5-Algorithm-SVMLight SUBDIR += p5-Chemistry-3DBuilder SUBDIR += p5-Chemistry-Bond-Find SUBDIR += p5-Chemistry-Canonicalize SUBDIR += p5-Chemistry-Elements SUBDIR += p5-Chemistry-File-MDLMol SUBDIR += p5-Chemistry-File-Mopac SUBDIR += p5-Chemistry-File-PDB SUBDIR += p5-Chemistry-File-SLN SUBDIR += p5-Chemistry-File-SMARTS SUBDIR += p5-Chemistry-File-SMILES SUBDIR += p5-Chemistry-File-VRML SUBDIR += p5-Chemistry-File-XYZ SUBDIR += p5-Chemistry-FormulaPattern SUBDIR += p5-Chemistry-InternalCoords SUBDIR += p5-Chemistry-Isotope SUBDIR += p5-Chemistry-MacroMol SUBDIR += p5-Chemistry-MidasPattern SUBDIR += p5-Chemistry-Mok SUBDIR += p5-Chemistry-Mol SUBDIR += p5-Chemistry-Pattern SUBDIR += p5-Chemistry-Reaction SUBDIR += p5-Chemistry-Ring SUBDIR += p5-Geo-BUFR SUBDIR += p5-Geo-Coordinates-Converter SUBDIR += p5-Geo-Coordinates-Converter-iArea SUBDIR += p5-Geo-WebService-Elevation-USGS SUBDIR += p5-Mcstas-Tools SUBDIR += p5-PerlMol SUBDIR += p5-Physics-Unit SUBDIR += packmol SUBDIR += pagmo2 SUBDIR += paje SUBDIR += paraview SUBDIR += pastix SUBDIR += pcmsolver SUBDIR += phonopy SUBDIR += plumed SUBDIR += pnetcdf SUBDIR += precice SUBDIR += pulseview SUBDIR += py-DendroPy SUBDIR += py-GPy SUBDIR += py-GPyOpt SUBDIR += py-MDAnalysis SUBDIR += py-MDAnalysisTests SUBDIR += py-OpenFermion SUBDIR += py-OpenFermion-Dirac SUBDIR += py-OpenFermion-PySCF SUBDIR += py-OpenMC SUBDIR += py-PubChemPy SUBDIR += py-PyFR SUBDIR += py-PyNE SUBDIR += py-SimpleSpectral SUBDIR += py-abipy SUBDIR += py-access SUBDIR += py-asap3 SUBDIR += py-asdf SUBDIR += py-asdf-standard SUBDIR += py-asdf-transform-schemas SUBDIR += py-ase SUBDIR += py-avogadrolibs SUBDIR += py-cdo SUBDIR += py-chainer SUBDIR += py-chainer-chemistry SUBDIR += py-chempy SUBDIR += py-cirq-aqt SUBDIR += py-cirq-core SUBDIR += py-cirq-google SUBDIR += py-cirq-ionq SUBDIR += py-cirq-pasqal SUBDIR += py-cirq-rigetti SUBDIR += py-coards SUBDIR += py-dimod SUBDIR += py-dipy SUBDIR += py-dlib SUBDIR += py-dwave-cloud-client SUBDIR += py-dwave-greedy SUBDIR += py-dwave-hybrid SUBDIR += py-dwave-inspector SUBDIR += py-dwave-neal SUBDIR += py-dwave-networkx SUBDIR += py-dwave-ocean-sdk SUBDIR += py-dwave-preprocessing SUBDIR += py-dwave-samplers SUBDIR += py-dwave-system SUBDIR += py-dwave-tabu SUBDIR += py-dwavebinarycsp SUBDIR += py-eccodes SUBDIR += py-esda SUBDIR += py-fresnel SUBDIR += py-geolinks SUBDIR += py-geomet SUBDIR += py-geometer SUBDIR += py-geometric SUBDIR += py-gpaw SUBDIR += py-gsd SUBDIR += py-h5json SUBDIR += py-h5py SUBDIR += py-hiphive SUBDIR += py-hoomd-blue SUBDIR += py-inequality SUBDIR += py-jupyter_jsmol SUBDIR += py-kim-query SUBDIR += py-kinematics SUBDIR += py-kliff SUBDIR += py-kpLib SUBDIR += py-liac-arff SUBDIR += py-libgetar SUBDIR += py-libpysal SUBDIR += py-lifelines SUBDIR += py-mdp SUBDIR += py-mmtf-python SUBDIR += py-molmod SUBDIR += py-moltemplate SUBDIR += py-netCDF4 SUBDIR += py-netcdf-flattener SUBDIR += py-nibabel SUBDIR += py-nilearn SUBDIR += py-obspy SUBDIR += py-oddt SUBDIR += py-openpiv SUBDIR += py-paida SUBDIR += py-paramz SUBDIR += py-penaltymodel SUBDIR += py-phono3py SUBDIR += py-phonopy SUBDIR += py-pupynere SUBDIR += py-py3Dmol SUBDIR += py-pyaixi SUBDIR += py-pyberny SUBDIR += py-pycsw SUBDIR += py-pydicom SUBDIR += py-pygeodesy SUBDIR += py-pygeometa SUBDIR += py-pygmo2 SUBDIR += py-pyked SUBDIR += py-pymatgen SUBDIR += py-pymbd SUBDIR += py-pymol SUBDIR += py-pyosf SUBDIR += py-pyprecice SUBDIR += py-pyqubo SUBDIR += py-pysal SUBDIR += py-pyscf SUBDIR += py-pyteomics SUBDIR += py-qcelemental SUBDIR += py-qcengine SUBDIR += py-qiskit SUBDIR += py-qiskit-aer SUBDIR += py-qiskit-experiments SUBDIR += py-qiskit-finance SUBDIR += py-qiskit-ibm-experiment SUBDIR += py-qiskit-ibm-provider SUBDIR += py-qiskit-ibmq-provider SUBDIR += py-qiskit-nature SUBDIR += py-qiskit-optimization SUBDIR += py-qiskit-terra SUBDIR += py-qspin SUBDIR += py-quantities SUBDIR += py-rmf SUBDIR += py-rmsd SUBDIR += py-ruffus SUBDIR += py-scikit-fuzzy SUBDIR += py-scikit-learn SUBDIR += py-scikit-optimize SUBDIR += py-scikit-sparse SUBDIR += py-scimath SUBDIR += py-scipy SUBDIR += py-scoria SUBDIR += py-segregation SUBDIR += py-segyio SUBDIR += py-sklearn-pandas SUBDIR += py-skrebate SUBDIR += py-spaghetti SUBDIR += py-spglib SUBDIR += py-tensorflow SUBDIR += py-thewalrus SUBDIR += py-tobler SUBDIR += py-trainstation SUBDIR += py-tweedledum SUBDIR += py-veusz SUBDIR += pybrain SUBDIR += pynn SUBDIR += q SUBDIR += qbox SUBDIR += qcl SUBDIR += qiskit-aer SUBDIR += qmcpack SUBDIR += quantum-espresso SUBDIR += quantum-espresso-pseudopotentials SUBDIR += quantum-jet SUBDIR += qwalk SUBDIR += rdkit SUBDIR += rmf SUBDIR += rubygem-ai4r SUBDIR += rubygem-cdo SUBDIR += rubygem-rgeo SUBDIR += rubygem-rgeo-geojson SUBDIR += rubygem-rgeo-proj4 SUBDIR += rubygem-rgeo-shapefile SUBDIR += rubygem-ruby-dcl SUBDIR += rubygem-ruby-netcdf SUBDIR += scidavis SUBDIR += segyio SUBDIR += shelxle SUBDIR += siconos SUBDIR += siesta SUBDIR += sigrok-cli SUBDIR += sigrok-firmware SUBDIR += sigrok-firmware-fx2lafw SUBDIR += sigrok-firmware-utils SUBDIR += silo SUBDIR += simbody SUBDIR += simgrid SUBDIR += simint SUBDIR += simlib SUBDIR += simple-dftd3 SUBDIR += simsmith SUBDIR += sirius SUBDIR += smoldyn SUBDIR += sparta SUBDIR += spglib SUBDIR += step SUBDIR += svmlight SUBDIR += tblite SUBDIR += teem SUBDIR += tfel SUBDIR += tfel-edf SUBDIR += thermofun SUBDIR += tinker SUBDIR += trilinos SUBDIR += tweedledum SUBDIR += udunits SUBDIR += ukrmol+ SUBDIR += v_sim SUBDIR += vipster SUBDIR += vmd SUBDIR += voro++ SUBDIR += votca SUBDIR += wannier90 SUBDIR += wwplot SUBDIR += wxmacmolplt SUBDIR += xcfun SUBDIR += xcrysden SUBDIR += xdrawchem SUBDIR += xtb SUBDIR += yoda SUBDIR += zotero .include 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