2 Commits

Author SHA256 Message Date
c34a91db0b Accepting request 1277863 from science
OBS-URL: https://build.opensuse.org/request/show/1277863
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glm?expand=0&rev=15
2025-05-20 07:31:22 +00:00
7ad56b8287 - Update to version 1.0.1
* Features:
    + Added C++17 [[nodiscard]] support
  * Improvements:
    + Enables only warnings as errors while building unit tests
    + Added aligned_*vec3 simd support
  * Fixes:
    + Fixed C++ language auto detection build, disable C++98 warnings
      with Clang [gh#g-truc/glm#1235] [gh#g-truc/glm#1231]
    + Fixed GTX_color_space missing <glm/ext/scalar_constants.hpp>
      include [gh#g-truc/glm#1233]
    + Fixed EXT_matrix_transform shear implementation
    + Fixed smoothstep SIMD implementation [gh#g-truc/glm#1222]
- Changes from version 1.0.0
  * Features:
    + Added GLM_EXT_scalar_reciprocal with tests
    + Added GLM_EXT_vector_reciprocal with tests
    + Added glm::iround and glm::uround to GLM_EXT_scalar_common
      and GLM_EXT_vector_common
    + Added GLM_EXT_matrix_integer with tests
    + Added Github Actions
    + Added GLM_FORCE_UNRESTRICTED_FLOAT to prevent static asserts
      when using other scalar types with function expecting floats.
  * Improvements:
    + Added constexpr qualifier for cross product
    + Added constexpr qualifier for dot product
  * Fixes:
    + Fixed incorrect assertion for glm::min and glm::max
    + Fixed quaternion orientation in glm::decompose
    + Fixed singularity in quaternion to euler angle roll conversion
    + Fixed quat glm::pow handling of small magnitude quaternions
    + Fixed glm::fastNormalize build error
    + Fixed glm::isMultiple build error
    + Fixed glm::adjugate calculation
    + Fixed glm::angle discards the sign of result for angles in
      range (2pi-1, 2pi)
    + Removed ban on using glm::string_cast with CUDA host code
- Removed patches
  * glm-0.9.9.8-install.patch, now included upstream
- Added patches
  * glm-1.0.1-fix-install-cmake-files.patch
  * glm-1.0.1-noarch.patch
  * glm-1.0.1-without-werror.patch
- Updated patches
  * glm-0.9.9.8-pkgconfig.patch updated to
    glm-1.0.1-pkgconfig.patch
  * glm-0.9.9.8-fix_tests_big-endian.patch updated to
    glm-1.0.1-fix-tests-big-endian.patch
- Spec file changes
  * Set BuildArch to noarch for devel package as it is a header only
    package
  * Use cmake_build instead of make_jobs

OBS-URL: https://build.opensuse.org/package/show/science/glm?expand=0&rev=16
2025-05-15 17:03:08 +00:00
11 changed files with 207 additions and 231 deletions

View File

@@ -1,150 +0,0 @@
From 02f26a88537b0b02dd0df77fc858e9449c7e3847 Mon Sep 17 00:00:00 2001
From: Krzysztof Kurek <krzysio.kurek@pm.me>
Date: Sat, 30 Jan 2021 21:08:48 +0100
Subject: [PATCH] Add installation support from PR #1054
This is based on commit 887827b762111a8e6b4765513b4be212fa6a5426,
discovered from https://github.com/g-truc/glm/pull/1054
---
CMakeLists.txt | 16 ++++++++++++++--
cmake/glm/glmConfig-version.cmake | 11 -----------
cmake/glm/glmConfig.cmake | 22 ----------------------
glm/CMakeLists.txt | 10 +++++++++-
manual.md | 21 ++++++++++++++++++++-
5 files changed, 43 insertions(+), 37 deletions(-)
delete mode 100644 cmake/glm/glmConfig-version.cmake
delete mode 100644 cmake/glm/glmConfig.cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 843e7546..642a5fde 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,13 +3,25 @@ cmake_policy(VERSION 3.2)
set(GLM_VERSION "0.9.9")
project(glm VERSION ${GLM_VERSION} LANGUAGES CXX)
-enable_testing()
+message(STATUS "GLM: Version " ${GLM_VERSION})
add_subdirectory(glm)
add_library(glm::glm ALIAS glm)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
-add_subdirectory(test)
+ include(CPack)
+ install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} PATTERN "CMakeLists.txt" EXCLUDE)
+ install(EXPORT glm FILE glmConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm NAMESPACE glm::)
+ include(CMakePackageConfigHelpers)
+ write_basic_package_version_file("glmConfigVersion.cmake" COMPATIBILITY AnyNewerVersion)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm)
+
+ include(CTest)
+ if(BUILD_TESTING)
+ add_subdirectory(test)
+ endif()
endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
+
+
diff --git a/cmake/glm/glmConfig-version.cmake b/cmake/glm/glmConfig-version.cmake
deleted file mode 100644
index 6e63a4a3..00000000
--- a/cmake/glm/glmConfig-version.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-if(${PACKAGE_FIND_VERSION_MAJOR} EQUAL 0)
- if (${PACKAGE_FIND_VERSION} VERSION_LESS ${GLM_VERSION})
- set(PACKAGE_VERSION_COMPATIBLE 1)
- endif()
- if(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${GLM_VERSION})
- set(PACKAGE_VERSION_EXACT 1)
- endif()
-else()
- set(PACKAGE_VERSION_UNSUITABLE 1)
-endif()
-
diff --git a/cmake/glm/glmConfig.cmake b/cmake/glm/glmConfig.cmake
deleted file mode 100644
index 4fba5116..00000000
--- a/cmake/glm/glmConfig.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
-cmake_policy(VERSION 3.2)
-
-set(GLM_VERSION 0.9.9)
-
-get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
-get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
-get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
-if (_IMPORT_PREFIX STREQUAL "/")
- set(_IMPORT_PREFIX "")
-endif()
-
-# Set the old GLM_INCLUDE_DIRS variable for backwards compatibility
-set(GLM_INCLUDE_DIRS ${_IMPORT_PREFIX})
-
-add_library(glm::glm INTERFACE IMPORTED)
-set_target_properties(glm::glm PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES ${GLM_INCLUDE_DIRS})
-
-mark_as_advanced(glm_DIR)
-set(_IMPORT_PREFIX)
-
diff --git a/glm/CMakeLists.txt b/glm/CMakeLists.txt
index 4ff51c81..cee0d2e7 100644
--- a/glm/CMakeLists.txt
+++ b/glm/CMakeLists.txt
@@ -43,7 +43,15 @@ source_group("SIMD Files" FILES ${SIMD_INLINE})
source_group("SIMD Files" FILES ${SIMD_HEADER})
add_library(glm INTERFACE)
-target_include_directories(glm INTERFACE ../)
+
+include(GNUInstallDirs)
+
+target_include_directories(glm INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+)
+
+install(TARGETS glm EXPORT glm)
if(BUILD_STATIC_LIBS)
add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
diff --git a/manual.md b/manual.md
index a7f6956f..d53df3d7 100644
--- a/manual.md
+++ b/manual.md
@@ -277,7 +277,26 @@ GLM does not depend on external libraries or headers such as `<GL/gl.h>`, [`<GL/
### <a name="section1_5"></a> 1.5. Finding GLM with CMake
-GLM packages a `glmConfig.cmake` and `glmConfig-version.cmake` in the root of the repository and the release archives. To find GLM with CMake you can pass `-Dglm_DIR=<path to glm root>/cmake/glm/` when running CMake. You can then either add `${GLM_INCLUDE_DIRS}` to your target's include directories, or link against the imported `glm::glm` target.
+When installed, GLM provides the CMake package configuration files `glmConfig.cmake` and `glmConfigVersion.cmake`.
+
+To use these configurations files, you may need to set the `glm_DIR` variable to the directory containing the configuration files `<installation prefix>/lib/cmake/glm/`.
+
+Use the `find_package` CMake command to load the configurations into your project. Lastly, either link your executable against the `glm::glm` target or add `${GLM_INCLUDE_DIRS}` to your target's include directories:
+
+```cmake
+set(glm_DIR <installation prefix>/lib/cmake/glm) # if necessary
+find_package(glm REQUIRED)
+target_link_libraries(<your executable> glm::glm)
+```
+
+To use GLM as a submodule in a project instead, use `add_subdirectory` to expose the same target, or add the directory to your target's
+
+```cmake
+add_subdirectory(glm)
+target_link_libraries(<your executable> glm::glm)
+# or
+target_include_directories(<your executable> glm)
+```
---
<div style="page-break-after: always;"> </div>
--
2.29.2

View File

@@ -1,26 +0,0 @@
Index: glm-0.9.9.8/CMakeLists.txt
===================================================================
--- glm-0.9.9.8.orig/CMakeLists.txt
+++ glm-0.9.9.8/CMakeLists.txt
@@ -17,6 +17,9 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_
write_basic_package_version_file("glmConfigVersion.cmake" COMPATIBILITY AnyNewerVersion)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm)
+ configure_file(glm.pc.in glm.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glm.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
include(CTest)
if(BUILD_TESTING)
add_subdirectory(test)
Index: glm-0.9.9.8/glm.pc.in
===================================================================
--- /dev/null
+++ glm-0.9.9.8/glm.pc.in
@@ -0,0 +1,7 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+includedir=${prefix}/include
+
+Name: GLM
+Description: OpenGL Mathematics
+Version: @GLM_VERSION@
+Cflags: -I${includedir}

Binary file not shown.

View File

@@ -0,0 +1,29 @@
From: Matthias Fehring <buschmann23@opensuse.org>
Date: Wed, 14 May 2025 17:23:00 +0200
Subject: Fix installation of cmake files
Upstream: no
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/CMakeLists.txt 2025-05-14 16:55:08.429478107 +0200
+++ b/CMakeLists.txt 2025-05-14 16:55:57.965657706 +0200
@@ -263,7 +263,7 @@
install(
EXPORT glm
NAMESPACE glm::
- DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/glm"
+ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/glm"
FILE glmConfig.cmake
)
include(CMakePackageConfigHelpers)
@@ -273,7 +273,7 @@
)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
- DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/glm"
+ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/glm"
)
configure_file(glm.pc.in glm.pc @ONLY)

View File

@@ -1,17 +1,17 @@
From 06ce42e72324b32b1f4c37c646e99950c2bd5f6b Mon Sep 17 00:00:00 2001
From: Max Rees <maxcrees@me.com>
Date: Sun, 15 Mar 2020 15:13:27 -0400
From: Matthias Fehring <buschmann23@opensuse.org>
Date: Wed, 14 May 2025 17:26:00 +0200
Subject: [PATCH] Fix test suite on big endian platforms
Upstream: submitted (https://github.com/g-truc/glm/pull/1001)
---
glm/gtc/packing.inl | 55 ++++++++++++++++++++++++++++++++++++++++
test/gtc/gtc_packing.cpp | 3 ++-
glm/gtc/packing.inl | 55 +++++++++++++++++++++++++++++++++++++++++++++++
test/gtc/gtc_packing.cpp | 3 +-
2 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/glm/gtc/packing.inl b/glm/gtc/packing.inl
index 8c906e16c..b1c99a507 100644
--- a/glm/gtc/packing.inl
+++ b/glm/gtc/packing.inl
--- a/glm/gtc/packing.inl 2024-02-27 18:19:47.000000000 +0100
+++ b/glm/gtc/packing.inl 2025-05-14 17:06:09.608767071 +0200
@@ -9,6 +9,9 @@
#include "../detail/type_half.hpp"
#include <cstring>
@@ -22,39 +22,39 @@ index 8c906e16c..b1c99a507 100644
namespace glm{
namespace detail
@@ -183,9 +186,15 @@ namespace detail
@@ -190,9 +193,15 @@
{
struct
struct Data
{
+#if BYTE_ORDER == LITTLE_ENDIAN
uint x : 3;
uint y : 3;
uint z : 2;
+#else
+ uint z : 2;
+ uint z : 2;
+ uint y : 3;
+ uint x : 3;
+#endif
} data;
uint8 pack;
};
@@ -194,8 +203,13 @@ namespace detail
@@ -201,8 +210,13 @@
{
struct
struct Data
{
+#if BYTE_ORDER == LITTLE_ENDIAN
uint x : 4;
uint y : 4;
+#else
+ uint y : 4;
+ uint x : 4;
+ uint y : 4;
+ uint x : 4;
+#endif
} data;
uint8 pack;
};
@@ -204,10 +218,17 @@ namespace detail
@@ -211,10 +225,17 @@
{
struct
struct Data
{
+#if BYTE_ORDER == LITTLE_ENDIAN
uint x : 4;
@@ -62,7 +62,7 @@ index 8c906e16c..b1c99a507 100644
uint z : 4;
uint w : 4;
+#else
+ uint w : 4;
+ uint w : 4;
+ uint z : 4;
+ uint y : 4;
+ uint x : 4;
@@ -70,25 +70,25 @@ index 8c906e16c..b1c99a507 100644
} data;
uint16 pack;
};
@@ -216,9 +237,15 @@ namespace detail
@@ -223,9 +244,15 @@
{
struct
struct Data
{
+#if BYTE_ORDER == LITTLE_ENDIAN
uint x : 5;
uint y : 6;
uint z : 5;
+#else
+ uint z : 5;
+ uint z : 5;
+ uint y : 6;
+ uint x : 5;
+#endif
} data;
uint16 pack;
};
@@ -227,10 +254,17 @@ namespace detail
@@ -234,10 +261,17 @@
{
struct
struct Data
{
+#if BYTE_ORDER == LITTLE_ENDIAN
uint x : 5;
@@ -96,7 +96,7 @@ index 8c906e16c..b1c99a507 100644
uint z : 5;
uint w : 1;
+#else
+ uint w : 1;
+ uint w : 1;
+ uint z : 5;
+ uint y : 5;
+ uint x : 5;
@@ -104,9 +104,9 @@ index 8c906e16c..b1c99a507 100644
} data;
uint16 pack;
};
@@ -239,10 +273,17 @@ namespace detail
@@ -252,10 +286,17 @@
{
struct
struct Data
{
+#if BYTE_ORDER == LITTLE_ENDIAN
uint x : 10;
@@ -114,7 +114,7 @@ index 8c906e16c..b1c99a507 100644
uint z : 10;
uint w : 2;
+#else
+ uint w : 2;
+ uint w : 2;
+ uint z : 10;
+ uint y : 10;
+ uint x : 10;
@@ -122,9 +122,9 @@ index 8c906e16c..b1c99a507 100644
} data;
uint32 pack;
};
@@ -251,10 +292,17 @@ namespace detail
@@ -264,10 +305,17 @@
{
struct
struct Data
{
+#if BYTE_ORDER == LITTLE_ENDIAN
int x : 10;
@@ -132,7 +132,7 @@ index 8c906e16c..b1c99a507 100644
int z : 10;
int w : 2;
+#else
+ int w : 2;
+ int w : 2;
+ int z : 10;
+ int y : 10;
+ int x : 10;
@@ -140,9 +140,9 @@ index 8c906e16c..b1c99a507 100644
} data;
uint32 pack;
};
@@ -263,10 +311,17 @@ namespace detail
@@ -276,10 +324,17 @@
{
struct
struct Data
{
+#if BYTE_ORDER == LITTLE_ENDIAN
uint x : 9;
@@ -150,7 +150,7 @@ index 8c906e16c..b1c99a507 100644
uint z : 9;
uint w : 5;
+#else
+ uint w : 5;
+ uint w : 5;
+ uint z : 9;
+ uint y : 9;
+ uint x : 9;
@@ -158,24 +158,22 @@ index 8c906e16c..b1c99a507 100644
} data;
uint32 pack;
};
diff --git a/test/gtc/gtc_packing.cpp b/test/gtc/gtc_packing.cpp
index df5b3bb1a..fbaaa5bcc 100644
--- a/test/gtc/gtc_packing.cpp
+++ b/test/gtc/gtc_packing.cpp
--- a/test/gtc/gtc_packing.cpp 2024-02-27 18:19:47.000000000 +0100
+++ b/test/gtc/gtc_packing.cpp 2025-05-14 17:07:45.510351543 +0200
@@ -4,6 +4,7 @@
#include <glm/ext/vector_relational.hpp>
#include <cstdio>
#include <vector>
+#include <arpa/inet.h>
void print_bits(float const& s)
{
@@ -156,7 +157,7 @@ int test_U3x10_1x2()
/*
static void print_bits(float const& s)
@@ -157,7 +158,7 @@
glm::u8vec4 const v0(0xff, 0x77, 0x0, 0x33);
glm::uint32 const p0 = *reinterpret_cast<glm::uint32 const*>(&v0[0]);
- glm::uint32 const r0 = 0x330077ff;
+ glm::uint32 const r0 = htonl(0xff770033);
+ glm::uint32 const r0 = htonl(0xff770033);
Error += p0 == r0 ? 0 : 1;

20
glm-1.0.1-noarch.patch Normal file
View File

@@ -0,0 +1,20 @@
From: Matthias Fehring <buschmann23@opensuse.org>
Date: Wed, 14 May 2025 17:27:00 +0200
Subject: Mark CMake config file as arch independent
This is a header only library.
---
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
--- a/CMakeLists.txt 2025-05-14 16:44:57.681696357 +0200
+++ b/CMakeLists.txt 2025-05-14 16:45:35.313300392 +0200
@@ -270,6 +270,7 @@
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
COMPATIBILITY AnyNewerVersion
+ ARCH_INDEPENDENT
)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"

22
glm-1.0.1-pkgconfig.patch Normal file
View File

@@ -0,0 +1,22 @@
--- a/CMakeLists.txt 2024-02-27 18:19:47.000000000 +0100
+++ b/CMakeLists.txt 2025-05-14 16:10:27.589678383 +0200
@@ -276,6 +276,9 @@ if (GLM_BUILD_INSTALL)
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/glm"
)
+ configure_file(glm.pc.in glm.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glm.pc DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
+
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
--- /dev/null 2025-05-14 12:48:29.697783955 +0200
+++ b/glm.pc.in 2025-05-14 16:11:48.008352154 +0200
@@ -0,0 +1,7 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+includedir=${prefix}/include
+
+Name: GLM
+Description: OpenGL Mathematics
+Version: @GLM_VERSION@
+Cflags: -I${includedir}

View File

@@ -0,0 +1,20 @@
From: Matthias Fehring <buschmann23@opensuse.org>
Date: Wed, 14 May 2025 17:29:00 +0200
Subject: Disable -Werror compile options for tests
Upstream: no
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/test/CMakeLists.txt 2024-02-27 18:19:47.000000000 +0100
+++ b/test/CMakeLists.txt 2025-05-14 16:20:58.092760801 +0200
@@ -20,7 +20,7 @@
endif()
if(NOT GLM_DISABLE_AUTO_DETECTION)
- add_compile_options(-Werror)
+# add_compile_options(-Werror)
# add_compile_options(-Wpedantic)
# add_compile_options(-Wall)
# add_compile_options(-Wextra)

3
glm-1.0.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9f3174561fd26904b23f0db5e560971cbf9b3cbda0b280f04d5c379d03bf234c
size 4567161

View File

@@ -1,3 +1,59 @@
-------------------------------------------------------------------
Wed May 14 15:31:11 UTC 2025 - Matthias Fehring <buschmann23@opensuse.org> - 1.0.1
- Update to version 1.0.1
* Features:
+ Added C++17 [[nodiscard]] support
* Improvements:
+ Enables only warnings as errors while building unit tests
+ Added aligned_*vec3 simd support
* Fixes:
+ Fixed C++ language auto detection build, disable C++98 warnings
with Clang [gh#g-truc/glm#1235] [gh#g-truc/glm#1231]
+ Fixed GTX_color_space missing <glm/ext/scalar_constants.hpp>
include [gh#g-truc/glm#1233]
+ Fixed EXT_matrix_transform shear implementation
+ Fixed smoothstep SIMD implementation [gh#g-truc/glm#1222]
- Changes from version 1.0.0
* Features:
+ Added GLM_EXT_scalar_reciprocal with tests
+ Added GLM_EXT_vector_reciprocal with tests
+ Added glm::iround and glm::uround to GLM_EXT_scalar_common
and GLM_EXT_vector_common
+ Added GLM_EXT_matrix_integer with tests
+ Added Github Actions
+ Added GLM_FORCE_UNRESTRICTED_FLOAT to prevent static asserts
when using other scalar types with function expecting floats.
* Improvements:
+ Added constexpr qualifier for cross product
+ Added constexpr qualifier for dot product
* Fixes:
+ Fixed incorrect assertion for glm::min and glm::max
+ Fixed quaternion orientation in glm::decompose
+ Fixed singularity in quaternion to euler angle roll conversion
+ Fixed quat glm::pow handling of small magnitude quaternions
+ Fixed glm::fastNormalize build error
+ Fixed glm::isMultiple build error
+ Fixed glm::adjugate calculation
+ Fixed glm::angle discards the sign of result for angles in
range (2pi-1, 2pi)
+ Removed ban on using glm::string_cast with CUDA host code
- Removed patches
* glm-0.9.9.8-install.patch, now included upstream
- Added patches
* glm-1.0.1-fix-install-cmake-files.patch
* glm-1.0.1-noarch.patch
* glm-1.0.1-without-werror.patch
- Updated patches
* glm-0.9.9.8-pkgconfig.patch updated to
glm-1.0.1-pkgconfig.patch
* glm-0.9.9.8-fix_tests_big-endian.patch updated to
glm-1.0.1-fix-tests-big-endian.patch
- Spec file changes
* Set BuildArch to noarch for devel package as it is a header only
package
* Use cmake_build instead of make_jobs
-------------------------------------------------------------------
Thu Mar 10 09:30:38 UTC 2022 - Lubos Kocman <lubos.kocman@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package glm
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: glm
Version: 0.9.9.8
Version: 1.0.1
Release: 0
Summary: Header only C++ mathematics library for graphics
License: GPL-2.0-only AND MIT
@@ -25,12 +25,16 @@ Group: Development/Libraries/C and C++
URL: https://glm.g-truc.net/
#Git-Clone: https://github.com/g-truc/glm.git
Source: https://github.com/g-truc/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE glm-0.9.9.8-install.patch
Patch2: glm-0.9.9.8-install.patch
# PATCH-FIX-OPENSUSE glm-0.9.9.8-pkgconfig.patch add pkgconfig file -- aloisio@gmx.com
Patch3: glm-0.9.9.8-pkgconfig.patch
# PATCH-FIX-UPSTREAM glm-0.9.9.8-fix_tests_big-endian.patch
Patch4: glm-0.9.9.8-fix_tests_big-endian.patch
# PATCH-FIX-OPENSUSE glm-1.0.1-pkgconfig.patch add pkgconfig file -- aloisio@gmx.com, updated by buschmann23@opensuse.org
Patch3: glm-1.0.1-pkgconfig.patch
# PATCH-FIX-UPSTREAM glm-1.0.1-fix-tests-big-endian.patch
Patch4: glm-1.0.1-fix-tests-big-endian.patch
# PATCH-FIX-OPENSUSE glm-1.0.1-without-werror.patch
Patch5: glm-1.0.1-without-werror.patch
# PATCH-FIX-OPENSUSE glm-1.0.1-fix-install-cmake-files.patch
Patch6: glm-1.0.1-fix-install-cmake-files.patch
# PATCH-FIX-OPENSUSE glm-1.0.1-noarch.patch
Patch7: glm-1.0.1-noarch.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
@@ -48,6 +52,7 @@ he knows GLM as well which makes it really easy to use.
Summary: Header only C++ mathematics library for graphics
Group: Development/Libraries/C and C++
Requires: cmake
BuildArch: noarch
%description devel
OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics
@@ -71,8 +76,10 @@ This package provides the documentation for GLM library.
%build
%cmake \
-DCMAKE_CXX_FLAGS="%{optflags} -fPIC -fno-strict-aliasing" \
-DGLM_TEST_ENABLE=ON
%make_jobs
-DGLM_BUILD_LIBRARY=OFF \
-DGLM_BUILD_TESTS=ON \
-DGLM_BUILD_INSTALL=ON
%cmake_build
%install
%cmake_install
@@ -84,8 +91,8 @@ This package provides the documentation for GLM library.
%files devel
%{_includedir}/glm
%{_libdir}/cmake/%{name}
%{_libdir}/pkgconfig/%{name}.pc
%{_datadir}/cmake/%{name}
%{_datadir}/pkgconfig/%{name}.pc
%files doc
# See https://github.com/g-truc/glm/blob/master/manual.md#-licenses for license details