diff options
author | B. Watson <urchlay@slackware.uk> | 2023-07-22 14:57:39 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-07-29 08:13:41 +0700 |
commit | f42acb48e076cb864c26b3f53bfc26053f8371eb (patch) | |
tree | 15a1ad05f80cb7c32ce201fb02ab20f092ec7fe9 /system | |
parent | 0fc34526ee7db9ebeb4c2f4d0ad276f721f644c7 (diff) |
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>
Diffstat (limited to 'system')
-rw-r--r-- | system/kmscon/README.Slackware | 2 | ||||
-rw-r--r-- | system/kmscon/kmscon.SlackBuild | 100 | ||||
-rw-r--r-- | system/kmscon/kmscon.info | 12 | ||||
-rw-r--r-- | system/kmscon/meson-compat.diff | 32 | ||||
-rw-r--r-- | system/kmscon/sysmacros.diff | 22 |
5 files changed, 102 insertions, 66 deletions
diff --git a/system/kmscon/README.Slackware b/system/kmscon/README.Slackware index a3e71f6d8070..e8a97402a991 100644 --- a/system/kmscon/README.Slackware +++ b/system/kmscon/README.Slackware @@ -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. diff --git a/system/kmscon/kmscon.SlackBuild b/system/kmscon/kmscon.SlackBuild index 70a6fb5caafa..caa3e0c555e5 100644 --- a/system/kmscon/kmscon.SlackBuild +++ b/system/kmscon/kmscon.SlackBuild @@ -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 {} \+ - -# Fix build on -current: add #include <sys/sysmacros.h> to files that -# use major() and minor() -patch -p1 < $CWD/sysmacros.diff - -[ -x configure ] || autoreconf -if - -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 - -make -make install-strip DESTDIR=$PKG +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +LIBDOC=$PKGDOC/$LIBNAM-$LIBVER +mkdir -p $LIBDOC + +# 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 .. + +cp -a COPYING LICENSE_htable NEWS README* $LIBDOC + +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 diff --git a/system/kmscon/kmscon.info b/system/kmscon/kmscon.info index f53f8173874a..895effecbb33 100644 --- a/system/kmscon/kmscon.info +++ b/system/kmscon/kmscon.info @@ -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" diff --git a/system/kmscon/meson-compat.diff b/system/kmscon/meson-compat.diff new file mode 100644 index 000000000000..6e5c69319432 --- /dev/null +++ b/system/kmscon/meson-compat.diff @@ -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, diff --git a/system/kmscon/sysmacros.diff b/system/kmscon/sysmacros.diff deleted file mode 100644 index d4996358cade..000000000000 --- a/system/kmscon/sysmacros.diff +++ /dev/null @@ -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> |