system/read-edid: Fix -current build.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2021-08-24 03:37:30 -04:00 committed by Willy Sudiarto Raharjo
parent f75ae693e2
commit bbd97da146
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 30 additions and 4 deletions

View file

@ -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__); }

View file

@ -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 \