summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkrytzz <krytzz@soylent.eu>2011-03-22 14:38:56 +0100
committerkrytzz <krytzz@soylent.eu>2011-03-22 14:38:56 +0100
commite126736727cf2e8ff211061346a6a1c4fb6f9413 (patch)
tree540e358686ea5d87e2216d10889704e50efdbae7 /games-puzzle
parent[games-simulation/fgrun] fix fltk dep slot (diff)
downloadgamerlay-e126736727cf2e8ff211061346a6a1c4fb6f9413.tar.gz
gamerlay-e126736727cf2e8ff211061346a6a1c4fb6f9413.tar.bz2
gamerlay-e126736727cf2e8ff211061346a6a1c4fb6f9413.zip
[games-puzzle/caph] bump, thanks jasiu
Diffstat (limited to 'games-puzzle')
-rw-r--r--games-puzzle/caph/Manifest6
-rw-r--r--games-puzzle/caph/caph-1.1.ebuild38
-rw-r--r--games-puzzle/caph/caph-20091231.ebuild39
-rw-r--r--games-puzzle/caph/files/caph-linux.patch87
4 files changed, 128 insertions, 42 deletions
diff --git a/games-puzzle/caph/Manifest b/games-puzzle/caph/Manifest
index 0ff4579..163e3b7 100644
--- a/games-puzzle/caph/Manifest
+++ b/games-puzzle/caph/Manifest
@@ -1,4 +1,4 @@
-DIST caph-data-091231.tar.bz2 522727 RMD160 a33d771db18021e1e9aa80c86f918053907621c6 SHA1 a1d9340ec6554c9c3497ee1d868d4a2322f379af SHA256 75ebe2a45a825daeb68ed7bca29b9ba4afb29f11f766cdd4a2e512195325731b
-DIST caph-src-091231.tar.bz2 29093 RMD160 2d0c217dcaa61688bc45bfe979148266b56187fc SHA1 3647b3737358590a994897758a86bdb79f01d68b SHA256 36617e81d94406c424b0f629c7411d4c47ca1e6b147b9b3711ceb880aafd3492
-EBUILD caph-20091231.ebuild 1008 RMD160 4a8e041ade47eaef624c3e964af4198a043fbc3f SHA1 34c115d4ae1ed17a31735ade472f26aec58daefc SHA256 eea30edf91cd683755be36c0967684d542bdd273266519243732793e2a5953a4
+AUX caph-linux.patch 1602 RMD160 a7be42e14b667cd7ea724c6035dab4e860660705 SHA1 b0a0c5116959edaf44383b83eec2d9ccd1f1e6ea SHA256 f482fd95e3376447dbc085eea27a6a10ddcf22ac04aad464776d117c1dcfc2c1
+DIST caph-1.1.tar.bz2 685093 RMD160 be65d4209683e8182b8932211225850f3fc6e28a SHA1 ccfbcd3c49ba2f8ff4c3dc92af675757015541d9 SHA256 6415970e7d32aefc6da2740f931052be8741d3f6663910a36962400b7b9a7ae8
+EBUILD caph-1.1.ebuild 829 RMD160 1efba29c51fd135472966097b9351845591c3eb7 SHA1 ea91f6783c9260e1f8db1eee9a03a2e02081b8cf SHA256 8a4f2defade9ceb5800625a044df98113c30979f60934b09c131111160a09a56
MISC metadata.xml 248 RMD160 ee88d37caf1c3d23017cbb8f7c4e1ea2778ef0d6 SHA1 86a6b9bad810bc86f91fe2dfa2b0f0d0c812ea68 SHA256 3fd8a78020dbbcd51f57289f40a144d3dde762d883dc1f61e93b1a2b449ed6a4
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="2"
+
+inherit games
+
+DESCRIPTION="sandbox physics game"
+HOMEPAGE="http://sourceforge.net/projects/caphgame"
+SRC_URI="mirror://sourceforge/caphgame/caph/${PN}game-${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="media-libs/libpng
+ media-libs/libsdl"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-linux.patch"
+}
+
+src_compile() {
+ cd src \
+ && CFLAGS="$CFLAGS -I../include" LFLAGS="-lpng -lSDL" ./mkgen > caph.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/caph-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="2"
-
-inherit games
-
-DESCRIPTION="sandbox physics game"
-HOMEPAGE="http://sourceforge.net/projects/caphgame"
-SRC_URI="mirror://sourceforge/caphgame/${PN}-091231/${PN}-src-091231.tar.bz2
- mirror://sourceforge/caphgame/${PN}-091231/${PN}-data-091231.tar.bz2"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE=""
-
-DEPEND="media-libs/libpng
- media-libs/libsdl"
-RDEPEND="${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 || die "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
+
+ #define SYS_PRINT 1
+-#define SYS_DATA_DIR "../share/caph/"
++#define SYS_DATA_DIR "/usr/share/games/caph/"
+
+ #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 = 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 = dir;
+-
+- while (*p != '\0') ++p;
+- while (*p != '/') --p;
+- *++p = '\0';
+-
+- strcat(dir, SYS_DATA_DIR);
+- return dir;
+-#endif
++ static char dir[FILENAME_MAX];
++ return strcpy(dir, SYS_DATA_DIR);
+ }
+
+ static void
+@@ -79,38 +58,19 @@
+ #if defined(_WIN32)
+ SetCurrentDirectory(name);
+ #else
+- int ret;
+-
+- ret = chdir(name);
++ chdir(name);
+ #endif
+ }
+
+ 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 = getenv("HOME");
+-
+- if (home)
+- strcpy(dir, home);
+- else
+- return "";
+-
+- char *p = dir;
+-
+- while (*p != '\0') ++p;
+-
+- if (*(p - 1) != '/') {
+- *p++ = '/';
+- *p++ = '\0';
+- }
+-
++ strcpy(dir, getenv("HOME"));
++ strcat(dir, "/");
+ strcat(dir, HOME_CONFIG);
+ return dir;
+ #endif