zeur here.

[not subscribed to this list so please Cc me on reply. thanks!]

It's seldom that I feel the urgent need to patch something in ports, but
here we are... the below patches add the following flavours:

 'dyncore':  re-enable the dynamic core;
 'nosplash': disable the spam upon invocation.

Hope this is useful to somebody :)

        --zeurkous.

Index: ports/emulators/dosbox/Makefile
===================================================================
RCS file: /cvs/ports/emulators/dosbox/Makefile,v
retrieving revision 1.38
diff -u -p -r1.38 Makefile
--- ports/emulators/dosbox/Makefile     29 Jul 2017 08:59:35 -0000      1.38
+++ ports/emulators/dosbox/Makefile     5 Jan 2019 10:10:08 -0000
@@ -34,8 +34,21 @@ CONFIGURE_ENV=CPPFLAGS="-I${LOCALBASE}/i
 CONFIGURE_ENV+=LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
 CONFIGURE_ARGS+=       --disable-alsatest
 
+PATCH_LIST=    patch-*
+
+FLAVORS=       dyncore nosplash
+FLAVOR?=
+
+.if ${FLAVOR:L:Mnosplash}
+PATCH_LIST+=   nosplash
+.endif
+
+.if ${FLAVOR:L:Mdyncore}
+PATCH_LIST+=   wxneeded
+.else
 # needs W+X memory
 CONFIGURE_ARGS+=       --disable-dynamic-core
+.endif
 
 pre-configure:
        cp ${FILESDIR}/midi_sndio.h ${WRKSRC}/src/gui

--- /dev/null   Sat Jan  5 10:11:15 2019
+++ ports/emulators/dosbox/patches/nosplash     Sat Jan  5 08:54:58 2019
@@ -0,0 +1,44 @@
+--- src/gui/..ar/0/sdlmain.cpp Mon May 10 17:43:54 2010
++++ src/gui/sdlmain.cpp        Sat Jan  5 08:54:39 2019
+@@ -986,7 +986,9 @@
+ static unsigned char logo[32*32*4]= {
+ #include "dosbox_logo.h"
+ };
++#ifdef TOTAL_WANKER
+ #include "dosbox_splash.h"
++#endif
+ 
+ //extern void UI_Run(bool);
+ static void GUI_StartUp(Section * sec) {
+@@ -1169,6 +1171,7 @@
+     Bit32u bmask = 0x00ff0000;
+ //#endif
+ 
++#ifdef TOTAL_WANKER
+ /* Please leave the Splash screen stuff in working order in DOSBox. We spend 
a lot of time making DOSBox. */
+       SDL_Surface* splash_surf = SDL_CreateRGBSurface(SDL_SWSURFACE, 640, 
400, 32, rmask, gmask, bmask, 0);
+       if (splash_surf) {
+@@ -1229,6 +1232,7 @@
+               delete [] tmpbufp;
+ 
+       }
++#endif
+ 
+       /* Get some Event handlers */
+       MAPPER_AddHandler(KillSwitch,MK_f9,MMOD1,"shutdown","ShutDown");
+@@ -1542,6 +1546,7 @@
+       Bit32u gmask = 0x0000ff00;                    
+       Bit32u bmask = 0x00ff0000;
+ #endif
++#ifdef TOTAL_WANKER
+       SDL_Surface* splash_surf = SDL_CreateRGBSurface(SDL_SWSURFACE, 640, 
400, 32, rmask, gmask, bmask, 0);
+       if (!splash_surf) return;
+ 
+@@ -1562,6 +1567,7 @@
+       SDL_BlitSurface(splash_surf, NULL, sdl.surface, NULL);
+       SDL_Flip(sdl.surface);
+       SDL_Delay(12000);
++#endif
+ }
+    
+ static void launcheditor() {

--- /dev/null   Sat Jan  5 10:11:26 2019
+++ ports/emulators/dosbox/patches/wxneeded     Sat Jan  5 09:36:25 2019
@@ -0,0 +1,10 @@
+--- src/..ar/0/Makefile.am     Mon May 10 17:43:54 2010
++++ src/Makefile.am            Sat Jan  5 09:34:46 2019
+@@ -14,6 +14,7 @@
+ dosbox_SOURCES = dosbox.cpp $(ico_stuff)
+ dosbox_LDADD = cpu/libcpu.a debug/libdebug.a dos/libdos.a fpu/libfpu.a  
hardware/libhardware.a gui/libgui.a \
+                ints/libints.a misc/libmisc.a shell/libshell.a 
hardware/serialport/libserial.a libs/gui_tk/libgui_tk.a
++dosbox_LDFLAGS = -z wxneeded
+ 
+ EXTRA_DIST = winres.rc dosbox.ico
+

Reply via email to