From 4cf73fb4d1b3f3c82417d6b861d1bc7b019ed1db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sun, 11 Oct 2015 17:59:17 +0200 Subject: [PATCH] New package: kobodeluxe-0.5.1 --- srcpkgs/kobodeluxe-data | 1 + srcpkgs/kobodeluxe/INSTALL | 7 + srcpkgs/kobodeluxe/REMOVE | 6 + .../kobodeluxe/patches/fix-const_strchr.patch | 11 ++ .../kobodeluxe/patches/fix-pipe12_name.patch | 156 ++++++++++++++++++ srcpkgs/kobodeluxe/template | 36 ++++ 6 files changed, 217 insertions(+) create mode 120000 srcpkgs/kobodeluxe-data create mode 100644 srcpkgs/kobodeluxe/INSTALL create mode 100644 srcpkgs/kobodeluxe/REMOVE create mode 100644 srcpkgs/kobodeluxe/patches/fix-const_strchr.patch create mode 100644 srcpkgs/kobodeluxe/patches/fix-pipe12_name.patch create mode 100644 srcpkgs/kobodeluxe/template diff --git a/srcpkgs/kobodeluxe-data b/srcpkgs/kobodeluxe-data new file mode 120000 index 0000000000..a6b8725b11 --- /dev/null +++ b/srcpkgs/kobodeluxe-data @@ -0,0 +1 @@ +kobodeluxe \ No newline at end of file diff --git a/srcpkgs/kobodeluxe/INSTALL b/srcpkgs/kobodeluxe/INSTALL new file mode 100644 index 0000000000..d9dd2ed35b --- /dev/null +++ b/srcpkgs/kobodeluxe/INSTALL @@ -0,0 +1,7 @@ +case "$ACTION" in + post) if [ "$UPDATE" != "yes" ]; then + mkdir -p /var/games/kobo-deluxe/scores + chmod 777 /var/games/kobo-deluxe/scores + fi + ;; +esac diff --git a/srcpkgs/kobodeluxe/REMOVE b/srcpkgs/kobodeluxe/REMOVE new file mode 100644 index 0000000000..20bc890bd5 --- /dev/null +++ b/srcpkgs/kobodeluxe/REMOVE @@ -0,0 +1,6 @@ +case "$ACTION" in + post) if [ "$UPDATE" != "yes" ]; then + rm -r /var/games/kobo-deluxe + fi + ;; +esac diff --git a/srcpkgs/kobodeluxe/patches/fix-const_strchr.patch b/srcpkgs/kobodeluxe/patches/fix-const_strchr.patch new file mode 100644 index 0000000000..b04e489320 --- /dev/null +++ b/srcpkgs/kobodeluxe/patches/fix-const_strchr.patch @@ -0,0 +1,11 @@ +--- graphics/window.cpp 2007-12-14 10:13:24.000000000 +0100 ++++ graphics/window.cpp 2015-10-11 17:14:24.004560636 +0200 +@@ -398,7 +398,7 @@ + */ + if(token) + { +- char *tok = strchr(txt, token); ++ const char *tok = strchr(txt, token); + if(tok) + tokpos = tok-txt; + else diff --git a/srcpkgs/kobodeluxe/patches/fix-pipe12_name.patch b/srcpkgs/kobodeluxe/patches/fix-pipe12_name.patch new file mode 100644 index 0000000000..009c741988 --- /dev/null +++ b/srcpkgs/kobodeluxe/patches/fix-pipe12_name.patch @@ -0,0 +1,156 @@ +The name pipe2 clashes with unistd.h function pipe2(3), +thus rename pipe1 and pipe2 to kpipe1 and kpipe2. + +--- enemies.h 2007-12-24 09:18:52.000000000 +0100 ++++ enemies.h 2015-10-11 17:20:42.882531076 +0200 +@@ -70,9 +70,9 @@ + extern const enemy_kind bomb2; + extern const enemy_kind bombdeto; + extern const enemy_kind cannon; +-extern const enemy_kind pipe1; ++extern const enemy_kind kpipe1; + extern const enemy_kind core; +-extern const enemy_kind pipe2; ++extern const enemy_kind kpipe2; + extern const enemy_kind rock; + extern const enemy_kind ring; + extern const enemy_kind enemy_m1; +@@ -157,11 +157,11 @@ + void move_core(); + void kill_core(); + +- void make_pipe1(); +- void move_pipe1(); ++ void make_kpipe1(); ++ void move_kpipe1(); + +- void make_pipe2(); +- void move_pipe2(); ++ void make_kpipe2(); ++ void move_kpipe2(); + + void make_enemy1(); + void move_enemy1(); +@@ -430,7 +430,7 @@ + + inline int _enemy::is_pipe() + { +- return ((_state != notuse) && ((ek == &pipe1) || (ek == &pipe2))); ++ return ((_state != notuse) && ((ek == &kpipe1) || (ek == &kpipe2))); + } + + +--- enemy.cpp 2007-12-24 11:36:46.000000000 +0100 ++++ enemy.cpp 2015-10-11 17:20:18.011533017 +0200 +@@ -713,7 +713,7 @@ + + void _enemy::kill_cannon() + { +- enemies.make(&pipe1, CS2PIXEL(x), CS2PIXEL(y)); ++ enemies.make(&kpipe1, CS2PIXEL(x), CS2PIXEL(y)); + sound.g_base_node_explo(x, y); + release(); + } +@@ -755,10 +755,10 @@ + + void _enemy::kill_core() + { +- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3); +- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7); +- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1); +- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5); ++ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3); ++ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7); ++ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1); ++ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5); + enemies.make(&explosion4, CS2PIXEL(x), CS2PIXEL(y)); + sound.g_base_core_explo(x, y); + release(); +@@ -777,10 +777,10 @@ + + /* + * =========================================================================== +- * pipe1 ++ * kpipe1 + * =========================================================================== + */ +-void _enemy::make_pipe1() ++void _enemy::make_kpipe1() + { + health = 1; + damage = 0; +@@ -790,7 +790,7 @@ + b = 0; + } + +-void _enemy::move_pipe1() ++void _enemy::move_kpipe1() + { + sound.g_pipe_rumble(x, y); + if((norm < ((VIEWLIMIT >> 1) + 32)) && (count == 1)) +@@ -851,10 +851,10 @@ + screen.set_map(x1, y1, m ^ a); + release(); + } +-const enemy_kind pipe1 = { ++const enemy_kind kpipe1 = { + 0, +- &_enemy::make_pipe1, +- &_enemy::move_pipe1, ++ &_enemy::make_kpipe1, ++ &_enemy::move_kpipe1, + &_enemy::kill_default, + -1, + -1, 0, +@@ -863,10 +863,10 @@ + + /* + * =========================================================================== +- * pipe2 ++ * kpipe2 + * =========================================================================== + */ +-void _enemy::make_pipe2() ++void _enemy::make_kpipe2() + { + int x1 = (CS2PIXEL(x) & (WORLD_SIZEX - 1)) >> 4; + int y1 = (CS2PIXEL(y) & (WORLD_SIZEY - 1)) >> 4; +@@ -898,7 +898,7 @@ + } + + +-void _enemy::move_pipe2() ++void _enemy::move_kpipe2() + { + if((norm < ((VIEWLIMIT >> 1) + 32)) && (count == 1)) + enemies.make(&explosion, +@@ -978,22 +978,22 @@ + } + p ^= a; + if(p & U_MASK) +- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1); ++ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1); + if(p & R_MASK) +- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3); ++ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3); + if(p & D_MASK) +- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5); ++ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5); + if(p & L_MASK) +- enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7); ++ enemies.make(&kpipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7); + manage.add_score(10); + release(); + } + + +-const enemy_kind pipe2 = { ++const enemy_kind kpipe2 = { + 0, +- &_enemy::make_pipe2, +- &_enemy::move_pipe2, ++ &_enemy::make_kpipe2, ++ &_enemy::move_kpipe2, + &_enemy::kill_default, + -1, + -1, 0, diff --git a/srcpkgs/kobodeluxe/template b/srcpkgs/kobodeluxe/template new file mode 100644 index 0000000000..5a71569597 --- /dev/null +++ b/srcpkgs/kobodeluxe/template @@ -0,0 +1,36 @@ +# Template file for 'kobodeluxe' +pkgname=kobodeluxe +version=0.5.1 +revision=1 +wrksrc="KoboDeluxe-${version}" +build_style=gnu-configure +configure_args="--sharedstatedir=/var/games" +hostmakedepends="pkg-config" +makedepends="SDL_image-devel" +depends="${pkgname}-data" +short_desc="Space shooter in 2D" +maintainer="Jürgen Buchmüller " +license="GPL-2" +homepage="http://olofson.net/kobodl/" +distfiles="${homepage}/download/KoboDeluxe-${version}.tar.bz2" +checksum=0f7b910a399d985437564af8c5d81d6dcf22b96b26b01488d72baa6a6fdb5c2c + +post_extract() { + tar xf icons.tar.gz +} +post_install() { + vinstall icons/KDE/kobo-deluxe.desktop 644 usr/share/applications kobodl.desktop + for _size in 16 22 32 48 64 128; do + vinstall icons/KDE/icons/${_size}x${_size}/kobodl.png 644 \ + usr/share/icons/hicolor/${_size}x${_size}/apps + done + vinstall icons/KDE/icons/32x32/kobodl.png 644 usr/share/pixmaps +} + +kobodeluxe-data_package() { + short_desc+=" - data files" + noarch=yes + pkg_install() { + vmove usr/share/kobo-deluxe + } +}