Gentoo Archives: gentoo-commits

From: "Michael Sterrett (mr_bones_)" <mr_bones_@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in games-emulation/sdlmame: ChangeLog sdlmame-0.141.ebuild
Date: Mon, 03 Jan 2011 06:11:29
Message-Id: 20110103061118.642A220057@flycatcher.gentoo.org
1 mr_bones_ 11/01/03 06:11:18
2
3 Modified: ChangeLog
4 Added: sdlmame-0.141.ebuild
5 Log:
6 version bump
7
8 (Portage version: 2.1.9.25/cvs/Linux i686)
9
10 Revision Changes Path
11 1.41 games-emulation/sdlmame/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-emulation/sdlmame/ChangeLog?rev=1.41&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-emulation/sdlmame/ChangeLog?rev=1.41&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-emulation/sdlmame/ChangeLog?r1=1.40&r2=1.41
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/games-emulation/sdlmame/ChangeLog,v
20 retrieving revision 1.40
21 retrieving revision 1.41
22 diff -u -r1.40 -r1.41
23 --- ChangeLog 16 Dec 2010 08:06:13 -0000 1.40
24 +++ ChangeLog 3 Jan 2011 06:11:18 -0000 1.41
25 @@ -1,6 +1,12 @@
26 # ChangeLog for games-emulation/sdlmame
27 -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/games-emulation/sdlmame/ChangeLog,v 1.40 2010/12/16 08:06:13 mr_bones_ Exp $
29 +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/games-emulation/sdlmame/ChangeLog,v 1.41 2011/01/03 06:11:18 mr_bones_ Exp $
31 +
32 +*sdlmame-0.141 (03 Jan 2011)
33 +
34 + 03 Jan 2011; Michael Sterrett <mr_bones_@g.o>
35 + +sdlmame-0.141.ebuild:
36 + version bump
37
38 *sdlmame-0.140_p2 (16 Dec 2010)
39
40
41
42
43 1.1 games-emulation/sdlmame/sdlmame-0.141.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-emulation/sdlmame/sdlmame-0.141.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-emulation/sdlmame/sdlmame-0.141.ebuild?rev=1.1&content-type=text/plain
47
48 Index: sdlmame-0.141.ebuild
49 ===================================================================
50 # Copyright 1999-2011 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/games-emulation/sdlmame/sdlmame-0.141.ebuild,v 1.1 2011/01/03 06:11:18 mr_bones_ Exp $
53
54 EAPI=2
55 inherit eutils flag-o-matic games
56
57 MY_PV=${PV/.}
58 MY_CONF_PN=${PN/sdl}
59 MY_P=${PN}${MY_PV}
60 MY_P=${MY_P%%_p*}
61 MY_CONF_VER="0.139"
62 DESCRIPTION="Multiple Arcade Machine Emulator (SDL)"
63 HOMEPAGE="http://mamedev.org/"
64 UPDATES="$(for PATCH_VER in $(seq 1 ${PV##*_p}) ; do echo "mirror://gentoo/${MY_P}u${PATCH_VER}_diff.zip"; done)"
65 # Upstream doesn't allow fetching with unknown User-Agent such as wget
66 SRC_URI="mirror://gentoo/${MY_P/sdl}s.zip $UPDATES
67 http://www.netswarm.net/misc/sdlmame-ui.bdf.gz"
68
69 LICENSE="XMAME"
70 SLOT="0"
71 KEYWORDS="~amd64 ~ppc ~x86"
72 IUSE="debug opengl"
73
74 RDEPEND=">=media-libs/libsdl-1.2.10[audio,joystick,opengl?,video]
75 media-libs/sdl-ttf
76 dev-libs/expat
77 debug? (
78 x11-libs/gtk+:2
79 gnome-base/gconf
80 x11-libs/libXinerama
81 )"
82 DEPEND="${RDEPEND}
83 app-arch/unzip
84 debug? ( x11-proto/xineramaproto )"
85
86 S=${WORKDIR}
87
88 # Function to disable a makefile option
89 disable_feature() {
90 sed -i \
91 -e "/$1.*=/s:^:# :" \
92 "${S}"/makefile \
93 || die "sed failed"
94 }
95
96 # Function to enable a makefile option
97 enable_feature() {
98 sed -i \
99 -e "/^#.*$1.*=/s:^# ::" \
100 "${S}"/${2:-makefile} \
101 || die "sed failed"
102 }
103
104 src_unpack() {
105 base_src_unpack
106 unpack ./mame.zip
107 rm -f mame.zip
108 }
109
110 src_prepare() {
111 if [[ $PV == *_p* ]] ; then
112 edos2unix $(grep +++ *diff | awk '{ print $2 }' | sort -u) *diff 2> /dev/null
113 einfo "Patching release with source updates"
114 epatch ${MY_PV%%_p*}*.diff
115 fi
116 sed -i \
117 -e '/CFLAGS += -O$(OPTIMIZE)/s:^:# :' \
118 -e '/CFLAGS += -pipe/s:^:# :' \
119 -e '/LDFLAGS += -s/s:^:# :' \
120 -e '/LDFLAGS =/d' \
121 -e 's:-Werror::' \
122 makefile \
123 || die "sed failed"
124 # Don't compile zlib and expat
125 einfo "Disabling embedded libraries: zlib and expat"
126 disable_feature BUILD_ZLIB
127 disable_feature BUILD_EXPAT
128
129 if use amd64; then
130 einfo "Enabling 64-bit support"
131 enable_feature PTR64
132 fi
133
134 if use ppc; then
135 einfo "Enabling PPC support"
136 enable_feature BIGENDIAN
137 fi
138
139 if use debug; then
140 einfo "Enabling debug support"
141 enable_feature DEBUG
142 else
143 einfo "Disabling debug support"
144 enable_feature NO_X11 src/osd/sdl/sdl.mak
145 fi
146
147 if ! use opengl ; then
148 einfo "Disabling opengl support"
149 enable_feature NO_OPENGL src/osd/sdl/sdl.mak
150 fi
151 }
152
153 src_compile() {
154 emake \
155 NAME="${PN}" \
156 OPT_FLAGS='-DINI_PATH=\"\$$HOME/.'${PN}'\;'"${GAMES_SYSCONFDIR}/${PN}"'\"'" ${CXXFLAGS}" \
157 CC="${CXX}" \
158 all || die
159 }
160
161 src_install() {
162 newgamesbin ${PN}$(use amd64 && echo 64)$(use debug && echo d) ${PN} || die
163
164 # Avoid collision on /usr/games/bin/jedutil
165 exeinto "$(games_get_libdir)/${PN}"
166 doexe chdman jedutil ldverify romcmp testkeys || die
167 doman src/osd/sdl/man/{chdman,jedutil,ldverify,romcmp,testkeys}.1
168 newman src/osd/sdl/man/mame.1 ${PN}.1
169
170 insinto "${GAMES_DATADIR}/${PN}"
171 doins -r src/osd/sdl/keymaps || die "doins -r keymaps failed"
172 newins sdlmame-ui.bdf ui.bdf || die "newins ui.bdf failed"
173
174 insinto "${GAMES_SYSCONFDIR}/${PN}"
175 doins "${FILESDIR}"/vector.ini || die "doins vector.ini failed"
176
177 sed \
178 -e "s:@GAMES_SYSCONFDIR@:${GAMES_SYSCONFDIR}:" \
179 -e "s:@GAMES_DATADIR@:${GAMES_DATADIR}:" \
180 "${FILESDIR}/${MY_CONF_PN}-${MY_CONF_VER}".ini.in > "${D}/${GAMES_SYSCONFDIR}/${PN}/${MY_CONF_PN}".ini \
181 || die "sed failed"
182
183 dodoc docs/{config,mame,newvideo}.txt whatsnew*.txt
184
185 keepdir \
186 "${GAMES_DATADIR}/${PN}"/{ctrlr,cheats,roms,samples,artwork,crosshair} \
187 "${GAMES_SYSCONFDIR}/${PN}"/{ctrlr,cheats}
188
189 prepgamesdirs
190 }
191
192 pkg_postinst() {
193 games_pkg_postinst
194
195 elog "It's strongly recommended that you change either the system-wide"
196 elog "${MY_CONF_PN}.ini at \"${GAMES_SYSCONFDIR}/${PN}\" or use a per-user setup at \$HOME/.${PN}"
197
198 if use opengl; then
199 echo
200 elog "You built ${PN} with opengl support and should set"
201 elog "\"video\" to \"opengl\" in ${MY_CONF_PN}.ini to take advantage of that"
202 fi
203 }