/[gentoo-x86]/games-board/freedoko/freedoko-0.7.10.ebuild
Gentoo

Contents of /games-board/freedoko/freedoko-0.7.10.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Mon Sep 24 08:45:18 2012 UTC (18 months, 4 weeks ago) by tupone
Branch: MAIN
Changes since 1.5: +5 -2 lines
Fix build with gcc-4.7 Bug #428574

(Portage version: 2.1.11.20/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-board/freedoko/freedoko-0.7.10.ebuild,v 1.5 2012/05/04 04:30:10 jdhore Exp $
4
5 EAPI=2
6 inherit eutils games
7
8 DESCRIPTION="FreeDoko is a Doppelkopf-game"
9 HOMEPAGE="http://free-doko.sourceforge.net"
10 SRC_URI="mirror://sourceforge/free-doko/FreeDoko_${PV}.src.zip
11 doc? ( mirror://sourceforge/free-doko/FreeDoko_${PV}.manual.zip )
12 backgrounds? ( mirror://sourceforge/free-doko/backgrounds.zip -> ${PN}-backgrounds.zip )
13 kdecards? ( mirror://sourceforge/free-doko/kdecarddecks.zip )
14 xskatcards? ( mirror://sourceforge/free-doko/xskat.zip )
15 pysolcards? ( mirror://sourceforge/free-doko/pysol.zip )
16 gnomecards? ( mirror://sourceforge/free-doko/gnome-games.zip )
17 openclipartcards? ( mirror://sourceforge/free-doko/openclipart.zip )
18 !xskatcards? (
19 !kdecards? (
20 !gnomecards? (
21 !openclipartcards? (
22 !pysolcards? (
23 mirror://sourceforge/free-doko/xskat.zip ) ) ) ) )"
24
25 LICENSE="GPL-2"
26 SLOT="0"
27 KEYWORDS="amd64 ppc x86"
28 IUSE="+xskatcards +gnomecards +kdecards +openclipartcards +pysolcards +backgrounds net doc"
29
30 RDEPEND="net? ( net-libs/gnet )
31 >=dev-cpp/gtkmm-2.4:2.4"
32 DEPEND="${RDEPEND}
33 app-arch/unzip
34 virtual/pkgconfig"
35
36 S=${WORKDIR}/FreeDoko_${PV}
37
38 src_unpack() {
39 local cards=0
40
41 unpack_cards() {
42 use $1 && { unpack $2 ; cards=$(( $cards + 1 )); };
43 }
44 unpack FreeDoko_${PV}.src.zip
45 use doc && unpack FreeDoko_${PV}.manual.zip
46 cp /dev/null "${S}"/src/Makefile.local
47
48 cd "${S}"/data/cardsets
49
50 unpack_cards xskatcards xskat.zip
51 unpack_cards kdecards kdecarddecks.zip
52 unpack_cards pysolcards pysol.zip
53 unpack_cards gnomecards gnome-games.zip
54 unpack_cards openclipartcards openclipart.zip
55 [ $cards ] || unpack xskat.zip # fall back to xskat
56
57 if use backgrounds ; then
58 cd "${S}"/data/backgrounds
59 unpack ${PN}-backgrounds.zip
60 fi
61 }
62
63 PATCHES=(
64 "${FILESDIR}"/${P}-gentoo.patch
65 "${FILESDIR}"/${P}-gcc47.patch
66 )
67
68 src_compile() {
69 export CPPFLAGS="-DPUBLIC_DATA_DIRECTORY_VALUE='\"${GAMES_DATADIR}/${PN}\"'"
70 export CPPFLAGS+=" -DMANUAL_DIRECTORY_VALUE='\"/usr/share/doc/${PF}/html\"'"
71 export OSTYPE=Linux
72 export USE_NETWORK=$(use net && echo true || echo false)
73 export USE_SOUND_ALUT=false # still marked experimental
74 emake Version || die
75 emake -C src FreeDoko || die
76 }
77
78 src_install() {
79 newgamesbin src/FreeDoko freedoko || die
80 insinto "${GAMES_DATADIR}"/${PN}/
81 doins -r data/{ai,cardsets,backgrounds,rules,sounds,translations,*png} || die
82 find "${D}${GAMES_DATADIR}"/${PN} -name Makefile -delete
83 dodoc AUTHORS README ChangeLog
84 use doc && dohtml -r doc/manual/
85 newicon src/FreeDoko.png ${PN}.png
86 make_desktop_entry ${PN} FreeDoko
87 prepgamesdirs
88 }

  ViewVC Help
Powered by ViewVC 1.1.20