svn commit: r370052 - in head/emulators/mess: . files
John Marino
marino at FreeBSD.org
Sun Oct 5 10:20:26 UTC 2014
Author: marino
Date: Sun Oct 5 10:20:24 2014
New Revision: 370052
URL: https://svnweb.freebsd.org/changeset/ports/370052
QAT: https://qat.redports.org/buildarchive/r370052/
Log:
emulators/mess: clean up, remove zip dependency, support DragonFly
This port has a post-extract target that wants to use native unzip
on an extracted file. This is an issue for DragonFly, but tar can
handle the zip file just file on both platforms, so switch to that.
DragonFly still has the incomplete FILE that it inherited from FreeBSD,
which is really a pain when FILE is a parameter in c++ routines. This
adds an extra patch for DragonFly to use an alternative default logging
callbacks to all mame to finally build on this platform.
While here:
- remove use of ${PORTNAME} where "mess" is the only correct value
- use ".zip" instead of extract variable
- Unmask installation commands
- Group mkdir commands into one
- Use NOT_FOR_ARCHS instead of conditional BROKEN
- Convert to USES=python
- Remove unnecessary conversion of -lpthread => -pthread
- Remove redundant @dirrm from pkg-plist
Added:
head/emulators/mess/files/extra-patch-src_osd_osdcore.c (contents, props changed)
Modified:
head/emulators/mess/Makefile
head/emulators/mess/pkg-plist
Modified: head/emulators/mess/Makefile
==============================================================================
--- head/emulators/mess/Makefile Sun Oct 5 10:10:29 2014 (r370051)
+++ head/emulators/mess/Makefile Sun Oct 5 10:20:24 2014 (r370052)
@@ -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}/audi
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/m6502ma
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>
Added: head/emulators/mess/files/extra-patch-src_osd_osdcore.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/mess/files/extra-patch-src_osd_osdcore.c Sun Oct 5 10:20:24 2014 (r370052)
@@ -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
+ };
+
+
Modified: head/emulators/mess/pkg-plist
==============================================================================
--- head/emulators/mess/pkg-plist Sun Oct 5 10:10:29 2014 (r370051)
+++ head/emulators/mess/pkg-plist Sun Oct 5 10:20:24 2014 (r370052)
@@ -358,11 +358,3 @@ libexec/mess/unidasm
%%DATADIR%%/keymaps/km-fr-OSX.txt
%%DATADIR%%/keymaps/km-fr.txt
%%DATADIR%%/keymaps/km_it.txt
- at dirrm %%DATADIR%%/keymaps
- at dirrm %%DATADIR%%/hash
- at dirrm %%DATADIR%%/artwork
- at dirrm %%DATADIR%%
-%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/docs
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
- at dirrm libexec/mess
More information about the svn-ports-all
mailing list