diff options
author | John Marino <marino@FreeBSD.org> | 2014-06-20 10:20:17 +0000 |
---|---|---|
committer | John Marino <marino@FreeBSD.org> | 2014-06-20 10:20:17 +0000 |
commit | 1dcf99244043c7314c59d4cb8f98e34390ac15c7 (patch) | |
tree | 172ff967692fddf098ad138d6ed3183fed87196e /emulators | |
parent | 6ddba6550eb63121d3464d53d7085eec615f623f (diff) |
Notes
Diffstat (limited to 'emulators')
12 files changed, 166 insertions, 126 deletions
diff --git a/emulators/visualboyadvance-m/Makefile b/emulators/visualboyadvance-m/Makefile index 1389d8dbe4fb..24c2d3df280e 100644 --- a/emulators/visualboyadvance-m/Makefile +++ b/emulators/visualboyadvance-m/Makefile @@ -3,39 +3,60 @@ PORTNAME= visualboyadvance-m PORTVERSION= 1.8.0r${SVN_REV} -PORTREVISION= 3 CATEGORIES= emulators -MASTER_SITES= http://update.cooltrainer.org/emulators/visualboyadvance-m/ +MASTER_SITES= https://cooltrainer.org/freebsd-ports/visualboyadvance-m/ MAINTAINER= root@cooltrainer.org COMMENT= Game Boy Advance emulator with GTK frontend +LICENSE= GPLv2 + LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png \ - libcairomm-1.0.so:${PORTSDIR}/graphics/cairomm \ libsfml-system.so:${PORTSDIR}/devel/sfml -OPTIONS_DEFINE= GVBAM NLS -OPTIONS_DEFAULT= GVBAM -OPTIONS_DEFINE_i386= ASM +OPTIONS_DEFINE= NLS FFMPEG LINK LIRC DEBUGGER +OPTIONS_MULTI= INTERFACE +OPTIONS_MULTI_INTERFACE= GVBAM SDL +OPTIONS_DEFINE_i386= ASMCORE ASMSCALERS +OPTIONS_DEFAULT= DEBUGGER SDL OPTIONS_SUB= yes -GVBAM_DESC= Build gvbam (GTK2 frontend) -NLS_USES= gettext +GVBAM_DESC= Enable GTK interface +SDL_DESC= Enable SDL interface +FFMPEG_DESC= Enable FFmpeg A/V recording +LINK_DESC= Enable GBA linking functionality +LIRC_DESC= Enable LIRC infrared support +DEBUGGER_DESC= Enable the debugger +ASMCORE_DESC= Enable x86 ASM CPU cores (i386 only) +ASMSCALERS_DESC= Enable x86 ASM graphic filters (i386 only) +NLS_USES= gettext WANT_GNOME= yes -DOS2UNIX_REGEX= .*\.(c|cpp|h) +DOS2UNIX_REGEX= .*\.(c|cpp|h|ypp) USE_XORG= x11 xext USE_GL= gl glu USE_SDL= sdl -USES= cmake desktop-file-utils dos2unix pkgconfig tar:bzip2 -CMAKE_ARGS+= -DVERSION:STRING="${PORTVERSION}" -DSYSCONFDIR:STRING="${PREFIX}/etc" -SVN_REV= 1001 +USES= cmake dos2unix pkgconfig tar:bzip2 +INSTALLS_ICONS= yes +SVN_REV= 1231 +CMAKE_ARGS+= -DVERSION:STRING="${PORTVERSION}" \ + -DSYSCONFDIR:STRING="${PREFIX}/etc" \ + -DENABLE_WX:BOOL=no .include <bsd.port.options.mk> -.if ${PORT_OPTIONS:MASM} +.if ${PORT_OPTIONS:MASMCORE} || ${PORT_OPTIONS:MASMSCALERS} BUILD_DEPENDS+= as:${PORTSDIR}/devel/binutils -CMAKE_ARGS+= -DENABLE_ASM_CORE:BOOL=yes -DENABLE_ASM_SCALERS:BOOL=yes +.if ${PORT_OPTIONS:MASMCORE} +CMAKE_ARGS+= -DENABLE_ASM_CORE:BOOL=yes +.else +CMAKE_ARGS+= -DENABLE_ASM_CORE:BOOL=no +.endif +.if ${PORT_OPTIONS:MASMSCALERS} +CMAKE_ARGS+= -DENABLE_ASM_SCALERS:BOOL=yes +.else +CMAKE_ARGS+= -DENABLE_ASM_SCALERS:BOOL=no +.endif .endif .if ${PORT_OPTIONS:MGVBAM} @@ -43,18 +64,57 @@ USE_GNOME= gtk20 LIB_DEPENDS+= libgtkmm-2.4.so:${PORTSDIR}/x11-toolkits/gtkmm24 \ libglibmm-2.4.so:${PORTSDIR}/devel/glibmm \ libgiomm-2.4.so:${PORTSDIR}/devel/glibmm \ + libcairomm-1.0.so:${PORTSDIR}/graphics/cairomm \ libglademm-2.4.so:${PORTSDIR}/devel/libglademm24 \ libgdkglextmm-x11-1.2.so:${PORTSDIR}/x11-toolkits/gtkglextmm +CMAKE_ARGS+= -DENABLE_GTK:BOOL=yes +USES+= desktop-file-utils .else CMAKE_ARGS+= -DENABLE_GTK:BOOL=no .endif +.if ${PORT_OPTIONS:MSDL} +.if !${PORT_OPTIONS:MDEBUGGER} +BROKEN= SDL requires DEBUGGER +.endif +CMAKE_ARGS+= -DENABLE_SDL:BOOL=yes +.else +CMAKE_ARGS+= -DENABLE_SDL:BOOL=no +.endif + +.if ${PORT_OPTIONS:MDEBUGGER} +CMAKE_ARGS+= -DENABLE_DEBUGGER:BOOL=yes +.else +CMAKE_ARGS+= -DENABLE_DEBUGGER:BOOL=no +.endif + +.if ${PORT_OPTIONS:MFFMPEG} +LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg +CMAKE_ARGS+= -DENABLE_FFMPEG:BOOL=yes +.else +CMAKE_ARGS+= -DENABLE_FFMPEG:BOOL=no +.endif + .if ${PORT_OPTIONS:MNLS} CMAKE_ARGS+= -DENABLE_NLS:BOOL=yes .else CMAKE_ARGS+= -DENABLE_NLS:BOOL=no .endif +.if ${PORT_OPTIONS:MLINK} +CMAKE_ARGS+= -DENABLE_LINK:BOOL=yes +.else +CMAKE_ARGS+= -DENABLE_LINK:BOOL=no +.endif + +.if ${PORT_OPTIONS:MLIRC} +LIB_DEPENDS+= liblirc_client.so:${PORTSDIR}/comms/lirc +RUN_DEPENDS+= lircd:${PORTSDIR}/comms/lirc +CMAKE_ARGS+= -DENABLE_LIRC:BOOL=yes +.else +CMAKE_ARGS+= -DENABLE_LIRC:BOOL=no +.endif + post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/CMakeScripts/FindSFML.cmake @@ -64,7 +124,7 @@ maint-gen-distfile: ${FALSE}; \ fi svn export -r${SVN_REV} \ - https://vbam.svn.sourceforge.net/svnroot/vbam/trunk ${DISTNAME} + https://svn.code.sf.net/p/vbam/code/trunk/ ${DISTNAME} ${TAR} jcf ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ${DISTNAME} ${RM} -rf ${DISTNAME} diff --git a/emulators/visualboyadvance-m/distinfo b/emulators/visualboyadvance-m/distinfo index e856c46999cb..8269bca10e64 100644 --- a/emulators/visualboyadvance-m/distinfo +++ b/emulators/visualboyadvance-m/distinfo @@ -1,2 +1,2 @@ -SHA256 (visualboyadvance-m-1.8.0r1001.tar.bz2) = 8668c8b556826681c8e848d999ff3ba1383daf78e3410a20bcfc0e8f2eeed4c2 -SIZE (visualboyadvance-m-1.8.0r1001.tar.bz2) = 766938 +SHA256 (visualboyadvance-m-1.8.0r1231.tar.bz2) = 50729f26136fc3847d9f85d26aab0c080846d8df6c9b75e427c90ee117b63979 +SIZE (visualboyadvance-m-1.8.0r1231.tar.bz2) = 1007578 diff --git a/emulators/visualboyadvance-m/files/patch-CMakeLists.txt b/emulators/visualboyadvance-m/files/patch-CMakeLists.txt index 0045b74eb06d..3566d59ced78 100644 --- a/emulators/visualboyadvance-m/files/patch-CMakeLists.txt +++ b/emulators/visualboyadvance-m/files/patch-CMakeLists.txt @@ -1,5 +1,5 @@ ---- CMakeLists.txt.orig 2010-03-14 23:36:45.000000000 -0400 -+++ CMakeLists.txt 2010-11-26 03:08:11.543538713 -0500 +--- CMakeLists.txt.orig 2013-09-24 04:49:26.000000000 -0700 ++++ CMakeLists.txt 2014-04-29 15:02:57.323817303 -0700 @@ -1,5 +1,5 @@ # The project's name is VBA-M it uses C and C++ code -PROJECT(VBA-M C CXX) @@ -7,13 +7,13 @@ cmake_minimum_required( VERSION 2.6.0 ) if( COMMAND cmake_policy ) -@@ -344,8 +344,7 @@ +@@ -427,8 +427,7 @@ INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/vbam DESTINATION bin) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/sdl/vbam.cfg-example - DESTINATION ${SYSCONFDIR} - RENAME vbam.cfg) + DESTINATION ${SYSCONFDIR}) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/vba-over.ini DESTINATION ${DATA_INSTALL_DIR}) ENDIF( ENABLE_SDL ) - IF( ENABLE_GTK ) diff --git a/emulators/visualboyadvance-m/files/patch-fex-fex-Data_Reader.cpp b/emulators/visualboyadvance-m/files/patch-fex-fex-Data_Reader.cpp deleted file mode 100644 index fdd058ba90f3..000000000000 --- a/emulators/visualboyadvance-m/files/patch-fex-fex-Data_Reader.cpp +++ /dev/null @@ -1,36 +0,0 @@ ---- fex/fex/Data_Reader.cpp.orig 2013-10-05 07:19:22.649937270 -0300 -+++ fex/fex/Data_Reader.cpp 2013-10-05 07:20:36.384931508 -0300 -@@ -732,11 +732,11 @@ - - blargg_err_t Gzip_File_Reader::read_v( void* p, int s ) - { -- int result = gzread( file_, p, s ); -+ int result = gzread( static_cast<gzFile_s *>(file_), p, s ); - if ( result != s ) - { - if ( result < 0 ) -- return convert_gz_error( file_ ); -+ return convert_gz_error( static_cast<gzFile_s *>(file_) ); - - return blargg_err_file_corrupt; - } -@@ -746,8 +746,8 @@ - - blargg_err_t Gzip_File_Reader::seek_v( int n ) - { -- if ( gzseek( file_, n, SEEK_SET ) < 0 ) -- return convert_gz_error( file_ ); -+ if ( gzseek( static_cast<gzFile_s *>(file_), n, SEEK_SET ) < 0 ) -+ return convert_gz_error( static_cast<gzFile_s *>(file_) ); - - return blargg_ok; - } -@@ -756,7 +756,7 @@ - { - if ( file_ ) - { -- if ( gzclose( file_ ) ) -+ if ( gzclose( static_cast<gzFile_s *>(file_) ) ) - check( false ); - file_ = NULL; - } diff --git a/emulators/visualboyadvance-m/files/patch-src-Util.cpp b/emulators/visualboyadvance-m/files/patch-src-Util.cpp deleted file mode 100644 index fe736d30a080..000000000000 --- a/emulators/visualboyadvance-m/files/patch-src-Util.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/Util.cpp.orig 2013-10-05 07:22:08.455933950 -0300 -+++ src/Util.cpp 2013-10-05 07:22:40.675934470 -0300 -@@ -544,7 +544,7 @@ - - gzFile utilGzOpen(const char *file, const char *mode) - { -- utilGzWriteFunc = (int (ZEXPORT *)(void *,void * const, unsigned int))gzwrite; -+ utilGzWriteFunc = (int (ZEXPORT *)(gzFile_s *,void * const, unsigned int))gzwrite; - utilGzReadFunc = gzread; - utilGzCloseFunc = gzclose; - utilGzSeekFunc = gzseek; diff --git a/emulators/visualboyadvance-m/files/patch-src-common-ffmpeg.cpp b/emulators/visualboyadvance-m/files/patch-src-common-ffmpeg.cpp new file mode 100644 index 000000000000..dc1a2aefa4d0 --- /dev/null +++ b/emulators/visualboyadvance-m/files/patch-src-common-ffmpeg.cpp @@ -0,0 +1,34 @@ +--- src/common/ffmpeg.cpp.orig 2014-04-29 21:21:05.929639513 -0700 ++++ src/common/ffmpeg.cpp 2014-04-29 21:26:22.513617805 -0700 +@@ -178,17 +178,31 @@ + // make sure RGB is supported (mostly not) + if(codec->pix_fmts) { + const enum PixelFormat *p; ++#if LIBAVCODEC_VERSION_MAJOR < 55 + int64_t mask = 0; ++#endif + for(p = codec->pix_fmts; *p != -1; p++) { + // may get complaints about 1LL; thus the cast ++#if LIBAVCODEC_VERSION_MAJOR < 55 + mask |= ((int64_t)1) << *p; ++#endif + if(*p == pixfmt) + break; + } + if(*p == -1) { + // if not supported, use a converter to the next best format + // this is swscale, the converter used by the output demo ++#if LIBAVCODEC_VERSION_MAJOR < 55 + enum PixelFormat dp = (PixelFormat)avcodec_find_best_pix_fmt(mask, pixfmt, 0, NULL); ++#else ++#if LIBAVCODEC_VERSION_MICRO >= 100 ++// FFmpeg ++ enum AVPixelFormat dp = avcodec_find_best_pix_fmt_of_list(codec->pix_fmts, pixfmt, 0, NULL); ++#else ++// libav ++ enum AVPixelFormat dp = avcodec_find_best_pix_fmt2(codec->pix_fmts, pixfmt, 0, NULL); ++#endif ++#endif + if(dp == -1) + dp = codec->pix_fmts[0]; + if(!(convpic = avcodec_alloc_frame()) || diff --git a/emulators/visualboyadvance-m/files/patch-src-gba-GBALink.cpp b/emulators/visualboyadvance-m/files/patch-src-gba-GBALink.cpp new file mode 100644 index 000000000000..9e21ce9e173f --- /dev/null +++ b/emulators/visualboyadvance-m/files/patch-src-gba-GBALink.cpp @@ -0,0 +1,14 @@ +--- src/gba/GBALink.cpp.orig 2014-04-29 17:12:28.260667843 -0700 ++++ src/gba/GBALink.cpp 2014-04-29 17:15:31.307655026 -0700 +@@ -2,9 +2,10 @@ + // with major changes by tjm + #include <string.h> + #include <stdio.h> ++#include <sys/param.h> + + // malloc.h does not seem to exist on Mac OS 10.7 +-#ifdef __APPLE__ ++#if defined(__APPLE__) || defined(__FreeBSD__) + #include <stdlib.h> + #else + #include <malloc.h> diff --git a/emulators/visualboyadvance-m/files/patch-src-gtk-filters.cpp b/emulators/visualboyadvance-m/files/patch-src-gtk-filters.cpp deleted file mode 100644 index 0e0f549b9c20..000000000000 --- a/emulators/visualboyadvance-m/files/patch-src-gtk-filters.cpp +++ /dev/null @@ -1,20 +0,0 @@ ---- src/gtk/filters.cpp.orig 2011-02-24 16:06:17.000000000 +0300 -+++ src/gtk/filters.cpp 2011-08-04 21:05:59.000000000 +0400 -@@ -87,7 +87,7 @@ - return astFilters[_eFilter].m_apvFunc[_eDepth]; - } - --char* pcsGetFilterName(const EFilter _eFilter) -+const char* pcsGetFilterName(const EFilter _eFilter) - { - return gettext(astFilters[_eFilter].m_csName); - } -@@ -97,7 +97,7 @@ - return astFiltersIB[_eFilterIB].m_apvFunc[_eDepth]; - } - --char* pcsGetFilterIBName(const EFilterIB _eFilterIB) -+const char* pcsGetFilterIBName(const EFilterIB _eFilterIB) - { - return gettext(astFiltersIB[_eFilterIB].m_csName); - } diff --git a/emulators/visualboyadvance-m/files/patch-src-gtk-filters.h b/emulators/visualboyadvance-m/files/patch-src-gtk-filters.h deleted file mode 100644 index 541cb664577e..000000000000 --- a/emulators/visualboyadvance-m/files/patch-src-gtk-filters.h +++ /dev/null @@ -1,15 +0,0 @@ ---- src/gtk/filters.h.orig 2011-02-20 00:33:53.000000000 +0300 -+++ src/gtk/filters.h 2011-08-04 21:06:06.000000000 +0400 -@@ -64,10 +64,10 @@ - }; - - Filter pvGetFilter(EFilter _eFilter, EFilterDepth _eDepth); --char* pcsGetFilterName(const EFilter _eFilter); -+const char* pcsGetFilterName(const EFilter _eFilter); - - FilterIB pvGetFilterIB(EFilterIB _eFilterIB, EFilterDepth _eDepth); --char* pcsGetFilterIBName(const EFilterIB _eFilterIB); -+const char* pcsGetFilterIBName(const EFilterIB _eFilterIB); - - } // namespace VBA - diff --git a/emulators/visualboyadvance-m/files/patch-src-gtk-gvbam.desktop b/emulators/visualboyadvance-m/files/patch-src-gtk-gvbam.desktop deleted file mode 100644 index bb25d03f0b19..000000000000 --- a/emulators/visualboyadvance-m/files/patch-src-gtk-gvbam.desktop +++ /dev/null @@ -1,7 +0,0 @@ ---- src/gtk/gvbam.desktop.orig 2010-01-03 11:21:23.810842812 -0500 -+++ src/gtk/gvbam.desktop 2010-01-03 11:22:48.352184026 -0500 -@@ -8,3 +8,4 @@ - Exec=gvbam - Icon=vbam - Categories=Application;Game;Emulator;GTK -+MimeType=application/x-gameboy-rom;application/x-gba-rom; diff --git a/emulators/visualboyadvance-m/files/patch-src-sdl-expr.cpp b/emulators/visualboyadvance-m/files/patch-src-sdl-expr.cpp new file mode 100644 index 000000000000..535299570661 --- /dev/null +++ b/emulators/visualboyadvance-m/files/patch-src-sdl-expr.cpp @@ -0,0 +1,17 @@ +--- src/sdl/expr.cpp.orig 2014-05-02 23:55:56.000000000 +0800 ++++ src/sdl/expr.cpp 2014-05-02 23:56:07.000000000 +0800 +@@ -90,14 +90,10 @@ + /* Copy the first part of user declarations. */ + #line 1 "expr.ypp" + +-namespace std { + #include <stdio.h> + #include <memory.h> + #include <stdlib.h> + #include <string.h> +-} +- +-using namespace std; + + #include "../System.h" + #include "../gba/elf.h" diff --git a/emulators/visualboyadvance-m/pkg-plist b/emulators/visualboyadvance-m/pkg-plist index 5cde44e342b7..6f15dbf4ac9b 100644 --- a/emulators/visualboyadvance-m/pkg-plist +++ b/emulators/visualboyadvance-m/pkg-plist @@ -1,16 +1,28 @@ -bin/vbam +%%GVBAM%%bin/gvbam +%%SDL%%bin/vbam @unexec if cmp -s %D/etc/vbam.cfg-example %D/etc/vbam.cfg; then rm -f %D/etc/vbam.cfg; fi etc/vbam.cfg-example @exec if [ ! -f %D/etc/vbam.cfg ] ; then cp -p %D/%F %B/vbam.cfg; fi -%%GVBAM%%bin/gvbam %%GVBAM%%share/applications/gvbam.desktop %%GVBAM%%share/icons/hicolor/16x16/apps/vbam.png %%GVBAM%%share/icons/hicolor/22x22/apps/vbam.png %%GVBAM%%share/icons/hicolor/24x24/apps/vbam.png %%GVBAM%%share/icons/hicolor/32x32/apps/vbam.png %%GVBAM%%share/icons/hicolor/scalable/apps/vbam.svg +%%GVBAM%%%%NLS%%share/locale/ca_ES/LC_MESSAGES/gvbam.mo +%%GVBAM%%%%NLS%%share/locale/cs/LC_MESSAGES/gvbam.mo +%%GVBAM%%%%NLS%%share/locale/de/LC_MESSAGES/gvbam.mo %%GVBAM%%%%NLS%%share/locale/en/LC_MESSAGES/gvbam.mo +%%GVBAM%%%%NLS%%share/locale/es_ES/LC_MESSAGES/gvbam.mo %%GVBAM%%%%NLS%%share/locale/fr/LC_MESSAGES/gvbam.mo +%%GVBAM%%%%NLS%%share/locale/it_IT/LC_MESSAGES/gvbam.mo +%%GVBAM%%%%NLS%%share/locale/nb/LC_MESSAGES/gvbam.mo +%%GVBAM%%%%NLS%%share/locale/nl/LC_MESSAGES/gvbam.mo +%%GVBAM%%%%NLS%%share/locale/pl/LC_MESSAGES/gvbam.mo +%%GVBAM%%%%NLS%%share/locale/pt_BR/LC_MESSAGES/gvbam.mo +%%GVBAM%%%%NLS%%share/locale/sv/LC_MESSAGES/gvbam.mo +%%GVBAM%%%%NLS%%share/locale/zh_CN/LC_MESSAGES/gvbam.mo +%%GVBAM%%%%NLS%%share/locale/zh_TW/LC_MESSAGES/gvbam.mo %%GVBAM%%share/vbam/ui/cheatedit.ui %%GVBAM%%share/vbam/ui/cheatlist.ui %%GVBAM%%share/vbam/ui/display.ui @@ -20,17 +32,9 @@ etc/vbam.cfg-example %%GVBAM%%share/vbam/ui/sound.ui %%GVBAM%%share/vbam/ui/vbam.ui %%GVBAM%%share/vbam/vba-over.ini -%%GVBAM%%@dirrm share/vbam/ui -%%GVBAM%%@dirrm share/vbam -%%GVBAM%%@dirrm share/icons/hicolor/scalable/apps -%%GVBAM%%@dirrm share/icons/hicolor/scalable -%%GVBAM%%@dirrm share/icons/hicolor/32x32/apps -%%GVBAM%%@dirrm share/icons/hicolor/32x32 -%%GVBAM%%@dirrm share/icons/hicolor/24x24/apps -%%GVBAM%%@dirrm share/icons/hicolor/24x24 -%%GVBAM%%@dirrm share/icons/hicolor/22x22/apps -%%GVBAM%%@dirrm share/icons/hicolor/22x22 -%%GVBAM%%@dirrm share/icons/hicolor/16x16/apps -%%GVBAM%%@dirrm share/icons/hicolor/16x16 -%%GVBAM%%@dirrm share/icons/hicolor -%%GVBAM%%@dirrm share/icons +%%GVBAM%%%%NLS%%@dirrmtry share/locale/ca_ES/LC_MESSAGES +%%GVBAM%%%%NLS%%@dirrmtry share/locale/ca_ES +%%GVBAM%%%%NLS%%@dirrmtry share/locale/it_IT/LC_MESSAGES +%%GVBAM%%%%NLS%%@dirrmtry share/locale/it_IT +%%GVBAM%%@dirrmtry share/vbam/ui +@dirrmtry share/vbam |