summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Teibes2019-02-14 23:58:23 +0100
committerCarsten Teibes2019-02-14 23:58:23 +0100
commit774e4bce1c4b785c727c20b5f32f08c6656e5986 (patch)
treefda139f5bf6df4c541dff68fb95a74b6b4003b88
parent63e968ac88f677ca90db02f8280f5857320dbb99 (diff)
downloadaur-774e4bce1c4b785c727c20b5f32f08c6656e5986.tar.gz
[fix] building, use more fedora patches
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD63
-rw-r--r--crack-attack-1.1.14-format-security.patch21
-rw-r--r--crack-attack-1.1.14-rhbz1065649.patch30
-rw-r--r--crack-attack-1.1.14-sanitize.patch44
5 files changed, 147 insertions, 35 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5d84ea9544b..eea05757a40 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = crack-attack
pkgdesc = A free OpenGL game based on the Super Nintendo classic Tetris Attack, with Fedora's patches
pkgver = 1.1.14
- pkgrel = 7
- url = http://www.nongnu.org/crack-attack/
+ pkgrel = 8
+ url = https://www.nongnu.org/crack-attack/
arch = i686
arch = x86_64
license = GPL
@@ -13,15 +13,21 @@ pkgbase = crack-attack
depends = freeglut
optdepends = crack-attack-sounds: for sound effects and music
source = http://download.savannah.gnu.org/releases/crack-attack/crack-attack-1.1.14.tar.gz
- source = crack-attack-1.1.14-glutInit.patch
source = crack-attack-1.1.14-audio.patch
- source = crack-attack-1.1.14-gcc43.patch
source = crack-attack-1.1.14-audio-ppc.patch
- md5sums = 262445024b0fca44508355242ea29d71
- md5sums = 75a884a0003521099b4bb417bfe8339b
- md5sums = 6c42bef707937b3bede26dc83e865e74
- md5sums = b6a21f65d3579a6cf3c9e48cede0b012
- md5sums = 1d24a261ea6b3a2d15328c3b7d9305d0
+ source = crack-attack-1.1.14-format-security.patch
+ source = crack-attack-1.1.14-gcc43.patch
+ source = crack-attack-1.1.14-glutInit.patch
+ source = crack-attack-1.1.14-rhbz1065649.patch
+ source = crack-attack-1.1.14-sanitize.patch
+ sha256sums = 75ca48e5cf7d49a301d0d6a4f61bf38c2d30308a1d4f7adacdab002c549253e9
+ sha256sums = 230339388298d794a307f5f01cc9d9f156322a28c0e497ab83b2d2df5a960e85
+ sha256sums = 5b86a81a91c434fc98002652ed3458d17ba12ab1aaa3647c85ba965252f157f8
+ sha256sums = 938778c17119fe59d6ed69ce11bf16d1253999c92f7a10305aecd66982df0dd0
+ sha256sums = 2a8e430316f0fbe3360b1fa7793345812d7c61aca2197a1a2e521ea7df42a608
+ sha256sums = 6128b4737a39b708a5107a41ab389a653eac33023f0e1bd3791d67424fcb6ee4
+ sha256sums = 3a82f216b4f580b7b774a89cba1eada266f4fd8c3b582b244bded2566b453cbf
+ sha256sums = 7897febe5fbff88f807d036f6bb5865e3df5690089aa1eb04e8f616f9be522ef
pkgname = crack-attack
diff --git a/PKGBUILD b/PKGBUILD
index 056373b20bf..fb64fb9da2a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,56 @@
-# Maintainer: Thibault Mondary <thibm@free.fr>
-# Maintainer: Simone Sclavi 'Ito' <darkhado@gmail.com>
-
+# Maintainer:
+# Contributor: Thibault Mondary <thibm@free.fr>
+# Contributor: Simone Sclavi 'Ito' <darkhado@gmail.com>
pkgname=crack-attack
pkgver=1.1.14
-pkgrel=7
+pkgrel=8
pkgdesc="A free OpenGL game based on the Super Nintendo classic Tetris Attack, with Fedora's patches"
arch=('i686' 'x86_64')
-url="http://www.nongnu.org/crack-attack/"
+url="https://www.nongnu.org/crack-attack/"
license=("GPL")
depends=('gtk2' 'sdl_mixer' 'freeglut')
makedepends=('glu' 'libxmu')
optdepends=('crack-attack-sounds: for sound effects and music')
-source=(http://download.savannah.gnu.org/releases/$pkgname/$pkgname-$pkgver.tar.gz
- crack-attack-1.1.14-glutInit.patch
- crack-attack-1.1.14-audio.patch
- crack-attack-1.1.14-gcc43.patch
- crack-attack-1.1.14-audio-ppc.patch
-)
-md5sums=('262445024b0fca44508355242ea29d71'
- '75a884a0003521099b4bb417bfe8339b'
- '6c42bef707937b3bede26dc83e865e74'
- 'b6a21f65d3579a6cf3c9e48cede0b012'
- '1d24a261ea6b3a2d15328c3b7d9305d0')
+source=("http://download.savannah.gnu.org/releases/$pkgname/$pkgname-$pkgver.tar.gz"
+ "$pkgname-$pkgver-audio.patch"
+ "$pkgname-$pkgver-audio-ppc.patch"
+ "$pkgname-$pkgver-format-security.patch"
+ "$pkgname-$pkgver-gcc43.patch"
+ "$pkgname-$pkgver-glutInit.patch"
+ "$pkgname-$pkgver-rhbz1065649.patch"
+ "$pkgname-$pkgver-sanitize.patch")
+sha256sums=('75ca48e5cf7d49a301d0d6a4f61bf38c2d30308a1d4f7adacdab002c549253e9'
+ '230339388298d794a307f5f01cc9d9f156322a28c0e497ab83b2d2df5a960e85'
+ '5b86a81a91c434fc98002652ed3458d17ba12ab1aaa3647c85ba965252f157f8'
+ '938778c17119fe59d6ed69ce11bf16d1253999c92f7a10305aecd66982df0dd0'
+ '2a8e430316f0fbe3360b1fa7793345812d7c61aca2197a1a2e521ea7df42a608'
+ '6128b4737a39b708a5107a41ab389a653eac33023f0e1bd3791d67424fcb6ee4'
+ '3a82f216b4f580b7b774a89cba1eada266f4fd8c3b582b244bded2566b453cbf'
+ '7897febe5fbff88f807d036f6bb5865e3df5690089aa1eb04e8f616f9be522ef')
-build() {
+prepare() {
cd $pkgname-$pkgver
- patch -Np1 -i ../crack-attack-1.1.14-glutInit.patch
- patch -Np1 -i ../crack-attack-1.1.14-audio.patch
- patch -Np1 -i ../crack-attack-1.1.14-gcc43.patch
- patch -Np1 -i ../crack-attack-1.1.14-audio-ppc.patch
+ patch -Np1 < ../$pkgname-$pkgver-audio.patch
+ patch -Np1 < ../$pkgname-$pkgver-audio-ppc.patch
+ patch -Np1 < ../$pkgname-$pkgver-format-security.patch
+ patch -Np1 < ../$pkgname-$pkgver-gcc43.patch
+ patch -Np1 < ../$pkgname-$pkgver-glutInit.patch
+ patch -Np1 < ../$pkgname-$pkgver-rhbz1065649.patch
+ patch -Np1 < ../$pkgname-$pkgver-sanitize.patch
+}
- ./configure --enable-sound=yes --prefix=/usr --mandir=/usr/share/man
+build() {
+ cd $pkgname-$pkgver
+ ./configure --enable-sound=yes --disable-binreloc --prefix=/usr --mandir=/usr/share/man
make
}
package(){
cd $pkgname-$pkgver
make DESTDIR=$pkgdir install
-
+
cd data
- sed -i -e 's#Application;Games#Game;BlockGame#' crack-attack.desktop
- install -D -m644 crack-attack.desktop $pkgdir/usr/share/applications/crack-attack.desktop
- install -D -m644 crack-attack.xpm $pkgdir/usr/share/pixmaps/crack-attack.xpm
+ sed 's|Application;Games|Game;BlockGame|' -i crack-attack.desktop
+ install -Dm644 crack-attack.desktop $pkgdir/usr/share/applications/crack-attack.desktop
+ install -Dm644 crack-attack.xpm $pkgdir/usr/share/pixmaps/crack-attack.xpm
}
diff --git a/crack-attack-1.1.14-format-security.patch b/crack-attack-1.1.14-format-security.patch
new file mode 100644
index 00000000000..a21cfd9abea
--- /dev/null
+++ b/crack-attack-1.1.14-format-security.patch
@@ -0,0 +1,21 @@
+diff -up crack-attack-1.1.14/src/gtk-gui/callbacks.cxx~ crack-attack-1.1.14/src/gtk-gui/callbacks.cxx
+--- crack-attack-1.1.14/src/gtk-gui/callbacks.cxx~ 2005-05-13 21:55:24.000000000 +0200
++++ crack-attack-1.1.14/src/gtk-gui/callbacks.cxx 2014-06-14 10:24:32.738154080 +0200
+@@ -113,7 +113,7 @@ ca_error_dialog (const char *message)
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+- message);
++ "%s", message);
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+ }
+@@ -160,7 +160,7 @@ gboolean networking_output (
+ buffer = gtk_text_view_get_buffer(txtOutput);
+ gtk_text_buffer_get_end_iter(buffer, &iter);
+ g_io_channel_read_line(source, &out, &length, NULL, NULL);
+- g_print(out);
++ g_print("%s", out);
+ gtk_text_buffer_insert(buffer, &iter, out, length);
+ g_free(out);
+ return true;
diff --git a/crack-attack-1.1.14-rhbz1065649.patch b/crack-attack-1.1.14-rhbz1065649.patch
new file mode 100644
index 00000000000..318016a1f34
--- /dev/null
+++ b/crack-attack-1.1.14-rhbz1065649.patch
@@ -0,0 +1,30 @@
+--- crack-attack-1.1.14/src/gtk-gui/gui_main.cxx~ 2005-05-13 21:55:24.000000000 +0200
++++ crack-attack-1.1.14/src/gtk-gui/gui_main.cxx 2014-06-14 10:24:32.738154080 +0200
+@@ -50,6 +50,18 @@
+ int glut_argc;
+ char **glut_argv;
+
++/*
++ * Call this when the window is unexpectedly destroyed to make sure the
++ * hidden gui process doesn't hang around in the background.
++ */
++static void destroy_window(GtkObject *object, gpointer data) {
++#ifdef DEVELOPMENT
++ g_print("\nOh no! We've been nexpectedly destroyed! :(\n");
++#endif
++ gtk_main_quit();
++}
++
++
+ /*
+ * Documentation
+ * html tables don't work right in explorer
+@@ -76,6 +88,8 @@
+ winCrackAttackSplash = create_winCrackAttackSplash ();
+ gui_data_read(winCrackAttackSplash);
+ gtk_widget_show (winCrackAttackSplash);
++ g_signal_connect(GTK_OBJECT(winCrackAttackSplash), "destroy",
++ G_CALLBACK(destroy_window), NULL);
+ gtk_main ();
+
+ return 0;
diff --git a/crack-attack-1.1.14-sanitize.patch b/crack-attack-1.1.14-sanitize.patch
new file mode 100644
index 00000000000..ec530476891
--- /dev/null
+++ b/crack-attack-1.1.14-sanitize.patch
@@ -0,0 +1,44 @@
+--- crack-attack-1.1.14/doc/crack-attack.6~ 2006-08-14 17:56:03.000000000 +0200
++++ crack-attack-1.1.14/doc/crack-attack.6 2006-08-14 17:56:03.000000000 +0200
+@@ -1,7 +1,7 @@
+ .TH crack-attack 6
+ .\" auto-generated from crack-attack.xml by docbook2manxml $Revision: 1.3 $
+ .SH NAME
+-crack-attack \- multiplayer OpenGL puzzle game like "Tetris Attack"
++crack-attack \- multiplayer OpenGL puzzle game
+ .SH SYNOPSIS
+ \fBcrack-attack\fR
+ {
+--- crack-attack-1.1.14/doc/index.html~ 2006-08-14 17:56:50.000000000 +0200
++++ crack-attack-1.1.14/doc/index.html 2006-08-14 17:56:50.000000000 +0200
+@@ -14,9 +14,6 @@
+ <font size=+3>
+ <br><br>
+ A free OpenGL game for Linux and Windows
+-<font size=+1>
+-<p>based on the Super Nintendo classic
+-<br>Tetris Attack
+ <font size=+0>
+ <p>by Daniel Nelson
+ <p>
+--- crack-attack-1.1.14/doc/crack-attack.xml~ 2006-08-14 17:55:21.000000000 +0200
++++ crack-attack-1.1.14/doc/crack-attack.xml 2006-08-14 17:55:21.000000000 +0200
+@@ -41,7 +41,7 @@
+ </refmeta>
+ <refnamediv id="name">
+ <refname>crack-attack</refname>
+- <refpurpose>multiplayer OpenGL puzzle game like "Tetris Attack"</refpurpose>
++ <refpurpose>multiplayer OpenGL puzzle game</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv id="synopsis">
+ <cmdsynopsis>
+@@ -67,8 +67,7 @@
+ <refsect1 id="description">
+ <title>Description</title>
+ <para>
+- &package; is roughly based on the Super Nintendo game
+- "Tetris Attack". Slowly, your stack of colored blocks grows from the
++ Slowly, your stack of colored blocks grows from the
+ bottom, and you've got to make sure it never reaches the top. If it
+ does, you lose. To eliminate blocks from the stack, line up at least
+ three of one color, horizontally or vertically. Once you do, those