diff options
author | B. Watson <yalhcru@gmail.com> | 2021-08-25 02:31:43 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-13 00:51:41 +0700 |
commit | f308b784eade50b815dc9bfec44ae4c51edb4c02 (patch) | |
tree | a3b8ed614fe916836e797f0da04254b7261502d5 /system/kmscon | |
parent | 12378c30376d8588e1e3f1f283000145b4e0e4c4 (diff) |
system/kmscon: Updated for version 8+20140708_0b34527.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/kmscon')
-rw-r--r-- | system/kmscon/git2tarxz.sh | 71 | ||||
-rw-r--r-- | system/kmscon/kmscon.SlackBuild | 24 | ||||
-rw-r--r-- | system/kmscon/kmscon.info | 8 | ||||
-rw-r--r-- | system/kmscon/sysmacros.diff | 22 |
4 files changed, 112 insertions, 13 deletions
diff --git a/system/kmscon/git2tarxz.sh b/system/kmscon/git2tarxz.sh new file mode 100644 index 0000000000000..1b26868216f36 --- /dev/null +++ b/system/kmscon/git2tarxz.sh @@ -0,0 +1,71 @@ +#!/bin/sh + +# This git2tarxz has special case code for kmscon. + +# Create source tarball from git repo, with generated version number. + +# Takes one optional argument, which is the commit or tag to create a +# tarball of. With no arg, HEAD is used. + +# Version number example: 0.0.1+20200227_ad7ec17 + +# Notes: + +# Do not use this if you're packaging a release. + +# This script doesn't need to be run as root. It does need to be able +# to write to the current directory it's run from. + +# Running this script twice for the same commit will NOT give identical +# tarballs, even if the contents are identical. This is because tar +# includes the current time in a newly-created tarball (plus there may +# be other git-related reasons). + +# Once you've generated a tarball, you'll still need a place to host it. +# Ask on the mailing list, if you don't have your own web server to +# play with. + +## Config: +# final tarball and slackbuild PRGNAM: +PRGNAM=kmscon + +# For github projects, you can use this unmodified: +CLONE_URL=git://people.freedesktop.org/~dvdhrm/kmscon + +## End of config. + +set -e + +GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX ) +rm -rf $GITDIR +git clone $CLONE_URL $GITDIR + +CWD="$( pwd )" +cd $GITDIR + +if [ "$1" != "" ]; then + git reset --hard "$1" || exit 1 +fi + +GIT_SHA=$( git rev-parse --short HEAD ) + +DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 ) + +# special case here: upstream's tags are "kmscon-<version>", not +# just <version>. +VERTAG=$( git tag -l | tail -1 | cut -d- -f2 ) + +VERSION=${VERTAG}+${DATE}_${GIT_SHA} + +rm -rf .git +find . -name .gitignore -print0 | xargs -0 rm -f + +cd "$CWD" +rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz +mv $GITDIR $PRGNAM-$VERSION +tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION + +echo +echo "Created tarball: $PRGNAM-$VERSION.tar.xz" +echo "VERSION=\"$VERSION\"" +echo "MD5SUM=\"$( md5sum $PRGNAM-$VERSION.tar.xz | cut -d' ' -f1 )\"" diff --git a/system/kmscon/kmscon.SlackBuild b/system/kmscon/kmscon.SlackBuild index a8aafaaa030b6..f7a936ff7f650 100644 --- a/system/kmscon/kmscon.SlackBuild +++ b/system/kmscon/kmscon.SlackBuild @@ -6,10 +6,13 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 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} +VERSION=${VERSION:-8+20140708_0b34527} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -22,9 +25,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 @@ -57,11 +57,14 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -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 + +[ -x configure ] || autoreconf -if SLKCFLAGS="$SLKCFLAGS -DSIGUNUSED=SIGSYS" CFLAGS="$SLKCFLAGS" \ @@ -82,6 +85,9 @@ make install-strip DESTDIR=$PKG 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 diff --git a/system/kmscon/kmscon.info b/system/kmscon/kmscon.info index ffeac16026e0b..55b5aef91ac64 100644 --- a/system/kmscon/kmscon.info +++ b/system/kmscon/kmscon.info @@ -1,8 +1,8 @@ PRGNAM="kmscon" -VERSION="8" -HOMEPAGE="http://www.freedesktop.org/wiki/Software/kmscon/" -DOWNLOAD="http://www.freedesktop.org/software/kmscon/releases/kmscon-8.tar.xz" -MD5SUM="90d39c4ef53a11c53f27be4a7e9acee4" +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" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="libtsm" diff --git a/system/kmscon/sysmacros.diff b/system/kmscon/sysmacros.diff new file mode 100644 index 0000000000000..d4996358cade0 --- /dev/null +++ b/system/kmscon/sysmacros.diff @@ -0,0 +1,22 @@ +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> |