Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OpenTURNS] add new port #29336

Merged
merged 14 commits into from
Feb 8, 2023
57 changes: 57 additions & 0 deletions ports/openturns/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO openturns/openturns
REF ad8482ece23d98802edc6258683e8353f9ff8b08
SHA512 b0bc88bcf54945b5e786b480e640ee182926c75f1d871f70690d9609c98745b1907b3d9184c07586591fa45238c837da5a893a00d9c576a9e10232bcc9adc593
HEAD_REF master
)

#vcpkg_find_acquire_program(PYTHON3)
#get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
#vcpkg_add_to_path("${PYTHON3_DIR}")
vcpkg_find_acquire_program(FLEX)
get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY)
vcpkg_add_to_path("${FLEX_DIR}")
vcpkg_find_acquire_program(BISON)
get_filename_component(BISON_DIR "${BISON}" DIRECTORY)
vcpkg_add_to_path("${BISON_DIR}")

# option (USE_HMAT "Use HMat library" ON)
# option (USE_R "Use R for graph output support" ON)
# option (USE_NLOPT "Use NLopt for additional optimization algorithms" ON)
# option (USE_CERES "Use Ceres Solver for additional optimization algorithms" ON)
# option (USE_CMINPACK "Use CMinpack for additional optimization algorithms" ON)
# option (USE_DLIB "Use dlib for additional optimization algorithms" ON)
# option (USE_IPOPT "Use Ipopt for nonlinear optimization" ON)
# option (USE_BONMIN "Use Bonmin for MINLP problems" ON)
# option (USE_PAGMO "Use Pagmo for multi-objective optimization" ON)
# option (USE_SPECTRA "Use Spectra for eigenvalues computation" ON)
# option (USE_PRIMESIEVE "Use primesieve for prime numbers generation" ON)
# option (USE_OPENMP "Use OpenMP to disable threading" ON)
# option (USE_OPENBLAS "Use OpenBLAS to disable threading" ON)
# option (BUILD_PYTHON "Build the python module for the library" ON)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DBUILD_PYTHON:BOOL=ON
-DUSE_BOOST:BOOL=ON # Required to make the distributions cross platform
-DUSE_DOXYGEN:BOOL=OFF
-DUSE_OPENMP:BOOL=OFF
)

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/OpenTURNSConfig.cmake" "/lib/cmake/" "/share/")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/OpenTURNSConfig.cmake" "/lib" "$<$<CONFIG:DEBUG>:/debug>/lib")


file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/pthread.h"
"${CURRENT_PACKAGES_DIR}/include/semaphore.h"
"${CURRENT_PACKAGES_DIR}/include/unistd.h")

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright")
39 changes: 39 additions & 0 deletions ports/openturns/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "openturns",
"version": "1.2.0",
"description": "OpenTURNS is a scientific C++ and Python library featuring an internal data model and algorithms dedicated to the treatment of uncertainties.",
"homepage": "http://www.openturns.org",
"license": null,
"dependencies": [
"blas",
"boost-random",
"ceres",
"cminpack",
"dlib",
"exprtk",
"hdf5",
"lapack",
"libxml2",
"mpc",
"mpfr",
"muparser",
"nlopt",
"pagmo2",
"pthread",
"python3",
{
"name": "python3",
"host": true
},
"spectra",
"tbb",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5684,6 +5684,10 @@
"baseline": "1.6.0",
"port-version": 3
},
"openturns": {
"baseline": "1.2.0",
"port-version": 0
},
"openvdb": {
"baseline": "10.0.0",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/o-/openturns.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "3b9c53996a09bfaf5f4292c0b42e820e7b5349d0",
"version": "1.2.0",
"port-version": 0
}
]
}