[arch-commits] CVS update of core/support/gpm (PKGBUILD gpm-openmax.patch)
Eric Belanger
eric at archlinux.org
Fri Nov 9 03:44:57 UTC 2007
Date: Thursday, November 8, 2007 @ 22:44:57
Author: eric
Path: /home/cvs-core/core/support/gpm
Added: gpm-openmax.patch (1.1)
Modified: PKGBUILD (1.12 -> 1.13)
fixed build issue with kernel 2.6.23, disabled SMP build, added url and license
-------------------+
PKGBUILD | 27 +++++++++++++++++++--------
gpm-openmax.patch | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 8 deletions(-)
Index: core/support/gpm/PKGBUILD
diff -u core/support/gpm/PKGBUILD:1.12 core/support/gpm/PKGBUILD:1.13
--- core/support/gpm/PKGBUILD:1.12 Mon May 15 13:30:58 2006
+++ core/support/gpm/PKGBUILD Thu Nov 8 22:44:56 2007
@@ -1,24 +1,35 @@
-# $Id: PKGBUILD,v 1.12 2006/05/15 17:30:58 uid1016 Exp $
-# Maintainer: dorphell <dorphell at archlinux.org>
+# $Id: PKGBUILD,v 1.13 2007/11/09 03:44:56 eric Exp $
+# Maintainer: Eric Belanger <eric at archlinux.org>
# Committer: Judd Vinet <jvinet at zeroflux.org>
# Contributor: Tom Newsom <Jeepster at gmx.co.uk>
+
pkgname=gpm
pkgver=1.20.1
pkgrel=6
pkgdesc="A mouse server for the console and xterm"
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
+url="http://unix.schottelius.org/gpm/"
+license=('GPL')
depends=('ncurses')
backup=(etc/conf.d/gpm)
-source=(ftp://arcana.linux.it/pub/$pkgname/$pkgname-$pkgver.tar.gz \
- gpm.patch gpm-quietdeath.patch gpm gpm.conf.d)
-md5sums=('632a8fa8a6613027e407ee3e7a54cf13' 'ffcb5ead568a7ce39602e2d39555b251'\
- '583fa2cf2a9db7ca458b23c1d095f667' 'c4d42a4725503a5524cae060a959a3d3'\
- '5f109341a7d1bb18c59d7c3a395d848a')
+options=('!makeflags')
+source=(http://unix.schottelius.org/gpm/archives/$pkgname-$pkgver.tar.bz2 \
+ gpm.patch gpm-quietdeath.patch gpm-openmax.patch gpm gpm.conf.d)
+md5sums=('2c63e827d755527950d9d13fe3d87692' 'ffcb5ead568a7ce39602e2d39555b251'\
+ '583fa2cf2a9db7ca458b23c1d095f667' '6b7be08b0f4e62f1871fa5b3aec25dbd'\
+ 'c4d42a4725503a5524cae060a959a3d3' '5f109341a7d1bb18c59d7c3a395d848a')
+sha1sums=('c48d937e62abb438c2f6439b34ef3332c89af8d1'
+ '16541df8144073b4e79664fd0070ec7233547e72'
+ '411f06da13e881dd07d6ea8765decc0eb7acc195'
+ '2d47d63b285153bfaa016aa20c342519a4bdb5a1'
+ 'c13ad1422d24af320e2abb9786c7eacef39b293c'
+ '3bcb67027f0ad7dc393388fb02c261126671f9f5')
build() {
cd $startdir/src/$pkgname-$pkgver
patch -Np1 -i ../gpm-quietdeath.patch || return 1
patch -Np1 -i ../gpm.patch || return 1
+ patch -Np1 -i ../gpm-openmax.patch || return 1
./configure --prefix=/usr --sysconfdir=/etc
make LIBS=-lm || return 1
make prefix=$startdir/pkg/usr install
Index: core/support/gpm/gpm-openmax.patch
diff -u /dev/null core/support/gpm/gpm-openmax.patch:1.1
--- /dev/null Thu Nov 8 22:44:57 2007
+++ core/support/gpm/gpm-openmax.patch Thu Nov 8 22:44:56 2007
@@ -0,0 +1,39 @@
+The OPEN_MAX constant was removed in Linux 2.6.23
+(commit 77293034696e3e0b6c8b8fc1f96be091104b3d2b)
+and sysconf is the POSIX way to do it.
+
+Signed-off-by: Tomas Janousek <tjanouse at redhat.com>
+---
+ src/prog/gpm-root.y | 4 +++-
+ src/special.c | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y
+index 3a97602..b496550 100644
+--- a/src/prog/gpm-root.y
++++ b/src/prog/gpm-root.y
+@@ -526,7 +526,9 @@ int f_bgcmd(int mode, DrawItem *self, int uid)
+ open("/dev/null",O_RDONLY); /* stdin */
+ open(consolename,O_WRONLY); /* stdout */
+ dup(1); /* stderr */
+- for (i=3;i<OPEN_MAX; i++) close(i);
++ int open_max = sysconf(_SC_OPEN_MAX);
++ if (open_max == -1) open_max = 1024;
++ for (i=3;i<open_max; i++) close(i);
+ execl("/bin/sh","sh","-c",self->arg,(char *)NULL);
+ exit(1); /* shouldn't happen */
+ default: return 0;
+diff --git a/src/special.c b/src/special.c
+index 5bed91a..c6cd04d 100644
+--- a/src/special.c
++++ b/src/special.c
+@@ -156,6 +156,8 @@ int processSpecial(Gpm_Event *event)
+ open(GPM_NULL_DEV,O_RDONLY); /* stdin */
+ open(console.device, O_WRONLY); /* stdout */
+ dup(1); /* stderr */
+- for (i=3;i<OPEN_MAX; i++) close(i);
++ int open_max = sysconf(_SC_OPEN_MAX);
++ if (open_max == -1) open_max = 1024;
++ for (i=3;i<open_max; i++) close(i);
+ execl("/bin/sh","sh","-c",command,(char *)NULL);
+ exit(1); /* shouldn't happen */
More information about the arch-commits
mailing list