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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Sat Feb 7 13:30:43 2015 UTC (5 years, 5 months ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +3 -3 lines
Stable for amd64, wrt bug #539134

(Portage version: 2.2.14/cvs/Linux x86_64, RepoMan options: --include-arches="amd64", signed Manifest commit with key 7194459F)

1 # Copyright 1999-2015 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.5.ebuild,v 1.9 2014/11/22 04:20:18 mr_bones_ Exp $
4
5 EAPI=5
6 inherit eutils games
7
8 MY_PV=${PV//./}
9 DESCRIPTION="save the world from Morgoth and battle evil (or become evil ;])"
10 HOMEPAGE="http://t-o-m-e.net/"
11 SRC_URI="http://t-o-m-e.net/dl/src/tome-${MY_PV}-src.tar.bz2"
12
13 LICENSE="Moria"
14 SLOT="0"
15 KEYWORDS="amd64 ppc x86"
16 IUSE="X Xaw3d gtk sdl"
17
18 RDEPEND=">=sys-libs/ncurses-5
19 X? ( x11-libs/libX11 )
20 Xaw3d? ( x11-libs/libXaw )
21 sdl? (
22 media-libs/sdl-ttf
23 media-libs/sdl-image
24 media-libs/libsdl )
25 gtk? ( >=x11-libs/gtk+-2.12.8:2 ) "
26 DEPEND="${RDEPEND}
27 virtual/pkgconfig
28 x11-misc/makedepend"
29
30 S=${WORKDIR}/tome-${MY_PV}-src/src
31
32 src_prepare() {
33 mv makefile.std makefile
34 epatch "${FILESDIR}/${PV}-gentoo-paths.patch" \
35 "${FILESDIR}"/${P}-noX.patch
36 sed -i -e '/^CC =/d' makefile || die
37 sed -i -e "s:xx:x:" ../lib/edit/p_info.txt || die
38 sed -i -e "s:GENTOO_DIR:${GAMES_STATEDIR}:" files.c init2.c || die
39
40 find .. -name .cvsignore -exec rm -f \{\} +
41 find ../lib/edit -type f -exec chmod a-x \{\} +
42 }
43
44 src_compile() {
45 local GENTOO_INCLUDES="" GENTOO_DEFINES="-DUSE_GCU " GENTOO_LIBS="$(pkg-config ncurses --libs)"
46 if use sdl || use X || use gtk || use Xaw3d; then
47 GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_EGO_GRAPHICS -DUSE_TRANSPARENCY \
48 -DSUPPORT_GAMMA"
49 fi
50 if use sdl || use X || use Xaw3d; then
51 GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_PRECISE_CMOVIE -DUSE_UNIXSOCK "
52 fi
53 if use sdl; then
54 GENTOO_INCLUDES="${GENTOO_INCLUDES} $(sdl-config --cflags)"
55 GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_SDL "
56 GENTOO_LIBS="${GENTOO_LIBS} $(sdl-config --libs) -lSDL_image -lSDL_ttf"
57 fi
58 if use X; then
59 GENTOO_INCLUDES="${GENTOO_INCLUDES} -I/usr/X11R6/include "
60 GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_X11 "
61 GENTOO_LIBS="${GENTOO_LIBS} -L/usr/X11R6/lib -lX11 "
62 fi
63 if use Xaw3d; then
64 GENTOO_INCLUDES="${GENTOO_INCLUDES} -I/usr/X11R6/include "
65 GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_XAW "
66 GENTOO_LIBS="${GENTOO_LIBS} -L/usr/X11R6/lib -lXaw -lXmu -lXt -lX11 "
67 fi
68 if use gtk; then
69 GENTOO_INCLUDES="${GENTOO_INCLUDES} $(pkg-config gtk+-2.0 --cflags)"
70 GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_GTK2 "
71 GENTOO_LIBS="${GENTOO_LIBS} $(pkg-config gtk+-2.0 --libs) "
72 GTK_SRC_FILE="main-gtk2.c"
73 GTK_OBJ_FILE="main-gtk2.o"
74 else
75 GTK_SRC_FILE=""
76 GTK_OBJ_FILE=""
77 fi
78 if use amd64; then
79 GENTOO_DEFINES="${GENTOO_DEFINES} -DLUA_NUM_TYPE=int "
80 fi
81 GENTOO_INCLUDES="${GENTOO_INCLUDES} -Ilua -I."
82 GENTOO_DEFINES="${GENTOO_DEFINES} -DUSE_LUA"
83 emake -j1 \
84 INCLUDES="${GENTOO_INCLUDES}" \
85 DEFINES="${GENTOO_DEFINES}" \
86 depend
87 emake ./tolua
88 emake \
89 COPTS="${CFLAGS}" \
90 INCLUDES="${GENTOO_INCLUDES}" \
91 DEFINES="${GENTOO_DEFINES}" \
92 LIBS="${GENTOO_LIBS} -lm" \
93 BINDIR="${GAMES_BINDIR}" \
94 LIBDIR="${GAMES_DATADIR}/${PN}" \
95 GTK_SRC_FILE="${GTK_SRC_FILE}" \
96 GTK_OBJ_FILE="${GTK_OBJ_FILE}"
97 }
98
99 src_install() {
100 emake -j1 \
101 DESTDIR="${D}" \
102 OWNER="${GAMES_USER}" \
103 BINDIR="${GAMES_BINDIR}" \
104 LIBDIR="${GAMES_DATADIR}/${PN}" install
105 cd ..
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 ewarn "If you have older save files and you wish to continue those games,"
122 ewarn "you'll need to remerge the version of ToME with which you started"
123 ewarn "those save-games."
124 }

  ViewVC Help
Powered by ViewVC 1.1.20