From a8405ca967687fc02b2f02a31fa53e7b7aaedc68 Mon Sep 17 00:00:00 2001 From: Johannes Huber Date: Thu, 22 May 2025 20:17:02 +0200 Subject: [PATCH] x11-misc/slop: fix build w/ cmake 4 Closes: https://bugs.gentoo.org/955893 Signed-off-by: Johannes Huber Part-of: https://github.com/gentoo/gentoo/pull/42215 Closes: https://github.com/gentoo/gentoo/pull/42215 Signed-off-by: Andreas Sturmlechner --- x11-misc/slop/files/slop-7.6-cmake4.patch | 10 +++++ x11-misc/slop/slop-7.6-r2.ebuild | 53 +++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 x11-misc/slop/files/slop-7.6-cmake4.patch create mode 100644 x11-misc/slop/slop-7.6-r2.ebuild diff --git a/x11-misc/slop/files/slop-7.6-cmake4.patch b/x11-misc/slop/files/slop-7.6-cmake4.patch new file mode 100644 index 0000000000000..b119315938ade --- /dev/null +++ b/x11-misc/slop/files/slop-7.6-cmake4.patch @@ -0,0 +1,10 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 44657ec..e400508 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.1.3) ++cmake_minimum_required(VERSION 3.5) + + project(slop VERSION 7.6 LANGUAGES CXX) + diff --git a/x11-misc/slop/slop-7.6-r2.ebuild b/x11-misc/slop/slop-7.6-r2.ebuild new file mode 100644 index 0000000000000..d500e258bbcff --- /dev/null +++ b/x11-misc/slop/slop-7.6-r2.ebuild @@ -0,0 +1,53 @@ +# 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 + virtual/opengl + x11-libs/libXrender:= + ) +" +BDEPEND=" + ${RDEPEND} + x11-base/xorg-proto +" +DEPEND=" + ${RDEPEND} + media-libs/glm +" + +PATCHES=( + "${FILESDIR}/${PN}"-7.5-missing-header.patch + "${FILESDIR}/${P}"-cmake4.patch +) + +src_prepare() { + use icu && eapply "${FILESDIR}/"icu-75.1-cxx17.patch + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DSLOP_OPENGL=$(usex opengl) + -DSLOP_UNICODE=$(usex icu) + ) + cmake_src_configure +}