Compare commits

...

No commits in common. "c8" and "c9-beta" have entirely different histories.
c8 ... c9-beta

7 changed files with 250 additions and 398 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/glm-0.9.8.5.zip
SOURCES/0.9.9.8.tar.gz

View File

@ -1 +1 @@
b40ea2a778e747a6acf7e7591524ad618f01b920 SOURCES/glm-0.9.8.5.zip
505e96fedffdb6e8e725ea353e5893576185f0fd SOURCES/0.9.9.8.tar.gz

View File

@ -1,21 +0,0 @@
diff -ru glm/glm/gtc/ulp.inl glm-ulp/glm/gtc/ulp.inl
--- glm/glm/gtc/ulp.inl 2014-12-09 21:13:54.000000000 +0200
+++ glm-ulp/glm/gtc/ulp.inl 2015-01-06 16:29:47.497932633 +0200
@@ -316,7 +316,7 @@
if(x < y)
{
T temp = x;
- while(temp != y)// && ulp < std::numeric_limits<std::size_t>::max())
+ while(temp < y)// && ulp < std::numeric_limits<std::size_t>::max())
{
++ulp;
temp = next_float(temp);
@@ -325,7 +325,7 @@
else if(y < x)
{
T temp = y;
- while(temp != x)// && ulp < std::numeric_limits<std::size_t>::max())
+ while(temp < x)// && ulp < std::numeric_limits<std::size_t>::max())
{
++ulp;
temp = next_float(temp);

View File

@ -1,345 +0,0 @@
diff -ru glm/glm/simd/platform.h glm.compiler-list/glm/simd/platform.h
--- glm/glm/simd/platform.h 2018-02-04 06:40:56.358999859 +0200
+++ glm.compiler-list/glm/simd/platform.h 2018-02-04 06:46:34.359917919 +0200
@@ -77,58 +77,37 @@
// Intel
#define GLM_COMPILER_INTEL 0x00100000
-#define GLM_COMPILER_INTEL12 0x00100010
-#define GLM_COMPILER_INTEL12_1 0x00100020
-#define GLM_COMPILER_INTEL13 0x00100030
#define GLM_COMPILER_INTEL14 0x00100040
#define GLM_COMPILER_INTEL15 0x00100050
#define GLM_COMPILER_INTEL16 0x00100060
+#define GLM_COMPILER_INTEL17 0x00100070
// Visual C++ defines
#define GLM_COMPILER_VC 0x01000000
-#define GLM_COMPILER_VC10 0x01000090
-#define GLM_COMPILER_VC11 0x010000A0
#define GLM_COMPILER_VC12 0x010000B0
#define GLM_COMPILER_VC14 0x010000C0
#define GLM_COMPILER_VC15 0x010000D0
+#define GLM_COMPILER_VC16 0x010000E0
// GCC defines
#define GLM_COMPILER_GCC 0x02000000
-#define GLM_COMPILER_GCC44 0x020000B0
-#define GLM_COMPILER_GCC45 0x020000C0
#define GLM_COMPILER_GCC46 0x020000D0
#define GLM_COMPILER_GCC47 0x020000E0
#define GLM_COMPILER_GCC48 0x020000F0
#define GLM_COMPILER_GCC49 0x02000100
-#define GLM_COMPILER_GCC50 0x02000200
-#define GLM_COMPILER_GCC51 0x02000300
-#define GLM_COMPILER_GCC52 0x02000400
-#define GLM_COMPILER_GCC53 0x02000500
-#define GLM_COMPILER_GCC54 0x02000600
-#define GLM_COMPILER_GCC60 0x02000700
-#define GLM_COMPILER_GCC61 0x02000800
-#define GLM_COMPILER_GCC62 0x02000900
-#define GLM_COMPILER_GCC70 0x02000A00
-#define GLM_COMPILER_GCC71 0x02000B00
-#define GLM_COMPILER_GCC72 0x02000C00
-#define GLM_COMPILER_GCC80 0x02000D00
+#define GLM_COMPILER_GCC5 0x02000200
+#define GLM_COMPILER_GCC6 0x02000300
+#define GLM_COMPILER_GCC7 0x02000400
+#define GLM_COMPILER_GCC8 0x02000500
// CUDA
#define GLM_COMPILER_CUDA 0x10000000
-#define GLM_COMPILER_CUDA40 0x10000040
-#define GLM_COMPILER_CUDA41 0x10000050
-#define GLM_COMPILER_CUDA42 0x10000060
-#define GLM_COMPILER_CUDA50 0x10000070
-#define GLM_COMPILER_CUDA60 0x10000080
-#define GLM_COMPILER_CUDA65 0x10000090
#define GLM_COMPILER_CUDA70 0x100000A0
#define GLM_COMPILER_CUDA75 0x100000B0
#define GLM_COMPILER_CUDA80 0x100000C0
// Clang
#define GLM_COMPILER_CLANG 0x20000000
-#define GLM_COMPILER_CLANG32 0x20000030
-#define GLM_COMPILER_CLANG33 0x20000040
#define GLM_COMPILER_CLANG34 0x20000050
#define GLM_COMPILER_CLANG35 0x20000060
#define GLM_COMPILER_CLANG36 0x20000070
@@ -148,20 +127,16 @@
# define GLM_COMPILER GLM_COMPILER_UNKNOWN
#elif defined(__INTEL_COMPILER)
-# if __INTEL_COMPILER == 1200
-# define GLM_COMPILER GLM_COMPILER_INTEL12
-# elif __INTEL_COMPILER == 1210
-# define GLM_COMPILER GLM_COMPILER_INTEL12_1
-# elif __INTEL_COMPILER == 1300
-# define GLM_COMPILER GLM_COMPILER_INTEL13
+# if (__clang_major__ < 1400)
+# error "GLM requires ICC 2013 SP1 or newer"
# elif __INTEL_COMPILER == 1400
# define GLM_COMPILER GLM_COMPILER_INTEL14
# elif __INTEL_COMPILER == 1500
# define GLM_COMPILER GLM_COMPILER_INTEL15
-# elif __INTEL_COMPILER >= 1600
+# elif __INTEL_COMPILER == 1600
# define GLM_COMPILER GLM_COMPILER_INTEL16
-# else
-# define GLM_COMPILER GLM_COMPILER_INTEL
+# elif __INTEL_COMPILER >= 1700
+# define GLM_COMPILER GLM_COMPILER_INTEL17
# endif
// CUDA
@@ -178,28 +153,18 @@
// Clang
#elif defined(__clang__)
# if defined(__apple_build_version__)
-# if __clang_major__ == 5 && __clang_minor__ == 0
-# define GLM_COMPILER GLM_COMPILER_CLANG33
-# elif __clang_major__ == 5 && __clang_minor__ == 1
-# define GLM_COMPILER GLM_COMPILER_CLANG34
+# if (__clang_major__ < 6)
+# error "GLM requires Clang 3.4 / Apple Clang 6.0 or higher"
# elif __clang_major__ == 6 && __clang_minor__ == 0
# define GLM_COMPILER GLM_COMPILER_CLANG35
# elif __clang_major__ == 6 && __clang_minor__ >= 1
# define GLM_COMPILER GLM_COMPILER_CLANG36
# elif __clang_major__ >= 7
# define GLM_COMPILER GLM_COMPILER_CLANG37
-# else
-# define GLM_COMPILER GLM_COMPILER_CLANG
# endif
# else
-# if __clang_major__ == 3 && __clang_minor__ == 0
-# define GLM_COMPILER GLM_COMPILER_CLANG30
-# elif __clang_major__ == 3 && __clang_minor__ == 1
-# define GLM_COMPILER GLM_COMPILER_CLANG31
-# elif __clang_major__ == 3 && __clang_minor__ == 2
-# define GLM_COMPILER GLM_COMPILER_CLANG32
-# elif __clang_major__ == 3 && __clang_minor__ == 3
-# define GLM_COMPILER GLM_COMPILER_CLANG33
+# if ((__clang_major__ == 3) && (__clang_minor__ < 4)) || (__clang_major__ < 3)
+# error "GLM requires Clang 3.4 or higher"
# elif __clang_major__ == 3 && __clang_minor__ == 4
# define GLM_COMPILER GLM_COMPILER_CLANG34
# elif __clang_major__ == 3 && __clang_minor__ == 5
@@ -220,39 +185,25 @@
# define GLM_COMPILER GLM_COMPILER_CLANG42
# elif __clang_major__ >= 4
# define GLM_COMPILER GLM_COMPILER_CLANG42
-# else
-# define GLM_COMPILER GLM_COMPILER_CLANG
# endif
# endif
// Visual C++
#elif defined(_MSC_VER)
-# if _MSC_VER < 1600
-# error "GLM requires Visual C++ 10 - 2010 or higher"
-# elif _MSC_VER == 1600
-# define GLM_COMPILER GLM_COMPILER_VC11
-# elif _MSC_VER == 1700
-# define GLM_COMPILER GLM_COMPILER_VC11
+# if _MSC_VER < 1800
+# error "GLM requires Visual C++ 12 - 2013 or higher"
# elif _MSC_VER == 1800
# define GLM_COMPILER GLM_COMPILER_VC12
# elif _MSC_VER == 1900
# define GLM_COMPILER GLM_COMPILER_VC14
# elif _MSC_VER >= 1910
# define GLM_COMPILER GLM_COMPILER_VC15
-# else//_MSC_VER
-# define GLM_COMPILER GLM_COMPILER_VC
# endif//_MSC_VER
// G++
#elif defined(__GNUC__) || defined(__MINGW32__)
-# if (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
-# define GLM_COMPILER (GLM_COMPILER_GCC42)
-# elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
-# define GLM_COMPILER (GLM_COMPILER_GCC43)
-# elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4)
-# define GLM_COMPILER (GLM_COMPILER_GCC44)
-# elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 5)
-# define GLM_COMPILER (GLM_COMPILER_GCC45)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ < 6)) || (__GNUC__ < 4)
+# error "GLM requires GCC 4.7 or higher"
# elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)
# define GLM_COMPILER (GLM_COMPILER_GCC46)
# elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 7)
@@ -261,32 +212,14 @@
# define GLM_COMPILER (GLM_COMPILER_GCC48)
# elif (__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)
# define GLM_COMPILER (GLM_COMPILER_GCC49)
-# elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 0)
-# define GLM_COMPILER (GLM_COMPILER_GCC50)
-# elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 1)
-# define GLM_COMPILER (GLM_COMPILER_GCC51)
-# elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 2)
-# define GLM_COMPILER (GLM_COMPILER_GCC52)
-# elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 3)
-# define GLM_COMPILER (GLM_COMPILER_GCC53)
-# elif (__GNUC__ == 5) && (__GNUC_MINOR__ >= 4)
-# define GLM_COMPILER (GLM_COMPILER_GCC54)
-# elif (__GNUC__ == 6) && (__GNUC_MINOR__ == 0)
-# define GLM_COMPILER (GLM_COMPILER_GCC60)
-# elif (__GNUC__ == 6) && (__GNUC_MINOR__ == 1)
-# define GLM_COMPILER (GLM_COMPILER_GCC61)
-# elif (__GNUC__ == 6) && (__GNUC_MINOR__ >= 2)
-# define GLM_COMPILER (GLM_COMPILER_GCC62)
-# elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 0)
-# define GLM_COMPILER (GLM_COMPILER_GCC70)
-# elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 1)
-# define GLM_COMPILER (GLM_COMPILER_GCC71)
-# elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 2)
-# define GLM_COMPILER (GLM_COMPILER_GCC72)
+# elif (__GNUC__ == 5)
+# define GLM_COMPILER (GLM_COMPILER_GCC5)
+# elif (__GNUC__ == 6)
+# define GLM_COMPILER (GLM_COMPILER_GCC6)
+# elif (__GNUC__ == 7)
+# define GLM_COMPILER (GLM_COMPILER_GCC7)
# elif (__GNUC__ >= 8)
-# define GLM_COMPILER (GLM_COMPILER_GCC80)
-# else
-# define GLM_COMPILER (GLM_COMPILER_GCC)
+# define GLM_COMPILER (GLM_COMPILER_GCC8)
# endif
#else
diff -ru glm/test/core/core_setup_message.cpp glm.compiler-list/test/core/core_setup_message.cpp
--- glm/test/core/core_setup_message.cpp 2018-02-04 06:40:56.359999845 +0200
+++ glm.compiler-list/test/core/core_setup_message.cpp 2018-02-04 06:41:19.846652644 +0200
@@ -10,12 +10,6 @@
{
switch(GLM_COMPILER)
{
- case GLM_COMPILER_VC10:
- std::printf("Visual C++ 10 - 2010\n");
- break;
- case GLM_COMPILER_VC11:
- std::printf("Visual C++ 11 - 2012\n");
- break;
case GLM_COMPILER_VC12:
std::printf("Visual C++ 12 - 2013\n");
break;
@@ -23,7 +17,10 @@
std::printf("Visual C++ 14 - 2015\n");
break;
case GLM_COMPILER_VC15:
- std::printf("Visual C++ 15 - 201X\n");
+ std::printf("Visual C++ 15 - 2017\n");
+ break;
+ case GLM_COMPILER_VC16:
+ std::printf("Visual C++ 16 - 20XX\n");
break;
default:
std::printf("Visual C++ version not detected\n");
@@ -35,12 +32,6 @@
{
switch(GLM_COMPILER)
{
- case GLM_COMPILER_GCC44:
- std::printf("GCC 4.4\n");
- break;
- case GLM_COMPILER_GCC45:
- std::printf("GCC 4.5\n");
- break;
case GLM_COMPILER_GCC46:
std::printf("GCC 4.6\n");
break;
@@ -53,41 +44,17 @@
case GLM_COMPILER_GCC49:
std::printf("GCC 4.9\n");
break;
- case GLM_COMPILER_GCC50:
- std::printf("GCC 5.0\n");
- break;
- case GLM_COMPILER_GCC51:
- std::printf("GCC 5.1\n");
- break;
- case GLM_COMPILER_GCC52:
- std::printf("GCC 5.2\n");
- break;
- case GLM_COMPILER_GCC53:
- std::printf("GCC 5.3\n");
- break;
- case GLM_COMPILER_GCC54:
- std::printf("GCC 5.4\n");
- break;
- case GLM_COMPILER_GCC60:
- std::printf("GCC 6.0\n");
+ case GLM_COMPILER_GCC5:
+ std::printf("GCC 5\n");
break;
- case GLM_COMPILER_GCC61:
- std::printf("GCC 6.1\n");
+ case GLM_COMPILER_GCC6:
+ std::printf("GCC 6\n");
break;
- case GLM_COMPILER_GCC62:
- std::printf("GCC 6.2\n");
+ case GLM_COMPILER_GCC7:
+ std::printf("GCC 7\n");
break;
- case GLM_COMPILER_GCC70:
- std::printf("GCC 7.0\n");
- break;
- case GLM_COMPILER_GCC71:
- std::printf("GCC 7.1\n");
- break;
- case GLM_COMPILER_GCC72:
- std::printf("GCC 7.2\n");
- break;
- case GLM_COMPILER_GCC80:
- std::printf("GCC 8.0\n");
+ case GLM_COMPILER_GCC8:
+ std::printf("GCC 8\n");
break;
default:
std::printf("GCC version not detected\n");
@@ -103,12 +70,6 @@
{
switch(GLM_COMPILER)
{
- case GLM_COMPILER_CLANG32:
- std::printf("Clang 3.2\n");
- break;
- case GLM_COMPILER_CLANG33:
- std::printf("Clang 3.3\n");
- break;
case GLM_COMPILER_CLANG34:
std::printf("Clang 3.4\n");
break;
@@ -145,23 +106,17 @@
{
switch(GLM_COMPILER)
{
- case GLM_COMPILER_INTEL12:
- std::printf("ICC 12\n");
- break;
- case GLM_COMPILER_INTEL12_1:
- std::printf("ICC 12.1\n");
- break;
- case GLM_COMPILER_INTEL13:
- std::printf("ICC 13\n");
- break;
case GLM_COMPILER_INTEL14:
- std::printf("ICC 14\n");
+ std::printf("ICC 14 - 2013 SP1\n");
break;
case GLM_COMPILER_INTEL15:
- std::printf("ICC 15\n");
+ std::printf("ICC 15 - 2015\n");
break;
case GLM_COMPILER_INTEL16:
- std::printf("ICC 16\n");
+ std::printf("ICC 16 - 2017\n");
+ break;
+ case GLM_COMPILER_INTEL17:
+ std::printf("ICC 17 - 20XX\n");
break;
default:
std::printf("Intel compiler version not detected\n");

View File

@ -0,0 +1,150 @@
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

@ -0,0 +1,25 @@
From e0c728eca35d6d9c34d239c56bdcfb460b378676 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joonas=20Saraj=C3=A4rvi?= <muep@iki.fi>
Date: Sun, 7 Feb 2021 19:34:40 +0200
Subject: [PATCH] Use built-in mechanism for marking arch-independent
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 642a5fde..a7b80449 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
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)
+ write_basic_package_version_file("glmConfigVersion.cmake" COMPATIBILITY AnyNewerVersion ARCH_INDEPENDENT)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm)
include(CTest)
--
2.29.2

View File

@ -2,19 +2,20 @@
%global debug_package %{nil}
Name: glm
Version: 0.9.8.5
Release: 2%{?dist}
Version: 0.9.9.8
Release: 3%{?dist}
Summary: C++ mathematics library for graphics programming
License: MIT
URL: http://glm.g-truc.net/
Source0: https://github.com/g-truc/glm/releases/download/%{version}/%{name}-%{version}.zip
Patch0: glm-0.9.6.1-ulp.patch
Source0: https://github.com/g-truc/glm/archive/%{version}.tar.gz
Patch0: glm-0.9.9.8-install.patch
Patch1: glm-0.9.9.8-noarch.patch
# https://github.com/g-truc/glm/commit/dd48b56e44d699a022c69155c8672caacafd9e8a
Patch1: glm-0.9.8.5-compiler-list.patch
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake >= 3.14
BuildRequires: make
%description
GLM is a C++ library for doing mathematics operations
@ -23,7 +24,6 @@ has been designed to resemble the built-in matrix and vector
types of the OpenGL shading language.
%package devel
Group: Development/Libraries
Summary: C++ mathematics library for graphics programming
BuildArch: noarch
@ -43,7 +43,6 @@ there is no matching run time package.
%package doc
Summary: Documentation for %{name}-devel
Group: Documentation
BuildArch: noarch
%description doc
@ -63,7 +62,7 @@ a programming manual for the %{name}-devel package.
# Also it looks like some versions get shipped with a common
# directory in archive root, but with an unusual name for the
# directory. In this case, use the -n option of the setup macro.
%setup -q -n glm
%setup -q
# A couple of files had CRLF line-ends in them.
# Check with rpmlint after updating the package that we are not
@ -71,8 +70,8 @@ a programming manual for the %{name}-devel package.
#
# This release of glm seems to have shipped with no CRLF file
# endings at all, so these are commented out.
sed -i 's/\r//' copying.txt
sed -i 's/\r//' readme.md
sed -i 's/\r//' CMakeLists.txt
sed -i 's/\r//' doc/api/doxygen.css
sed -i 's/\r//' doc/api/dynsections.js
sed -i 's/\r//' doc/api/jquery.js
@ -84,26 +83,25 @@ sed -i 's/\r//' glm/detail/setup.hpp
sed -i 's/\r//' glm/simd/platform.h
sed -i 's/\r//' test/core/core_setup_message.cpp
%patch0 -p1 -b .ulp
%patch1 -p1 -b .compiler-list
%patch0 -p1
%patch1 -p1
%build
mkdir build
cd build
%{cmake} -DGLM_TEST_ENABLE=ON ..
make %{?_smp_mflags}
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%{cmake} -DGLM_TEST_ENABLE=ON
%cmake_build
%check
cd build
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
cd %{_vpath_builddir}
# Some tests are disabled due to known upstream bugs:
# https://github.com/g-truc/glm/issues/666
ctest --output-on-failure -E 'test-core_type_mat(2x4|3x4|4x4)'
# Some tests are disabled due to failing tests (to be reported)
# - test-core_func_common fails on aarch64
# - test-gtc_packing fails on s390x
ctest --output-on-failure -E '(test-core_func_common|test-gtc_packing)'
%install
cd build
cd %{_vpath_builddir}
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
@ -114,24 +112,69 @@ find $RPM_BUILD_ROOT -name CMakeLists.txt -exec rm -f {} ';'
# cmake configuration files under /usr/share.
mkdir -pv $RPM_BUILD_ROOT%{_datadir}
mv $RPM_BUILD_ROOT%{_libdir}/cmake $RPM_BUILD_ROOT%{_datadir}/cmake
mv $RPM_BUILD_ROOT%{_libdir}/pkgconfig $RPM_BUILD_ROOT%{_datadir}/pkgconfig
rmdir $RPM_BUILD_ROOT%{_libdir}
# Here it seems to be acceptable to own the cmake and pkgconfig directories
# as an alternative to having glm-devel depending on cmake and pkg-config
# https://fedoraproject.org/wiki/Packaging:Guidelines#The_directory_is_owned_by_a_package_which_is_not_required_for_your_package_to_function
%files devel
%doc copying.txt readme.md
%doc readme.md
%{_includedir}/%{name}
%{_datadir}/cmake
%{_datadir}/pkgconfig/
%files doc
%doc copying.txt
%doc doc/%{name}.pdf
%doc doc/manual.pdf
%doc doc/api/
%changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.9.9.8-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 0.9.9.8-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Sun Feb 07 2021 Joonas Sarajärvi <muep@iki.fi> - 0.9.9.8-1
- New upstream release (#1823615)
- pkgconfig support is no longer supported in upstream and not shipped
* Tue Feb 02 2021 Jeff Law <law@redhat.com> - 0.9.9.6-8
- Disable strict aliasing due to bugs in testsuite (#1923456)
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9.6-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Oct 26 2020 Joonas Sarajärvi <muep@iki.fi> - 0.9.9.6-6
- Fix #1863634 - FTBFS in Fedora rawhide/f33
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9.6-5
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sat May 02 2020 Joonas Sarajärvi <muep@iki.fi> - 0.9.9.6-3
- Remove arch check from glmConfigVersion.cmake, fix #1758009
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Nov 23 2019 Joonas Sarajärvi <muep@iki.fi> - 0.9.9.6-1
- New upstream release
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Oct 11 2018 Joonas Sarajärvi <muep@iki.fi> - 0.9.9.2-1
- Update to upstream GLM version 0.9.9.2
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild