]> git.draconx.ca Git - gentoo-draconx.git/blob - games-action/trine-bin/trine-bin-1.08_p4.ebuild
trine: Use bundled ffmpeg libs.
[gentoo-draconx.git] / games-action / trine-bin / trine-bin-1.08_p4.ebuild
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=3
6 inherit games eutils
7
8 DESCRIPTION="A physics-based action game where diff characters allow diff solutions to challenges"
9 HOMEPAGE="http://trine-thegame.com/"
10 SRC_URI="amd64? ( TrineUpdate4.64.run )"
11 #x86? ( TrineUpdate3.32.run )
12
13 LICENSE="frozenbyte-eula"
14 SLOT="0"
15 KEYWORDS="-* ~amd64 ~x86"
16 IUSE=""
17 RESTRICT="fetch strip"
18
19 DEPEND="app-arch/unzip"
20 RDEPEND=">=sys-libs/glibc-2.4
21         >=sys-devel/gcc-4.3.0
22         gnome-base/libglade
23         =media-libs/libsdl-1.2*
24         =media-libs/sdl-image-1.2*
25         =media-libs/sdl-ttf-2.0*
26         virtual/ffmpeg
27         media-libs/libogg
28         =media-libs/openal-1*
29         media-libs/libpng:1.2
30         media-libs/libvorbis
31         amd64? ( dev-libs/libx86 )"
32 #       x11-libs/libtxc_dxtn"
33
34 S=${WORKDIR}
35
36 d="${GAMES_PREFIX_OPT}/${PN}"
37 QA_PRESTRIPPED="${d#/}/trine-launcher ${d#/}/trine-bin ${d#/}/lib*/lib*.so*"
38 QA_TEXTRELS_x86="`echo ${d#/}/lib32/lib{avcodec.so.51,avformat.so.52,avutil.so.49,FLAC.so.8}`"
39
40 bits=$(use x86 && echo 32 || echo 64)
41
42 pkg_nofetch() {
43         einfo "Fetch ${SRC_URI} and put it into ${DISTDIR}"
44         einfo "See http://www.humblebundle.com/ for more info."
45 }
46
47 src_unpack() {
48         # manually run unzip as the initial seek causes it to exit(1)
49         unzip -q "${DISTDIR}/${A}"
50         rm lib*/lib{gcc_s,m,rt,selinux}.so.?
51
52         # remove bundled libraries
53         #rm "${S}/lib${bits}/libGLEW.so.1.5"
54         rm "${S}/lib${bits}/libstdc++.so.6"
55         rm "${S}/lib${bits}/libSDL-1.2.so.0"
56         rm "${S}/lib${bits}/libSDL_image-1.2.so.0"
57         rm "${S}/lib${bits}/libSDL_ttf-2.0.so.0"
58         #rm "${S}/lib${bits}/libavcodec.so.52"
59         #rm "${S}/lib${bits}/libavformat.so.52"
60         #rm "${S}/lib${bits}/libavutil.so.50"
61         #rm "${S}/lib${bits}/libswscale.so.0"
62         #rm "${S}/lib${bits}/libjpeg.so.62"
63         rm "${S}/lib${bits}/libogg.so.0"
64         rm "${S}/lib${bits}/libopenal.so.1"
65         rm "${S}/lib${bits}/libpng12.so.0"
66         rm "${S}/lib${bits}/libvorbis.so.0"
67         rm "${S}/lib${bits}/libvorbisfile.so.3"
68 }
69
70 src_install() {
71         local b bb
72
73         doicon Trine.xpm || die
74         for b in bin launcher ; do
75         bb="trine-${b}"
76         exeinto ${d}
77         newexe ${bb}${bits} ${bb} || die
78         games_make_wrapper ${bb} "./${bb}" "${d}" || die
79         make_desktop_entry ${bb} "Trine ${b}" Trine
80         done
81
82         exeinto ${d}/lib${bits}
83         doexe lib${bits}/* || die
84
85         insinto ${d}
86         doins -r binds config data dev profiles *.fbz *.glade trine-logo.png || die
87
88         dodoc Trine_Manual_linux.pdf Trine_updates.txt
89
90         prepgamesdirs
91 }