summaryrefslogtreecommitdiff
path: root/games-puzzle/twindistress
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-puzzle/twindistress
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-puzzle/twindistress')
-rw-r--r--games-puzzle/twindistress/Manifest5
-rw-r--r--games-puzzle/twindistress/files/twindistress-1.1.0-ldflags.patch11
-rw-r--r--games-puzzle/twindistress/files/twindistress-1.1.0-warnings.patch61
-rw-r--r--games-puzzle/twindistress/metadata.xml11
-rw-r--r--games-puzzle/twindistress/twindistress-1.1.0.ebuild59
5 files changed, 147 insertions, 0 deletions
diff --git a/games-puzzle/twindistress/Manifest b/games-puzzle/twindistress/Manifest
new file mode 100644
index 000000000000..1eb8b6364ce8
--- /dev/null
+++ b/games-puzzle/twindistress/Manifest
@@ -0,0 +1,5 @@
+AUX twindistress-1.1.0-ldflags.patch 372 BLAKE2B 7966bd989fefdc13bf433f33ebcbada98723990d7779f6674a8ded1952ffcaf522b0c9df1795773f25e511fe22a8c9b33f31563cb0261e9a3eaaae040829d497 SHA512 5c19ffcfe2e9a451e95ac4d03da20cf54bf46ddc7bd369cc9e6c49a3215f8c39f50632d9e60167389859156c4df35ed7b813e1beb7a884c8ec0198f56a8d9f56
+AUX twindistress-1.1.0-warnings.patch 3342 BLAKE2B 3c96cb1a4f9c8073f493798ff653a7172294ceac58a283f08f12183cae498e3d2ef3f1bb091a7d18ade256d1ab7652baf4f3d9b743422382652292cf458c9566 SHA512 20bb973c6dea47436333f9449c7b924c38744e74b8eed6646062e4a48c74156cba8fd17150f5a4f8dc19de68ee1c394eee8aa0f2f867a72bddbbb32278e9c304
+DIST twind-1.1.0.tar.gz 2837845 BLAKE2B 2c5d0eff1fba42be02aeece2552f343ecfbba9e14484f78d3ef1acc08f313cb3bd9cfc7c4bc2033697bd3ae7792853d1c1206dc3b8e374215eb7d89365dae02b SHA512 f1b3be3e5706ce244dd291b6fba2160605593e51b60344521025daf882509e164aa5c201c8d696e56a64d6f3525d16ecd3fd78cc1b86f39f401d4137b615fe8f
+EBUILD twindistress-1.1.0.ebuild 1379 BLAKE2B 00dc5e4866c8dec94aad7a148819cfa9b4a3c2492afa3c533172cf897778fb012056c4f0c930022a882150135ebf1bc2c7b5da0df74edd58bcd5929b52d8ec06 SHA512 48ceef2f202934a39dd5920f5e20dd0db6b538a69173a07641a55e3102bdde4cf4ad0732344dec423efea875b650ff82f181d260da34def12d9798902dd1b215
+MISC metadata.xml 328 BLAKE2B c47ffd007164600a4f8e9ecabd1c8b29c65513a0fff46d5a4b2e2978ac8922263d3d10e6c5303e9a60e3645bb8ad030b561b1aaf5dfd5d69f4bb97998db024e7 SHA512 a7244b86047c6854bbec72296e625cc10aefa30a2e901dbc2f15083ab1532dc7b3e5fe91ae344fe8b4f0d1019b6f4c91def98cbeffb8fe4a044cc34cd9b03e38
diff --git a/games-puzzle/twindistress/files/twindistress-1.1.0-ldflags.patch b/games-puzzle/twindistress/files/twindistress-1.1.0-ldflags.patch
new file mode 100644
index 000000000000..0ac589d88368
--- /dev/null
+++ b/games-puzzle/twindistress/files/twindistress-1.1.0-ldflags.patch
@@ -0,0 +1,11 @@
+--- Makefile.old 2010-10-19 09:06:48.000000000 +0200
++++ Makefile 2010-10-19 09:06:59.000000000 +0200
+@@ -50,7 +50,7 @@
+ make twind MIXER_LIB= AUDIOFLAG=NOAUDIO
+
+ twind: twind.o
+- $(CC) twind.o $(LIBS) $(SDL_LIBS) $(MIXER_LIB) -o twind
++ $(CC) $(LDFLAGS) twind.o $(LIBS) $(SDL_LIBS) $(MIXER_LIB) -o twind
+
+ twind.o: twind.c
+ $(CC) $(CFLAGS) $(SDL_CFLAGS) -c twind.c
diff --git a/games-puzzle/twindistress/files/twindistress-1.1.0-warnings.patch b/games-puzzle/twindistress/files/twindistress-1.1.0-warnings.patch
new file mode 100644
index 000000000000..67ee19149ec8
--- /dev/null
+++ b/games-puzzle/twindistress/files/twindistress-1.1.0-warnings.patch
@@ -0,0 +1,61 @@
+diff -ru twind-1.1.0.orig/twind.c twind-1.1.0/twind.c
+--- twind-1.1.0.orig/twind.c 2004-07-15 21:44:50.000000000 -0400
++++ twind-1.1.0/twind.c 2010-10-19 03:32:44.372280497 -0400
+@@ -674,10 +674,10 @@
+ if (event.button.x >= MENULX && event.button.x < MENURX && event.button.y >= starty && event.button.y < (starty + height)) {
+ current_menu_high = (event.button.y - starty) / game.font[font].height;
+ /* re-assign current_menu_high if blank option */
+- if (menu_items[game.menu][current_menu_high] == "")
++ if (*menu_items[game.menu][current_menu_high] == '\0')
+ current_menu_high = game.last_menu_high;
+ if (game.last_menu_high != current_menu_high) {
+- if (menu_items[game.menu][current_menu_high] != "") {
++ if (*menu_items[game.menu][current_menu_high] != '\0') {
+ #ifndef NOAUDIO
+ if (game.audio_enabled) Mix_PlayChannel(MENU_OPTION, game.sound[MENU_OPTION], 0);
+ #endif
+@@ -697,7 +697,7 @@
+ if (event.button.x >= MENULX && event.button.x < MENURX && event.button.y >= starty && event.button.y < (starty + height)) {
+ current_menu_high = (event.button.y - starty) / game.font[font].height;
+ /* make sure the option isn't blank */
+- if (menu_items[game.menu][current_menu_high] != "") {
++ if (*menu_items[game.menu][current_menu_high] != '\0') {
+ #ifndef NOAUDIO
+ if (game.audio_enabled) Mix_PlayChannel(OPTION_CHOICE, game.sound[OPTION_CHOICE], 0);
+ #endif
+@@ -917,7 +917,7 @@
+ #endif
+ current_menu_high--;
+ /* if option blank, go to previous */
+- while (menu_items[game.menu][current_menu_high] == "")
++ while (*menu_items[game.menu][current_menu_high] == '\0')
+ current_menu_high--;
+ /* wrap around to the bottom entry */
+ if (current_menu_high == -1)
+@@ -930,7 +930,7 @@
+ #endif
+ current_menu_high++;
+ /* if option blank, go to next */
+- while (menu_items[game.menu][current_menu_high] == "")
++ while (*menu_items[game.menu][current_menu_high] == '\0')
+ current_menu_high++;
+ /* wrap around to the top entry */
+ if (current_menu_high == game.menu_item_cnt)
+@@ -1536,7 +1536,7 @@
+ if (level_time && game.stop_timer + game.added_time < game.best_time)
+ game.best_time = game.stop_timer + game.added_time;
+ /* subtract a set amount of time after level 11 */
+- if (game.current_level > 11)
++ if (game.current_level >= 11)
+ game.level_time -= 10;
+ else
+ game.level_time = times[level_time];
+@@ -1546,7 +1546,7 @@
+ break;
+ }
+ /* increase time for next level */
+- if (level_time != 12)
++ if (level_time != 10)
+ level_time++;
+ }
+ if (game.exit_game != NEW_GAME) {
diff --git a/games-puzzle/twindistress/metadata.xml b/games-puzzle/twindistress/metadata.xml
new file mode 100644
index 000000000000..b3a48cd60dea
--- /dev/null
+++ b/games-puzzle/twindistress/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">twind</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-puzzle/twindistress/twindistress-1.1.0.ebuild b/games-puzzle/twindistress/twindistress-1.1.0.ebuild
new file mode 100644
index 000000000000..cdc296985750
--- /dev/null
+++ b/games-puzzle/twindistress/twindistress-1.1.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils games
+
+MY_P="twind-${PV}"
+DESCRIPTION="Match and remove all of the blocks before time runs out"
+HOMEPAGE="http://twind.sourceforge.net/"
+SRC_URI="mirror://sourceforge/twind/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-libs/libsdl[video]
+ media-libs/sdl-mixer
+ media-libs/sdl-image[png]"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i \
+ -e '/^CC/d' \
+ -e "/^CFLAGS/s:-g:${CFLAGS}:" \
+ -e "/^DATA_PREFIX/s:/.*$:${GAMES_DATADIR}/${PN}/:" \
+ -e "/^HIGH_SCORE_PREFIX/s:/.*$:${GAMES_STATEDIR}/${PN}/:" \
+ Makefile || die "sed failed"
+ epatch \
+ "${FILESDIR}"/${P}-ldflags.patch \
+ "${FILESDIR}"/${P}-warnings.patch
+}
+
+src_install() {
+ dogamesbin twind
+
+ insinto "${GAMES_DATADIR}/${PN}"
+ doins -r graphics music sound
+
+ doicon graphics/twind.png
+ make_desktop_entry twind "Twin Distress"
+
+ dodoc AUTHORS ChangeLog CREDITS NEWS README TODO
+
+ dodir "${GAMES_STATEDIR}/${PN}"
+ touch "${D}/${GAMES_STATEDIR}/${PN}/twind.hscr"
+ fperms 660 "${GAMES_STATEDIR}/${PN}/twind.hscr"
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ if ! has_version "media-libs/sdl-mixer[vorbis]" ; then
+ ewarn "Music support will be disabled since sdl-mixer"
+ ewarn "wasn't built with USE=vorbis"
+ fi
+}