aboutsummaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-10-05 10:20:24 +0000
committerJohn Marino <marino@FreeBSD.org>2014-10-05 10:20:24 +0000
commit0de0d570c4a95bd38f306d82a523edfbc2711122 (patch)
tree5deb5786303c798725a69de136f4770d67fb69ec /emulators
parent72d0d7c79888bebb549f466110f68c094d5e6dfb (diff)
downloadports-0de0d570c4a95bd38f306d82a523edfbc2711122.tar.gz
ports-0de0d570c4a95bd38f306d82a523edfbc2711122.zip
Notes
Diffstat (limited to 'emulators')
-rw-r--r--emulators/mess/Makefile63
-rw-r--r--emulators/mess/files/extra-patch-src_osd_osdcore.c63
-rw-r--r--emulators/mess/pkg-plist8
3 files changed, 94 insertions, 40 deletions
diff --git a/emulators/mess/Makefile b/emulators/mess/Makefile
index f6d6a0c43995..a590f098ff1d 100644
--- a/emulators/mess/Makefile
+++ b/emulators/mess/Makefile
@@ -8,7 +8,7 @@ CATEGORIES= emulators
MASTER_SITES= http://mamedev.mameworld.info/releases/ \
http://emumovies.com/aarongiles/releases/ \
http://mamedev.org/updates/:patchsets
-DISTFILES= mame${PORTVERSION:S/.//:C/p[0-9]*$//}s${EXTRACT_SUFX} \
+DISTFILES= mame${PORTVERSION:S/.//:C/p[0-9]*$//}s.zip \
${UPDATE_PATCHES:C/$/.zip:patchsets/}
DIST_SUBDIR= mame
@@ -21,13 +21,14 @@ LIB_DEPENDS= libFLAC.so:${PORTSDIR}/audio/flac \
libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig
RUN_DEPENDS= liberation-fonts-ttf>=0:${PORTSDIR}/x11-fonts/liberation-fonts-ttf
-NO_WRKSUBDIR= yes
+NOT_FOR_ARCHS= ia64 powerpc sparc64
-USES= dos2unix gmake pkgconfig shebangfix zip
+USES= dos2unix gmake pkgconfig python:2,build shebangfix
DOS2UNIX_FILES= src/lib/lib7z/CpuArch.h \
src/lib/lua/luaconf.h \
src/osd/eigccx86.h \
src/osd/eminline.h \
+ src/osd/osdcore.c \
src/osd/sdl/osinline.h \
src/osd/sdl/sdlsync_ntc.c \
src/osd/sdl/sdlsync_os2.c
@@ -37,12 +38,12 @@ SHEBANG_FILES= src/emu/cpu/m6502/m6502make.py \
src/emu/cpu/tms57002/tmsmake.py
USE_XORG= xext xi xinerama xrender
USE_GL= gl
-USE_PYTHON_BUILD=2
+NO_WRKSUBDIR= yes
MAKE_ENV= NOWERROR=1 USE_NETWORK=1 \
LD="${CXX}" PYTHON="${PYTHON_CMD}" \
OPT_FLAGS="${CXXFLAGS}" GCC_LDFLAGS="${LDFLAGS}" \
- TARGET="${PORTNAME}" FULLNAME="${PORTNAME}" \
- SDL_NETWORK="pcap"
+ TARGET="mess" FULLNAME="mess" SDL_NETWORK="pcap"
+MAKE_ARGS= TARGETOS=freebsd
MAKEFILE= makefile
SUB_FILES= pkg-message
@@ -73,19 +74,22 @@ UPDATE_PATCHES!= /usr/bin/jot -s " " \
USE_SDL= sdl ttf
.endif
-.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
-BROKEN= Does not install on ia64, powerpc, or sparc64
+.if ${ARCH} == amd64
+MAKE_ARGS+= PTR64=1
+.endif
+
+.if ${OPSYS} == DragonFly
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-src_osd_osdcore.c
.endif
post-extract:
- @(cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} mame.zip \
- ${EXTRACT_AFTER_ARGS})
+ (cd ${WRKDIR} && ${TAR} -xf mame.zip)
@${RM} -f ${WRKDIR}/mame.zip
# Use post-extract target to get in before dos2unix-isation
.if defined(UPDATE_PATCHES)
. for patch in ${UPDATE_PATCHES:S/_/./}
@${ECHO_MSG} -n "===> Applying upstream development patch ${patch}... "
- @${PATCH} ${PATCH_ARGS} < ${WRKSRC}/${patch}
+ ${PATCH} ${PATCH_ARGS} < ${WRKSRC}/${patch}
@${ECHO_MSG} "[DONE]"
. endfor
.endif
@@ -102,30 +106,25 @@ post-patch:
s|-O$$(OPTIMIZE)|| ; \
/--warn-common/s|= -Wl,|= $$(GCC_LDFLAGS) -Wl,| ; \
/LDFLAGS/s|-s|| ; \
- /LIBS/s|-lstdc++|| ; \
- /LIBS/s|-lpthread|-pthread|' ${WRKSRC}/makefile
+ /LIBS/s|-lstdc++||' ${WRKSRC}/makefile
@${REINPLACE_CMD} -e \
- '/LIBS/s|-lpthread|-pthread| ; \
- /-isystem/s|^|#| ; \
+ '/-isystem/s|^|#| ; \
/X11R6/s|^|#|' ${WRKSRC}/src/osd/sdl/sdl.mak
do-install:
- (cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PORTNAME} \
- ${STAGEDIR}${PREFIX}/bin)
- @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}
-.for F in castool chdman imgtool jedutil ldresample ldverify romcmp \
- testkeys unidasm
- (cd ${WRKSRC} && ${INSTALL_PROGRAM} ${F} \
- ${STAGEDIR}${PREFIX}/libexec/${PORTNAME})
-.endfor
- @${MKDIR} ${STAGEDIR}${DATADIR}
- @(cd ${WRKSRC} && ${COPYTREE_SHARE} artwork ${STAGEDIR}${DATADIR})
- @(cd ${WRKSRC} && ${COPYTREE_SHARE} hash ${STAGEDIR}${DATADIR})
- @(cd ${WRKSRC}/src/osd/sdl && ${COPYTREE_SHARE} keymaps \
- ${STAGEDIR}${DATADIR})
- @${MKDIR} ${STAGEDIR}${DOCSDIR}
- @(cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${STAGEDIR}${DOCSDIR})
- @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- (cd ${FILESDIR} && ${INSTALL_DATA} mess.ini ${STAGEDIR}${EXAMPLESDIR})
+ @${MKDIR} ${STAGEDIR}${DATADIR} \
+ ${STAGEDIR}${DOCSDIR} \
+ ${STAGEDIR}${EXAMPLESDIR} \
+ ${STAGEDIR}${PREFIX}/libexec/mess
+ ${INSTALL_PROGRAM} ${WRKSRC}/mess ${STAGEDIR}${PREFIX}/bin
+ (cd ${WRKSRC} && ${INSTALL_PROGRAM} castool chdman imgtool jedutil \
+ ldresample ldverify romcmp testkeys unidasm \
+ ${STAGEDIR}${PREFIX}/libexec/mess)
+ (cd ${WRKSRC} && ${COPYTREE_SHARE} artwork ${STAGEDIR}${DATADIR})
+ (cd ${WRKSRC} && ${COPYTREE_SHARE} hash ${STAGEDIR}${DATADIR})
+ (cd ${WRKSRC}/src/osd/sdl && \
+ ${COPYTREE_SHARE} keymaps ${STAGEDIR}${DATADIR})
+ (cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${STAGEDIR}${DOCSDIR})
+ ${INSTALL_DATA} ${FILESDIR}/mess.ini ${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.mk>
diff --git a/emulators/mess/files/extra-patch-src_osd_osdcore.c b/emulators/mess/files/extra-patch-src_osd_osdcore.c
new file mode 100644
index 000000000000..0892d35e5366
--- /dev/null
+++ b/emulators/mess/files/extra-patch-src_osd_osdcore.c
@@ -0,0 +1,63 @@
+--- src/osd/osdcore.c.orig 2014-10-05 09:30:10 UTC
++++ src/osd/osdcore.c
+@@ -2,6 +2,10 @@
+ #include "osdcore.h"
+ #include "portmidi/portmidi.h"
+
++typedef struct __FILE_public FILEX;
++FILEX dummyval;
++FILEX * dummy = &dummyval;
++
+ bool g_print_verbose = false;
+
+
+@@ -10,9 +14,14 @@ bool g_print_verbose = false;
+ for file output
+ -------------------------------------------------*/
+
+-void osd_file_output_callback(FILE *param, const char *format, va_list argptr)
++void osd_file_std_output_callback(FILEX *param, const char *format, va_list argptr)
++{
++ vfprintf(stdout, format, argptr);
++}
++
++void osd_file_err_output_callback(FILEX *param, const char *format, va_list argptr)
+ {
+- vfprintf(param, format, argptr);
++ vfprintf(stderr, format, argptr);
+ }
+
+
+@@ -21,7 +30,7 @@ void osd_file_output_callback(FILE *para
+ for no output
+ -------------------------------------------------*/
+
+-void osd_null_output_callback(FILE *param, const char *format, va_list argptr)
++void osd_null_std_output_callback(FILEX *param, const char *format, va_list argptr)
+ {
+ }
+
+@@ -30,16 +39,16 @@ void osd_null_output_callback(FILE *para
+ /* output channels */
+ static output_delegate output_cb[OSD_OUTPUT_CHANNEL_COUNT] =
+ {
+- output_delegate(FUNC(osd_file_output_callback), stderr), // OSD_OUTPUT_CHANNEL_ERROR
+- output_delegate(FUNC(osd_file_output_callback), stderr), // OSD_OUTPUT_CHANNEL_WARNING
+- output_delegate(FUNC(osd_file_output_callback), stdout), // OSD_OUTPUT_CHANNEL_INFO
++ output_delegate(FUNC(osd_file_err_output_callback), dummy), // OSD_OUTPUT_CHANNEL_ERROR
++ output_delegate(FUNC(osd_file_err_output_callback), dummy), // OSD_OUTPUT_CHANNEL_WARNING
++ output_delegate(FUNC(osd_file_std_output_callback), dummy), // OSD_OUTPUT_CHANNEL_INFO
+ #ifdef MAME_DEBUG
+- output_delegate(FUNC(osd_file_output_callback), stdout), // OSD_OUTPUT_CHANNEL_DEBUG
++ output_delegate(FUNC(osd_file_std_output_callback), dummy), // OSD_OUTPUT_CHANNEL_DEBUG
+ #else
+- output_delegate(FUNC(osd_null_output_callback), stdout), // OSD_OUTPUT_CHANNEL_DEBUG
++ output_delegate(FUNC(osd_null_std_output_callback), dummy), // OSD_OUTPUT_CHANNEL_DEBUG
+ #endif
+- output_delegate(FUNC(osd_file_output_callback), stdout), // OSD_OUTPUT_CHANNEL_VERBOSE
+- output_delegate(FUNC(osd_file_output_callback), stdout) // OSD_OUTPUT_CHANNEL_LOG
++ output_delegate(FUNC(osd_file_std_output_callback), dummy), // OSD_OUTPUT_CHANNEL_VERBOSE
++ output_delegate(FUNC(osd_file_std_output_callback), dummy) // OSD_OUTPUT_CHANNEL_LOG
+ };
+
+
diff --git a/emulators/mess/pkg-plist b/emulators/mess/pkg-plist
index 22287fd92c2f..e2eb36ef0bc2 100644
--- a/emulators/mess/pkg-plist
+++ b/emulators/mess/pkg-plist
@@ -358,11 +358,3 @@ libexec/mess/unidasm
%%DATADIR%%/keymaps/km-fr-OSX.txt
%%DATADIR%%/keymaps/km-fr.txt
%%DATADIR%%/keymaps/km_it.txt
-@dirrm %%DATADIR%%/keymaps
-@dirrm %%DATADIR%%/hash
-@dirrm %%DATADIR%%/artwork
-@dirrm %%DATADIR%%
-%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/docs
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@dirrm libexec/mess