From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q21oK-0000kG-Ts for garchives@archives.gentoo.org; Tue, 22 Mar 2011 13:39:49 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7416F1C028; Tue, 22 Mar 2011 13:39:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2E2A11C028 for ; Tue, 22 Mar 2011 13:39:39 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EC7B61B4054 for ; Tue, 22 Mar 2011 13:39:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 57F788006A for ; Tue, 22 Mar 2011 13:39:38 +0000 (UTC) From: "Steffen Stramm" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Steffen Stramm" Message-ID: Subject: [gentoo-commits] proj/gamerlay:master commit in: games-puzzle/caph/, games-puzzle/caph/files/ X-VCS-Repository: proj/gamerlay X-VCS-Files: games-puzzle/caph/caph-1.1.ebuild games-puzzle/caph/caph-20091231.ebuild games-puzzle/caph/files/caph-linux.patch X-VCS-Directories: games-puzzle/caph/ games-puzzle/caph/files/ X-VCS-Committer: krytzz X-VCS-Committer-Name: Steffen Stramm X-VCS-Revision: e126736727cf2e8ff211061346a6a1c4fb6f9413 Date: Tue, 22 Mar 2011 13:39:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 445389dc41ae1857210546b3a9d5e24e commit: e126736727cf2e8ff211061346a6a1c4fb6f9413 Author: krytzz soylent eu> AuthorDate: Tue Mar 22 13:38:56 2011 +0000 Commit: Steffen Stramm soylent eu> CommitDate: Tue Mar 22 13:38:56 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gamerlay.git;= a=3Dcommit;h=3De1267367 [games-puzzle/caph] bump, thanks jasiu --- games-puzzle/caph/caph-1.1.ebuild | 38 +++++++++++++ games-puzzle/caph/caph-20091231.ebuild | 39 ------------- games-puzzle/caph/files/caph-linux.patch | 87 ++++++++++++++++++++++++= ++++++ 3 files changed, 125 insertions(+), 39 deletions(-) diff --git a/games-puzzle/caph/caph-1.1.ebuild b/games-puzzle/caph/caph-1= .1.ebuild new file mode 100644 index 0000000..f2278fa --- /dev/null +++ b/games-puzzle/caph/caph-1.1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3D"2" + +inherit games + +DESCRIPTION=3D"sandbox physics game" +HOMEPAGE=3D"http://sourceforge.net/projects/caphgame" +SRC_URI=3D"mirror://sourceforge/caphgame/caph/${PN}game-${PV}/${P}.tar.b= z2" + +LICENSE=3D"GPL-3" +SLOT=3D"0" +KEYWORDS=3D"~amd64 ~x86" + +DEPEND=3D"media-libs/libpng + media-libs/libsdl" +RDEPEND=3D"${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}/${PN}-linux.patch" +} + +src_compile() { + cd src \ + && CFLAGS=3D"$CFLAGS -I../include" LFLAGS=3D"-lpng -lSDL" ./mkgen > cap= h.mk \ + && ./build \ + || die "build failed" +} + +src_install() { + dogamesbin "bin/caph" || die "dogamesbin failed" + insinto "${GAMES_DATADIR}" + doins -r "share/${PN}" || die "doins failed" + dodoc "doc/${PN}/README" || die "dodoc failed" + prepgamesdirs +} diff --git a/games-puzzle/caph/caph-20091231.ebuild b/games-puzzle/caph/c= aph-20091231.ebuild deleted file mode 100644 index df4ba92..0000000 --- a/games-puzzle/caph/caph-20091231.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=3D"2" - -inherit games - -DESCRIPTION=3D"sandbox physics game" -HOMEPAGE=3D"http://sourceforge.net/projects/caphgame" -SRC_URI=3D"mirror://sourceforge/caphgame/${PN}-091231/${PN}-src-091231.t= ar.bz2 - mirror://sourceforge/caphgame/${PN}-091231/${PN}-data-091231.tar.bz2" - -LICENSE=3D"GPL-3" -SLOT=3D"0" -KEYWORDS=3D"~amd64" -IUSE=3D"" - -DEPEND=3D"media-libs/libpng - media-libs/libsdl" -RDEPEND=3D"${DEPEND}" - -src_prepare() { - sed -i "s:../share/${PN}:${GAMES_DATADIR}/${PN}:" ${PN}-src/src/${PN}.c= || die "sed failed" - sed -i "s:return dir;:return SYS_DATA_DIR;:" ${PN}-src/src/${PN}.c || d= ie "sed failed" -} - -src_compile() { - cd "${PN}-src/src" - ./build || die "build failed" -} - -src_install() { - dogamesbin "caph-src/bin/caph" || die "dogamesbin failed" - insinto "${GAMES_DATADIR}" - doins -r "${PN}-data/share/${PN}" || die "install failed" - dodoc "${PN}-src/doc/${PN}/README" || die "dodoc failed" - prepgamesdirs -} diff --git a/games-puzzle/caph/files/caph-linux.patch b/games-puzzle/caph= /files/caph-linux.patch new file mode 100644 index 0000000..f83ba69 --- /dev/null +++ b/games-puzzle/caph/files/caph-linux.patch @@ -0,0 +1,87 @@ +--- caph-1.1/src/caph.c.orig 2010-10-25 17:40:24.000000000 +0200 ++++ caph-1.1/src/caph.c 2011-03-19 00:26:07.127666043 +0100 +@@ -37,7 +37,7 @@ + #endif +=20 + #define SYS_PRINT 1 +-#define SYS_DATA_DIR "../share/caph/" ++#define SYS_DATA_DIR "/usr/share/games/caph/" +=20 + #define DATA_CONFIG "caph.conf" + #define HOME_CONFIG ".caph.conf" +@@ -48,29 +48,8 @@ + static const char * + sys_get_data_dir() + { +- static char dir[256]; +- +-#if defined(_WIN32) +- strcpy(dir, SYS_DATA_DIR); +- return dir; +-#else +- int ret =3D readlink("/proc/self/exe", dir, sizeof(dir)); +- if (ret < 0) { +- fprintf(stderr, "%s:%i [ERROR] readlink failed: %s \n", +- __FILE__, __LINE__, strerror(ret)); +- strcpy(dir, SYS_DATA_DIR); +- return dir; +- } +- +- char *p =3D dir; +- +- while (*p !=3D '\0') ++p; +- while (*p !=3D '/') --p; +- *++p =3D '\0'; +- +- strcat(dir, SYS_DATA_DIR); +- return dir; +-#endif ++ static char dir[FILENAME_MAX]; ++ return strcpy(dir, SYS_DATA_DIR); + } +=20 + static void +@@ -79,38 +58,19 @@ + #if defined(_WIN32) + SetCurrentDirectory(name); + #else +- int ret; +- +- ret =3D chdir(name); ++ chdir(name); + #endif + } +=20 + static const char * + sys_get_config() + { +- static char dir[256]; +- const char *home; +- ++ static char dir[FILENAME_MAX]; + #if defined(_WIN32) +- strcpy(dir, DATA_CONFIG); +- return dir; ++ return strcpy(dir, DATA_CONFIG); + #else +- home =3D getenv("HOME"); +- +- if (home) +- strcpy(dir, home); +- else +- return ""; +- +- char *p =3D dir; +- +- while (*p !=3D '\0') ++p; +- +- if (*(p - 1) !=3D '/') { +- *p++ =3D '/'; +- *p++ =3D '\0'; +- } +- ++ strcpy(dir, getenv("HOME")); ++ strcat(dir, "/"); + strcat(dir, HOME_CONFIG); + return dir; + #endif