mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
system/kmscon: Updated for version 9.0.0.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
0fc34526ee
commit
f42acb48e0
5 changed files with 98 additions and 62 deletions
|
@ -5,7 +5,7 @@ As shipped, kmscon only works for root. If you want to be able to run
|
|||
it as a normal user, you could make it setuid root (not recommended). A
|
||||
better solution:
|
||||
|
||||
setcap cap_sys_tty_config,cap_sys_admin=ep
|
||||
setcap cap_sys_tty_config,cap_sys_admin=ep /usr/bin/kmscon
|
||||
|
||||
See capabilities(7) and http://www.slackbuilds.org/caps/ for more info
|
||||
on capabilities.
|
||||
|
|
|
@ -6,17 +6,25 @@
|
|||
|
||||
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
||||
|
||||
# 20230722 bkw: switch to Aetf's fork, which looks actively
|
||||
# maintained. Thanks to lockywolf for finding it. Also, include
|
||||
# libtsm here instead of as a separate build: it's been on SBo for ~9
|
||||
# years and nothing but this ever depended on it.
|
||||
|
||||
# 20210825 bkw: update to the last git commit, post v8 release. It's from
|
||||
# 2014, so I doubt there will be more version updates.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=kmscon
|
||||
VERSION=${VERSION:-8+20140708_0b34527}
|
||||
VERSION=${VERSION:-9.0.0}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
LIBNAM=libtsm
|
||||
LIBVER=${LIBVER:-4.0.2}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i586 ;;
|
||||
|
@ -50,50 +58,66 @@ fi
|
|||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
TOPDIR=$TMP/$PRGNAM-build
|
||||
rm -rf $PKG $TOPDIR
|
||||
mkdir -p $TOPDIR $PKG $OUTPUT
|
||||
cd $TOPDIR
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
|
||||
cd $PRGNAM-$VERSION
|
||||
tar xvf $CWD/$LIBNAM-$LIBVER.tar.gz
|
||||
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 {} \+
|
||||
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
|
||||
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
|
||||
|
||||
# Fix build on -current: add #include <sys/sysmacros.h> to files that
|
||||
# use major() and minor()
|
||||
patch -p1 < $CWD/sysmacros.diff
|
||||
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
LIBDOC=$PKGDOC/$LIBNAM-$LIBVER
|
||||
mkdir -p $LIBDOC
|
||||
|
||||
[ -x configure ] || autoreconf -if
|
||||
# first, the library:
|
||||
cd $TOPDIR/$LIBNAM-$LIBVER
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake \
|
||||
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
make install/strip DESTDIR=$PKG
|
||||
cd ..
|
||||
|
||||
SLKCFLAGS="$SLKCFLAGS -DSIGUNUSED=SIGSYS"
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
--disable-static \
|
||||
--enable-shared \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--mandir=/usr/man \
|
||||
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
||||
--build=$ARCH-slackware-linux
|
||||
cp -a COPYING LICENSE_htable NEWS README* $LIBDOC
|
||||
|
||||
make
|
||||
make install-strip DESTDIR=$PKG
|
||||
export PKG_CONFIG_PATH=$PKG/usr/lib$LIBDIRSUFFIX/pkgconfig:$PKG_CONFIG_PATH
|
||||
|
||||
# now, build the app, using the lib we just built.
|
||||
cd $TOPDIR/$PRGNAM-$VERSION
|
||||
|
||||
# meson is a moving target. this patch doesn't entirely fix things, we also
|
||||
# have to manually set some LDFLAGS and CFLAGS, below.
|
||||
patch -p1 < $CWD/meson-compat.diff
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
LDFLAGS="-L$PKG/usr/lib$LIBDIRSUFFIX -ldl" \
|
||||
CFLAGS="-I$PKG/usr/include $SLKCFLAGS" \
|
||||
meson .. \
|
||||
--buildtype=release \
|
||||
--infodir=/usr/info \
|
||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||
--localstatedir=/var \
|
||||
--mandir=/usr/man \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
-Dstrip=true
|
||||
"${NINJA:=ninja}"
|
||||
DESTDIR=$PKG $NINJA install
|
||||
cd ..
|
||||
|
||||
gzip $PKG/usr/man/man1/$PRGNAM.1
|
||||
|
||||
# we don't seem to need the .la files
|
||||
rm -f $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM/*.la
|
||||
|
||||
mkdir -p $PKG/etc/$PRGNAM
|
||||
cat $CWD/$PRGNAM.conf > $PKG/etc/$PRGNAM/$PRGNAM.conf.new
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a COPYING NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
cp -a COPYING NEWS README* docs/*.txt $PKGDOC
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
PRGNAM="kmscon"
|
||||
VERSION="8+20140708_0b34527"
|
||||
HOMEPAGE="https://www.freedesktop.org/wiki/Software/kmscon/"
|
||||
DOWNLOAD="https://slackware.uk/~urchlay/src/kmscon-8+20140708_0b34527.tar.xz"
|
||||
MD5SUM="e83747951b94e9ee8aa6b344cd686921"
|
||||
VERSION="9.0.0"
|
||||
HOMEPAGE="https://github.com/Aetf/kmscon"
|
||||
DOWNLOAD="https://github.com/Aetf/kmscon/releases/download/v9.0.0/kmscon-9.0.0.tar.xz \
|
||||
https://github.com/Aetf/libtsm/archive/v4.0.2/libtsm-4.0.2.tar.gz"
|
||||
MD5SUM="1095a675c17d6adc6aa1537aff72c642 \
|
||||
bcf1bafa3798bced0e9bd16b4afdf256"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES="libtsm"
|
||||
REQUIRES=""
|
||||
MAINTAINER="B. Watson"
|
||||
EMAIL="urchlay@slackware.uk"
|
||||
|
|
32
system/kmscon/meson-compat.diff
Normal file
32
system/kmscon/meson-compat.diff
Normal file
|
@ -0,0 +1,32 @@
|
|||
diff -Naur kmscon-9.0.0/meson.build kmscon-9.0.0.patched/meson.build
|
||||
--- kmscon-9.0.0/meson.build 2022-06-15 03:48:52.000000000 -0400
|
||||
+++ kmscon-9.0.0.patched/meson.build 2023-07-22 03:32:29.965571375 -0400
|
||||
@@ -7,7 +7,7 @@
|
||||
license: 'MIT',
|
||||
# meson 0.58: f-string
|
||||
# meson 0.62: dependency libdl
|
||||
- meson_version: '>=0.62.0',
|
||||
+ meson_version: '>=0.59.4',
|
||||
default_options: [
|
||||
'warning_level=1',
|
||||
'werror=true',
|
||||
@@ -48,7 +48,6 @@
|
||||
libtsm_deps = dependency('libtsm', version: '>=4.0.0')
|
||||
libudev_deps = dependency('libudev', version: '>=172')
|
||||
libdrm_deps = dependency('libdrm')
|
||||
-dl_deps = dependency('dl')
|
||||
threads_deps = dependency('threads')
|
||||
|
||||
python = find_program('python3')
|
||||
diff -Naur kmscon-9.0.0/src/meson.build kmscon-9.0.0.patched/src/meson.build
|
||||
--- kmscon-9.0.0/src/meson.build 2022-06-15 03:48:52.000000000 -0400
|
||||
+++ kmscon-9.0.0.patched/src/meson.build 2023-07-22 03:33:42.300564567 -0400
|
||||
@@ -257,7 +257,7 @@
|
||||
kmscon_srcs += 'kmscon_terminal.c'
|
||||
endif
|
||||
kmscon = executable('kmscon', kmscon_srcs,
|
||||
- dependencies: [xkbcommon_deps, libtsm_deps, threads_deps, dl_deps, conf_deps, shl_deps, eloop_deps, uterm_deps],
|
||||
+ dependencies: [xkbcommon_deps, libtsm_deps, threads_deps, conf_deps, shl_deps, eloop_deps, uterm_deps],
|
||||
export_dynamic: true,
|
||||
install: true,
|
||||
install_dir: libexecdir,
|
|
@ -1,22 +0,0 @@
|
|||
diff -Naur kmscon-8/src/uterm_drm3d_video.c kmscon-8.patched/src/uterm_drm3d_video.c
|
||||
--- kmscon-8/src/uterm_drm3d_video.c 2013-10-18 12:32:27.698000000 -0400
|
||||
+++ kmscon-8.patched/src/uterm_drm3d_video.c 2021-08-25 00:16:43.117558748 -0400
|
||||
@@ -30,6 +30,7 @@
|
||||
#define EGL_EGLEXT_PROTOTYPES
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
#include <errno.h>
|
||||
diff -Naur kmscon-8/src/uterm_vt.c kmscon-8.patched/src/uterm_vt.c
|
||||
--- kmscon-8/src/uterm_vt.c 2013-10-23 17:15:18.865000000 -0400
|
||||
+++ kmscon-8.patched/src/uterm_vt.c 2021-08-25 00:16:51.038558028 -0400
|
||||
@@ -27,6 +27,7 @@
|
||||
* Virtual Terminals
|
||||
*/
|
||||
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/kd.h>
|
Loading…
Reference in a new issue