commit:     96a0014fc2c87441834692ab73cfd9428b859279
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Mon Oct 20 07:41:51 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Oct 20 11:06:08 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96a0014f

x11-misc/slop: fix CMake < 3.10 warning

Closes: https://bugs.gentoo.org/964438
Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>
Part-of: https://github.com/gentoo/gentoo/pull/44257
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../slop/files/slop-7.7-cmake-min-ver-3.11.patch   | 47 ++++++++++++++++++++++
 x11-misc/slop/slop-7.7-r1.ebuild                   | 42 +++++++++++++++++++
 2 files changed, 89 insertions(+)

diff --git a/x11-misc/slop/files/slop-7.7-cmake-min-ver-3.11.patch 
b/x11-misc/slop/files/slop-7.7-cmake-min-ver-3.11.patch
new file mode 100644
index 000000000000..79e9696d2eb6
--- /dev/null
+++ b/x11-misc/slop/files/slop-7.7-cmake-min-ver-3.11.patch
@@ -0,0 +1,47 @@
+Backport upstream patch to fix deprecation warning for CMake < 3.10
+introduced with CMake version 3.31.
+
+See-also: 
https://github.com/naelstrof/slop/commit/6756a334a63dec0cca890d56f67c0042d40c4851
+From: Lucio Sauer <[email protected]>
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.5.0)
++cmake_minimum_required(VERSION 3.11)
+ 
+ project(slop VERSION 7.7 LANGUAGES CXX)
+ 
+@@ -18,7 +18,6 @@ set( BUILD_SHARED_LIBS ON CACHE BOOL "Build all libraries as 
shared" )
+ set( SLOP_OPENGL TRUE CACHE BOOL "To enable or disable OpenGL support." )
+ if ( SLOP_OPENGL )
+   add_definitions(-DSLOP_OPENGL="True")
+-  set(OpenGL_GL_PREFERENCE "GLVND")
+ endif()
+ 
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/")
+@@ -100,16 +99,12 @@ endif()
+ 
+ target_link_libraries(${EXECUTABLE_NAME} ${LIBRARY_NAME} )
+ 
+-if( CMAKE<3.7 )
+-  message( WARNING "CMake version is below 3.7, CMake version >= 3.7 is 
required for unicode support." )
+-else()
+-  find_package(ICU COMPONENTS uc)
+-  set( SLOP_UNICODE TRUE CACHE BOOL "To enable or disable unicode support." )
+-  if ( SLOP_UNICODE AND ICU_FOUND )
+-    add_definitions(-DCXXOPTS_USE_UNICODE)
+-    include_directories( ${ICU_INCLUDE_DIR} )
+-    target_link_libraries(${EXECUTABLE_NAME} ${ICU_UC_LIBRARIES} )
+-  endif()
++find_package(ICU COMPONENTS uc)
++set( SLOP_UNICODE TRUE CACHE BOOL "To enable or disable unicode support." )
++if ( SLOP_UNICODE AND ICU_FOUND )
++  add_definitions(-DCXXOPTS_USE_UNICODE)
++  include_directories( ${ICU_INCLUDE_DIR} )
++  target_link_libraries(${EXECUTABLE_NAME} ${ICU_UC_LIBRARIES} )
+ endif()
+ 
+ install( TARGETS ${EXECUTABLE_NAME} DESTINATION "${CMAKE_INSTALL_BINDIR}" )
+-- 
+2.51.0
+

diff --git a/x11-misc/slop/slop-7.7-r1.ebuild b/x11-misc/slop/slop-7.7-r1.ebuild
new file mode 100644
index 000000000000..223ca60fe36c
--- /dev/null
+++ b/x11-misc/slop/slop-7.7-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Application that queries the user for a selection for printing"
+HOMEPAGE="https://github.com/naelstrof/slop";
+SRC_URI="https://github.com/naelstrof/slop/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="icu opengl"
+
+RDEPEND="
+       x11-libs/libX11
+       x11-libs/libXext
+       icu? ( dev-libs/icu:= )
+       opengl? (
+               media-libs/glew:0=
+               media-libs/libglvnd[X]
+               x11-libs/libXrender
+       )
+"
+DEPEND="
+       ${RDEPEND}
+       media-libs/glm
+       x11-base/xorg-proto
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${P}-cmake-min-ver-3.11.patch ) # bug 964438
+
+src_configure() {
+       local mycmakeargs=(
+               -DSLOP_OPENGL=$(usex opengl)
+               -DSLOP_UNICODE=$(usex icu)
+       )
+       cmake_src_configure
+}

Reply via email to