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

{lib,vis}[GCCcore/12.3.0,gfbf/2023a] Polyscope v2.2.1, GLM v1.0.1 #20398

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
39 changes: 39 additions & 0 deletions easybuild/easyconfigs/g/GLFW/GLFW-3.4-GCCcore-12.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
easyblock = 'CMakeMake'

name = 'GLFW'
version = '3.4'

homepage = 'https://www.glfw.org'
description = """GLFW is an Open Source, multi-platform library for OpenGL,
OpenGL ES and Vulkan development on the desktop"""

toolchain = {'name': 'GCCcore', 'version': '12.3.0'}

source_urls = ['https://github.com/%(namelower)s/%(namelower)s/archive/']
sources = ['%(version)s.tar.gz']
checksums = ['c038d34200234d071fae9345bc455e4a8f2f544ab60150765d7704e08f3dac01']

builddependencies = [
('CMake', '3.26.3'),
('binutils', '2.40'),
('pkgconf', '1.9.5'),
]
dependencies = [
('Wayland', '1.22.0'),
('X11', '20230603'),
]

# build both static and shared libraries
configopts = [
'-DBUILD_SHARED_LIBS=OFF',
'-DBUILD_SHARED_LIBS=ON',
]


sanity_check_paths = {
'files': ['include/%(name)s/glfw3.h', 'include/%(name)s/glfw3native.h'] +
['lib/libglfw3.a', 'lib/libglfw.%s' % SHLIB_EXT, 'lib/pkgconfig/glfw3.pc'],
'dirs': ['include/%(name)s', 'lib/cmake/glfw3', 'lib/pkgconfig'],
}

moduleclass = 'vis'
33 changes: 33 additions & 0 deletions easybuild/easyconfigs/g/GLM/GLM-1.0.1-GCCcore-12.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
easyblock = 'CMakeMake'

name = 'GLM'
version = '1.0.1'

homepage = 'https://github.com/g-truc/glm'
description = """
OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics
software based on the OpenGL Shading Language (GLSL) specifications."""

toolchain = {'name': 'GCCcore', 'version': '12.3.0'}

source_urls = ['https://github.com/g-truc/glm/archive/']
sources = ['%(version)s.tar.gz']
patches = [
'%(name)s-%(version)s_adjust_cmake_installpath.patch',
]
checksums = [
{'1.0.1.tar.gz': '9f3174561fd26904b23f0db5e560971cbf9b3cbda0b280f04d5c379d03bf234c'},
{'GLM-1.0.1_adjust_cmake_installpath.patch': '5fb50fbdc63d3abd2b1ee623430e7404a9f5436b52c775444b3d61a9051e5ec4'},
]

builddependencies = [
('binutils', '2.40'),
('CMake', '3.26.3'),
]

sanity_check_paths = {
'files': [],
'dirs': ['include/glm/gtc', 'include/glm/gtx', 'lib/cmake'],
}

moduleclass = 'lib'
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Adjust path where cmake target files are installed

Åke Sandgren, 2024-04-18
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 03417722..d4417ae4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -263,7 +263,7 @@ if (GLM_BUILD_INSTALL)
install(
EXPORT glm
NAMESPACE glm::
- DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/glm"
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/glm"
FILE glmConfig.cmake
)
include(CMakePackageConfigHelpers)
@@ -273,7 +273,7 @@ if (GLM_BUILD_INSTALL)
)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
- DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/glm"
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/glm"
)

configure_file(
84 changes: 84 additions & 0 deletions easybuild/easyconfigs/p/Polyscope/Polyscope-2.2.1-gfbf-2023a.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
easyblock = 'CMakeMake'

name = 'Polyscope'
version = '2.2.1'

homepage = 'https://polyscope.run/'
description = """Polyscope is a C++/Python viewer and user interface for
3D data such as meshes and point clouds. It allows you to register your
data and quickly generate informative and beautiful visualizations,
either programmatically or via a dynamic GUI. Polyscope is designed to
be lightweight—it does not “take ownership” over your entire program,
and it is easy to integrate with existing codebases and popular
libraries. The lofty objective of Polyscope is to offer a useful visual
interface to your data via a single line of code."""

toolchain = {'name': 'gfbf', 'version': '2023a'}

github_account = 'nmwsharp'
source_urls = [GITHUB_LOWER_SOURCE]
sources = [
'v%(version)s.tar.gz',
{
'source_urls': ['https://github.com/ocornut/imgui/archive'],
'download_filename': 'v1.90.5.tar.gz',
'filename': 'imgui-1.90.5.tar.gz',
'extract_cmd': "tar -C %(namelower)s-%(version)s/deps/imgui/imgui --strip-components=1 -xf %s",
},
{
'filename': 'happly-20240207-master.tar.gz',
'git_config': {
'url': 'https://github.com/nmwsharp',
'repo_name': 'happly',
'commit': '8a606309daaa680eee495c8279feb0b704148f4a',
},
'extract_cmd': "tar -C %(namelower)s-%(version)s/deps/happly --strip-components=1 -xf %s",
},
]
patches = [
'%(name)s-%(version)s_use_external_GLFW+GLM.patch',
]
checksums = [
'1952d20722cb37c5531e88d5b7f5db88c2827c55fd7ada481c2ac425f3bc4d25',
'e94b48dba7311c85ba8e3e6fe7c734d76a0eed21b2b42c5180fd5706d1562241',
None,
'072353ee11262b66a3245fc2fba060efa7fc98676ec1f69b6792b6c5672cd3f8',
]

builddependencies = [
('CMake', '3.26.3'),
]

dependencies = [
('Python', '3.11.3'),
('SciPy-bundle', '2023.07'),
('libglvnd', '1.6.0'),
('GLFW', '3.4'),
('GLM', '1.0.1'),
]

exts_defaultclass = 'PythonPackage'

exts_default_options = {
'source_urls': [PYPI_SOURCE],
'use_pip': True,
'download_dep_fail': True,
'sanity_pip_check': True,
}

exts_list = [
('polyscope', version, {
'checksums': ['b01f0b76cdec3e6728e16e273b07d4630a3073bba41e9fdd3721d569a1417b7e'],
}),
]

modextrapaths = {
'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages',
}

sanity_check_paths = {
'files': [],
'dirs': ['lib']
}

moduleclass = 'vis'
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Use external GLFW and GLM

Åke Sandgren, 2024-04-19
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 77dc97b..f91833b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,10 @@ set(POLYSCOPE_BACKEND_OPENGL_MOCK "ON" CACHE BOOL "Enable openGL_mock backend")
set(POLYSCOPE_BACKEND_OPENGL3_EGL "AUTO" CACHE STRING "Enable openGL3_egl backend") # 'AUTO' means "if we're on linux and EGL.h is available"

### Do anything needed for dependencies and bring their stuff in to scope
+if("${POLYSCOPE_BACKEND_OPENGL3_GLFW}")
+ find_package(glfw3)
+endif()
+find_package(glm)
add_subdirectory(deps)

### Add things for this project
diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt
index d7bded0..c078d41 100644
--- a/deps/CMakeLists.txt
+++ b/deps/CMakeLists.txt
@@ -20,6 +20,8 @@ if(NOT TARGET glm::glm)
add_subdirectory(glm)
target_compile_definitions(glm INTERFACE GLM_ENABLE_EXPERIMENTAL)
set_target_properties(glm PROPERTIES LINKER_LANGUAGE CXX)
+else()
+ target_compile_definitions(glm::glm INTERFACE GLM_ENABLE_EXPERIMENTAL)
endif()

## Imgui