/[gentoo-x86]/games-roguelike/tome/tome-2.3.4.ebuild
Gentoo

Contents of /games-roguelike/tome/tome-2.3.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Fri Jul 31 13:51:20 2009 UTC (8 years, 11 months ago) by nyhm
Branch: MAIN
Changes since 1.4: +3 -3 lines
Fix typo in DEPEND, bug #279797
(Portage version: 2.2_rc33/cvs/Linux x86_64)

1 nyhm 1.5 # Copyright 1999-2009 Gentoo Foundation
2 nyhm 1.1 # Distributed under the terms of the GNU General Public License v2
3 nyhm 1.5 # $Header: /var/cvsroot/gentoo-x86/games-roguelike/tome/tome-2.3.4.ebuild,v 1.4 2008/01/14 20:35:11 grobian Exp $
4 nyhm 1.1
5 vapier 1.3 inherit eutils games
6 nyhm 1.1
7     MY_PV=${PV//./}
8     DESCRIPTION="save the world from Morgoth and battle evil (or become evil ;])"
9     HOMEPAGE="http://t-o-m-e.net/"
10     SRC_URI="http://t-o-m-e.net/dl/src/tome-${MY_PV}-src.tar.bz2"
11    
12     LICENSE="Moria"
13     SLOT="0"
14 grobian 1.4 KEYWORDS="~amd64 ~ppc ~x86"
15 nyhm 1.1 IUSE="X Xaw3d gtk sdl"
16    
17     RDEPEND=">=sys-libs/ncurses-5
18     X? ( x11-libs/libX11 )
19     Xaw3d? ( x11-libs/libXaw )
20     sdl? (
21     media-libs/sdl-ttf
22     media-libs/sdl-image
23 wolf31o2 1.2 media-libs/libsdl )
24 nyhm 1.1 gtk? ( !amd64? ( =x11-libs/gtk+-1.2* ) )"
25 nyhm 1.5 DEPEND="${RDEPEND}
26 nyhm 1.1 x11-misc/makedepend"
27    
28     S=${WORKDIR}/tome-${MY_PV}-src
29    
30     src_unpack() {
31     unpack ${A}
32     cd "${S}"
33     epatch "${FILESDIR}"/${P}-gcc41.patch
34     cd "src"
35     mv makefile.std makefile
36     epatch "${FILESDIR}/${PV}-gentoo-paths.patch"
37     sed -i \
38     -e "s:GENTOO_DIR:${GAMES_STATEDIR}:" files.c init2.c \
39     || die "sed failed"
40    
41     find "${S}" -name .cvsignore -exec rm -f \{\} \;
42     find "${S}/lib/edit" -type f -exec chmod a-x \{\} \;
43     }
44    
45     src_compile() {
46     local GENTOO_INCLUDES="" GENTOO_DEFINES="-DUSE_GCU " GENTOO_LIBS="-lncurses"
47     if use sdl || use X || use gtk || use Xaw3d; then
48     GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_EGO_GRAPHICS -DUSE_TRANSPARENCY \
49     -DSUPPORT_GAMMA"
50     fi
51     if use sdl || use X || use Xaw3d; then
52     GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_PRECISE_CMOVIE -DUSE_UNIXSOCK "
53     fi
54     if use sdl; then
55     GENTOO_INCLUDES="${GENTOO_INCLUDES} $(sdl-config --cflags)"
56     GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_SDL "
57     GENTOO_LIBS="${GENTOO_LIBS} $(sdl-config --libs) -lSDL_image -lSDL_ttf"
58     fi
59     if use X; then
60     GENTOO_INCLUDES="${GENTOO_INCLUDES} -I/usr/X11R6/include "
61     GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_X11 "
62     GENTOO_LIBS="${GENTOO_LIBS} -L/usr/X11R6/lib -lX11 "
63     fi
64     if use Xaw3d; then
65     GENTOO_INCLUDES="${GENTOO_INCLUDES} -I/usr/X11R6/include "
66     GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_XAW "
67     GENTOO_LIBS="${GENTOO_LIBS} -L/usr/X11R6/lib -lXaw -lXmu -lXt -lX11 "
68     fi
69     if use gtk; then
70     if use amd64; then
71     einfo "gtk support will not be built for amd64"
72     else
73     GENTOO_INCLUDES="${GENTOO_INCLUDES} $(gtk-config --cflags)"
74     GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_GTK "
75     GENTOO_LIBS="${GENTOO_LIBS} $(gtk-config --libs) "
76     fi
77     fi
78     GENTOO_INCLUDES="${GENTOO_INCLUDES} -Ilua -I."
79     GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_LUA"
80     cd src
81     make \
82     INCLUDES="${GENTOO_INCLUDES}" \
83     DEFINES="${GENTOO_DEFINES}" \
84     depend || die "make depend failed"
85     emake ./tolua || die "emake ./tolua failed"
86     emake \
87     COPTS="${CFLAGS}" \
88     INCLUDES="${GENTOO_INCLUDES}" \
89     DEFINES="${GENTOO_DEFINES}" \
90     LIBS="${GENTOO_LIBS}" \
91     BINDIR="${GAMES_BINDIR}" \
92     LIBDIR="${GAMES_DATADIR}/${PN}" \
93     || die "emake failed"
94     }
95    
96     src_install() {
97     cd src
98     make \
99     DESTDIR="${D}" \
100     OWNER="${GAMES_USER}" \
101     BINDIR="${GAMES_BINDIR}" \
102     LIBDIR="${GAMES_DATADIR}/${PN}" install \
103     || die "make install failed"
104     cd "${S}"
105     dodoc *.txt
106    
107     dodir "${GAMES_STATEDIR}"
108     touch "${D}/${GAMES_STATEDIR}/${PN}-scores.raw"
109     prepgamesdirs
110     fperms g+w "${GAMES_STATEDIR}/${PN}-scores.raw"
111     #FIXME: something has to be done about this.
112     fperms g+w "${GAMES_DATADIR}/${PN}/data"
113     }
114    
115     pkg_postinst() {
116     games_pkg_postinst
117     echo
118     ewarn "ToME ${PV} is not save-game compatible with 2.3.0 and previous versions."
119     echo
120     ewarn "If you have older save files and you wish to continue those games,"
121     ewarn "you'll need to remerge the version of ToME with which you started"
122     ewarn "those save-games."
123     }

  ViewVC Help
Powered by ViewVC 1.1.20