summaryrefslogtreecommitdiff
path: root/system/read-edid
diff options
context:
space:
mode:
Diffstat (limited to 'system/read-edid')
-rw-r--r--system/read-edid/gcc10fix.diff24
-rw-r--r--system/read-edid/read-edid.SlackBuild10
2 files changed, 30 insertions, 4 deletions
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 02c132ac54..51112e9c2c 100644
--- a/system/read-edid/read-edid.SlackBuild
+++ b/system/read-edid/read-edid.SlackBuild
@@ -6,6 +6,8 @@
# 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.
@@ -18,7 +20,7 @@ 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}
@@ -30,9 +32,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -68,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 \