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/concentration | |
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/concentration')
-rw-r--r-- | games-puzzle/concentration/Manifest | 1 | ||||
-rw-r--r-- | games-puzzle/concentration/concentration-1.2-r1.ebuild | 32 | ||||
-rw-r--r-- | games-puzzle/concentration/files/concentration-1.2-gentoo.patch | 155 | ||||
-rw-r--r-- | games-puzzle/concentration/metadata.xml | 5 |
4 files changed, 193 insertions, 0 deletions
diff --git a/games-puzzle/concentration/Manifest b/games-puzzle/concentration/Manifest new file mode 100644 index 000000000000..ac0bc78dddc5 --- /dev/null +++ b/games-puzzle/concentration/Manifest @@ -0,0 +1 @@ +DIST concentration-1.2.tar.gz 1044563 SHA256 f247fa694c03bc0a2be91bf85fed8c0f44447d0e7216b2d22259713453596ce8 SHA512 afa9007cfaaa9a1cedcbfc490cb63d93d8ed1e91230ee714cece481ed3a39b73c82ec4cda65b29a27e9e71a7d2215be7f476e3217b487af54716eb4d692ca005 WHIRLPOOL 469e38d5b485ddd2938acc66f57a4b259828d2e5baf13827b45b1c11dbfaaa36cc4a2f1b5e8e7d17088246469cfffa461296b650730e6e3b71d55195b808e1bf diff --git a/games-puzzle/concentration/concentration-1.2-r1.ebuild b/games-puzzle/concentration/concentration-1.2-r1.ebuild new file mode 100644 index 000000000000..902176460f0c --- /dev/null +++ b/games-puzzle/concentration/concentration-1.2-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils games + +DESCRIPTION="The classic memory game with some new life" +HOMEPAGE="https://packages.gentoo.org/package/games-puzzle/concentration" +SRC_URI="mirror://gentoo/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="" + +DEPEND="media-libs/libsdl[sound,video] + media-libs/sdl-mixer[vorbis] + media-libs/sdl-image[jpeg,png] + media-libs/sdl-ttf" +RDEPEND=${DEPEND} + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch +} + +src_install() { + default + newicon pics/set1/19.png ${PN}.png + make_desktop_entry ${PN} Concentration + prepgamesdirs +} diff --git a/games-puzzle/concentration/files/concentration-1.2-gentoo.patch b/games-puzzle/concentration/files/concentration-1.2-gentoo.patch new file mode 100644 index 000000000000..759d068b5bae --- /dev/null +++ b/games-puzzle/concentration/files/concentration-1.2-gentoo.patch @@ -0,0 +1,155 @@ +diff -ru concentration-1.2.orig/src/ShiftyEngine.c concentration-1.2/src/ShiftyEngine.c +--- concentration-1.2.orig/src/ShiftyEngine.c 2004-09-20 21:08:59.000000000 -0400 ++++ concentration-1.2/src/ShiftyEngine.c 2010-05-18 13:39:22.717713130 -0400 +@@ -61,13 +61,13 @@ + int len = strlen(name); + assert(name); + +- gameName = (char *)malloc((sizeof(char) * len) + 1); ++ gameName = malloc(len + 1); + if(!gameName) { + fprintf(stderr, "Out Of Memory."); + exit(1); + } + +- strncpy(gameName, name, len); ++ snprintf(gameName, len + 1, "%s", name); + } + + /***************************************************** +@@ -87,13 +87,13 @@ + int len = strlen(name); + assert(name); + +- backgroundName = (char *)malloc((sizeof(char) * len) + 1); ++ backgroundName = malloc(len + 1); + if(!backgroundName) { + fprintf(stderr, "Out Of Memory."); + exit(1); + } + +- strncpy(backgroundName, name, len); ++ snprintf(backgroundName, len + 1, "%s", name); + } + + /***************************************************** +@@ -175,7 +175,7 @@ + exit(1); + } + +- strncpy(t->name, name, 16); ++ snprintf(t->name, 16, "%s", name); + t->x = x; + t->y = y; + t->w = w; +diff -ru concentration-1.2.orig/src/concentration.c concentration-1.2/src/concentration.c +--- concentration-1.2.orig/src/concentration.c 2005-11-09 11:05:02.000000000 -0500 ++++ concentration-1.2/src/concentration.c 2010-05-18 13:42:19.688474410 -0400 +@@ -202,7 +202,7 @@ + + /***************************************************** + ****************************************************/ +-inline void drawText(char * str, SDL_Color color, int x, int y, TTF_Font * font) ++void drawText(char * str, SDL_Color color, int x, int y, TTF_Font * font) + { + static SDL_Rect dest; + +@@ -814,7 +814,7 @@ + SE_Error("A blit failed."); + SDL_FreeSurface(text); + +- sprintf(str, "%d seconds", myclock); ++ snprintf(str, sizeof(str), "%d seconds", myclock); + text = TTF_RenderText_Blended(smallFont, str, black); + if(!text) + SE_Error("A render failed."); +@@ -831,7 +831,7 @@ + SE_Error("A blit failed."); + SDL_FreeSurface(text); + +- sprintf(str, "%d trys", hits + misses); ++ snprintf(str, sizeof(str), "%d trys", hits + misses); + text = TTF_RenderText_Blended(smallFont, str, black); + if(!text) + SE_Error("A render failed."); +@@ -840,7 +840,7 @@ + SE_Error("A blit failed."); + SDL_FreeSurface(text); + +- sprintf(str, "Total pairs: %d", (size == 2) ? 2 : (size == 4) ? 8 : 36); ++ snprintf(str, sizeof(str), "Total pairs: %d", (size == 2) ? 2 : (size == 4) ? 8 : 36); + text = TTF_RenderText_Blended(smallFont, str, black); + if(!text) + SE_Error("A render failed."); +@@ -1327,7 +1327,7 @@ + { + int x, makeFullScreen = 0; + +- char name[16]; ++ char name[64]; + + SE_SetName("Concentration 1.2"); + SE_SetBackground("pics/background.png"); +@@ -1395,13 +1395,13 @@ + + /* load icon set 1 */ + for(x = 1; x <= 30; x++) { +- sprintf(name, "pics/set1/%d.png", x); ++ snprintf(name, sizeof(name), "pics/set1/%d.png", x); + icons[x] = loadPNG(name); + +- sprintf(name, "pics/set2/%d.png", x); ++ snprintf(name, sizeof(name), "pics/set2/%d.png", x); + icons2[x] = loadPNG(name); + +- sprintf(name, "pics/set3/%d.png", x); ++ snprintf(name, sizeof(name), "pics/set3/%d.png", x); + icons3[x] = loadPNG(name); + } + +diff -ru concentration-1.2.orig/src/gfx.c concentration-1.2/src/gfx.c +--- concentration-1.2.orig/src/gfx.c 2004-09-20 21:08:59.000000000 -0400 ++++ concentration-1.2/src/gfx.c 2010-05-18 13:39:22.718722669 -0400 +@@ -39,8 +39,7 @@ + exit(1); + } + +- strcpy(newname, sg_data_path); +- strcat(newname, name); ++ snprintf(newname, len1 + len2 + 1, "%s%s", sg_data_path, name); + + temp = IMG_Load(newname); + if (temp == NULL) { +@@ -67,8 +66,7 @@ + exit(1); + } + +- strcpy(newname, sg_data_path); +- strcat(newname, name); ++ snprintf(newname, len1 + len2 + 1, "%s%s", sg_data_path, name); + + temp = IMG_Load(newname); + if (temp == NULL) { +@@ -99,8 +97,7 @@ + exit(1); + } + +- strcpy(newname, sg_data_path); +- strcat(newname, name); ++ snprintf(newname, len1 + len2 + 1, "%s%s", sg_data_path, name); + + temp = TTF_OpenFont(newname, size); + if (temp == NULL) { +diff -ru concentration-1.2.orig/src/sound.c concentration-1.2/src/sound.c +--- concentration-1.2.orig/src/sound.c 2004-09-20 21:08:59.000000000 -0400 ++++ concentration-1.2/src/sound.c 2010-05-18 13:39:22.718722669 -0400 +@@ -57,8 +57,7 @@ + fprintf(stderr, "Out of memory!\n"); + exit(1); + } +- strcpy(newname, sg_data_path); +- strcat(newname, name); ++ snprintf(newname, len1 + len2 + 1, "%s%s", sg_data_path, name); + + temp = Mix_LoadWAV(newname); + if(!temp) diff --git a/games-puzzle/concentration/metadata.xml b/games-puzzle/concentration/metadata.xml new file mode 100644 index 000000000000..d3c2cc926f0b --- /dev/null +++ b/games-puzzle/concentration/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> |