Lines 6-12
Link Here
|
6 |
# |
6 |
# |
7 |
|
7 |
|
8 |
PORTNAME?= xmame |
8 |
PORTNAME?= xmame |
9 |
PORTVERSION?= 0.88 |
9 |
PORTVERSION?= 0.89 |
10 |
CATEGORIES= emulators |
10 |
CATEGORIES= emulators |
11 |
MASTER_SITES= http://x.mame.net/download/:xmame \ |
11 |
MASTER_SITES= http://x.mame.net/download/:xmame \ |
12 |
http://www.sys2064.com/files/util/:history \ |
12 |
http://www.sys2064.com/files/util/:history \ |
Lines 24-36
Link Here
|
24 |
USE_PERL5= yes |
24 |
USE_PERL5= yes |
25 |
USE_GMAKE= yes |
25 |
USE_GMAKE= yes |
26 |
USE_REINPLACE= yes |
26 |
USE_REINPLACE= yes |
|
|
27 |
WANT_SDL= yes |
28 |
WANT_GNOME= yes |
29 |
|
30 |
# Are we building MAME, MESS or PinMAME? (also set by slave ports) |
31 |
MAMEMESS?= mame |
27 |
|
32 |
|
28 |
MAN6= x${MAMEMESS}.6 |
33 |
MAN6= x${MAMEMESS}.6 |
29 |
|
34 |
|
30 |
XMAMEVERSION?= ${PORTVERSION} |
35 |
OPTIONS= SDL "Use the SDL driver" on \ |
|
|
36 |
OPENGL "Use the OpenGL driver" off \ |
37 |
X11 "Use the X11 driver" off \ |
38 |
SVGALIB "Use the Svgalib driver" off \ |
39 |
ASM68K "Enable the speedier but buggy 68k emulator" off \ |
40 |
OPTIMIZATION "Enable maximum C compiler optimization" off \ |
41 |
ESOUND "Enable esound support" off \ |
42 |
DATFILES "Installs additional information files" on \ |
43 |
NETWORK "Include support for network play (**BROKEN**)" off |
31 |
|
44 |
|
32 |
# Are we building MAME, MESS or PinMAME? (also set by slave ports) |
45 |
XMAMEVERSION?= ${PORTVERSION} |
33 |
MAMEMESS?= mame |
|
|
34 |
|
46 |
|
35 |
PLIST_SUB+= MAMEMESS="x${MAMEMESS}" SPOOLGAMES="${SPOOLGAMES}" |
47 |
PLIST_SUB+= MAMEMESS="x${MAMEMESS}" SPOOLGAMES="${SPOOLGAMES}" |
36 |
.if ${MAMEMESS} == "mame" |
48 |
.if ${MAMEMESS} == "mame" |
Lines 101-119
Link Here
|
101 |
.endif |
113 |
.endif |
102 |
.endif |
114 |
.endif |
103 |
|
115 |
|
104 |
PKGOPTS= ${FILESDIR}/pkg-opts |
|
|
105 |
|
106 |
# |
116 |
# |
107 |
# Various options are processed here. |
117 |
# Various options are processed here. |
108 |
# |
118 |
# |
|
|
119 |
.include <bsd.port.pre.mk> |
109 |
|
120 |
|
110 |
# Option WITH_DATFILES |
121 |
# Option WITH_DATFILES |
111 |
.if ${MAMEMESS} == "mame" |
122 |
.if ${MAMEMESS} == "mame" |
112 |
.if !defined(WITH_DATFILES) |
|
|
113 |
WITH_DATFILES= yes |
114 |
.endif |
115 |
|
123 |
|
116 |
.if ${WITH_DATFILES:L} != "no" |
124 |
.if defined(WITH_DATFILES) |
117 |
PLIST_SUB+= DATFILES="" |
125 |
PLIST_SUB+= DATFILES="" |
118 |
|
126 |
|
119 |
EXTRACT_DEPENDS= unzip:${PORTSDIR}/archivers/unzip |
127 |
EXTRACT_DEPENDS= unzip:${PORTSDIR}/archivers/unzip |
Lines 138-149
Link Here
|
138 |
.endif |
146 |
.endif |
139 |
.endif |
147 |
.endif |
140 |
|
148 |
|
141 |
# Option WITH_ASM68K |
149 |
.if defined(WITH_ASM68K) |
142 |
.if !defined(WITH_ASM68K) |
|
|
143 |
WITH_ASM68K= no |
144 |
.endif |
145 |
|
146 |
.if ${WITH_ASM68K:L} == "yes" |
147 |
ASM_COMMENT= |
150 |
ASM_COMMENT= |
148 |
.else |
151 |
.else |
149 |
ASM_COMMENT=\# |
152 |
ASM_COMMENT=\# |
Lines 151-171
Link Here
|
151 |
|
154 |
|
152 |
# Option WITH_OPTIMIZATION |
155 |
# Option WITH_OPTIMIZATION |
153 |
.if defined(WITH_OPTIMIZATION) |
156 |
.if defined(WITH_OPTIMIZATION) |
154 |
.if ${WITH_OPTIMIZATION:L} == "yes" |
|
|
155 |
CFLAGS+= -O3 -Wall -Wno-unused -funroll-loops \ |
157 |
CFLAGS+= -O3 -Wall -Wno-unused -funroll-loops \ |
156 |
-fstrength-reduce -fomit-frame-pointer -ffast-math \ |
158 |
-fstrength-reduce -fomit-frame-pointer -ffast-math \ |
157 |
-falign-functions=4 -falign-jumps=4 -falign-loops=4 |
159 |
-falign-functions=4 -falign-jumps=4 -falign-loops=4 |
158 |
.endif |
160 |
.endif |
159 |
.endif |
|
|
160 |
|
161 |
|
161 |
SDLSOUNDCOMMENT= \# |
162 |
SDLSOUNDCOMMENT= \# |
162 |
|
163 |
|
163 |
# Option DISPLAY_TARGET |
164 |
# Option DISPLAY_TARGET |
164 |
.if !defined(DISPLAY_TARGET) |
165 |
.if defined(WITH_SDL) |
165 |
DISPLAY_TARGET=sdl |
166 |
USE_SDL= sdl |
|
|
167 |
DISPLAY_TARGET= sdl |
168 |
DISPLAY_METHOD= SDL |
169 |
SDLSOUNDCOMMENT= |
166 |
.endif |
170 |
.endif |
167 |
|
171 |
|
168 |
.if ${DISPLAY_TARGET:L} == "opengl" |
172 |
.if defined(WITH_OPENGL) |
|
|
173 |
USE_XLIB= yes |
174 |
DISPLAY_TARGET= opengl |
169 |
CFLAGS+= ${PTHREAD_CFLAGS} -I${X11BASE}/include |
175 |
CFLAGS+= ${PTHREAD_CFLAGS} -I${X11BASE}/include |
170 |
USE_GL= yes |
176 |
USE_GL= yes |
171 |
DISPLAY_METHOD= x11 |
177 |
DISPLAY_METHOD= x11 |
Lines 173-214
Link Here
|
173 |
ALL_DOCS+= ${GLDOCS} |
179 |
ALL_DOCS+= ${GLDOCS} |
174 |
.else |
180 |
.else |
175 |
PLIST_SUB+= OPENGL="@comment " |
181 |
PLIST_SUB+= OPENGL="@comment " |
176 |
|
|
|
177 |
.if ${DISPLAY_TARGET:L} == "svgalib" |
178 |
LIB_DEPENDS= vga.1:${PORTSDIR}/graphics/svgalib |
179 |
DISPLAY_METHOD= svgalib |
180 |
.else |
181 |
|
182 |
.if ${DISPLAY_TARGET:L} == "x11" |
183 |
DISPLAY_METHOD= x11 |
184 |
.else |
185 |
|
186 |
.if ${DISPLAY_TARGET:L} != "sdl" |
187 |
pre-everything:: |
188 |
@${ECHO_MSG} "You must select a valid DISPLAY_TARGET. Refer to" |
189 |
@${ECHO_MSG} "'make options' for more information." |
190 |
@exit 1 |
191 |
.endif |
192 |
USE_SDL= sdl |
193 |
DISPLAY_METHOD= SDL |
194 |
SDLSOUNDCOMMENT= |
195 |
.endif |
196 |
.endif |
197 |
.endif |
182 |
.endif |
198 |
|
183 |
|
199 |
.if ${DISPLAY_TARGET:L} != "svgalib" |
184 |
.if defined(WITH_SVGALIB) |
|
|
185 |
DISPLAY_TARGET= svgalib |
186 |
LIB_DEPENDS+= vga.1:${PORTSDIR}/graphics/svgalib |
200 |
USE_XPM= yes |
187 |
USE_XPM= yes |
201 |
USE_X_PREFIX= yes |
188 |
DISPLAY_METHOD= svgalib |
202 |
.endif |
189 |
.endif |
203 |
|
190 |
|
204 |
PKGNAMESUFFIX=-${DISPLAY_METHOD:L} |
191 |
.if defined(WITH_X11) |
205 |
|
192 |
DISPLAY_METHOD= x11 |
206 |
# Option WITH_ESOUND |
193 |
USE_XLIB= yes |
207 |
.if !defined(WITH_ESOUND) |
|
|
208 |
WITH_ESOUND= no |
209 |
.endif |
194 |
.endif |
210 |
|
195 |
|
211 |
.if ${WITH_ESOUND:L} == "yes" |
196 |
# Option WITH_ESOUND |
|
|
197 |
.if defined(WITH_ESOUND) |
212 |
ESOUNDCOMMENT= |
198 |
ESOUNDCOMMENT= |
213 |
USE_GNOME= esound |
199 |
USE_GNOME= esound |
214 |
.else |
200 |
.else |
Lines 217-260
Link Here
|
217 |
|
203 |
|
218 |
# XXX Network support is *broken* in 0.85+, leave commented out for now |
204 |
# XXX Network support is *broken* in 0.85+, leave commented out for now |
219 |
# Option WITH_NETWORK |
205 |
# Option WITH_NETWORK |
220 |
#.if ${MAMEMESS} == "mame" |
206 |
.if defined(WITH_NETWORK) |
221 |
.if !defined(WITH_NETWORK) |
|
|
222 |
WITH_NETWORK= no |
223 |
.endif |
224 |
|
225 |
.if ${WITH_NETWORK:L} != "no" |
226 |
BROKEN= "Networking support is currently broken" |
207 |
BROKEN= "Networking support is currently broken" |
227 |
NETWORK= |
208 |
NETWORK= |
228 |
.else |
209 |
.else |
229 |
NETWORK=\# |
210 |
NETWORK=\# |
230 |
.endif |
211 |
.endif |
231 |
#.endif |
|
|
232 |
|
233 |
.include <bsd.port.pre.mk> |
234 |
|
235 |
# |
236 |
# Regular targets |
237 |
# |
238 |
|
239 |
options: |
240 |
@(${ECHO_MSG} "===> Build options for ${PKGNAME}:"; \ |
241 |
${PERL} -ne '/^#/ || /^\s/ && print || \ |
242 |
print sprintf "* %s [%s]\n %s", split(/\|/)' ${PKGOPTS}) | \ |
243 |
$${PAGER:-/usr/bin/more} |
244 |
|
245 |
pre-everything:: |
246 |
.if !defined(BATCH) |
247 |
@${TEST} -r ${PKGOPTS} && \ |
248 |
(${ECHO_MSG} '-------------------------------------------------------------------------'; \ |
249 |
${ECHO_MSG} 'Perform a "make options" to see a list of available installation options.'; \ |
250 |
${ECHO_MSG} '-------------------------------------------------------------------------';) |
251 |
.endif |
252 |
|
212 |
|
253 |
# The large number of sed regexes here is intended to make this port a whole |
213 |
# The large number of sed regexes here is intended to make this port a whole |
254 |
# lot easier to maintain - please don't convert them into a patch. |
214 |
# lot easier to maintain - please don't convert them into a patch. |
255 |
# |
|
|
256 |
# XXX: The -Imess part was added because of a conflict with cdparanoia-3.9.8_3 |
257 |
# which (imho bogusly) installs an 'utils.h' header in $LOCALBASE/include |
258 |
do-configure: |
215 |
do-configure: |
259 |
${REINPLACE_CMD} -e "s@= gcc@?= ${CC}@g" \ |
216 |
${REINPLACE_CMD} -e "s@= gcc@?= ${CC}@g" \ |
260 |
-e "s@^TARGET.*@TARGET = ${MAMEMESS}@g" \ |
217 |
-e "s@^TARGET.*@TARGET = ${MAMEMESS}@g" \ |
Lines 263-269
Link Here
|
263 |
-e "s@^CFLAGS.*@CFLAGS ?= ${CFLAGS}@g" \ |
220 |
-e "s@^CFLAGS.*@CFLAGS ?= ${CFLAGS}@g" \ |
264 |
-e "s@^INSTALL_GROUP.*@INSTALL_GROUP = wheel@g" \ |
221 |
-e "s@^INSTALL_GROUP.*@INSTALL_GROUP = wheel@g" \ |
265 |
-e "s@# LIBS.*@LIBS = -L${LOCALBASE}/lib@g" \ |
222 |
-e "s@# LIBS.*@LIBS = -L${LOCALBASE}/lib@g" \ |
266 |
-e "s@# INCLUDES.*@INCLUDES = -Imess -I${LOCALBASE}/include@g" \ |
223 |
-e "s@# INCLUDES.*@INCLUDES = -I${LOCALBASE}/include@g" \ |
267 |
-e "s@^PREFIX.*@PREFIX = ${PREFIX}@g" \ |
224 |
-e "s@^PREFIX.*@PREFIX = ${PREFIX}@g" \ |
268 |
-e "s@/share/man@/man@g" \ |
225 |
-e "s@/share/man@/man@g" \ |
269 |
-e "s@^MY_CPU.*@MY_CPU = ${ARCH}@g" \ |
226 |
-e "s@^MY_CPU.*@MY_CPU = ${ARCH}@g" \ |
Lines 277-287
Link Here
|
277 |
-e "s@^SDL_CONFIG.*@SDL_CONFIG = ${SDL_CONFIG}@g" \ |
234 |
-e "s@^SDL_CONFIG.*@SDL_CONFIG = ${SDL_CONFIG}@g" \ |
278 |
-e "s@^GLLIBS += .*@GLLIBS += ${PTHREAD_LIBS}@g" \ |
235 |
-e "s@^GLLIBS += .*@GLLIBS += ${PTHREAD_LIBS}@g" \ |
279 |
${WRKSRC}/makefile.unix |
236 |
${WRKSRC}/makefile.unix |
280 |
.if ${DISPLAY_TARGET:L} == "sdl" |
237 |
.if defined(WITH_SDL) |
281 |
${REINPLACE_CMD} -e "s@# JOY_SDL = 1@JOY_SDL = 1@g" ${WRKSRC}/makefile.unix |
238 |
${REINPLACE_CMD} -e "s@# JOY_SDL = 1@JOY_SDL = 1@g" ${WRKSRC}/makefile.unix |
282 |
.endif |
239 |
.endif |
283 |
|
240 |
|
284 |
.if ${DISPLAY_TARGET:L} == "opengl" |
241 |
.if defined(WITH_OPENGL) |
285 |
${REINPLACE_CMD} -e "s@# X11_OPENGL = 1@X11_OPENGL = 1@g" ${WRKSRC}/makefile.unix |
242 |
${REINPLACE_CMD} -e "s@# X11_OPENGL = 1@X11_OPENGL = 1@g" ${WRKSRC}/makefile.unix |
286 |
.endif |
243 |
.endif |
287 |
|
244 |
|
Lines 341-347
Link Here
|
341 |
${INSTALL_DATA} ${WRKDIR}/history.dat ${PREFIX}/share/xmame |
298 |
${INSTALL_DATA} ${WRKDIR}/history.dat ${PREFIX}/share/xmame |
342 |
${INSTALL_DATA} ${WRKDIR}/cheat.dat ${PREFIX}/share/xmame |
299 |
${INSTALL_DATA} ${WRKDIR}/cheat.dat ${PREFIX}/share/xmame |
343 |
.endif |
300 |
.endif |
344 |
.if ${DISPLAY_TARGET:L} == "opengl" |
301 |
.if defined(WITH_OPENGL) |
345 |
@${ECHO_MSG} |
302 |
@${ECHO_MSG} |
346 |
@${ECHO_MSG} "**************************************************************" |
303 |
@${ECHO_MSG} "**************************************************************" |
347 |
@${ECHO_MSG} "* HEADSUP: The OpenGL code is now built on top of the X11" |
304 |
@${ECHO_MSG} "* HEADSUP: The OpenGL code is now built on top of the X11" |