mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-26 00:55:14 +00:00
- Fix build on non-i386 arch
- Add option to support Gtk/SVGAlib GUI - Support NOPORTDOCS - Fix WWW: line PR: ports/62262 Submitted by: Ports Fury
This commit is contained in:
parent
31868e4865
commit
245be80d76
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=99819
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= darcnes
|
||||
PORTVERSION= 9b0401
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= emulators
|
||||
MASTER_SITES= http://www.dridus.com/~nyef/darcnes/download/
|
||||
DISTNAME= dn${PORTVERSION}
|
||||
@ -15,14 +16,45 @@ EXTRACT_SUFX= .tgz
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= multi-system emulator
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}
|
||||
|
||||
NO_CDROM= Commercial use is restricted
|
||||
|
||||
USE_X_PREFIX= yes
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}
|
||||
|
||||
WANT_GNOME= yes
|
||||
USE_GMAKE= yes
|
||||
MAKE_ARGS= CC="${CC}" TARGET_CC="${CC}" CXX="${CXX}" TARGET_CXX="${CXX}" \
|
||||
AS="${AS}" TARGET_AS="${CC}" LD="${LD}" TARGET_LD="${CC}"
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${ARCH} != "i386" || defined(WITHOUT_X86_ASM)
|
||||
MAKE_ARGS+= C_ONLY=-DC_ONLY
|
||||
.else
|
||||
MAKE_ARGS+= MACH_TYPES=-DMACH_TYPES=\\\"types-i386.h\\\"
|
||||
.endif
|
||||
|
||||
.if ${HAVE_GNOME:Mgtk12}!=""
|
||||
USE_GNOME= gtk12
|
||||
MAKE_ARGS+= TARGET=Linux_GTK
|
||||
PKGNAMESUFFIX= -gtk
|
||||
.else
|
||||
.if defined(WITH_SVGALIB)
|
||||
LIB_DEPENDS+= vga:${PORTSDIR}/graphics/svgalib
|
||||
MAKE_ARGS+= TARGET=Linux_svgalib
|
||||
PKGNAMESUFFIX= -svgalib
|
||||
.else
|
||||
USE_XLIB= yes
|
||||
.endif
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${CP} ${FILESDIR}/endian.h ${WRKSRC}
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/darcnes ${PREFIX}/bin
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/darcnes ${PREFIX}/bin
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/readme ${DOCSDIR}
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
41
emulators/darcnes/files/endian.h
Normal file
41
emulators/darcnes/files/endian.h
Normal file
@ -0,0 +1,41 @@
|
||||
#ifndef __HAD_MY_ENDIAN_H
|
||||
#define __HAD_MY_ENDIAN_H
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#if (defined(BSD) && (BSD >= 199306))
|
||||
/* this should filter out NetBSD, FreeBSD and OpenBSD */
|
||||
#include <machine/endian.h>
|
||||
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
#define MSB_FIRST 1
|
||||
#undef LSB_FIRST
|
||||
#else
|
||||
#define LSB_FIRST 1
|
||||
#undef MSB_FIRST
|
||||
#endif
|
||||
|
||||
#else
|
||||
/* for Linux, perhaps use #ifdef __linux__? */
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined(__BYTE_ORDER)
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
#define MSB_FIRST 1
|
||||
#undef LSB_FIRST
|
||||
#else
|
||||
#define LSB_FIRST 1
|
||||
#undef MSB_FIRST
|
||||
#endif /* __BYTE_ORDER == __BIG_ENDIAN */
|
||||
|
||||
#else /* defined(__BYTE_ORDER) */
|
||||
|
||||
/* not Linux, either, just set it to LSB */
|
||||
#define LSB_FIRST 1
|
||||
#undef MSB_FIRST
|
||||
|
||||
#endif /* defined(__BYTE_ORDER) */
|
||||
|
||||
#endif /* defined(BSD) && (BSD >= 199306) */
|
||||
|
||||
#endif /* __HAD_MY_ENDIAN_H */
|
@ -1,35 +1,52 @@
|
||||
--- Makefile.orig Tue Mar 27 16:51:41 2001
|
||||
+++ Makefile Wed Oct 23 20:19:27 2002
|
||||
@@ -18,7 +18,7 @@
|
||||
--- Makefile.orig Wed Mar 28 09:51:41 2001
|
||||
+++ Makefile Mon Feb 2 20:30:32 2004
|
||||
@@ -11,16 +11,16 @@
|
||||
|
||||
DEBUG=-g
|
||||
#C_ONLY=-DC_ONLY
|
||||
|
||||
-MACH_TYPES=-DMACH_TYPES=\"types-i386.h\"
|
||||
+#MACH_TYPES=-DMACH_TYPES=\"types-i386.h\"
|
||||
|
||||
#BYTE_ORDER=-DMSB_FIRST
|
||||
-BYTE_ORDER=-DLSB_FIRST
|
||||
+#BYTE_ORDER=-DLSB_FIRST
|
||||
|
||||
-DEBUG=-g
|
||||
+#DEBUG=-g
|
||||
|
||||
-OPTFLAGS=-O2 -fomit-frame-pointer
|
||||
+OPTFLAGS=
|
||||
+#OPTFLAGS=-O2 -fomit-frame-pointer
|
||||
|
||||
BASE_CFLAGS=-Wall $(DEBUG) $(OPTFLAGS) $(C_ONLY) $(BYTE_ORDER) $(MACH_TYPES)
|
||||
-BASE_CFLAGS=-Wall $(DEBUG) $(OPTFLAGS) $(C_ONLY) $(BYTE_ORDER) $(MACH_TYPES)
|
||||
+BASE_CFLAGS=-Wall $(DEBUG) $(OPTFLAGS) $(C_ONLY) $(MACH_TYPES)
|
||||
BASE_SFLAGS=-Wall $(DEBUG) $(OPTFLAGS)
|
||||
@@ -85,15 +85,14 @@
|
||||
#
|
||||
# fixup command variables
|
||||
#
|
||||
-LOCAL_CC?=gcc
|
||||
-LOCAL_CXX?=g++
|
||||
-LOCAL_AS?=gcc
|
||||
-LOCAL_LD?=gcc
|
||||
-
|
||||
-CC=$(LOCAL_CC)
|
||||
-CXX=$(LOCAL_CC)
|
||||
-AS=$(LOCAL_AS)
|
||||
-LD=$(LOCAL_LD)
|
||||
+CC?=cc
|
||||
+LOCAL_CC=$(CC)
|
||||
+CXX?=c++
|
||||
+LOCAL_CXX=$(CXX)
|
||||
+AS=$(CC)
|
||||
+LOCAL_AS=$(AS)
|
||||
+LD=$(CC)
|
||||
+LOCAL_LD=$(LD)
|
||||
BASE_LDFLAGS=
|
||||
|
||||
ifndef CROSS_COMPILING
|
||||
TARGET_CC=$(LOCAL_CC)
|
||||
@@ -33,8 +33,12 @@
|
||||
#
|
||||
ifeq ($(TARGET),Linux_svgalib)
|
||||
CONFFLAGS=-DPCE_CD_SUPPORT -DSOUND
|
||||
+LOCALBASE?=/usr/local
|
||||
+LDFLAGS+=-L${LOCALBASE}/lib
|
||||
+CFLAGS+=-I${LOCALBASE}/include
|
||||
+SFLAGS+=-I${LOCALBASE}/include
|
||||
SYSTEMSRCS=video_svga.c ui_svga.c snd_unix.c cd_unix.c
|
||||
-BINFILE=sdarcnes
|
||||
+BINFILE=darcnes
|
||||
LIBS=-lvgagl -lvga
|
||||
endif
|
||||
|
||||
@@ -43,9 +47,10 @@
|
||||
#
|
||||
ifeq ($(TARGET),Linux_X)
|
||||
CONFFLAGS=-DPCE_CD_SUPPORT -DSOUND
|
||||
-LDFLAGS+=-L/usr/X11R6/lib
|
||||
-CFLAGS+=-I/usr/X11R6/include
|
||||
-SFLAGS+=-I/usr/X11R6/include
|
||||
+X11BASE?=/usr/X11R6
|
||||
+LDFLAGS+=-L${X11BASE}/lib
|
||||
+CFLAGS+=-I${X11BASE}/include
|
||||
+SFLAGS+=-I${X11BASE}/include
|
||||
SYSTEMSRCS=video_x.c ui_x.c snd_unix.c keyboard_x.c cd_unix.c
|
||||
BINFILE=darcnes
|
||||
LIBS=-lXext -lXaw -lXmu -lXt -lX11
|
||||
|
31
emulators/darcnes/files/patch-cd_unix.c
Normal file
31
emulators/darcnes/files/patch-cd_unix.c
Normal file
@ -0,0 +1,31 @@
|
||||
--- cd_unix.c.orig Sun Aug 20 03:25:53 2000
|
||||
+++ cd_unix.c
|
||||
@@ -62,7 +62,6 @@
|
||||
|
||||
void cd_play_track(u8 track)
|
||||
{
|
||||
-#ifdef SYSTEM_FREEBSD
|
||||
struct ioc_play_track playtrack;
|
||||
|
||||
/* FIXME: CD keeps playing after program quits */
|
||||
@@ -74,12 +73,10 @@
|
||||
playtrack.end_index = 1;
|
||||
|
||||
ioctl(cd_drive, CDIOCPLAYTRACKS, &playtrack);
|
||||
-#endif
|
||||
}
|
||||
|
||||
void cd_play_lba(u32 from, u32 to, int repeat)
|
||||
{
|
||||
-#ifdef SYSTEM_FREEBSD
|
||||
struct ioc_play_blocks playblocks;
|
||||
|
||||
/* FIXME: ignores the repeat flag */
|
||||
@@ -94,7 +91,6 @@
|
||||
playblocks.len = to - from;
|
||||
|
||||
ioctl(cd_drive, CDIOCPLAYBLOCKS, &playblocks);
|
||||
-#endif
|
||||
}
|
||||
|
||||
#ifdef SYSTEM_LINUX
|
7
emulators/darcnes/files/patch-mtypes.h
Normal file
7
emulators/darcnes/files/patch-mtypes.h
Normal file
@ -0,0 +1,7 @@
|
||||
--- mtypes.h.orig Sat Aug 7 18:19:37 1999
|
||||
+++ mtypes.h Thu Jun 1 02:43:05 2000
|
||||
@@ -11,2 +11,4 @@
|
||||
|
||||
+#include "endian.h"
|
||||
+
|
||||
typedef unsigned char byte;
|
10
emulators/darcnes/files/patch-tool.c
Normal file
10
emulators/darcnes/files/patch-tool.c
Normal file
@ -0,0 +1,10 @@
|
||||
--- tool.c.orig Sat May 6 23:50:17 2000
|
||||
+++ tool.c Thu Jun 1 02:43:09 2000
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "video.h"
|
||||
#include "tool.h"
|
||||
#include "system.h"
|
||||
+#include "endian.h"
|
||||
|
||||
unsigned long system_flags;
|
||||
|
11
emulators/darcnes/files/patch-types.h
Normal file
11
emulators/darcnes/files/patch-types.h
Normal file
@ -0,0 +1,11 @@
|
||||
--- types.h.orig Tue Dec 7 03:01:23 1999
|
||||
+++ types.h Thu Jun 1 02:43:11 2000
|
||||
@@ -13,6 +13,8 @@
|
||||
#include MACH_TYPES
|
||||
#endif
|
||||
|
||||
+#include "endian.h"
|
||||
+
|
||||
typedef unsigned char u8;
|
||||
typedef signed char s8;
|
||||
|
10
emulators/darcnes/files/patch-ui_gtk.c
Normal file
10
emulators/darcnes/files/patch-ui_gtk.c
Normal file
@ -0,0 +1,10 @@
|
||||
--- ui_gtk.c.orig Tue Aug 22 11:06:48 2000
|
||||
+++ ui_gtk.c Mon Feb 2 20:12:54 2004
|
||||
@@ -63,6 +63,7 @@
|
||||
video_buffer_1 = video_buffer_2 = NULL;
|
||||
|
||||
/* Get Gtk up and running. */
|
||||
+ gtk_set_locale();
|
||||
gtk_init( &argc, &argv );
|
||||
|
||||
nes_gtk_window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
15
emulators/darcnes/files/patch-ui_x.c
Normal file
15
emulators/darcnes/files/patch-ui_x.c
Normal file
@ -0,0 +1,15 @@
|
||||
--- ui_x.c.orig Mon Oct 30 23:15:31 2000
|
||||
+++ ui_x.c
|
||||
@@ -177,6 +177,12 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
+ if (romfile == NULL) {
|
||||
+ printf("rom not specified.\n");
|
||||
+ usage(argv[0]);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
initialize_window(display);
|
||||
|
||||
activate_system(system_type, romfile);
|
@ -1,3 +1,3 @@
|
||||
multi-system emulator
|
||||
|
||||
WWW: http://www.netway.com/~nyef/
|
||||
WWW: http://www.dridus.com/~nyef/darcnes/
|
||||
|
@ -1 +1,3 @@
|
||||
bin/darcnes
|
||||
%%PORTDOCS%%%%DOCSDIR%%/readme
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
|
Loading…
Reference in New Issue
Block a user