summaryrefslogtreecommitdiffstats
path: root/extra
diff options
context:
space:
mode:
Diffstat (limited to 'extra')
-rw-r--r--extra/gnuchess/.footprint4
-rw-r--r--extra/gnuchess/.md5sum3
-rw-r--r--extra/gnuchess/Pkgfile23
-rw-r--r--extra/gnuchess/gcc4.patch10
-rw-r--r--extra/gnuchess/gnuchess-gcc4.patch11
-rw-r--r--extra/gnuchess/gnuchess-glibc210.patch39
6 files changed, 90 insertions, 0 deletions
diff --git a/extra/gnuchess/.footprint b/extra/gnuchess/.footprint
new file mode 100644
index 000000000..2df299466
--- /dev/null
+++ b/extra/gnuchess/.footprint
@@ -0,0 +1,4 @@
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/gnuchess
+-rwxr-xr-x root/root usr/bin/gnuchessx
diff --git a/extra/gnuchess/.md5sum b/extra/gnuchess/.md5sum
new file mode 100644
index 000000000..3b35e1850
--- /dev/null
+++ b/extra/gnuchess/.md5sum
@@ -0,0 +1,3 @@
+259da00aa559e5624c65279484fccaf7 gnuchess-5.07.tar.gz
+a99f426060828d5de76f4fffe941fe7b gnuchess-gcc4.patch
+e7fc4876dcd7d6d4e1ff019f39408086 gnuchess-glibc210.patch
diff --git a/extra/gnuchess/Pkgfile b/extra/gnuchess/Pkgfile
new file mode 100644
index 000000000..796da283f
--- /dev/null
+++ b/extra/gnuchess/Pkgfile
@@ -0,0 +1,23 @@
+# Description: Jeu d'échecs
+# URL: http://www.gnu.org/software/chess/chess.html
+# Maintainer: NuTyX core team
+# Packager: thierryn1 at hispeed dot ch
+# Depends on: readline, ncursesi
+
+name=gnuchess
+version=5.07
+release=1
+group=app
+source=(ftp://ftp.gnu.org/pub/gnu/chess/$name-$version.tar.gz
+ gnuchess-gcc4.patch
+ gnuchess-glibc210.patch)
+
+build() {
+ cd $name-$version
+ patch -Np1 -i ../gnuchess-gcc4.patch
+ patch -Np0 -i ../gnuchess-glibc210.patch
+ ./configure --prefix=/usr
+ make -j3
+ make prefix=$PKG/usr install
+}
+
diff --git a/extra/gnuchess/gcc4.patch b/extra/gnuchess/gcc4.patch
new file mode 100644
index 000000000..b5ce9230d
--- /dev/null
+++ b/extra/gnuchess/gcc4.patch
@@ -0,0 +1,10 @@
+--- gnuchess-5.07/src/input.c.orig 2005-11-11 00:45:40.000000000 +0100
++++ gnuchess-5.07/src/input.c 2005-11-11 00:45:51.000000000 +0100
+@@ -92,7 +92,7 @@
+ fgets(inputstr, MAXSTR, stdin);
+ }
+
+-static pthread_t input_thread;
++pthread_t input_thread;
+
+ /* Mutex and condition variable for thread communication */
diff --git a/extra/gnuchess/gnuchess-gcc4.patch b/extra/gnuchess/gnuchess-gcc4.patch
new file mode 100644
index 000000000..173f2fba8
--- /dev/null
+++ b/extra/gnuchess/gnuchess-gcc4.patch
@@ -0,0 +1,11 @@
+--- gnuchess-5.07/src/input.c.orig 2005-11-11 00:45:40.000000000 +0100
++++ gnuchess-5.07/src/input.c 2005-11-11 00:45:51.000000000 +0100
+@@ -92,7 +92,7 @@
+ fgets(inputstr, MAXSTR, stdin);
+ }
+
+-static pthread_t input_thread;
++pthread_t input_thread;
+
+ /* Mutex and condition variable for thread communication */
+
diff --git a/extra/gnuchess/gnuchess-glibc210.patch b/extra/gnuchess/gnuchess-glibc210.patch
new file mode 100644
index 000000000..3c191eec9
--- /dev/null
+++ b/extra/gnuchess/gnuchess-glibc210.patch
@@ -0,0 +1,39 @@
+--- src/common.h.old 2009-05-28 10:26:58.000000000 +0200
++++ src/common.h 2009-05-28 11:03:31.000000000 +0200
+@@ -745,7 +745,7 @@
+ * Input routine, initialized to one of the specific
+ * input routines. The given argument is the prompt.
+ */
+-void (*getline) (char *);
++void (*mygetline) (char *);
+
+ #define MAXSTR 128
+ extern char inputstr[MAXSTR];
+--- src/input.c.old 2009-05-28 10:27:06.000000000 +0200
++++ src/input.c 2009-05-28 11:04:38.000000000 +0200
+@@ -127,7 +127,7 @@
+ (RealGameCnt+1)/2 + 1 );
+ }
+ pthread_mutex_lock(&input_mutex);
+- getline(prompt);
++ mygetline(prompt);
+ input_status = INPUT_AVAILABLE;
+ pthread_cond_signal(&input_cond);
+ pthread_mutex_unlock(&input_mutex);
+@@ -173,13 +173,13 @@
+ {
+ #ifdef HAVE_LIBREADLINE
+ if (isatty(STDIN_FILENO)) {
+- getline = getline_readline;
++ mygetline = getline_readline;
+ using_history();
+ } else {
+- getline = getline_standard;
++ mygetline = getline_standard;
+ }
+ #else
+- getline = getline_standard;
++ mygetline = getline_standard;
+ #endif
+ /* Start input thread */
+ pthread_create(&input_thread, NULL, input_func, NULL);