From d5f7727937bd1a468c5e6be5396a9d3186e1afea Mon Sep 17 00:00:00 2001 From: Michael Sterrett Date: Wed, 10 Sep 2008 17:29:32 +0000 Subject: initial commit. Heavily modified ebuild, originally submitted by Paul Bredbury via bug #168940 (Portage version: 2.1.4.4) --- games-strategy/defcon-demo/ChangeLog | 11 +++ games-strategy/defcon-demo/Manifest | 5 ++ games-strategy/defcon-demo/defcon-demo-1.42.ebuild | 80 ++++++++++++++++++++++ games-strategy/defcon-demo/files/defcon | 15 ++++ games-strategy/defcon-demo/metadata.xml | 8 +++ 5 files changed, 119 insertions(+) create mode 100644 games-strategy/defcon-demo/ChangeLog create mode 100644 games-strategy/defcon-demo/Manifest create mode 100644 games-strategy/defcon-demo/defcon-demo-1.42.ebuild create mode 100644 games-strategy/defcon-demo/files/defcon create mode 100644 games-strategy/defcon-demo/metadata.xml diff --git a/games-strategy/defcon-demo/ChangeLog b/games-strategy/defcon-demo/ChangeLog new file mode 100644 index 000000000000..20332a03dad4 --- /dev/null +++ b/games-strategy/defcon-demo/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for games-strategy/defcon-demo +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-strategy/defcon-demo/ChangeLog,v 1.1 2008/09/10 17:29:31 mr_bones_ Exp $ + +*defcon-demo-1.42 (10 Sep 2008) + + 10 Sep 2008; Michael Sterrett +files/defcon, + +metadata.xml, +defcon-demo-1.42.ebuild: + initial commit. Heavily modified ebuild, originally submitted by Paul + Bredbury via bug #168940 + diff --git a/games-strategy/defcon-demo/Manifest b/games-strategy/defcon-demo/Manifest new file mode 100644 index 000000000000..61bd944e6402 --- /dev/null +++ b/games-strategy/defcon-demo/Manifest @@ -0,0 +1,5 @@ +AUX defcon 400 RMD160 e8de936155647e0e1642f003d0be3d08abf587f0 SHA1 1da24de208675313a2fcb70a5d594e1de71b571e SHA256 132840e1a669b6e5fc31eb3ad67bc2e95f0b34970a25e1b9fae13578cdf933d1 +DIST defcon-v1.42.tar.gz 63093946 RMD160 0de1cd9daf80269c47a27387e326461ab6657cff SHA1 2385fbaff4c772ea7b9c6c4e125748112ba44cc4 SHA256 5973c32ef55d245b9adfbce33bb7c503d3f0ad7bf5deb55eba8754f9850cdf40 +EBUILD defcon-demo-1.42.ebuild 1754 RMD160 b52914faf1d8a51d842f1a4478cb08644c197d70 SHA1 c02ea83b9939e1bec4d1beb4277f4fa060a8628f SHA256 02a7785f715d4ba71d0bec06f652ee1b2068c26bf9c528ab48db176b7a48fde8 +MISC ChangeLog 374 RMD160 7728f61ba0d881ccf77d406dcc39919faec5a7c7 SHA1 846518a3f525856551f2d465ce6b5108b2488ffa SHA256 d7db71358f0d7792a1684aa0846ff2f41e3e8c05c0b927fa928694cde4c22914 +MISC metadata.xml 291 RMD160 574f63287adddb7ae033c53a3a29f2c1e37e1497 SHA1 dff5e35df378d220e5975ad0de8087a11d29cf42 SHA256 84b3534a5e435f20efd3845269de9e1f51c68bab6ca580d70314259e17b937bd diff --git a/games-strategy/defcon-demo/defcon-demo-1.42.ebuild b/games-strategy/defcon-demo/defcon-demo-1.42.ebuild new file mode 100644 index 000000000000..80aa6bef85c7 --- /dev/null +++ b/games-strategy/defcon-demo/defcon-demo-1.42.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-strategy/defcon-demo/defcon-demo-1.42.ebuild,v 1.1 2008/09/10 17:29:31 mr_bones_ Exp $ + +EAPI=1 +inherit eutils toolchain-funcs games + +MY_PN=defcon +MY_PV=${PV/_/-} +MY_P=defcon-v${MY_PV} + +DESCRIPTION="Global thermonuclear war simulation with multiplayer support" +HOMEPAGE="http://www.introversion.co.uk/defcon/" +SRC_URI="http://download.introversion.co.uk/defcon/linux/${MY_P}.tar.gz" + +LICENSE="defcon" +SLOT="0" +KEYWORDS="~x86" +IUSE="+system-libs" +RESTRICT="strip" + +# glibc discussion: +# http://forums.introversion.co.uk/defcon/viewtopic.php?t=4016 +RDEPEND=">=sys-libs/glibc-2.3 + system-libs? ( + media-libs/libogg + media-libs/libsdl + media-libs/libvorbis ) + x11-libs/libX11 + x11-libs/libXau + x11-libs/libXext + x11-libs/libXdmcp" +DEPEND="" + +S=${WORKDIR}/${MY_P} + +src_unpack() { + unpack ${A} + cd "${S}" + + # FindPath scripts are ugly and unnecessary + rm -f defcon doc/README-SDL.txt + if use system-libs ; then + rm -f lib/lib* + fi + sed \ + -e "s:GAMEDIR:${GAMES_PREFIX_OPT}/${PN}:g" \ + "${FILESDIR}"/defcon > "${T}"/defcon \ + || die "sed failed" + echo "int chdir(const char *d) { return 0; }" > chdir.c \ + || die "echo failed" +} + +src_compile() { + $(tc-getCC) -fPIC -shared -ldl -o lib/chdir.so chdir.c || die +} + +src_install() { + local dir=${GAMES_PREFIX_OPT}/${PN} + + insinto "${dir}/lib" + doins lib/*.dat || die + + exeinto "${dir}"/lib + doexe lib/*.{sh,x86,so} || die + + dodoc manual.pdf doc/*txt + doicon doc/defcon.ico + + # Can be upgraded to full version, so is not installed as "demo" + dogamesbin "${T}"/defcon || die "dogamesbin failed" + make_desktop_entry ${MY_PN} "Defcon" /usr/share/pixmaps/defcon.ico + + prepgamesdirs +} + +pkg_postinst() { + games_pkg_postinst + elog "Screenshots will appear in ~/.defcon/lib" +} diff --git a/games-strategy/defcon-demo/files/defcon b/games-strategy/defcon-demo/files/defcon new file mode 100644 index 000000000000..6e9dd3b5307c --- /dev/null +++ b/games-strategy/defcon-demo/files/defcon @@ -0,0 +1,15 @@ +#!/bin/sh +if [ -n "GAMEDIR/lib" ] ; then + if [ "${LD_LIBRARY_PATH+set}" = "set" ] ; then + export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:GAMEDIR/lib" + else + export LD_LIBRARY_PATH="GAMEDIR/lib" + fi +fi +if [[ ! -e ~/.defcon/lib ]] ; then + mkdir -p ~/.defcon/lib \ + && cd ~/.defcon/lib \ + && ln -s "GAMEDIR"/lib/* . +fi +cd ~/.defcon/lib +LD_PRELOAD="GAMEDIR/lib/chdir.so" exec ./defcon.bin.x86 "$@" diff --git a/games-strategy/defcon-demo/metadata.xml b/games-strategy/defcon-demo/metadata.xml new file mode 100644 index 000000000000..1de86a524780 --- /dev/null +++ b/games-strategy/defcon-demo/metadata.xml @@ -0,0 +1,8 @@ + + + +games + + Use system libraries instead of the ones included in the upstream distribution. + + -- cgit v1.2.3-65-gdbad