dev-qt/qttest: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / games-simulation / bcs-demo / bcs-demo-1.3-r1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit eutils unpacker
6
7 DESCRIPTION="design and build bridges and then stress test them with trains"
8 HOMEPAGE="http://www.chroniclogic.com/pontifex2.htm"
9 SRC_URI="ftp://ggdev-1.homelan.com/bcs/bcsdemo_v${PV/./_}.sh.bin
10         http://www.highprogrammer.com/alan/pfx2/openal-alan-hack-0.0.1.tar.gz"
11
12 LICENSE="BCS"
13 SLOT="0"
14 KEYWORDS="-* ~amd64 ~x86"
15 IUSE=""
16 RESTRICT="strip"
17
18 RDEPEND="
19         media-libs/libsdl[abi_x86_32(-)]
20         sys-libs/glibc
21         x11-libs/libX11[abi_x86_32(-)]
22         x11-libs/libXau[abi_x86_32(-)]
23         x11-libs/libXdmcp[abi_x86_32(-)]
24         x11-libs/libXext[abi_x86_32(-)]
25         virtual/opengl[abi_x86_32(-)]"
26
27 S=${WORKDIR}
28
29 dir=/opt/${PN}
30 Ddir=${D}/${dir}
31 QA_PREBUILT="${dir:1}/*"
32
33 src_unpack() {
34         unpack_makeself bcsdemo_v${PV/./_}.sh.bin
35         unpack openal-alan-hack-0.0.1.tar.gz
36 }
37
38 src_install() {
39         dodir "${dir}"
40
41         tar -zxf bcsdemo.tar.gz -C "${Ddir}" || die
42         rm -f "${Ddir}"/bcs-linux-openal-fixer.sh || die
43
44         exeinto "${dir}"
45 #       doexe bin/Linux/x86/rungame.sh
46 #       exeinto ${dir}/lib
47         mv "${Ddir}"/bcs "${Ddir}"/bcs-bin
48         newexe libopenal.so.0.0.6 libopenal.so.0
49         echo '#!/bin/bash' >> "${Ddir}"/bcs
50         echo 'LD_PRELOAD="./libopenal.so.0" ./bcs-bin' >> "${Ddir}"/bcs
51         fperms 755 "${dir}"/bcs
52         make_wrapper bcs-demo ./bcs "${dir}" "${dir}"
53
54         insinto "${dir}"
55         doins *.cfg
56         dodoc readme*
57 }