mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-08 16:13:50 +02:00
crack-attack: rework the entire template. It's much more cleaner
The music should be included in another pkg. And we need to fix cross-compilation. (It's required to fix the guys from this project too...)
This commit is contained in:
parent
721532c094
commit
b375948933
5 changed files with 80 additions and 32 deletions
|
@ -0,0 +1,12 @@
|
||||||
|
diff -up crack-attack-1.1.14/src/Sound.cxx~ crack-attack-1.1.14/src/Sound.cxx
|
||||||
|
--- src/Sound.cxx 2008-06-24 11:20:22.000000000 +0200
|
||||||
|
+++ src/Sound.cxx 2008-06-24 11:20:22.000000000 +0200
|
||||||
|
@@ -41,7 +41,7 @@ ChunkMap chunks;
|
||||||
|
int audio_rate = 22050;
|
||||||
|
int audio_channels = 2;
|
||||||
|
int audio_buffers = 1024; /* small enough buffer to get synchronized sound */
|
||||||
|
-Uint16 audio_format = AUDIO_S16; /* 16-bit stereo */
|
||||||
|
+Uint16 audio_format = AUDIO_S16SYS; /* 16-bit stereo */
|
||||||
|
int has_audio_available = 0;
|
||||||
|
|
||||||
|
void Sound::initialize( void )
|
37
srcpkgs/crack-attack/patches/crack-attack-1.1.14-audio.patch
Normal file
37
srcpkgs/crack-attack/patches/crack-attack-1.1.14-audio.patch
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
--- src/Music.h 2007-01-12 10:54:25.000000000 +0100
|
||||||
|
+++ src/Music.h 2007-01-12 10:54:25.000000000 +0100
|
||||||
|
@@ -34,10 +34,10 @@
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#define GC_MUSIC_FILENAME_LENGTH 128
|
||||||
|
-#define GC_MUSIC_PRELUDE_TRACK "prelude"
|
||||||
|
-#define GC_MUSIC_GAME_TRACK "game"
|
||||||
|
-#define GC_MUSIC_GAMEOVER_TRACK "gameover"
|
||||||
|
-#define GC_MUSIC_YOUWIN_TRACK "youwin"
|
||||||
|
+#define GC_MUSIC_PRELUDE_TRACK "prelude.xm"
|
||||||
|
+#define GC_MUSIC_GAME_TRACK "game.xm"
|
||||||
|
+#define GC_MUSIC_GAMEOVER_TRACK "gameover.xm"
|
||||||
|
+#define GC_MUSIC_YOUWIN_TRACK "youwin.xm"
|
||||||
|
|
||||||
|
class Music {
|
||||||
|
public:
|
||||||
|
--- src/Music.cxx 2007-01-12 11:23:15.000000000 +0100
|
||||||
|
+++ src/Music.cxx 2007-01-12 11:23:15.000000000 +0100
|
||||||
|
@@ -91,7 +91,7 @@
|
||||||
|
cout << "Playing " << music_filelist[current_track].c_str() << endl;
|
||||||
|
#endif
|
||||||
|
music = Mix_LoadMUS( music_filelist[current_track].c_str() );
|
||||||
|
- Mix_VolumeMusic( MIX_MAX_VOLUME / 4 );
|
||||||
|
+ Mix_VolumeMusic( (MIX_MAX_VOLUME * 8) / 10 );
|
||||||
|
Mix_PlayMusic( music , 0 );
|
||||||
|
Mix_HookMusicFinished(Music::finished);
|
||||||
|
keep_playing = 1;
|
||||||
|
@@ -126,7 +126,7 @@
|
||||||
|
cout << "Playing " << Track.c_str() << endl;
|
||||||
|
#endif
|
||||||
|
music = Mix_LoadMUS( Track.c_str() );
|
||||||
|
- Mix_VolumeMusic( MIX_MAX_VOLUME / 4 );
|
||||||
|
+ Mix_VolumeMusic( (MIX_MAX_VOLUME * 8) / 10 );
|
||||||
|
Mix_PlayMusic( music , 0 );
|
||||||
|
keep_playing = 0;
|
||||||
|
}
|
11
srcpkgs/crack-attack/patches/crack-attack-1.1.14-gcc43.patch
Normal file
11
srcpkgs/crack-attack/patches/crack-attack-1.1.14-gcc43.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
diff -up crack-attack-1.1.14/src/TextureLoader.h~ crack-attack-1.1.14/src/TextureLoader.h
|
||||||
|
--- src/TextureLoader.h 2008-01-04 23:07:02.000000000 +0100
|
||||||
|
+++ src/TextureLoader.h 2008-01-04 23:07:02.000000000 +0100
|
||||||
|
@@ -28,6 +28,7 @@
|
||||||
|
#define TEXTURELOADER_H
|
||||||
|
|
||||||
|
#include <GL/glut.h>
|
||||||
|
+#include <string.h>
|
||||||
|
|
||||||
|
#include "glext.h"
|
||||||
|
#include "sstream.h"
|
|
@ -0,0 +1,11 @@
|
||||||
|
diff -ur crack-attack-1.1.14.vanilla/src/Attack.cxx crack-attack-1.1.14/src/Attack.cxx
|
||||||
|
--- src/Attack.cxx 2005-05-13 21:00:02.000000000 +0200
|
||||||
|
+++ src/Attack.cxx 2006-05-04 09:56:04.000000000 +0200
|
||||||
|
@@ -83,6 +83,7 @@
|
||||||
|
int height = -1, width = -1;
|
||||||
|
|
||||||
|
player_name[0] = '\0';
|
||||||
|
+ glutInit(&argc, argv);
|
||||||
|
parseCommandLine(argc, argv, mode, port, host_name, player_name, height, width);
|
||||||
|
run_crack_attack(mode, port, host_name, player_name, height, width);
|
||||||
|
|
|
@ -1,44 +1,21 @@
|
||||||
# Template file for 'crack-attack'
|
# Template file for 'crack-attack'
|
||||||
pkgname=crack-attack
|
pkgname=crack-attack
|
||||||
version=1.1.14
|
version=1.1.14
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc=$pkgname-$version
|
|
||||||
create_wrksrc=yes
|
|
||||||
build_wrksrc=$wrksrc
|
|
||||||
#only_for_archs="i686 x86_64"
|
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--enable-sound=yes"
|
configure_args="--enable-sound=yes"
|
||||||
#make_build_args=""
|
hostmakedepends="pkg-config"
|
||||||
#make_install_args=""
|
makedepends="gtk+-devel SDL_mixer-devel libfreeglut-devel libXmu-devel libGL
|
||||||
#conf_files=""
|
atk-devel gdk-pixbuf-devel libstdc++-devel SDL-devel"
|
||||||
#make_dirs="/var/log/sa 0755 root root"
|
only_for_archs="x86_64"
|
||||||
hostmakedepends="pkg-config rpmextract
|
|
||||||
gtk+-devel SDL_mixer-devel libfreeglut-devel libXmu-devel"
|
|
||||||
makedepends=""
|
|
||||||
depends=""
|
|
||||||
short_desc="Tetris Attack clone"
|
short_desc="Tetris Attack clone"
|
||||||
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
|
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
|
||||||
license="GPL-2"
|
license="GPL-2"
|
||||||
homepage="http://www.nongnu.org/crack-attack/"
|
homepage="http://www.nongnu.org/crack-attack/"
|
||||||
distfiles="http://kojipkgs.fedoraproject.org/packages/${pkgname}/${version}/28.fc21/src/${pkgname}-${version}-28.fc21.src.rpm"
|
distfiles="http://download.savannah.gnu.org/releases/${pkgname}/${pkgname}-${version}.tar.gz"
|
||||||
checksum="6fb2ad5a1dcdc590fcbeb4d1925a7e55f1af27780a5550cded280475d2c08b1d"
|
checksum="75ca48e5cf7d49a301d0d6a4f61bf38c2d30308a1d4f7adacdab002c549253e9"
|
||||||
|
|
||||||
post_extract() {
|
|
||||||
tar xf crack-attack-1.1.14.tar.bz2
|
|
||||||
tar xf crack-attack-music.tar.gz
|
|
||||||
tar xf crack-attack-sounds.tar.gz
|
|
||||||
|
|
||||||
cd $build_wrksrc
|
|
||||||
cat ../*.patch | patch -p1
|
|
||||||
}
|
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vcopy ../music usr/share/${pkgname}
|
vinstall data/crack-attack.desktop 644 usr/share/applications
|
||||||
vcopy ../data/sounds usr/share/${pkgname}
|
vinstall data/crack-attack.xpm 644 usr/share/pixmaps
|
||||||
vlicense ../music-sound-copyright.txt
|
|
||||||
|
|
||||||
vmkdir usr/share/applications
|
|
||||||
mv $DESTDIR/usr/share/${pkgname}/${pkgname}.desktop $DESTDIR/usr/share/applications/
|
|
||||||
vmkdir usr/share/pixmaps
|
|
||||||
cp $DESTDIR/usr/share/${pkgname}/crack-attack.xpm $DESTDIR/usr/share/pixmaps
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue