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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Fri Apr 27 07:40:06 2007 UTC (6 years, 11 months ago) by mr_bones_
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
old
(Portage version: 2.1.2.2)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-roguelike/tome/tome-2.3.3.ebuild,v 1.5 2007/03/12 17:19:44 genone Exp $
4
5 inherit eutils flag-o-matic games
6
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 KEYWORDS="~amd64 ~ppc ~ppc-macos ~x86"
15 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 media-libs/libsdl )
24 gtk? ( !amd64? ( =x11-libs/gtk+-1.2* ) )"
25 DEPEND="${REDEPEND}
26 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 append-ldflags $(bindnow-flags)
81 cd src
82 make \
83 INCLUDES="${GENTOO_INCLUDES}" \
84 DEFINES="${GENTOO_DEFINES}" \
85 depend || die "make depend failed"
86 emake ./tolua || die "emake ./tolua failed"
87 emake \
88 COPTS="${CFLAGS}" \
89 INCLUDES="${GENTOO_INCLUDES}" \
90 DEFINES="${GENTOO_DEFINES}" \
91 LIBS="${GENTOO_LIBS}" \
92 BINDIR="${GAMES_BINDIR}" \
93 LIBDIR="${GAMES_DATADIR}/${PN}" \
94 || die "emake failed"
95 }
96
97 src_install() {
98 cd src
99 make \
100 DESTDIR="${D}" \
101 OWNER="${GAMES_USER}" \
102 BINDIR="${GAMES_BINDIR}" \
103 LIBDIR="${GAMES_DATADIR}/${PN}" install \
104 || die "make install failed"
105 cd "${S}"
106 dodoc *.txt
107
108 dodir "${GAMES_STATEDIR}"
109 touch "${D}/${GAMES_STATEDIR}/${PN}-scores.raw"
110 prepgamesdirs
111 fperms g+w "${GAMES_STATEDIR}/${PN}-scores.raw"
112 #FIXME: something has to be done about this.
113 fperms g+w "${GAMES_DATADIR}/${PN}/data"
114 }
115
116 pkg_postinst() {
117 games_pkg_postinst
118 echo
119 ewarn "ToME ${PV} is not save-game compatible with 2.3.0 and previous versions."
120 echo
121 elog "If you have older save files and you wish to continue those games,"
122 elog "you'll need to remerge the version of ToME with which you started"
123 elog "those save-games."
124 }

  ViewVC Help
Powered by ViewVC 1.1.20