On Mon, 2024-05-06 at 00:51 -0600, Anthony J. Bentley wrote:
> Martijn van Duren writes:
> > Back in 2018 Jasper explicitly disabled wxWidgets on vbam so it wouldn't
> > accidentally get picked up. I reckon it would be worth it to enable it
> > explicitly, since it would build the visualboyadvance-m binary.
> > 
> > Not only brings it some menu options which allows you to change things
> > at runtime, it also brings in some features I couldn't find in vbam:
> > most notably the link (network) option. Without it battling your
> > friends, or completing your pokedex will be impossible. :-)
> 
> I agree, we should provide the wx frontend since it has extra features.

After some testing I found that the networking feature isn't as stable
as I hoped. From the same source it works a lot better on Linux.
However I still think it's worth it.
> 
> > I placed visualboyadvance-m inside the vbam package for quick testing,
> > but considering it pulls in extra dependencies and is its own thing
> > it might be cleaner to put it in its own subpackage.
> 
> I agree, we also provide separate packages in similar cases like mgba
> and mgba-qt.
> 
> The hard part :) is what to name the wx package. We shouldn't call it
> "visualboyadvance-m" after the executable, because nobody looking at
> the package names will know the difference between the "vbam" and
> "visualboyadvance-m" packages. So maybe vbam-wxwidgets?

I personally would've gone for visualboyadvance-m, but I don't care
enough about the name and went with your suggestion.
> 
> > +@tag update-desktop-database
> > +@tag gtk-update-icon-cache %D/share/icons/hicolor
> 
> Needs additional RUN_DEPENDS.
> 
Fixed

Somehow update-plist added share/applications/, and share/icons...
I've left in the new PLIST-main, but I think it's worth explicit
mentioning.

Index: Makefile
===================================================================
RCS file: /cvs/ports/emulators/vbam/Makefile,v
retrieving revision 1.41
diff -u -p -r1.41 Makefile
--- Makefile    7 Feb 2024 20:51:39 -0000       1.41
+++ Makefile    17 May 2024 10:39:57 -0000
@@ -1,13 +1,16 @@
 BROKEN-alpha =         ICE or OOM on hq_implementation.cpp
 BROKEN-hppa =          ICE or OOM on src/filters/hq/c/hq_base.h:421
 
-COMMENT =              emulator for Nintendo Game Boy (Color/Advance)
+COMMENT-main =         emulator for Nintendo Game Boy (Color/Advance)
+COMMENT-wxwidgets =    emulator for Nintendo Game Boy (Color/Advance) with GUI
 
 GH_ACCOUNT =           visualboyadvance-m
 GH_PROJECT =           ${GH_ACCOUNT}
 GH_TAGNAME =           v2.1.9
 PKGNAME =              vbam-${GH_TAGNAME:S/v//}
 
+MULTI_PACKAGES =       -main -wxwidgets
+
 CATEGORIES =           emulators
 
 HOMEPAGE =             https://www.vba-m.com
@@ -15,9 +18,15 @@ HOMEPAGE =           https://www.vba-m.com
 # GPLv2+ (see doc/License.txt)
 PERMIT_PACKAGE =               Yes
 
-WANTLIB += ${COMPILER_LIBCXX}
-WANTLIB += GL GLU SDL2 c charset iconv intl m sfml-network sfml-system
-WANTLIB += z
+cWANTLIB += ${COMPILER_LIBCXX}
+cWANTLIB += GL GLU SDL2 c charset iconv intl m sfml-network sfml-system
+cWANTLIB += z
+
+WANTLIB-main =         ${cWANTLIB}
+WANTLIB-wxwidgets =    ${cWANTLIB}
+WANTLIB-wxwidgets +=   wx_gtk3u_xrc-3.2 wx_baseu_xml-3.2 wx_gtk3u_html-3.2
+WANTLIB-wxwidgets +=   wx_baseu_net-3.2 wx_gtk3u_core-3.2 wx_baseu-3.2 
wx_gtk3u_gl-3.2
+WANTLIB-wxwidgets +=   wx_gtk3u_gl-3.2
 
 MODULES =              devel/cmake
 
@@ -25,13 +34,20 @@ MODULES =           devel/cmake
 COMPILER =             base-clang ports-gcc
 
 BUILD_DEPENDS =                devel/gettext,-tools
+# visualboyadvance-m
+BUILD_DEPENDS +=       archivers/zip
 
-LIB_DEPENDS =          devel/gettext,-runtime \
+cLIB_DEPENDS =         devel/gettext,-runtime \
                        devel/sdl2 \
                        multimedia/sfml
+LIB_DEPENDS-main =     ${cLIB_DEPENDS}
+LIB_DEPENDS-wxwidgets += ${cLIB_DEPENDS} x11/wxWidgets
+
+RUN_DEPENDS-wxwidgets =        devel/desktop-file-utils \
+                       x11/gtk+4,-guic
 
 CONFIGURE_ARGS +=      -DENABLE_FFMPEG=OFF \
-                       -DENABLE_WX=OFF \
+                       -DENABLE_WX=ON \
                        -DENABLE_SDL=ON
 # Creates unlinkable files ('data' according to file(1))
 CONFIGURE_ARGS +=      -DENABLE_LTO=OFF
Index: patches/patch-src_wx_panel_cpp
===================================================================
RCS file: patches/patch-src_wx_panel_cpp
diff -N patches/patch-src_wx_panel_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_wx_panel_cpp      17 May 2024 10:39:57 -0000
@@ -0,0 +1,27 @@
+Index: src/wx/panel.cpp
+--- src/wx/panel.cpp.orig
++++ src/wx/panel.cpp
+@@ -2309,6 +2309,7 @@ void GLDrawingPanel::DrawingPanelInit()
+         else
+             wxLogDebug(_("Disabling GLX VSync."));
+
++        Display *cdisplay;
+         static PFNGLXSWAPINTERVALEXTPROC glXSwapIntervalEXT = NULL;
+         static PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = NULL;
+         static PFNGLXSWAPINTERVALMESAPROC glXSwapIntervalMESA = NULL;
+@@ -2321,8 +2322,9 @@ void GLDrawingPanel::DrawingPanelInit()
+         if (strstr(glxQuery, "GLX_EXT_swap_control") != NULL)
+         {
+             glXSwapIntervalEXT = 
reinterpret_cast<PFNGLXSWAPINTERVALEXTPROC>(glXGetProcAddress((const 
GLubyte*)"glXSwapIntervalEXT"));
+-            if (glXSwapIntervalEXT)
+-                glXSwapIntervalEXT(glXGetCurrentDisplay(),
++            cdisplay = glXGetCurrentDisplay();
++            if (glXSwapIntervalEXT && cdisplay)
++                glXSwapIntervalEXT(cdisplay,
+                                    glXGetCurrentDrawable(), 
OPTION(kPrefVsync));
+             else
+                 systemScreenMessage(_("Failed to set glXSwapIntervalEXT"));
+@@ -2700,4 +2702,4 @@ void GameArea::UnsuspendScreenSaver() {
+         xscreensaver_suspended = false;
+     }
+ #endif // HAVE_XSS
Index: pkg/DESCR
===================================================================
RCS file: pkg/DESCR
diff -N pkg/DESCR
--- pkg/DESCR   16 Sep 2013 01:17:27 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-VBA-M is a Nintendo Game Boy, Game Boy Color, and Game Boy Advance
-emulator. It is a fork of the now inactive VisualBoy Advance project,
-with goals to improve the capabilities and features of the emulator.
Index: pkg/DESCR-main
===================================================================
RCS file: pkg/DESCR-main
diff -N pkg/DESCR-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-main      17 May 2024 10:39:57 -0000
@@ -0,0 +1,3 @@
+VBA-M is a Nintendo Game Boy, Game Boy Color, and Game Boy Advance
+emulator. It is a fork of the now inactive VisualBoy Advance project,
+with goals to improve the capabilities and features of the emulator.
Index: pkg/DESCR-wxwidgets
===================================================================
RCS file: pkg/DESCR-wxwidgets
diff -N pkg/DESCR-wxwidgets
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-wxwidgets 17 May 2024 10:39:57 -0000
@@ -0,0 +1,2 @@
+vbam-wxwidgets is a wxWidgets based graphical frontend for the vbam Game Boy
+emulator, with some additional features.
Index: pkg/PLIST
===================================================================
RCS file: pkg/PLIST
diff -N pkg/PLIST
--- pkg/PLIST   11 Mar 2022 18:59:42 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,6 +0,0 @@
-@bin bin/vbam
-@man man/man6/vbam.6
-share/examples/vbam/
-share/examples/vbam/vbam.cfg
-share/vbam/
-share/vbam/vba-over.ini
Index: pkg/PLIST-main
===================================================================
RCS file: pkg/PLIST-main
diff -N pkg/PLIST-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-main      17 May 2024 10:39:57 -0000
@@ -0,0 +1,8 @@
+@bin bin/vbam
+@man man/man6/vbam.6
+share/applications/
+share/examples/vbam/
+share/examples/vbam/vbam.cfg
+share/icons/
+share/vbam/
+share/vbam/vba-over.ini
Index: pkg/PLIST-wxwidgets
===================================================================
RCS file: pkg/PLIST-wxwidgets
diff -N pkg/PLIST-wxwidgets
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-wxwidgets 17 May 2024 10:39:57 -0000
@@ -0,0 +1,83 @@
+@bin bin/visualboyadvance-m
+@man man/man6/visualboyadvance-m.6
+share/applications/visualboyadvance-m.desktop
+share/icons/hicolor/128x128/apps/visualboyadvance-m.png
+share/icons/hicolor/16x16/apps/visualboyadvance-m.png
+share/icons/hicolor/22x22/apps/visualboyadvance-m.png
+share/icons/hicolor/24x24/apps/visualboyadvance-m.png
+share/icons/hicolor/256x256/apps/visualboyadvance-m.png
+share/icons/hicolor/32x32/apps/visualboyadvance-m.png
+share/icons/hicolor/48x48/apps/visualboyadvance-m.png
+share/icons/hicolor/64x64/apps/visualboyadvance-m.png
+share/icons/hicolor/96x96/apps/visualboyadvance-m.png
+share/icons/hicolor/scalable/apps/visualboyadvance-m.svg
+share/locale/bg/LC_MESSAGES/wxvbam.mo
+share/locale/br/LC_MESSAGES/wxvbam.mo
+share/locale/cs/LC_MESSAGES/wxvbam.mo
+share/locale/de/LC_MESSAGES/wxvbam.mo
+share/locale/el/LC_MESSAGES/wxvbam.mo
+share/locale/en_US/
+share/locale/en_US/LC_MESSAGES/
+share/locale/en_US/LC_MESSAGES/wxvbam.mo
+share/locale/es/LC_MESSAGES/wxvbam.mo
+share/locale/es_419/
+share/locale/es_419/LC_MESSAGES/
+share/locale/es_419/LC_MESSAGES/wxvbam.mo
+share/locale/es_CO/
+share/locale/es_CO/LC_MESSAGES/
+share/locale/es_CO/LC_MESSAGES/wxvbam.mo
+share/locale/es_PE/
+share/locale/es_PE/LC_MESSAGES/
+share/locale/es_PE/LC_MESSAGES/wxvbam.mo
+share/locale/es_US/
+share/locale/es_US/LC_MESSAGES/
+share/locale/es_US/LC_MESSAGES/wxvbam.mo
+share/locale/fr/LC_MESSAGES/wxvbam.mo
+share/locale/fr_FR/
+share/locale/fr_FR/LC_MESSAGES/
+share/locale/fr_FR/LC_MESSAGES/wxvbam.mo
+share/locale/gl/LC_MESSAGES/wxvbam.mo
+share/locale/he_IL/
+share/locale/he_IL/LC_MESSAGES/
+share/locale/he_IL/LC_MESSAGES/wxvbam.mo
+share/locale/hu/LC_MESSAGES/wxvbam.mo
+share/locale/hu_HU/
+share/locale/hu_HU/LC_MESSAGES/
+share/locale/hu_HU/LC_MESSAGES/wxvbam.mo
+share/locale/id/LC_MESSAGES/wxvbam.mo
+share/locale/it_IT/
+share/locale/it_IT/LC_MESSAGES/
+share/locale/it_IT/LC_MESSAGES/wxvbam.mo
+share/locale/ja/LC_MESSAGES/wxvbam.mo
+share/locale/ko/LC_MESSAGES/wxvbam.mo
+share/locale/ko_KR/
+share/locale/ko_KR/LC_MESSAGES/
+share/locale/ko_KR/LC_MESSAGES/wxvbam.mo
+share/locale/ms_MY/
+share/locale/ms_MY/LC_MESSAGES/
+share/locale/ms_MY/LC_MESSAGES/wxvbam.mo
+share/locale/nb/LC_MESSAGES/wxvbam.mo
+share/locale/nl/LC_MESSAGES/wxvbam.mo
+share/locale/pl/LC_MESSAGES/wxvbam.mo
+share/locale/pl_PL/
+share/locale/pl_PL/LC_MESSAGES/
+share/locale/pl_PL/LC_MESSAGES/wxvbam.mo
+share/locale/pt_BR/LC_MESSAGES/wxvbam.mo
+share/locale/pt_PT/
+share/locale/pt_PT/LC_MESSAGES/
+share/locale/pt_PT/LC_MESSAGES/wxvbam.mo
+share/locale/ru_RU/
+share/locale/ru_RU/LC_MESSAGES/
+share/locale/ru_RU/LC_MESSAGES/wxvbam.mo
+share/locale/sv/LC_MESSAGES/wxvbam.mo
+share/locale/tr/LC_MESSAGES/wxvbam.mo
+share/locale/uk/LC_MESSAGES/wxvbam.mo
+share/locale/zh-Hans/
+share/locale/zh-Hans/LC_MESSAGES/
+share/locale/zh-Hans/LC_MESSAGES/wxvbam.mo
+share/locale/zh/LC_MESSAGES/wxvbam.mo
+share/locale/zh_CN/LC_MESSAGES/wxvbam.mo
+share/metainfo/
+share/metainfo/visualboyadvance-m.metainfo.xml
+@tag update-desktop-database
+@tag gtk-update-icon-cache %D/share/icons/hicolor

Reply via email to