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

[gmsh] Add new port #21896

Merged
merged 13 commits into from
Dec 17, 2021
69 changes: 69 additions & 0 deletions ports/gmsh/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Common Ambient Variables:
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
# CURRENT_INSTALLED_DIR = ${VCPKG_ROOT_DIR}\installed\${TRIPLET}
# DOWNLOADS = ${VCPKG_ROOT_DIR}\downloads
# PORT = current port name (zlib, etc)
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
# VCPKG_TOOLCHAIN = ON OFF
# TRIPLET_SYSTEM_ARCH = arm x86 x64
# BUILD_ARCH = "Win32" "x64" "ARM"
# MSBUILD_PLATFORM = "Win32"/"x64"/${TRIPLET_SYSTEM_ARCH}
# DEBUG_CONFIG = "Debug Static" "Debug Dll"
# RELEASE_CONFIG = "Release Static"" "Release DLL"
# VCPKG_TARGET_IS_WINDOWS
# VCPKG_TARGET_IS_UWP
# VCPKG_TARGET_IS_LINUX
# VCPKG_TARGET_IS_OSX
# VCPKG_TARGET_IS_FREEBSD
# VCPKG_TARGET_IS_ANDROID
# VCPKG_TARGET_IS_MINGW
# VCPKG_TARGET_EXECUTABLE_SUFFIX
# VCPKG_TARGET_STATIC_LIBRARY_SUFFIX
# VCPKG_TARGET_SHARED_LIBRARY_SUFFIX
#
# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md

# # Specifies if the port install should fail immediately given a condition
# vcpkg_fail_port_install(MESSAGE "gmsh currently only supports Linux and Mac platforms" ON_TARGET "Windows")
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved

vcpkg_from_gitlab(
GITLAB_URL https://gitlab.com
OUT_SOURCE_PATH SOURCE_PATH
REPO gmsh/gmsh
REF 4.9.0
SHA512 a3d820b76e6f0730d1d5aa595bdefcca0cbf3f3b
HEAD_REF gmsh_4_9_0
[PATCHES <patch1.patch> <patch2.patch>...]
[FILE_DISAMBIGUATOR <N>]
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
)

# # Check if one or more features are a part of a package installation.
# # See /docs/maintainers/vcpkg_check_features.md for more details
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
# FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used
fltk WITH_FLTK
opencascade OCC OCC_CAF OCC_TBB
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
# PREFER_NINJA # Disable this option if project cannot be built with Ninja
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
# OPTIONS_RELEASE -DOPTIMIZE=1
# OPTIONS_DEBUG -DDEBUGGABLE=1
)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved

vcpkg_install_cmake()
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved

# # Moves all .cmake files from /debug/share/gmsh/ to /share/gmsh/
# # See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details
# vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/gmsh)

# # Handle copyright
# file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gmsh RENAME copyright)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
21 changes: 21 additions & 0 deletions ports/gmsh/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "gmsh",
"version-string": "4.9.0",
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
"homepage": "https://gmsh.info",
"description": "Gmsh is an open source 3D finite element mesh generator with a built-in CAD engine and post-processor.",
"dependencies": [],

JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
"default-features": [],
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
"features": [
{
"name": "fltk",
"description": "needed if build with GUI.",
"dependencies": [fltk]
},
{
"name": "opencascade",
"description": "boolean operations, constructive solid geometry features and STEP file import",
"dependencies": [opencascade]
}
]
}
9 changes: 9 additions & 0 deletions versions/g-/gmsh.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "a3d820b76e6f0730d1d5aa595bdefcca0cbf3f3b",
"version-string": "2021-12-04",
"port-version": 0
}
]
}