commit:     ed63861dde75c8b6dd081db068bd6b1e274582e8
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Sun Mar 23 12:35:40 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar 25 04:23:19 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed63861d

app-misc/i2bits: fix build with CMake 4

Also rationalize seds into diff that works with cmake eclass

Closes: https://bugs.gentoo.org/951901
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/41237
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-misc/i2bits/files/i2bits-0.1.0-cmake4.patch | 15 +++++++++++++++
 app-misc/i2bits/i2bits-0.1.0-r2.ebuild          | 18 ++++++++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/app-misc/i2bits/files/i2bits-0.1.0-cmake4.patch 
b/app-misc/i2bits/files/i2bits-0.1.0-cmake4.patch
new file mode 100644
index 000000000000..d01ca1da78f4
--- /dev/null
+++ b/app-misc/i2bits/files/i2bits-0.1.0-cmake4.patch
@@ -0,0 +1,15 @@
+Prepare build for CMake 4.
+Fold and rationalize seds
+https://bugs.gentoo.org/951901
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,6 +1,7 @@
+-cmake_minimum_required(VERSION 2.8)
++project(i2bits)
++cmake_minimum_required(VERSION 3.5)
+ #set(CMAKE_VERBOSE_MAKEFILE ON)
+-set(CMAKE_C_FLAGS "-std=c99 -Wall -Wextra -pedantic")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ 
+ add_executable(i2bits i2bits.c)
+ 

diff --git a/app-misc/i2bits/i2bits-0.1.0-r2.ebuild 
b/app-misc/i2bits/i2bits-0.1.0-r2.ebuild
new file mode 100644
index 000000000000..ed3a73384864
--- /dev/null
+++ b/app-misc/i2bits/i2bits-0.1.0-r2.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+COMMIT="4c613505b2cb"
+DESCRIPTION="Utility to convert hex or dec to binary format"
+HOMEPAGE="https://bitbucket.org/PascalRD/i2bits/";
+SRC_URI="https://bitbucket.org/PascalRD/i2bits/get/${COMMIT}.tar.gz -> 
${P}-bb.tar.gz"
+S="${WORKDIR}/PascalRD-${PN}-${COMMIT}"
+
+LICENSE="WTFPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+PATCHES=( "${FILESDIR}/${P}-cmake4.patch" )

Reply via email to