app-misc/cmatrix: fix build w/ cmake 4

Closes: https://bugs.gentoo.org/952791
Signed-off-by: Johannes Huber <johu@gmx.de>
Part-of: https://github.com/gentoo/gentoo/pull/42266
Closes: https://github.com/gentoo/gentoo/pull/42266
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Johannes Huber
2025-05-26 17:18:11 +02:00
committed by Sam James
parent c23c2b9ca8
commit 5111996fc8
2 changed files with 55 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
FONT_SUFFIX="pcf"
inherit cmake font
DESCRIPTION="Ncurses based app to show a scrolling screen from the Matrix"
HOMEPAGE="https://github.com/abishekvashok/cmatrix"
SRC_URI="https://github.com/abishekvashok/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
IUSE="+unicode"
DEPEND="sys-libs/ncurses:=[unicode(+)?]"
RDEPEND="${DEPEND}"
PATCHES=( "${FILESDIR}"/${P}-cmake4.patch )
src_configure() {
local mycmakeargs=(
-DCURSES_NEED_WIDE=$(usex unicode)
)
cmake_src_configure
}
src_install() {
cmake_src_install
use X && font_src_install
doman ${PN}.1
}
pkg_postinst() {
use X && font_pkg_postinst
}
pkg_postrm() {
use X && font_pkg_postrm
}

View File

@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fba6fed..3b6300e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
# CMake build system for CMatrix
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.10)
project(CMatrix LANGUAGES C)
set(VERSION "2.0")