From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- games-arcade/tuxdash/Manifest | 8 ++ .../files/tuxdash-0.8-fix-build-system.patch | 11 +++ .../tuxdash/files/tuxdash-0.8-fix-c++14.patch | 101 +++++++++++++++++++++ .../tuxdash/files/tuxdash-0.8-fix-paths.patch | 45 +++++++++ games-arcade/tuxdash/metadata.xml | 8 ++ games-arcade/tuxdash/tuxdash-0.8-r1.ebuild | 47 ++++++++++ 6 files changed, 220 insertions(+) create mode 100644 games-arcade/tuxdash/Manifest create mode 100644 games-arcade/tuxdash/files/tuxdash-0.8-fix-build-system.patch create mode 100644 games-arcade/tuxdash/files/tuxdash-0.8-fix-c++14.patch create mode 100644 games-arcade/tuxdash/files/tuxdash-0.8-fix-paths.patch create mode 100644 games-arcade/tuxdash/metadata.xml create mode 100644 games-arcade/tuxdash/tuxdash-0.8-r1.ebuild (limited to 'games-arcade/tuxdash') diff --git a/games-arcade/tuxdash/Manifest b/games-arcade/tuxdash/Manifest new file mode 100644 index 000000000000..71c2bed5d5b0 --- /dev/null +++ b/games-arcade/tuxdash/Manifest @@ -0,0 +1,8 @@ +AUX tuxdash-0.8-fix-build-system.patch 575 SHA256 a98eeed5f3ca9b9aa9d0fc86fbbc8f7d6aeaeb25ed2cbb3d1f2b66ce53211761 SHA512 bda193ee657973c26bccdd2f2caa8414be454e0e6b016673aad07dce23be300d79103bdbac40ee2aeb0a0dd1ae875f9d0b1b36b20aa4af2b40052b464574dd73 WHIRLPOOL 868a3c870715f344beafb0ae90905fd4340975e88404f3d8b03b8c860218693cdbc80a336ff9a26d628c38fd7207aefe62d138cce3431b17f9762a189dc1cf0e +AUX tuxdash-0.8-fix-c++14.patch 4251 SHA256 150a30e713d7c8951bc5bbf4ebcd23a6187ee0c4ff8ef3f781bb5e23fb43b284 SHA512 5314fe0be54a2232ce10d5c518bc30913303aad3d7d5af94a7e3e24661545c3a5ef50eedd2db4ab0cac1021a78064c362b3ef6731703ffb7e5020bfb4787c725 WHIRLPOOL 2577428df03bc1bc75fd0cfcec77365ba3e5ce18fa06171a7aed2b1630466cd2fbd8d3f980ad8fbdc93dbfd2127fc669514c8767d11e5b01292339790ed1b000 +AUX tuxdash-0.8-fix-paths.patch 1671 SHA256 969b528f8da22041527fc537414be5879c0470ed95bb73bf266023ed7ed05910 SHA512 ff896b3ea57f95e9298a8640a8c2eb31049ab83a7cca1ecf40f73d9e7a1b1ee386f9f41d6a5af0b004015b2c97fa8ef0ed4eb11cc109c5efcd53b55fe0094d93 WHIRLPOOL fb5109b80982702e7ca8630deabe025960b9d412c1aa940cbfab988024a6e14b5e794ba52ecdfca5b234c53b4fd6ec091ba826acf88fa8bece60bb18685468a7 +DIST tuxdash_src_0.8.tar.bz2 447560 SHA256 6d29dbd5fba3c72e86d2ab2c036b24577d4eee1761467ac13924a43f2bcdbc02 SHA512 5c42b89ce3121025801d78d35962a2aa3d10e4443f6c929e7df4b45673e6285f37ed353877aa33eaa0edf584f7a428a8f485301ba1476865a498ab699ee81f86 WHIRLPOOL 1351f99690710124691a0ce1bc29c61bc29a78e07e7204c8c04de1775c73888aeb44b764471eb2b396ae305f45bbb6ca490c59afc7ed646c39f6fb3d4a08ba0b +EBUILD tuxdash-0.8-r1.ebuild 843 SHA256 ff7a933d5d8588660c9678e4a859e49752335ce373d635de7856ba8f35afd147 SHA512 952e4b167a03bb10118ccbc97c8b05d89aee92f7f6a7e24182b92cb4fad66b2b97d6b096220c3aca27072f3fa6331006548d1b8669b80041f52ae411cf87bdbc WHIRLPOOL b45e38762f3e3e0b4549eb9fb264372578fce7833b6feb01c5e6aa039633aac42c345e677d694c03039310d800d0dbb0abbd75d7fc3b4d3f31b230c249dfdac8 +MISC ChangeLog 2461 SHA256 010181d65b75c574e73092a670015b83d80f32e7c31ffb8a24a7fa46c64653d4 SHA512 fa41b73dacb05467475711289ec5ca2034b5f40674c7366efcda392d373974bcfc82abf328a0745ca4aacc6c70ef80cdb77d7e590762c3f8d1ba5031cb77c3db WHIRLPOOL aa4fc3f5acc9e5bf86e738f5c6c46383870609c73d5be633aad54d667d627795be65be89de7ce6869966597908d282939d3b4ebd3e040e7ae69a5c416421c483 +MISC ChangeLog-2015 1215 SHA256 5a17b1e44fea8a530d04ad9b95ab123b49bc15c64af22fd47654955dcc9577d3 SHA512 bd59b33d639a99b436ee36c2ce6404c3d2f1760c63bbcf33a21d670906fc2c359ac9180b0d96e0b15c7fad13b621335d6eed178339b80c409622e468015a9c65 WHIRLPOOL fdc2f7b6380c52041bba4f323d35fba86db235357d77df0490db917b4fb11cc3711cdcf4a6f80abf0886b102ec8a758d6d3392ba5ed63abcca588296d02ee898 +MISC metadata.xml 249 SHA256 943b9ce0cd072229b43569ab668dd7ec741d9dfefd942c8921dabd4490b27b0c SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 WHIRLPOOL b10e21575c78e201a652c8582cd16e3f7c86b13dd20a30f4cea44066fb139440b3c186147dbaae83478f11a20b6f457a99c8b29ee1239a4caaa21eee01250088 diff --git a/games-arcade/tuxdash/files/tuxdash-0.8-fix-build-system.patch b/games-arcade/tuxdash/files/tuxdash-0.8-fix-build-system.patch new file mode 100644 index 000000000000..9f861d98e8cc --- /dev/null +++ b/games-arcade/tuxdash/files/tuxdash-0.8-fix-build-system.patch @@ -0,0 +1,11 @@ +Fix build system to honour all user variables. + +--- a/src/Makefile ++++ b/src/Makefile +@@ -1,4 +1,4 @@ + all: +- g++ main.cpp -Wall `/usr/bin/sdl-config --libs --cflags` -lSDL_ttf -o ../TuxDash ++ $(CXX) main.cpp $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) `/usr/bin/sdl-config --libs --cflags` -lSDL_ttf -o ../tuxdash + static: +- g++ -static main.cpp -Wall `/usr/bin/sdl-config --cflags --static-libs` -lSDL_ttf -lfreetype -lz -o ../TuxDash ++ $(CXX) -static main.cpp $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) `/usr/bin/sdl-config --cflags --static-libs` -lSDL_ttf -lfreetype -lz -o ../tuxdash diff --git a/games-arcade/tuxdash/files/tuxdash-0.8-fix-c++14.patch b/games-arcade/tuxdash/files/tuxdash-0.8-fix-c++14.patch new file mode 100644 index 000000000000..b37f456f559b --- /dev/null +++ b/games-arcade/tuxdash/files/tuxdash-0.8-fix-c++14.patch @@ -0,0 +1,101 @@ +Modernise C++ to avoid errors in C++14 mode. +See also: https://bugs.gentoo.org/show_bug.cgi?id=600084 + +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -66,7 +66,7 @@ + + void writeconfig(const map& game_map) { + ofstream config((ostring)TuxHomeDirectory + "/config"); // open config file +- if(config == NULL) { // error check ++ if(!config) { // error check + cout << "Warning: Couldn't write to file " << (ostring)TuxHomeDirectory + "/config" << endl; + return; + } +@@ -124,7 +124,7 @@ + + void readconfig(class map& game_map) { + ifstream config((ostring)TuxHomeDirectory + "/config"); // open config file +- if(config==0) { // error check ++ if(!config) { // error check + cout << "Warning: Couldn't find configuration file " << (ostring)TuxHomeDirectory + "/config" << ". Using default values." << endl; + return; + } +--- a/src/map.cpp ++++ b/src/map.cpp +@@ -346,13 +346,13 @@ + cout << "-- copy map --" << endl; // print status message + ifstream in_file(path); // open source file + +- if(in_file == 0) { // error checking ++ if(!in_file) { // error checking + cout << "Couldn't open sourcefile \"" << filename << "\"" << endl; + cout << endl << "-- error in copymap --" << endl; + return 1; + } + +- if(out_file == 0) { // error checking ++ if(!out_file) { // error checking + cout << "Couldn't open target file \"" << temp_path << "\" for writing " << endl; + cout << endl << "-- error in copymap --" << endl; + return 1; +@@ -390,7 +390,7 @@ + path = mapfolder; + path += filename; + file.open(path); // open file +- if(file == NULL) { ++ if(!file) { + cout << "map::savemap : error while saving map to file '" << path << "'" << endl; + return 1; + } +@@ -402,7 +402,7 @@ + path = savefolder; + path += filename; + file.open(path); // open file +- if(file == NULL) { ++ if(!file) { + cout << "map::savemap : error while saving game to file '" << path << "'" << endl; + return 1; + } +--- a/src/menu.cpp ++++ b/src/menu.cpp +@@ -119,7 +119,7 @@ + + // add a selection box + +-class element* menu_mgm::add_box(int x, int y, const ostring& text, const ostring& value, bool selectable, int size, int xgroup, int ygroup, int max, int width, int height, unsigned char r, unsigned char g, unsigned char b, int value_type, bool dependency, char* depend) { ++class element* menu_mgm::add_box(int x, int y, const ostring& text, const ostring& value, bool selectable, int size, int xgroup, int ygroup, int max, int width, int height, unsigned char r, unsigned char g, unsigned char b, int value_type, bool dependency, const char* depend) { + class element& newone = add(); + newone.value = value; + newone.posx = x; +--- a/src/menu.h ++++ b/src/menu.h +@@ -56,7 +56,7 @@ + void check_custom_parameters(); // check if parameters are okay + ostring keytoa(SDLKey); // cast SDLKey to ASCII + class element* add_text(int, int, const ostring&, bool, int, int =-1, int =-1, unsigned char =0, unsigned char =0, unsigned char = 0, int = -1, int = -1); // add a text element +- class element* add_box(int, int, const ostring&, const ostring&, bool, int, int, int, int, int, int, unsigned char, unsigned char, unsigned char, int = 0, bool =false, char* =0); // add a box element ++ class element* add_box(int, int, const ostring&, const ostring&, bool, int, int, int, int, int, int, unsigned char, unsigned char, unsigned char, int = 0, bool =false, const char* =0); // add a box element + class element* add_select(int, int, const ostring&, const ostring&, bool, int, int, int, const char* oneoftwo=0); // add a select element + void draw_window(); // draw the current menu screen with all elements + void selection_mgm(char); // process user input for menu navigation +--- a/src/surface.cpp ++++ b/src/surface.cpp +@@ -92,7 +92,7 @@ + else file_tmp = file; + + TTF_Font *font = TTF_OpenFont(file_tmp, size); +- SDL_Color color = {r, g, b, 0}; ++ SDL_Color color = {(Uint8)r, (Uint8)g, (Uint8)b, 0}; + + area = TTF_RenderText_Solid(font, text, color); + +@@ -118,7 +118,7 @@ + SDL_Surface* text_surface; + SDL_Rect temp; + TTF_Font *font_tmp = TTF_OpenFont(font, size); +- SDL_Color farbe = {r, g, b, 0}; ++ SDL_Color farbe = {(Uint8)r, (Uint8)g, (Uint8)b, 0}; + text_surface = TTF_RenderText_Solid(font_tmp, text, farbe); + TTF_CloseFont(font_tmp); + temp = pos; diff --git a/games-arcade/tuxdash/files/tuxdash-0.8-fix-paths.patch b/games-arcade/tuxdash/files/tuxdash-0.8-fix-paths.patch new file mode 100644 index 000000000000..72cde9d411f8 --- /dev/null +++ b/games-arcade/tuxdash/files/tuxdash-0.8-fix-paths.patch @@ -0,0 +1,45 @@ +Change paths for Gentoo's filesystem layout. + +--- a/config ++++ b/config +@@ -1,11 +1,11 @@ + # Fullscreen enable/disable +-Fullscreen = 0 ++Fullscreen = 1 + # Width of screen in blocks + screenX = 21 + # Height of screen in blocks + screenY = 16 + # Theme Folder - path to a valid theme +-theme = themes/original/ ++theme = /usr/share/tuxdash/themes/original/ + # Distance in X direction, before scrolling starts + scrolldistX = 3 + # Distance in Y direction, before scrolling starts +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -340,9 +340,7 @@ + + // set tuxdash's config / working directory + char* HomeDirectory; +- char* CurrentDirectory; + HomeDirectory = getenv("HOME"); // get users home directory +- CurrentDirectory = getenv("PWD"); // get TuxDash's working directory + TuxHomeDirectory = new char[strlen(HomeDirectory)+strlen("/.tuxdash")+1]; // align space for the string containing the path to tuxdash's config directory + strcpy(TuxHomeDirectory, HomeDirectory); + strcat(TuxHomeDirectory, "/.tuxdash"); +@@ -355,12 +353,12 @@ + } + else { + mkdir((ostring)TuxHomeDirectory + "/themes", 0711); // create the themes folder. The default themes are not copied there, but the folder is created for possible additional themes added by the player +- chdir(CurrentDirectory); ++ chdir("/usr/share/tuxdash"); + system((ostring)"cp -r maps savegames config " + TuxHomeDirectory); + } + } + cout << endl << " Using " << TuxHomeDirectory << " for configuration, map and savegame files" << endl; +- chdir(CurrentDirectory); ++ chdir("/usr/share/tuxdash"); + // finished with check of working directory + + int running=1, start, stop, framestart = time(0), frames=0, frame_count = 0; diff --git a/games-arcade/tuxdash/metadata.xml b/games-arcade/tuxdash/metadata.xml new file mode 100644 index 000000000000..78274e0fa550 --- /dev/null +++ b/games-arcade/tuxdash/metadata.xml @@ -0,0 +1,8 @@ + + + + + games@gentoo.org + Gentoo Games Project + + diff --git a/games-arcade/tuxdash/tuxdash-0.8-r1.ebuild b/games-arcade/tuxdash/tuxdash-0.8-r1.ebuild new file mode 100644 index 000000000000..07b0d8695885 --- /dev/null +++ b/games-arcade/tuxdash/tuxdash-0.8-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="A simple BoulderDash clone" +HOMEPAGE="http://www.tuxdash.de/index.php?language=EN" +SRC_URI="http://www.tuxdash.de/ressources/downloads/${PN}_src_${PV}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86 ~x86-fbsd" +IUSE="" + +RDEPEND=" + media-libs/libsdl[video] + media-libs/sdl-ttf" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-0.8-fix-build-system.patch + "${FILESDIR}"/${PN}-0.8-fix-c++14.patch + "${FILESDIR}"/${PN}-0.8-fix-paths.patch +) + +src_prepare() { + default + rm -f GPL TuxDash || die +} + +src_configure() { + tc-export CXX +} + +src_compile() { + emake -C src +} + +src_install() { + dobin tuxdash + einstalldocs + + insinto /usr/share/${PN} + doins -r themes maps fonts savegames config +} -- cgit v1.2.3