From 1173ec3c53de9a9a589eb93fa3ee97ba57571930 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Fri, 22 Aug 2025 11:42:04 +0800 Subject: [PATCH] fix build with cmake 4 --- freeglut-cmake-4.0.patch | 33 +++++++++++++++++++++++++++++++++ freeglut.spec | 6 +++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 freeglut-cmake-4.0.patch diff --git a/freeglut-cmake-4.0.patch b/freeglut-cmake-4.0.patch new file mode 100644 index 0000000..06c867e --- /dev/null +++ b/freeglut-cmake-4.0.patch @@ -0,0 +1,33 @@ +From 5f6e47b6b50d5fbe53e772f777869815d86ced8e Mon Sep 17 00:00:00 2001 +From: Funda Wang +Date: Thu, 3 Jul 2025 13:04:37 +0300 +Subject: [PATCH] Fix build with cmake 4 + +--- + CMakeLists.txt | 2 +- + progs/test-shapes-gles1/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 83d2fb3..1682bde 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR) ++CMAKE_MINIMUM_REQUIRED(VERSION 3.5...${CMAKE_VERSION}) + PROJECT(freeglut LANGUAGES C) + + if (POLICY CMP0072) +diff --git a/progs/test-shapes-gles1/CMakeLists.txt b/progs/test-shapes-gles1/CMakeLists.txt +index fc2c1c3..d821c1d 100644 +--- a/progs/test-shapes-gles1/CMakeLists.txt ++++ b/progs/test-shapes-gles1/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.5...${CMAKE_VERSION}) + project(test-shapes-gles1) + + IF(CMAKE_COMPILER_IS_GNUCC) +-- +2.49.0 + diff --git a/freeglut.spec b/freeglut.spec index 0220e43..4c3c2cd 100644 --- a/freeglut.spec +++ b/freeglut.spec @@ -1,11 +1,12 @@ Name: freeglut Version: 3.6.0 -Release: 1 +Release: 2 Summary: A freely licensed alternative to the GLUT library License: MIT URL: https://freeglut.sourceforge.net Source0: https://github.com/freeglut/freeglut/releases/download/v%{version}/%{name}-%{version}.tar.gz Source1: https://downloads.sourceforge.net/openglut/openglut-0.6.3-doc.tar.gz +Patch0: freeglut-cmake-4.0.patch BuildRequires: gcc BuildRequires: cmake >= 3.11 @@ -62,6 +63,9 @@ install -p -m 644 doc/man/*.3 $RPM_BUILD_ROOT/%{_mandir}/man3 %doc README.md doc/html/*.png doc/html/*.html %changelog +* Fri Aug 22 2025 Funda Wang - 3.6.0-2 +- fix build with cmake 4.0 + * Mon Dec 23 2024 Funda Wang - 3.6.0-1 - update to 3.6.0 -- Gitee