summaryrefslogtreecommitdiffstats
path: root/system/read-edid
diff options
context:
space:
mode:
Diffstat (limited to 'system/read-edid')
-rw-r--r--system/read-edid/README7
-rw-r--r--system/read-edid/gcc10fix.diff24
-rw-r--r--system/read-edid/read-edid.SlackBuild22
-rw-r--r--system/read-edid/read-edid.info2
4 files changed, 46 insertions, 9 deletions
diff --git a/system/read-edid/README b/system/read-edid/README
index d0b7063947..421c48a98c 100644
--- a/system/read-edid/README
+++ b/system/read-edid/README
@@ -6,11 +6,12 @@ the EDID from a monitor. It should work with most monitors made since
the video card supports the standard read commands (most do).
read-edid is a set of two tools: get-edid, which gets the raw edid
-information from the monitor, and parse-edid, which turns the raw binary
-information into an xorg.conf-compatible Monitor section.
+information from the monitor, and parse-edid, which turns the raw
+binary information into an xorg.conf-compatible Monitor section.
Modern Linux kernels also make the EDID data available in
-/sys/class/drm/card*-*/edid, so the get-edid command might not be needed.
+/sys/class/drm/card*-*/edid, so the get-edid command might not be
+needed.
See also system/edid-decode, which gives more detail than parse-edid,
but doesn't format its output as an xorg.conf-compatible snippet.
diff --git a/system/read-edid/gcc10fix.diff b/system/read-edid/gcc10fix.diff
new file mode 100644
index 0000000000..da52af6a69
--- /dev/null
+++ b/system/read-edid/gcc10fix.diff
@@ -0,0 +1,24 @@
+diff -Naur read-edid-3.0.2/get-edid/classic.c read-edid-3.0.2.patched/get-edid/classic.c
+--- read-edid-3.0.2/get-edid/classic.c 2015-04-28 21:08:34.000000000 -0400
++++ read-edid-3.0.2.patched/get-edid/classic.c 2021-08-24 03:34:15.182335445 -0400
+@@ -26,7 +26,7 @@
+ #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 -Naur read-edid-3.0.2/get-edid/i2c.c read-edid-3.0.2.patched/get-edid/i2c.c
+--- read-edid-3.0.2/get-edid/i2c.c 2014-11-21 06:52:13.000000000 -0500
++++ read-edid-3.0.2.patched/get-edid/i2c.c 2021-08-24 03:34:21.390334880 -0400
+@@ -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/system/read-edid/read-edid.SlackBuild b/system/read-edid/read-edid.SlackBuild
index 0d8369e95f..6f4465bee2 100644
--- a/system/read-edid/read-edid.SlackBuild
+++ b/system/read-edid/read-edid.SlackBuild
@@ -1,11 +1,13 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for read-edid
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20210824 bkw: BUILD=2, fix build on -current
+
# 20190108 bkw:
# - update README: mention the /sys/class/drm stuff and edid-decode.
# - fix README and slack-desc formatting.
@@ -14,10 +16,13 @@
# 20150505 bkw: update for v3.0.2 (COPYING => LICENSE too)
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=read-edid
VERSION=${VERSION:-3.0.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -27,7 +32,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -58,6 +67,9 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+# make all but one declaration of 'int quiet' an extern
+patch -p1 < $CWD/gcc10fix.diff
+
mkdir -p build
cd build
cmake \
@@ -83,4 +95,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/read-edid/read-edid.info b/system/read-edid/read-edid.info
index e149e7e4d0..a8284097ae 100644
--- a/system/read-edid/read-edid.info
+++ b/system/read-edid/read-edid.info
@@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
-EMAIL="yalhcru@gmail.com"
+EMAIL="urchlay@slackware.uk"