aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/visualboyadvance-m
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2016-12-29 22:20:46 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2016-12-29 22:20:46 +0800
commit5c405fe28e1a17da4d5270824717c5af0c1a64d7 (patch)
tree851c751a6d3cd48e79c70ec477bc18a2c430052d /emulators/visualboyadvance-m
parentde95c140d6ce0f15568143f9b66fd090894d3157 (diff)
downloadfreebsd-ports-gnome-5c405fe28e1a17da4d5270824717c5af0c1a64d7.tar.gz
freebsd-ports-gnome-5c405fe28e1a17da4d5270824717c5af0c1a64d7.tar.zst
freebsd-ports-gnome-5c405fe28e1a17da4d5270824717c5af0c1a64d7.zip
- Remove bogus (in presence of USE_GITHUB) USES=tar*
- Switch to options helpers - Fix build with GBVAM and/or without SDL (add mising files and conditions to plist) - Fix manpage installation (patch mandir instead of moving file later, no need to empty directory in the plist) - Fix build with LIRC (remove double patching) - Fix build with LINK (use correct version of SFML) Approved by: portmgr blanket
Diffstat (limited to 'emulators/visualboyadvance-m')
-rw-r--r--emulators/visualboyadvance-m/Makefile128
-rw-r--r--emulators/visualboyadvance-m/files/patch-CMakeLists.txt9
-rw-r--r--emulators/visualboyadvance-m/files/patch-src-gba-GBALink.cpp9
-rw-r--r--emulators/visualboyadvance-m/pkg-plist14
4 files changed, 54 insertions, 106 deletions
diff --git a/emulators/visualboyadvance-m/Makefile b/emulators/visualboyadvance-m/Makefile
index 402968b4f3d4..dfc537c3ba4f 100644
--- a/emulators/visualboyadvance-m/Makefile
+++ b/emulators/visualboyadvance-m/Makefile
@@ -34,100 +34,54 @@ 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|ypp)
USE_XORG= x11 xext
USE_GL= gl glu
USE_SDL= sdl
-USES= cmake dos2unix pkgconfig tar:bzip2
+USES= cmake dos2unix pkgconfig
INSTALLS_ICONS= yes
-CMAKE_ARGS+= -DVERSION:STRING="${PORTVERSION}" \
+CMAKE_ARGS= -DVERSION:STRING="${PORTVERSION}" \
-DSYSCONFDIR:STRING="${PREFIX}/etc" \
-DENABLE_WX:BOOL=no
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MASMCORE} || ${PORT_OPTIONS:MASMSCALERS}
-BUILD_DEPENDS+= as:devel/binutils
-.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}
-USE_GNOME= gtk20
-LIB_DEPENDS+= libgtkmm-2.4.so:x11-toolkits/gtkmm24 \
- libglibmm-2.4.so:devel/glibmm \
- libgiomm-2.4.so:devel/glibmm \
- libcairomm-1.0.so:graphics/cairomm \
- libglademm-2.4.so:devel/libglademm24 \
- libgdkglextmm-x11-1.2.so: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: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
-LIB_DEPENDS+= libsfml1-system.so:devel/sfml1
-.else
-CMAKE_ARGS+= -DENABLE_LINK:BOOL=no
-.endif
-
-.if ${PORT_OPTIONS:MLIRC}
-LIB_DEPENDS+= liblirc_client.so:comms/lirc
-RUN_DEPENDS+= lircd:comms/lirc
-CMAKE_ARGS+= -DENABLE_LIRC:BOOL=yes
-.else
-CMAKE_ARGS+= -DENABLE_LIRC:BOOL=no
-.endif
+ASMCORE_BUILD_DEPENDS= as:devel/binutils
+ASMCORE_CMAKE_BOOL= ENABLE_ASM_CORE
+
+ASMSCALERS_BUILD_DEPENDS= as:devel/binutils
+ASMSCALERS_CMAKE_ARGS= ENABLE_ASM_SCALERS
+
+GVBAM_USE_GNOME= gtk20
+GVBAM_LIB_DEPENDS= libgtkmm-2.4.so:x11-toolkits/gtkmm24 \
+ libglibmm-2.4.so:devel/glibmm \
+ libgiomm-2.4.so:devel/glibmm \
+ libcairomm-1.0.so:graphics/cairomm \
+ libglademm-2.4.so:devel/libglademm24 \
+ libgdkglextmm-x11-1.2.so:x11-toolkits/gtkglextmm
+GVBAM_CMAKE_BOOL= ENABLE_GTK
+GVBAM_USES= desktop-file-utils
+
+SDL_IMPLIES= DEBUGGER
+SDL_CMAKE_BOOL= ENABLE_SDL
+
+DEBUGGER_CMAKE_BOOL= ENABLE_DEBUGGER
+
+FFMPEG_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg
+FFMPEG_CMAKE_BOOL= ENABLE_FFMPEG
+
+NLS_USES= gettext
+NLS_CMAKE_BOOL= ENABLE_NLS
+
+LINK_CMAKE_BOOL= ENABLE_LINK
+LINK_LIB_DEPENDS= libsfml-system.so:devel/sfml
+
+LIRC_LIB_DEPENDS= liblirc_client.so:comms/lirc
+LIRC_RUN_DEPENDS= lircd:comms/lirc
+LIRC_CMAKE_BOOL= ENABLE_LIRC
post-patch:
- @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g; s|include/SFML|&1|; \
- s|NAMES sfml-|NAMES sfml1-|' ${WRKSRC}/CMakeScripts/FindSFML.cmake
- @${REINPLACE_CMD} -e '/#include/ s|SFML|&1|' \
- ${WRKSRC}/src/gba/GBASockClient.h \
- ${WRKSRC}/src/gba/GBALink.cpp \
- ${WRKSRC}/src/gba/GBALink.h
- @${REINPLACE_CMD} -e '/SET.*LIRC_CLIENT_LIBRARY/ s|lirc_client|${LOCALBASE}/lib/lib&.so|' \
- ${WRKSRC}/CMakeLists.txt
+ @${REINPLACE_CMD} -e '/SET.*LIRC_CLIENT_LIBRARY/ s|lirc_client|${LOCALBASE}/lib/lib&.so|; \
+ s|share/man|man|' ${WRKSRC}/CMakeLists.txt
maint-gen-distfile:
@if [ -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
@@ -139,8 +93,10 @@ maint-gen-distfile:
${TAR} jcf ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}
${RM} -r ${DISTNAME}
-post-install:
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/vbam
- ${MV} ${STAGEDIR}${PREFIX}/share/man/man1/vbam.1 ${STAGEDIR}${PREFIX}/man/man1/
+post-install-SDL-on:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/vbam
+
+post-install-GVBAM-on:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gvbam
.include <bsd.port.mk>
diff --git a/emulators/visualboyadvance-m/files/patch-CMakeLists.txt b/emulators/visualboyadvance-m/files/patch-CMakeLists.txt
index 81bf47f7abc1..12cebb66b520 100644
--- a/emulators/visualboyadvance-m/files/patch-CMakeLists.txt
+++ b/emulators/visualboyadvance-m/files/patch-CMakeLists.txt
@@ -7,15 +7,6 @@
cmake_minimum_required( VERSION 2.6.0 )
if( COMMAND cmake_policy )
-@@ -354,7 +354,7 @@ IF( ENABLE_SDL )
- ENDIF( WIN32 )
-
- IF( ENABLE_LIRC )
-- SET( LIRC_CLIENT_LIBRARY lirc_client )
-+ SET( LIRC_CLIENT_LIBRARY /usr/local/lib/liblirc_client.so )
- ENDIF( ENABLE_LIRC )
-
- TARGET_LINK_LIBRARIES (
@@ -369,8 +369,7 @@ IF( ENABLE_SDL )
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/vbam DESTINATION bin)
ENDIF( WIN32 )
diff --git a/emulators/visualboyadvance-m/files/patch-src-gba-GBALink.cpp b/emulators/visualboyadvance-m/files/patch-src-gba-GBALink.cpp
index 206b6a3c050a..fd4b8622719f 100644
--- a/emulators/visualboyadvance-m/files/patch-src-gba-GBALink.cpp
+++ b/emulators/visualboyadvance-m/files/patch-src-gba-GBALink.cpp
@@ -12,12 +12,3 @@
#include <stdlib.h>
#else
#include <malloc.h>
-@@ -89,7 +90,7 @@ bool speedhack = true;
- #include "GBALink.h"
- #include "GBASockClient.h"
-
--#include <SFML/Network.hpp>
-+#include <SFML1/Network.hpp>
-
- #ifdef ENABLE_NLS
- #include <libintl.h>
diff --git a/emulators/visualboyadvance-m/pkg-plist b/emulators/visualboyadvance-m/pkg-plist
index a40dbb2e3cda..c9de9c04cd74 100644
--- a/emulators/visualboyadvance-m/pkg-plist
+++ b/emulators/visualboyadvance-m/pkg-plist
@@ -1,24 +1,34 @@
%%GVBAM%%bin/gvbam
%%SDL%%bin/vbam
-@sample etc/vbam.cfg-example etc/vbam.cfg
+%%SDL%%@sample etc/vbam.cfg-example etc/vbam.cfg
%%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/LC_MESSAGES/gvbam.mo
%%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/en_GB/LC_MESSAGES/gvbam.mo
+%%GVBAM%%%%NLS%%share/locale/es/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/gl/LC_MESSAGES/gvbam.mo
+%%GVBAM%%%%NLS%%share/locale/id/LC_MESSAGES/gvbam.mo
%%GVBAM%%%%NLS%%share/locale/it_IT/LC_MESSAGES/gvbam.mo
+%%GVBAM%%%%NLS%%share/locale/ko/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/pt_PT/LC_MESSAGES/gvbam.mo
+%%GVBAM%%%%NLS%%share/locale/ru/LC_MESSAGES/gvbam.mo
+%%GVBAM%%%%NLS%%share/locale/sr/LC_MESSAGES/gvbam.mo
%%GVBAM%%%%NLS%%share/locale/sv/LC_MESSAGES/gvbam.mo
+%%GVBAM%%%%NLS%%share/locale/tr/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
@@ -35,5 +45,5 @@
%%GVBAM%%share/icons/hicolor/48x48/apps/vbam.png
%%GVBAM%%share/icons/hicolor/64x64/apps/vbam.png
%%GVBAM%%share/icons/hicolor/96x96/apps/vbam.png
-@dir share/man/man1
man/man1/vbam.1.gz
+%%GVBAM%%man/man1/gvbam.1.gz