diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /games-puzzle/tong | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'games-puzzle/tong')
-rw-r--r-- | games-puzzle/tong/Manifest | 1 | ||||
-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 | 5 | ||||
-rw-r--r-- | games-puzzle/tong/tong-1.2.ebuild | 45 |
6 files changed, 145 insertions, 0 deletions
diff --git a/games-puzzle/tong/Manifest b/games-puzzle/tong/Manifest new file mode 100644 index 000000000000..eec3aa47209e --- /dev/null +++ b/games-puzzle/tong/Manifest @@ -0,0 +1 @@ +DIST tong-1.2.tar.gz 88028070 SHA256 7514bf0c1c1a9a8d6985d0fbe83486b83f665d9a202beed2ae91e3f45e90942b SHA512 0544f489141bba37985f1ef3c316208e3e6dacdea8f8b79f37997a9489ff5c1710fd1426e02489f8adb33bf9a1511bb9a0250122fa2054ef4a6ef203c8881261 WHIRLPOOL 107d3009c2e70e78ef81781b388e329f3c45aac8e09470e5c362b3d8b152ad7b6a2d119490a2e2bc29899bb4a8ab36f9d9e86245c46257c260c6b2f65769ab16 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..d3c2cc926f0b --- /dev/null +++ b/games-puzzle/tong/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>games</herd> +</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..f320cbc63ec5 --- /dev/null +++ b/games-puzzle/tong/tong-1.2.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 ~ppc 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 +} |