diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /games-puzzle/tong |
reinit the tree, so we can have metadata
Diffstat (limited to 'games-puzzle/tong')
-rw-r--r-- | games-puzzle/tong/Manifest | 8 | ||||
-rw-r--r-- | games-puzzle/tong/files/tong-1.2-datadir.patch | 41 | ||||
-rw-r--r-- | games-puzzle/tong/files/tong-1.2-fps.patch | 25 | ||||
-rw-r--r-- | games-puzzle/tong/files/tong-1.2-makefile.patch | 28 | ||||
-rw-r--r-- | games-puzzle/tong/metadata.xml | 8 | ||||
-rw-r--r-- | games-puzzle/tong/tong-1.2.ebuild | 44 |
6 files changed, 154 insertions, 0 deletions
diff --git a/games-puzzle/tong/Manifest b/games-puzzle/tong/Manifest new file mode 100644 index 000000000000..bfb4be9e8b8b --- /dev/null +++ b/games-puzzle/tong/Manifest @@ -0,0 +1,8 @@ +AUX tong-1.2-datadir.patch 1105 SHA256 2948094ac5ad181594ae80e66c459fc5c860c66e7e9f54d3bb7fd1c8807851d6 SHA512 68b59062fb9c5c12eb2af7a1f4cdc47cff0ef1a656323b8fe28175931984c4336e5a763b5f6df32120311d4f84bc084341e455a29f19941d6a27b076e1213c6d WHIRLPOOL 2669a7ec474ac3aaeba2cf217244f96e9edb6271a1283646978fa507847ae2007311f59a04cee8421a692cfb9ac83ad4f0d932d6cf72ee3d080684fc07ddfcf5 +AUX tong-1.2-fps.patch 553 SHA256 a5ee4809b73f965275dd1dd8ae7ed96fc1e7bd9dfb19f86b8be1d0a271657eb0 SHA512 789be3f3742d12166e58717dec9890f9051a86ae6aca072046c6874397f6cbb0d604fc4127228ac258dceab2425777207777167e6ec3c28baa0b39324f931692 WHIRLPOOL cb94826525fdea39e40863d18a599fe88889b34cb35b364c57441d771663b8bc7c23681a5b14abbf0804e449d281ac031e9c74db94a80a15504dfbe07725e4cf +AUX tong-1.2-makefile.patch 897 SHA256 5b358ac7c923e32cca6ed7b8541fd267b866827ff869dd61b3210b6c6b1234ea SHA512 c342f686a57def0f07dd51aa7c180108624463db5ef1defc4ac4636df74a9b754dccf5c39615f0cf2a30caf77fd20b07a8d89d337a8e19cf148ae47d44fb0731 WHIRLPOOL 7acab9df0da31ae5715fcaa783f437b98a27844e12f48a5c311550cfc0d6ee3726ae49ed5fa559712bf0db38af8bc88ca1789b296d928b6a30e8c08345351d1c +DIST tong-1.2.tar.gz 88028070 SHA256 7514bf0c1c1a9a8d6985d0fbe83486b83f665d9a202beed2ae91e3f45e90942b SHA512 0544f489141bba37985f1ef3c316208e3e6dacdea8f8b79f37997a9489ff5c1710fd1426e02489f8adb33bf9a1511bb9a0250122fa2054ef4a6ef203c8881261 WHIRLPOOL 107d3009c2e70e78ef81781b388e329f3c45aac8e09470e5c362b3d8b152ad7b6a2d119490a2e2bc29899bb4a8ab36f9d9e86245c46257c260c6b2f65769ab16 +EBUILD tong-1.2.ebuild 1041 SHA256 2036d02ee219c9432f311e2deef4235e0d6e0b164a436f7909316a0cdb2a2559 SHA512 1579c5b1f8c0da548fe50f3ee46846b888e2e13239776b0ac27984db7681aaaf12d415524f958ff10d790eddf9b8adf23e65e2d13caf4517f6ad80413993a937 WHIRLPOOL d6a2b3d8154dd45ae2e6e706efba857edd60532339899837cb126748423729240c18cde77482b917b844143cdf21a010de117a6052dc0142ef922b084c203e82 +MISC ChangeLog 2510 SHA256 6ec5d392f7040623d99fa71e3a97370ea08dbdc2ccfd4c4a7a13b1e5878085b5 SHA512 6b145482a2a7fbb78a463a34d1be7f4afb5ea81601d5c4be6e3c27392a13b8575835eec1e0169f5fbc6289b16e30e4be17282c032af26e54c3e5451627ca36ea WHIRLPOOL fc22c31e5b90d29a40bb131332d304f4f0e973e1f5f28124f2e8f8ad8807000add55ce0b35525902458acdbdc988bc066d417a035aa7525d2332f7f4cf75007c +MISC ChangeLog-2015 2004 SHA256 357ca53f619007e19fa63e9f66e720ad0c5f8f8125434d94da50dbd8c563835b SHA512 e60558c5b71bf643a7b7331973f99a714f052ebf3aa001557f865d3c4771a94d9808935df97f6b2c0ca81c98622f7fa9575a19a4ad82d42dbdbb7ca712126a19 WHIRLPOOL 89160d9b5a83c52044cf500d9802b0007b4a801cf4ca2b92f16ddb1240b457526821197417756256a8805fea1b554ac693810e60dd21a30ba2f987a4b66d4dfc +MISC metadata.xml 249 SHA256 943b9ce0cd072229b43569ab668dd7ec741d9dfefd942c8921dabd4490b27b0c SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 WHIRLPOOL b10e21575c78e201a652c8582cd16e3f7c86b13dd20a30f4cea44066fb139440b3c186147dbaae83478f11a20b6f457a99c8b29ee1239a4caaa21eee01250088 diff --git a/games-puzzle/tong/files/tong-1.2-datadir.patch b/games-puzzle/tong/files/tong-1.2-datadir.patch new file mode 100644 index 000000000000..d0279ac3b874 --- /dev/null +++ b/games-puzzle/tong/files/tong-1.2-datadir.patch @@ -0,0 +1,41 @@ +--- tong.cpp.orig ++++ tong.cpp +@@ -202,7 +202,6 @@ + Tetrad *tetrad, *nexttetrad; + Paddle *paddle; + Ball *ball; +- char datadir[256]; + input_t input; + int volume = MIX_MAX_VOLUME; + +@@ -210,7 +209,6 @@ + volume = 24; + #endif + memset(&input, 0, sizeof(input_t)); +- strcpy(datadir, GAME_DATA_DIR); + if(argc>1) { + if(!strcmp(argv[1], "-v") || !strcmp(argv[1], "--version")) { + printf("%s\n", GAME_ID); +@@ -219,10 +217,6 @@ + "warranty; not even for MERCHANTABILITY or" + " FITNESS FOR A PARTICULAR PURPOSE.\n"); + return 0; +- } else if(!strncmp(argv[1], "-p=", 3)) { +- strcpy(datadir, argv[1]+(3*sizeof(char))); +- } else if(!strncmp(argv[1], "--path=", 7)) { +- strcpy(datadir, argv[1]+(7*sizeof(char))); + } else { + printf("Usage: %s [OPTION]\n", argv[0]); + printf("Play TONG, a Free Software game (Tetris meets Pong)\n"); +@@ -237,11 +231,6 @@ + #ifdef WII + fatInitDefault(); + #endif +- if (chdir(datadir)) { +- printf("Could not chdir to %s (attempting to use current dir)\n", +- datadir); +- } +- + if(SDL_Init(SDL_INIT_AUDIO + |SDL_INIT_VIDEO + |SDL_INIT_TIMER diff --git a/games-puzzle/tong/files/tong-1.2-fps.patch b/games-puzzle/tong/files/tong-1.2-fps.patch new file mode 100644 index 000000000000..8ce66ebf1d31 --- /dev/null +++ b/games-puzzle/tong/files/tong-1.2-fps.patch @@ -0,0 +1,25 @@ +--- tong.cpp.orig ++++ tong.cpp +@@ -64,6 +64,8 @@ + + #define DEMO_TIME 8000 + ++#define MIN_TIME 45 ++ + #define GP2X_BUTTON_UP 0 + #define GP2X_BUTTON_UPLEFT 1 + #define GP2X_BUTTON_LEFT 2 +@@ -1854,6 +1856,13 @@ + SDL_Flip(screen); + lastlastupdate=lastupdate; + lastupdate=SDL_GetTicks(); ++ ++ // limit to 1000/MIN_TIME fps ++ if (lastupdate-lastlastupdate < MIN_TIME) { ++ SDL_Delay(MIN_TIME - (lastupdate - lastlastupdate)); ++ } ++ lastupdate = SDL_GetTicks(); ++ + } //main game loop + + Mix_FreeMusic(music); diff --git a/games-puzzle/tong/files/tong-1.2-makefile.patch b/games-puzzle/tong/files/tong-1.2-makefile.patch new file mode 100644 index 000000000000..68b4547d9427 --- /dev/null +++ b/games-puzzle/tong/files/tong-1.2-makefile.patch @@ -0,0 +1,28 @@ +--- Makefile.orig ++++ Makefile +@@ -1,11 +1,10 @@ + # TONG! makefile, tweak as you see fit + +-SDL_CFLAGS := $(shell sdl-config --cflags) ++CXXFLAGS += $(shell sdl-config --cflags) + SDL_LDFLAGS := $(shell sdl-config --libs) + MIXER_FLAGS := -lSDL_mixer -lpthread + IMG_FLAGS := -lSDL_image + GAME_DATA_DIR := . +-CC = g++ -O3 -Wall #-ggdb3 + SOURCES = tetris.cpp pong.cpp text.cpp option.cpp media.cpp + # these sources need to be linked to SDL libs, so may have special flag settings + SDL_SOURCES = tong.cpp +@@ -29,11 +28,7 @@ + + # builds all, builds the target + all: $(OBJS) +- $(CC) $(SDL_LDFLAGS) $(MIXER_FLAGS) $(IMG_FLAGS) $(OBJS) -o $(TARGET) +-%.o: %.cpp +- $(CC) $(SDL_CFLAGS) -c -o $@ $< +-tong.o: $(SDL_SOURCES) +- $(CC) -DGAME_DATA_DIR=\"$(GAME_DATA_DIR)\" $(SDL_CFLAGS) -c -o $@ $< ++ $(CXX) $(LDFLAGS) $(OBJS) $(SDL_LDFLAGS) $(MIXER_FLAGS) $(IMG_FLAGS) -o $(TARGET) + + # clean out the mess + clean: diff --git a/games-puzzle/tong/metadata.xml b/games-puzzle/tong/metadata.xml new file mode 100644 index 000000000000..78274e0fa550 --- /dev/null +++ b/games-puzzle/tong/metadata.xml @@ -0,0 +1,8 @@ +<?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> +</pkgmetadata> diff --git a/games-puzzle/tong/tong-1.2.ebuild b/games-puzzle/tong/tong-1.2.ebuild new file mode 100644 index 000000000000..9df9c40eef39 --- /dev/null +++ b/games-puzzle/tong/tong-1.2.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils games + +DESCRIPTION="Tetris and Pong in the same place at the same time" +HOMEPAGE="http://www.nongnu.org/tong/" +SRC_URI="http://www.nongnu.org/tong/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="media-libs/libsdl[sound,joystick,video] + media-libs/sdl-image[png] + media-libs/sdl-mixer[vorbis]" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${PN} + +src_prepare() { + epatch \ + "${FILESDIR}/${P}-makefile.patch" \ + "${FILESDIR}/${P}-fps.patch" \ + "${FILESDIR}/${P}-datadir.patch" + sed -i \ + -e "s:\"media/:\"${GAMES_DATADIR}/${PN}/media/:" \ + media.cpp option.cpp option.h pong.cpp tetris.cpp text.cpp \ + || die + cp media/icon.png "${T}/${PN}.png" || die +} + +src_install() { + dogamesbin tong + dodir "${GAMES_DATADIR}/${PN}" + cp -r media/ "${D}/${GAMES_DATADIR}/${PN}" || die + dodoc CHANGELOG README making-of.txt CREDITS + + make_desktop_entry tong TONG + doicon "${T}/${PN}.png" + prepgamesdirs +} |