Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Oct 2001 16:47:44 +0100 (CET)
From:      stijn@win.tue.nl
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/31596: [MAINTAINER UPDATE]: emulators/xmame
Message-ID:  <200110291547.f9TFli274243@pcwin002.win.tue.nl>

next in thread | raw e-mail | index | archive | help

>Number:         31596
>Category:       ports
>Synopsis:       [MAINTAINER UPDATE]: emulators/xmame
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 29 07:50:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Stijn Hoop
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
>Environment:

System: FreeBSD 4.4-STABLE #0: Mon Oct 15 04:32:30 CEST 2001

>Description:

- Update to include svgalib support. Unfortunately I couldn't get this
  to work. It compiles however it tries to run and immediately quits
  again. Maybe an svgalib guru can fix this. It probably has to do with
  my compilation fix in files/patch-ad not being correct, but I couldn't
  find anything else in the svgalib docs.
- Fix some portlint errors (unfortunately the Makefile is way too complicated
  to fix all portlint warnings)
- Change the name of the package to include the display method. Theoretically
  this way slave ports could be created to have different packages for
  different display methods.

>How-To-Repeat:

N/A

>Fix:

- Apply the following patch.
- File added: files/patch-ad

diff -urN --exclude=CVS /usr/ports/emulators/xmame/Makefile xmame/Makefile
--- /usr/ports/emulators/xmame/Makefile	Sun Oct  7 05:33:03 2001
+++ xmame/Makefile	Mon Oct 29 16:17:36 2001
@@ -15,17 +15,21 @@
 		http://www.sys2064.com/files/mame/
 DISTNAME=	xmame-${XMAMEVERSION:S/p/pre/}
 DIST_SUBDIR=	xmame
-XMAMEVERSION?=	${PORTVERSION}
-USE_BZIP2=	yes
 
 MAINTAINER?=	stijn@win.tue.nl
 
-USE_XPM=	yes
-USE_X_PREFIX=	yes
+USE_BZIP2=	yes
 USE_GMAKE=	yes
 
 MAN6=		x${MAMEMESS}.6
 
+XMAMEVERSION?=	${PORTVERSION}
+
+.if !defined(WITH_SVGALIB) || ${WITH_SVGALIB} != "yes"
+USE_XPM=	yes
+USE_X_PREFIX=	yes
+.endif
+
 # Are we building MAME, MESS or PinMAME? (also set by slave ports)
 MAMEMESS?=	mame
 
@@ -162,6 +166,9 @@
 #		acceleration
 #  WITH_SDL	Uses the SDL library to be able to play fullscreen
 #		without root rights
+#  WITH_SVGALIB	Uses the svgalib library to allow playing without X. This
+#		has not been extensively tested; patches welcome to make
+#		this actually work.
 #  WITH_X11	The standard display target, should work without
 #		dependancies other than X
 #
@@ -175,6 +182,12 @@
 ALL_DOCS+=	${GLDOCS}
 .else
 PLIST_SUB+=	OPENGL="@comment "
+.if defined(WITH_SVGALIB) && ${WITH_SVGALIB} == "yes"
+LIB_DEPENDS=	vga.1:${PORTSDIR}/graphics/svgalib
+CFLAGS+=	-I${LOCALBASE}/include
+MAKE_ENV+=	LOCALBASE=${LOCALBASE}
+DISPLAY_METHOD=	svgalib
+.else
 .if !defined(WITH_SDL) || ${WITH_SDL} != "no"
 LIB_DEPENDS=    SDL-1.1.3:${PORTSDIR}/devel/sdl12
 SDL_CONFIG?=	${LOCALBASE}/bin/sdl11-config
@@ -191,6 +204,8 @@
 DISPLAY_METHOD=	x11
 .endif
 .endif
+.endif
+PKGNAMESUFFIX=-${DISPLAY_METHOD:L}
 
 # USB joysticks - only enabled on -STABLE because of conflicting USB
 # prototypes in -STABLE & -CURRENT.
@@ -222,12 +237,14 @@
 				${WRKSRC}/src/unix/video-drivers/glexport.c
 	${PERL} -pi -e 's@malloc.h@stdlib.h@' \
 				${WRKSRC}/src/unix/video-drivers/gljpg.c
+	${PERL} -pi -e 's@asm/io.h@machine/cpufunc.h@' \
+				${WRKSRC}/src/unix/video-drivers/twkuser.c
 
 # The large number of sed regexes here is intended to make this port a whole
 # lot easier to maintain - please don't convert them into a patch.
 do-configure:
 	${SED} -e "s@= gcc@?=  ${CC}@g" \
-		-e "s@= -O2 -Wall@?=  ${CFLAGS}@g" \
+		-e "s@^CFLAGS.*@CFLAGS ?= ${CFLAGS}@g" \
 		-e "s@= cp@?=  ${INSTALL} ${COPY}@g" \
 		-e "s@lib/x\$$(TARGET)@share/x\$$(TARGET)@g" \
 		-e "s@/usr/X11R6@${X11BASE}@g" \
diff -urN --exclude=CVS /usr/ports/emulators/xmame/files/patch-ac xmame/files/patch-ac
--- /usr/ports/emulators/xmame/files/patch-ac	Sun Apr 15 05:32:17 2001
+++ xmame/files/patch-ac	Tue Oct 16 15:17:42 2001
@@ -1,8 +1,11 @@
---- src/unix/unix.mak.orig	Mon Apr  9 03:54:42 2001
-+++ src/unix/unix.mak	Tue Apr 10 10:52:06 2001
-@@ -46,18 +46,18 @@
+--- src/unix/unix.mak.orig	Thu Sep 20 04:34:41 2001
++++ src/unix/unix.mak	Tue Oct 16 12:33:55 2001
+@@ -44,20 +44,20 @@
+ 
+ # svga and ggi also use $(X11LIB) since that's where zlib often is
  LIBS.x11        = $(X11LIB) $(JOY_X11_LIBS) -lX11 -lXext 
- LIBS.svgalib    = $(X11LIB) -lvga -lvgagl
+-LIBS.svgalib    = $(X11LIB) -lvga -lvgagl
++LIBS.svgalib    = -L$(LOCALBASE)/lib -lvga -lvgagl
  LIBS.ggi        = $(X11LIB) -lggi
 -LIBS.xgl        = $(X11LIB) $(JOY_X11_LIBS) -lX11 -lXext $(GLLIBS) -ljpeg
 +LIBS.xgl        = $(X11LIB) $(JOY_X11_LIBS) -lX11 -lXext $(GLLIBS) -L/usr/local/lib -ljpeg
@@ -23,7 +26,7 @@
  CFLAGS.photon2	=
  
  INST.x11        = doinstall
-@@ -322,7 +322,7 @@
+@@ -332,7 +332,7 @@
  	
  doc/x$(TARGET)rc.dist: all src/unix/xmamerc-keybinding-notes.txt
  	./x$(TARGET).$(DISPLAY_METHOD) -noloadconfig -showconfig | \
@@ -32,7 +35,7 @@
  	cat src/unix/xmamerc-keybinding-notes.txt >> doc/x$(TARGET)rc.dist
  	
  doc/gamelist.$(TARGET): all
-@@ -331,7 +331,8 @@
+@@ -341,7 +341,8 @@
  
  doc/x$(TARGET).6: all src/unix/xmame.6-1 src/unix/xmame.6-3
  	cat src/unix/xmame.6-1 > doc/x$(TARGET).6
diff -urN --exclude=CVS /usr/ports/emulators/xmame/files/patch-ad xmame/files/patch-ad
--- /usr/ports/emulators/xmame/files/patch-ad	Thu Jan  1 01:00:00 1970
+++ xmame/files/patch-ad	Wed Oct 17 12:44:18 2001
@@ -0,0 +1,13 @@
+--- src/unix/video-drivers/svgainput.c.orig	Tue Oct 16 11:06:30 2001
++++ src/unix/video-drivers/svgainput.c	Tue Oct 16 11:05:37 2001
+@@ -12,6 +12,10 @@
+ #include "devices.h"
+ #include "keyboard.h"
+ 
++#ifdef __FreeBSD__
++#define	SIGUNUSED	SIGUSR2
++#endif
++
+ static int console_fd       = -1;
+ static int mouse_fd         = -1;
+ static int leds             =  0;
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110291547.f9TFli274243>