On Fri, May 31 2019, <zeurkous@volny.cz> wrote:
> [not subscribed, please Cc, thanks.]
Not to rain on your parade, but...
> 6.5 update of the previous patch, w/ additional 'ne2000' flavour.
>
> 'dyncore': re-enable the dynamic core (possibly insecure)
You don't mention a rationale for this. The only wxneeded report I know
of mentions no performance change.
https://marc.info/?l=openbsd-ports&m=149053625314161&w=2
So what's the point of lowering the security of an emulator possibly
used to run untrusted images?
> 'ne2000': add third-party ne(4) emulation
I guess this is the easiest way to get networking support in dosbox.
But is that a good thing? Running DOS applications on the modern
internet looks dubious at best.
Technically such a patch should probably be handled using
PATCHFILES/SUPDISTFILES.
> 'nosplash': disable spam piccy upon invocation
Is that a serious proposal? The wording used for the ifdef doesn't seem
appropriate. Regarding the intent, your diff contains the surrounding
line:
> + /* Please leave the Splash screen stuff in working order in DOSBox. We spend a lot of time making DOSBox. */
That change doesn't look desirable in the ports tree IMO.
> Tested only in the most limited of fashions (on 6.5), but expected to
> work fine. As always, {bug,test} reports are very welcome.
Obviously tests on -current would be better.
If you're proposing this diff for inclusion in the ports tree, please
make that clear. Your earlier proposal (with MAINTAINER in Cc) didn't
make it clear either:
https://marc.info/?l=openbsd-ports&m=154669079320603&w=2
FLAVORS should be seldom used, they add complexity and make
tests/updates harder.
s/WANT_LIB/WANTLIB/ below
> Enjoy!
>
> --zeurkous.
>
> --- ports/emulators/dosbox/Makefile.orig Tue Jan 22 04:31:41 2019
> +++ ports/emulators/dosbox/Makefile Fri May 31 19:34:00 2019
> @@ -6,6 +6,7 @@
>
> VERSION= 0.74-2
> DISTNAME= dosbox-${VERSION}
> +REVISION= 0
> PKGNAME= dosbox-${VERSION:S/-/./}
> CATEGORIES= games x11 emulators
> MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=dosbox/}
> @@ -37,8 +38,26 @@
> CONFIGURE_ENV+=LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
> CONFIGURE_ARGS+= --disable-alsatest
>
> +PATCH_LIST= patch-*
> +
> +FLAVORS= dyncore ne2000 nosplash
> +FLAVOR?=
> +
> +.if ${FLAVOR:L:Mne2000}
> +PATCH_LIST+= ne2000
> +WANT_LIB+=pcap
> +.endif
> +
> +.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 Fri May 31 19:56:39 2019
> +++ ports/emulators/dosbox/patches/ne2000 Fri May 31 19:45:02 2019
> @@ -0,0 +1,2047 @@
> +--- visualc_net/dosbox.vcproj.orig Thu Jul 5 13:24:23 2018
> ++++ visualc_net/dosbox.vcproj Fri May 31 18:19:21 2019
> +@@ -480,6 +480,9 @@
> + <File
> + RelativePath="..\src\hardware\mixer.cpp">
> + </File>
> ++ <File
> ++ RelativePath="..\src\hardware\ne2000.cpp">
> ++ </File>
> + <File
> + RelativePath="..\src\hardware\pic.cpp">
> + </File>
> +@@ -827,6 +830,9 @@
> + </File>
> + <File
> + RelativePath="..\include\mouse.h">
> ++ </File>
> ++ <File
> ++ RelativePath="..\include\ne2000.h">
> + </File>
> + <File
> + RelativePath="..\include\paging.h">
> +
> +--- src/platform/visualc/config.h.orig Mon Aug 27 14:55:55 2018
> ++++ src/platform/visualc/config.h Fri May 31 18:19:21 2019
> +@@ -12,6 +12,9 @@
> + /* Define to 1 to enable internal modem support, requires SDL_net */
> + #define C_MODEM 1
> +
> ++/* Define to 1 to enable NE2000 ethernet passthrough, requires libpcap */
> ++#define C_NE2000 1
> ++
> + /* Define to 1 to enable IPX networking support, requires SDL_net */
> + #define C_IPX 1
> +
> +
> +--- src/hardware/ne2000.cpp.orig Fri May 31 18:19:21 2019
> ++++ src/hardware/ne2000.cpp Fri May 31 18:28:13 2019
> +@@ -0,0 +1,1660 @@
> ++#include "config.h"
> ++
> ++#ifdef C_NE2000
> ++
> ++
> ++#include "dosbox.h"
> ++#include <string.h>
> ++#include <stdio.h>
> ++#include "support.h"
> ++#include "inout.h"
> ++#include "setup.h"
> ++#include "callback.h"
> ++#include "timer.h"
> ++#include "pic.h"
> ++#include "cpu.h"
> ++
> ++/* Couldn't find a real spec for the NE2000 out there, hence this is adapted heavily from Bochs */
> ++
> ++
> ++/////////////////////////////////////////////////////////////////////////
> ++// $Id: ne2k.cc,v 1.56.2.1 2004/02/02 22:37:22 cbothamy Exp $
> ++/////////////////////////////////////////////////////////////////////////
> ++//
> ++// Copyright (C) 2002 MandrakeSoft S.A.
> ++//
> ++// MandrakeSoft S.A.
> ++// 43, rue d'Aboukir
> ++// 75002 Paris - France
> ++// http://www.linux-mandrake.com/
> ++// http://www.mandrakesoft.com/
> ++//
> ++// This library is free software; you can redistribute it and/or
> ++// modify it under the terms of the GNU Lesser General Public
> ++// License as published by the Free Software Foundation; either
> ++// version 2 of the License, or (at your option) any later version.
> ++//
> ++// This library is distributed in the hope that it will be useful,
> ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
> ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> ++// Lesser General Public License for more details.
> ++//
> ++// You should have received a copy of the GNU Lesser General Public
> ++// License along with this library; if not, write to the Free Software
> ++// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> ++
> ++// Peter Grehan (grehan@iprg.nokia.com) coded all of this
> ++// NE2000/ether stuff.
> ++
> ++#include "ne2000.h"
> ++
> ++#define HAVE_REMOTE
> ++
> ++#include "pcap.h"
> ++// Handle to WinPCap device
> ++pcap_t *adhandle = 0;
> ++static void NE2000_TX_Event(Bitu val);
> ++
> ++#ifdef WIN32
> ++// DLL loading
> ++#define pcap_sendpacket(A,B,C) PacketSendPacket(A,B,C)
> ++#define pcap_close(A) PacketClose(A)
> ++#define pcap_freealldevs(A) PacketFreealldevs(A)
> ++#define pcap_open(A,B,C,D,E,F) PacketOpen(A,B,C,D,E,F)
> ++#define pcap_next_ex(A,B,C) PacketNextEx(A,B,C)
> ++#define pcap_findalldevs_ex(A,B,C,D) PacketFindALlDevsEx(A,B,C,D)
> ++
> ++int (*PacketSendPacket)(pcap_t *, const u_char *, int) = 0;
> ++void (*PacketClose)(pcap_t *) = 0;
> ++void (*PacketFreealldevs)(pcap_if_t *) = 0;
> ++pcap_t* (*PacketOpen)(char const *,int,int,int,struct pcap_rmtauth *,char *) = 0;
> ++int (*PacketNextEx)(pcap_t *, struct pcap_pkthdr **, const u_char **) = 0;
> ++int (*PacketFindALlDevsEx)(char *, struct pcap_rmtauth *, pcap_if_t **, char *) = 0;
> ++
> ++
No comments:
Post a Comment