summaryrefslogtreecommitdiffstats
path: root/source/a/gpm
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/gpm')
-rwxr-xr-xsource/a/gpm/gpm.SlackBuild30
-rw-r--r--source/a/gpm/gpm.gcc7.diff28
-rw-r--r--source/a/gpm/gpm.types.diff10
-rw-r--r--source/a/gpm/setup.mouse18
-rw-r--r--source/a/gpm/slack-desc14
5 files changed, 75 insertions, 25 deletions
diff --git a/source/a/gpm/gpm.SlackBuild b/source/a/gpm/gpm.SlackBuild
index 6c763657d..9c28a4f86 100755
--- a/source/a/gpm/gpm.SlackBuild
+++ b/source/a/gpm/gpm.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2008, 2009, 2010, 2013, 2014 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2013, 2014, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -11,7 +11,7 @@
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
@@ -22,25 +22,35 @@
# by: volkerdi@slackware.com
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=gpm
VERSION=1.20.7
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# 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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-gpm
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -68,6 +78,8 @@ find . \
zcat $CWD/gpm-1.20.1-lib-silent.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/gpm-1.20.5-close-fds.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/gpm-1.20.1-select-1.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gpm.types.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gpm.gcc7.diff.gz | patch -p1 --verbose || exit 1
sh autogen.sh
@@ -92,7 +104,7 @@ CFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--sysconfdir=/etc \
--libdir=/usr/lib${LIBDIRSUFFIX} \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
make || exit 1
make install DESTDIR=$PKG || exit 1
diff --git a/source/a/gpm/gpm.gcc7.diff b/source/a/gpm/gpm.gcc7.diff
new file mode 100644
index 000000000..b53d4ca66
--- /dev/null
+++ b/source/a/gpm/gpm.gcc7.diff
@@ -0,0 +1,28 @@
+--- ./src/prog/gpm-root.y.orig 2012-10-26 16:21:38.000000000 -0500
++++ ./src/prog/gpm-root.y 2018-02-03 14:52:27.229309044 -0600
+@@ -1196,11 +1196,7 @@
+ LOG_DAEMON : LOG_USER);
+ /* reap your zombies */
+ childaction.sa_handler=reap_children;
+-#if defined(__GLIBC__)
+- __sigemptyset(&childaction.sa_mask);
+-#else /* __GLIBC__ */
+- childaction.sa_mask=0;
+-#endif /* __GLIBC__ */
++ sigemptyset(&childaction.sa_mask);
+ childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */
+ sigaction(SIGCHLD,&childaction,NULL);
+
+--- ./src/daemon/open_console.c.orig 2018-02-03 14:49:24.586310986 -0600
++++ ./src/daemon/open_console.c 2018-02-03 14:53:03.347308660 -0600
+@@ -24,6 +24,10 @@
+ #include <sys/ioctl.h> /* ioctl */
+ #include <sys/types.h>
+
++#ifdef HAVE_SYS_SYSMACROS_H
++#include <sys/sysmacros.h> /* major() w/newer glibc */
++#endif
++
+ /* Linux specific (to be outsourced in gpm2 */
+ #include <linux/serial.h> /* for serial console check */
+ #include <asm/ioctls.h> /* for serial console check */
diff --git a/source/a/gpm/gpm.types.diff b/source/a/gpm/gpm.types.diff
new file mode 100644
index 000000000..a2bd5055d
--- /dev/null
+++ b/source/a/gpm/gpm.types.diff
@@ -0,0 +1,10 @@
+--- ./src/daemon/open_console.c.orig 2012-10-26 16:21:38.000000000 -0500
++++ ./src/daemon/open_console.c 2018-02-03 14:48:09.879311780 -0600
+@@ -22,6 +22,7 @@
+ #include <fcntl.h> /* open and co. */
+ #include <sys/stat.h> /* stat() */
+ #include <sys/ioctl.h> /* ioctl */
++#include <sys/types.h>
+
+ /* Linux specific (to be outsourced in gpm2 */
+ #include <linux/serial.h> /* for serial console check */
diff --git a/source/a/gpm/setup.mouse b/source/a/gpm/setup.mouse
index dcdc6a8f9..4703671ff 100644
--- a/source/a/gpm/setup.mouse
+++ b/source/a/gpm/setup.mouse
@@ -4,8 +4,8 @@ T_PX=$1
TMP=/var/log/setup/tmp
GPM=/usr/sbin/gpm
# If the mouse is USB, we can autodetect it:
-if [ -r /proc/bus/usb/devices ]; then
- if cat /proc/bus/usb/devices | grep usb_mouse 1> /dev/null 2> /dev/null ; then
+if [ -r /proc/bus/input/devices ]; then
+ if grep -B3 Handlers=mouse /proc/bus/input/devices | grep Phys=usb 1>/dev/null 2>/dev/null; then
MOUSE_TYPE=usb
MTYPE="imps2"
( cd $T_PX/dev ; rm -f mouse ; ln -sf input/mice mouse )
@@ -15,11 +15,11 @@ fi
if [ "$MOUSE_TYPE" = "" ]; then
dialog --title "MOUSE CONFIGURATION" --default-item "imps2" --menu \
"This part of the configuration \
-process will create a /dev/mouse link pointing to your default mouse device. \
+process will create a /dev/mouse link pointing to your default mouse device. \
You can change the /dev/mouse link later if the mouse doesn't work, or if \
-you switch to a different type of pointing device. We will also use the \
+you switch to a different type of pointing device. We will also use the \
information about the mouse to set the correct protocol for gpm, the Linux \
-mouse server. Please select a mouse type \
+mouse server. Please select a mouse type \
from the list below:" 20 76 8 \
"ps2" "PS/2 port mouse (most desktops and laptops)" \
"usb" "USB connected mouse" \
@@ -124,13 +124,13 @@ else # assume \$1 = start:
fi
# There is another way to run GPM, where it acts as a repeater outputting a
-# virtual MouseSystems mouse on /dev/gpmdata. This is useful for feeding
+# virtual MouseSystems mouse on /dev/gpmdata. This is useful for feeding
# gpm's data to X, especially if you've got a busmouse (in that situation X
-# and gpm may not coexist without using a repeater). To try running a GPM
+# and gpm may not coexist without using a repeater). To try running a GPM
# repeater for X, change the gpm command line to look like this:
# $GPM -R msc -m /dev/mouse -t $MTYPE
# Then, make sure that the mouse configuration in your XF86Config file refers
-# to the repeater device (/dev/gpmdata) and a MouseSystems mouse type. If you
+# to the repeater device (/dev/gpmdata) and a MouseSystems mouse type. If you
# edit the file directly, you'll want the lines to look like this (minus the
# comment marks '#' shown here, of course):
#Section "Pointer"
@@ -142,7 +142,7 @@ chmod 755 $T_PX/etc/rc.d/rc.gpm-sample
# Now ask if this should be the new rc.gpm:
dialog --title "GPM CONFIGURATION" --yesno \
"The gpm program allows you to cut and paste text on\n\
-the virtual consoles using a mouse. If you choose to\n\
+the virtual consoles using a mouse. If you choose to\n\
run it at boot time, this line will be added to your\n\
/etc/rc.d/rc.gpm:\n\
\n\
diff --git a/source/a/gpm/slack-desc b/source/a/gpm/slack-desc
index 7d0bdc952..8f3ac4222 100644
--- a/source/a/gpm/slack-desc
+++ b/source/a/gpm/slack-desc
@@ -1,19 +1,19 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
gpm: gpm (general purpose mouse server)
gpm:
gpm: The general purpose mouse server, or gpm, allows you to use the mouse
-gpm: to cut and paste text from the screen. It also acts as a mouse
+gpm: to cut and paste text from the screen. It also acts as a mouse
gpm: server for applications running on the Linux console, such as the
gpm: Midnight Commander file manager.
gpm:
-gpm: NOTE: This program may cause problems when you start X on systems
-gpm: that use a bus mouse (not common). If you get an 'unable to open
-gpm: mouse device' error from X, disable /etc/rc.d/rc.gpm.
+gpm:
+gpm:
+gpm:
gpm: