commit:     595b689979a0a5e299aee2e9222d094d90dfe1b0
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 27 20:58:52 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Aug 28 15:50:00 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=595b6899

x11-misc/read-edid: update EAPI 7 -> 8, use patch instead of -fnocommon

Bug: https://bugs.gentoo.org/706878
Closes: https://bugs.gentoo.org/957515
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../read-edid/files/read-edid-3.0.2-fcommon.patch  | 37 ++++++++++++++++++
 x11-misc/read-edid/read-edid-3.0.2-r2.ebuild       | 44 ++++++++++++++++++++++
 2 files changed, 81 insertions(+)

diff --git a/x11-misc/read-edid/files/read-edid-3.0.2-fcommon.patch 
b/x11-misc/read-edid/files/read-edid-3.0.2-fcommon.patch
new file mode 100644
index 000000000000..56f67bd73dfe
--- /dev/null
+++ b/x11-misc/read-edid/files/read-edid-3.0.2-fcommon.patch
@@ -0,0 +1,37 @@
+Source: 
https://salsa.debian.org/debian/read-edid/-/blob/master/debian/patches/0002-Fix-multiple-definitions-of-int-quiet.patch
+
+From: =?utf-8?b?0L3QsNCx?= <[email protected]>
+Date: Sun, 8 Jun 2025 14:20:52 +0200
+Subject: Fix multiple definitions of int quiet
+
+---
+ get-edid/classic.c | 2 +-
+ get-edid/i2c.c     | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/get-edid/classic.c b/get-edid/classic.c
+index 9cc8ee3..b13f5f0 100644
+--- a/get-edid/classic.c
++++ b/get-edid/classic.c
+@@ -26,7 +26,7 @@ typedef byte* real_ptr;
+ #define dosmemput(buffer,length,offset) memcpy(offset,buffer,length)
+ 
+ #define display(...) if (quiet == 0) { fprintf(stderr, __VA_ARGS__); }
+-int quiet;
++extern int quiet;
+ 
+ real_ptr far_ptr_to_real_ptr( uint32 farptr )
+ {
+diff --git a/get-edid/i2c.c b/get-edid/i2c.c
+index 625d7cb..0929e98 100644
+--- a/get-edid/i2c.c
++++ b/get-edid/i2c.c
+@@ -15,7 +15,7 @@
+ 
+ //Ideas (but not too much actual code) taken from i2c-tools. Thanks guys.
+ 
+-int quiet;
++extern int quiet;
+ 
+ #define display(...) if (quiet == 0) { fprintf(stderr, __VA_ARGS__); }
+ 

diff --git a/x11-misc/read-edid/read-edid-3.0.2-r2.ebuild 
b/x11-misc/read-edid/read-edid-3.0.2-r2.ebuild
new file mode 100644
index 000000000000..2e9267b36e5c
--- /dev/null
+++ b/x11-misc/read-edid/read-edid-3.0.2-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake linux-info
+
+DESCRIPTION="Program that can get information from a PnP monitor"
+HOMEPAGE="http://www.polypux.org/projects/read-edid/";
+SRC_URI="http://www.polypux.org/projects/${PN}/${P}.tar.gz";
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~loong ~ppc ~riscv ~sparc ~x86"
+IUSE="vbe-mode"
+
+DEPEND="vbe-mode? ( >=dev-libs/libx86-1.1 )"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-fcommon.patch" ) # bug 706878
+
+pkg_setup() {
+       CONFIG_CHECK="~I2C_CHARDEV"
+       ERROR_I2C_CHARDEV="I2C_CHARDEV support not enabled in the kernel. 
get-edid will "
+       if use vbe-mode; then
+               ERROR_I2C_CHARDEV+="fall back to the legacy, VBE-based 
interface."
+       else
+               ERROR_I2C_CHARDEV+="not work."
+       fi
+       linux-info_pkg_setup
+}
+
+src_prepare() {
+       sed -i -e 's|COPYING||g;s|share/doc/read-edid|share/doc/'"${PF}"'|g' \
+               CMakeLists.txt || die
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DCLASSICBUILD=$(usex vbe-mode)
+       )
+       cmake_src_configure
+}

Reply via email to