pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/emulators/ucon64



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sun Jul  7 22:47:57 UTC 2019

Modified Files:
        pkgsrc/emulators/ucon64: Makefile PLIST distinfo options.mk
        pkgsrc/emulators/ucon64/patches: patch-backup_libcd64_Makefile
            patch-backup_libcd64_cd64io.c patch-backup_libcd64_cd64io.h
            patch-configure patch-configure.in
Added Files:
        pkgsrc/emulators/ucon64/patches: patch-libdiscmage_misc__z.h
            patch-misc_archive.h
Removed Files:
        pkgsrc/emulators/ucon64/patches: patch-Makefile patch-config.mak.in
            patch-libdiscmage_libdiscmage.h patch-misc_parallel.c
            patch-misc_unzip.h

Log Message:
ucon64: update to 2.2.0.

With much help from upstream to get this compiling nicely on NetBSD.

2.2.0
- added (GB) --gp2bmp convert Game Boy Printer data (produced by --xmccl) to
BMP (by dbjh; based on version of gblnk (by Chris McCormick) improved by
Difegue. Many thanks to Difegue for providing me with Game Boy Printer data.
Thanks to Martin Eyre for documenting his findings about Game Boy Printer
commands)
- added (SNES) --sminis=ID convert *.srm (SRAM) file to SNES/Super Famicom
Classic Mini (hakchi2) format for game with identifier ID (by dbjh)
- added (SNES) --smini2srm convert SNES/Super Famicom Classic Mini (hakchi2)
SRAM data to *.srm (SRAM) file (by dbjh)
- added support for NetBSD (by dbjh; thanks to Thomas Klausner for his help)
- updated support for OpenBSD (64-bit) (by dbjh)
- updated (all) made -o also work for --rrom, --r83 and --rjoliet, just like
the other rename options (--rdat, --rl and --ru) (by dbjh)
- updated (SNES) improved reliability of GDSF communication for PCs with a
parallel port that supports ECP (built-in or PCIe parallel port card). At last.
It is essential to correctly specify ecr_offset for this to work (by dbjh; many
thanks to Mystic_Merlin for testing)
- updated (SNES) improved --ufosd by adding specific support for 10 and 12 Mbit
HiROMs and implementing a generic way to set the SRAM mapping bytes (by dbjh;
thanks to Revenant for the information and Trenton_net for testing)
- added (SNES) --xufosd send ROM to Super UFO Pro 8 SD. Be sure to use a tool
like Zadig to add libusb-0.1 (libusb-win32) support (by dbjh; thanks to
Revenant for the information and Trenton_net and Revenant for testing)
- updated (SNES) added NTSC/PAL fix for Soul Blazer F/G and Super Metroid E (by
dbjh; thanks to Mystic_Merlin)
- added (SNES) work-around for using the Game Doctor SF6 protocol for parallel
ports that do not support reading from the Control register. It is good enough
to at least allow dumping saver data and SRAM. To enable the new functionality
assign a value other than 0 to the variable gd6_send_byte_delay. See the FAQ
question 55 for details (by dbjh; many thanks to NorQue and Mystic_Merlin for
testing)
- updated (SNES) made --gd3 specify a pass-through mapping for LoROM DSP games
(by dbjh)
- updated (SNES) added proper recognition of Pro Fighter headers of LoROM DSP
games with 2, 8 or 32 kB SRAM (by dbjh)
- updated (SNES) added interpretation of remaining part of GD3 header (DRAM and
SRAM mapping) to --dbuh (by dbjh)
- updated (SNES & Genesis) fixed split file detection for formats other than
(M)GD and MGH which I broke in 2.1.0 (by dbjh)
- added (all) --split=N split ROM in parts of N Bytes (including possible
header). This is a generic file splitting option. Use -s, optionally in
combination with --ssize=SIZE to split files for use with a specific console or
backup unit (by dbjh)
- added (SNES) support for Super Magicom/SMC IC2 file format. This format is
used by several ancient backup units, including the Twin Supercom, Future
Supercom Pro.9 and UFO Super Drive PRO 6 HYPER VERSION in order to run HiROM
games up to 16 Mbit. Use --ic2 to convert a file to Super Magicom/SMC IC2
format (by dbjh; thanks to Mystic_Merlin for info and testing)
- updated (SNES) fixed bug in --ufo that caused it to produce incorrect headers
for games that do not use SRAM (by dbjh; thanks to Mystic_Merlin for feedback
and testing)
- updated (SNES) fixed bug in -j for files in UFO format smaller than or equal
to 8 Mbit (by dbjh)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/emulators/ucon64/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/emulators/ucon64/PLIST
cvs rdiff -u -r1.9 -r1.10 pkgsrc/emulators/ucon64/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/emulators/ucon64/options.mk
cvs rdiff -u -r1.2 -r0 pkgsrc/emulators/ucon64/patches/patch-Makefile \
    pkgsrc/emulators/ucon64/patches/patch-libdiscmage_libdiscmage.h \
    pkgsrc/emulators/ucon64/patches/patch-misc_unzip.h
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_Makefile \
    pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_cd64io.c \
    pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_cd64io.h \
    pkgsrc/emulators/ucon64/patches/patch-configure \
    pkgsrc/emulators/ucon64/patches/patch-configure.in
cvs rdiff -u -r1.1 -r0 pkgsrc/emulators/ucon64/patches/patch-config.mak.in \
    pkgsrc/emulators/ucon64/patches/patch-misc_parallel.c
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/emulators/ucon64/patches/patch-libdiscmage_misc__z.h \
    pkgsrc/emulators/ucon64/patches/patch-misc_archive.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/emulators/ucon64/Makefile
diff -u pkgsrc/emulators/ucon64/Makefile:1.12 pkgsrc/emulators/ucon64/Makefile:1.13
--- pkgsrc/emulators/ucon64/Makefile:1.12       Wed Mar  7 12:34:55 2018
+++ pkgsrc/emulators/ucon64/Makefile    Sun Jul  7 22:47:57 2019
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.12 2018/03/07 12:34:55 wiz Exp $
+# $NetBSD: Makefile,v 1.13 2019/07/07 22:47:57 wiz Exp $
 
-DISTNAME=              ucon64-2.1.0-src
+DISTNAME=              ucon64-2.2.0-src
 PKGNAME=               ${DISTNAME:S/-src//}
-PKGREVISION=           1
 CATEGORIES=            emulators
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=ucon64/}
 
@@ -13,23 +12,16 @@ LICENSE=            gnu-gpl-v2
 
 WRKSRC=                        ${WRKDIR}/${DISTNAME}/src
 
-CONFIGURE_ARGS+=       --disable-dload
-CPPFLAGS+=             -D__unix__
+CONFIGURE_ARGS+=       --with-libcd64
 GNU_CONFIGURE=         yes
 USE_TOOLS+=            gmake
 CHECK_PORTABILITY_SKIP+=install_beos.sh
 
-.include "../../mk/bsd.prefs.mk"
-
-.if ${OPSYS} == NetBSD
-MAKE_ENV+=             OSTYPE=netbsd
-.endif
-
 INSTALLATION_DIRS=     bin lib share/examples/ucon64 share/doc/ucon64/images
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/ucon64 ${DESTDIR}${PREFIX}/bin
-       ${INSTALL_LIB} ${WRKSRC}/libdiscmage/libdiscmage.so ${DESTDIR}${PREFIX}/lib
+       ${INSTALL_LIB} ${WRKSRC}/libdiscmage/discmage.so ${DESTDIR}${PREFIX}/lib
        ${INSTALL_DATA} ${WRKSRC}/[a-z]*.txt \
                ${DESTDIR}${PREFIX}/share/examples/ucon64
        ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/*.html \

Index: pkgsrc/emulators/ucon64/PLIST
diff -u pkgsrc/emulators/ucon64/PLIST:1.4 pkgsrc/emulators/ucon64/PLIST:1.5
--- pkgsrc/emulators/ucon64/PLIST:1.4   Wed Mar  7 12:34:55 2018
+++ pkgsrc/emulators/ucon64/PLIST       Sun Jul  7 22:47:57 2019
@@ -1,6 +1,6 @@
-@comment $NetBSD: PLIST,v 1.4 2018/03/07 12:34:55 wiz Exp $
+@comment $NetBSD: PLIST,v 1.5 2019/07/07 22:47:57 wiz Exp $
 bin/ucon64
-lib/libdiscmage.so
+lib/discmage.so
 share/doc/ucon64/changes.html
 share/doc/ucon64/developers.html
 share/doc/ucon64/faq.html
@@ -20,6 +20,7 @@ share/doc/ucon64/images/logo.png
 share/doc/ucon64/images/mdpro.png
 share/doc/ucon64/images/msg.png
 share/doc/ucon64/images/pcepro.png
+share/doc/ucon64/images/pl.png
 share/doc/ucon64/images/qd16.png
 share/doc/ucon64/images/sc.png
 share/doc/ucon64/images/sf3.png
@@ -29,6 +30,7 @@ share/doc/ucon64/images/smd.png
 share/doc/ucon64/images/smspro.png
 share/doc/ucon64/images/snesppak.png
 share/doc/ucon64/images/swc.png
+share/doc/ucon64/images/ufosd.png
 share/doc/ucon64/images/v64.png
 share/doc/ucon64/images/v64jr.png
 share/doc/ucon64/install.html

Index: pkgsrc/emulators/ucon64/distinfo
diff -u pkgsrc/emulators/ucon64/distinfo:1.9 pkgsrc/emulators/ucon64/distinfo:1.10
--- pkgsrc/emulators/ucon64/distinfo:1.9        Wed Mar  7 12:34:55 2018
+++ pkgsrc/emulators/ucon64/distinfo    Sun Jul  7 22:47:57 2019
@@ -1,16 +1,13 @@
-$NetBSD: distinfo,v 1.9 2018/03/07 12:34:55 wiz Exp $
+$NetBSD: distinfo,v 1.10 2019/07/07 22:47:57 wiz Exp $
 
-SHA1 (ucon64-2.1.0-src.tar.gz) = 83506c965ba4ab6fa7122c9dcebbabe6c553cbc3
-RMD160 (ucon64-2.1.0-src.tar.gz) = b3b6b95a44cb50ac7e3634d07b1b50960fb971f8
-SHA512 (ucon64-2.1.0-src.tar.gz) = da2dbe8a573e7dc779f69859f4d3508d4818dcfd99b6b397a7b23a2038a1d8c85835fae9e237a1639ec6179e8ceabb95fd0d65f95f963de99bc61024f686580e
-Size (ucon64-2.1.0-src.tar.gz) = 1348408 bytes
-SHA1 (patch-Makefile) = 9cfc3c474562d5073099286a9659e4e5d4cf5d2f
-SHA1 (patch-backup_libcd64_Makefile) = b46127daa77cd9516954365897247c8f33088883
-SHA1 (patch-backup_libcd64_cd64io.c) = b47d14bb41708caa5a582444d5f4ef35cda973ea
-SHA1 (patch-backup_libcd64_cd64io.h) = 026c79ecc577e701b27113d369e6c8d977f01d53
-SHA1 (patch-config.mak.in) = 87db3e62bbd5fa94fa83878b227e3ed3ff8920e1
-SHA1 (patch-configure) = a4b89f6885abe731b75f6277bc563ec992f8d0c9
-SHA1 (patch-configure.in) = 3d5a3ecad1b50499b001eda39ec0100d0ed8ee16
-SHA1 (patch-libdiscmage_libdiscmage.h) = 7a5ced96ae619fd843d3b1acdcd28788937cc79a
-SHA1 (patch-misc_parallel.c) = 164137f352049698a2ff4758bd3dda72ab4dadec
-SHA1 (patch-misc_unzip.h) = 3a065530cd80c74985a997459ee67847b8f75864
+SHA1 (ucon64-2.2.0-src.tar.gz) = e92167c4537c9b74c879242b785d108f0f91e641
+RMD160 (ucon64-2.2.0-src.tar.gz) = 4bd6e17fbe970800f1f4e563263ccc86794eddf7
+SHA512 (ucon64-2.2.0-src.tar.gz) = 1f21083585d9e3a32546139e2b0786ff37d32e070b21ecc39a1d179e39be3e786d5d07b06c1dce8b3f43e14800974159f54a9a469e59070b2b50c4cbb85136dc
+Size (ucon64-2.2.0-src.tar.gz) = 1488002 bytes
+SHA1 (patch-backup_libcd64_Makefile) = c6d659c96ea2389266b6480f2d3afe79a647685d
+SHA1 (patch-backup_libcd64_cd64io.c) = ab1d2b9ad9c3258114f946b13c28520b40eb60b2
+SHA1 (patch-backup_libcd64_cd64io.h) = c4f915436c3867ea77ddc95942a074a8266a5c03
+SHA1 (patch-configure) = 2f56081b1ea8b0fcabc1979866fddc144241bc62
+SHA1 (patch-configure.in) = 069ffe610faec56696b71b42f2abafa53488a5ff
+SHA1 (patch-libdiscmage_misc__z.h) = 3456714ff4ea4328a7d6b3cd785e76abbca2423a
+SHA1 (patch-misc_archive.h) = 3ed6b8a6464e0fcb2992e0065b1e84ac0572f670

Index: pkgsrc/emulators/ucon64/options.mk
diff -u pkgsrc/emulators/ucon64/options.mk:1.2 pkgsrc/emulators/ucon64/options.mk:1.3
--- pkgsrc/emulators/ucon64/options.mk:1.2      Sat Feb 10 13:53:48 2018
+++ pkgsrc/emulators/ucon64/options.mk  Sun Jul  7 22:47:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.2 2018/02/10 13:53:48 khorben Exp $
+# $NetBSD: options.mk,v 1.3 2019/07/07 22:47:57 wiz Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.ucon64
 PKG_SUPPORTED_OPTIONS= libusb
@@ -10,8 +10,5 @@ PKG_SUPPORTED_OPTIONS=        libusb
 ###
 .if !empty(PKG_OPTIONS:Mlibusb)
 CONFIGURE_ARGS+=       --with-libusb
-CPPFLAGS+=             -I${BUILDLINK_PREFIX.libusb}/include
-LDFLAGS+=              -L${BUILDLINK_PREFIX.libusb}/lib
-LDFLAGS+=              ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.libusb}/lib
 .  include "../../mk/libusb.buildlink3.mk"
 .endif

Index: pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_Makefile
diff -u pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_Makefile:1.1 pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_Makefile:1.2
--- pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_Makefile:1.1   Wed Mar  7 12:34:55 2018
+++ pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_Makefile       Sun Jul  7 22:47:57 2019
@@ -1,54 +1,48 @@
-$NetBSD: patch-backup_libcd64_Makefile,v 1.1 2018/03/07 12:34:55 wiz Exp $
+$NetBSD: patch-backup_libcd64_Makefile,v 1.2 2019/07/07 22:47:57 wiz Exp $
 
 Patch from upstream to improve build on NetBSD.
 
---- backup/libcd64/Makefile.orig       2016-02-11 00:32:59.000000000 +0000
+--- backup/libcd64/Makefile.orig       2019-05-21 00:13:14.000000000 +0000
 +++ backup/libcd64/Makefile
-@@ -2,9 +2,9 @@ CC=gcc
- 
- ifdef DEBUG
- # I think we only use gnu99 instead of c99 due to va_args extensions.
--CFLAGS+=-I. -Wall -W -pg -g -pedantic -ansi -DDEBUG
-+CFLAGS+=-I. -Wall -W -std=gnu99 -pg -g -pedantic -ansi -DDEBUG
- else
--CFLAGS+=-I. -Wall -W -O6 -funroll-loops -fexpensive-optimizations
-+CFLAGS+=-I. -Wall -W -std=gnu99 -O6 -funroll-loops -fexpensive-optimizations
+@@ -80,19 +80,10 @@ RAWIO=1
  endif
  
- ifndef DJGPP
-@@ -40,14 +40,6 @@ LDFLAGS+=-Wl,--out-implib,libcd64dll.a
- endif
+ ifeq ($(OSTYPE),OpenBSD)
+-# i386_iopl() is located in libi386.a (note the .a)
+-#LIBS+=/usr/lib/libi386.a
+-#LDFLAGS+=-li386
+-LIBS+=/usr/lib/libamd64.a
+-LDFLAGS+=-lamd64
+ RAWIO=1
  endif
  
--# The next check is not really specific to FreeBSD or OpenBSD -- the version of
--#  gcc I use is just old.
--ifeq ($(findstring FreeBSD,$(OSTYPE)),)
--ifeq ($(findstring OpenBSD,$(OSTYPE)),)
--CFLAGS+=-std=gnu99
--endif
--endif
--
- 
- DEFAULT_BUILD=1
+ ifeq ($(OSTYPE),NetBSD)
+-#LIBS+=/usr/lib/libi386.a
+-#LDFLAGS+=-li386
+-LIBS+=/usr/lib/libx86_64.a
+-LDFLAGS+=-lx86_64
+ RAWIO=1
+ endif
  
-@@ -90,8 +82,18 @@ endif
+@@ -131,6 +122,21 @@ endif
  
- ifeq ($(findstring OpenBSD,$(OSTYPE)),OpenBSD)
- # i386_iopl() is located in libi386.a (note the .a)
--LIBS+=/usr/lib/libi386.a
--LDFLAGS+=-L/usr/lib -li386
+ ifdef RAWIO
+ CFLAGS+=-DCD64_USE_RAWIO
++
++ifeq ($(OSTYPE),OpenBSD)
++# i386_iopl() is located in libi386.a (note the .a)
 +#LIBS+=/usr/lib/libi386.a
 +#LDFLAGS+=-li386
 +LIBS+=/usr/lib/libamd64.a
 +LDFLAGS+=-lamd64
-+RAWIO=1
 +endif
 +
-+ifeq ($(findstring NetBSD,$(OSTYPE)),NetBSD)
++ifeq ($(OSTYPE),NetBSD)
 +#LIBS+=/usr/lib/libi386.a
 +#LDFLAGS+=-li386
 +LIBS+=/usr/lib/libx86_64.a
 +LDFLAGS+=-lx86_64
- RAWIO=1
++endif
  endif
  
+ default: all
Index: pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_cd64io.c
diff -u pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_cd64io.c:1.1 pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_cd64io.c:1.2
--- pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_cd64io.c:1.1   Wed Mar  7 12:34:55 2018
+++ pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_cd64io.c       Sun Jul  7 22:47:57 2019
@@ -1,39 +1,227 @@
-$NetBSD: patch-backup_libcd64_cd64io.c,v 1.1 2018/03/07 12:34:55 wiz Exp $
+$NetBSD: patch-backup_libcd64_cd64io.c,v 1.2 2019/07/07 22:47:57 wiz Exp $
 
 Patch from upstream to improve build on NetBSD.
 
---- backup/libcd64/cd64io.c.orig       2017-07-29 05:55:48.000000000 +0000
+--- backup/libcd64/cd64io.c.orig       2019-05-06 06:48:17.000000000 +0000
 +++ backup/libcd64/cd64io.c
-@@ -827,14 +827,29 @@ int cd64_open_rawio(struct cd64_t *cd64)
-                       return 0;
-               }
-       }
--#elif defined __OpenBSD__
--      /* I cannot test i386_set_ioperm(), so I only use i386_iopl() */
-+#elif (defined __OpenBSD__ || defined __NetBSD__) && defined __i386__
-       ret = i386_iopl(3);
-       if (ret == -1) {
-               cd64->notice_callback2("i386_iopl: %s", strerror(errno));
-               return 0;
-       }
--#elif defined __FreeBSD__
+@@ -41,7 +41,20 @@
+ 
+ #ifdef CD64_USE_RAWIO
+ 
++static INLINE uint8_t inb2(uint16_t);
++static INLINE void outb2(uint8_t, uint16_t);
++
+ #if defined _WIN32 || defined __CYGWIN__
++#ifdef _MSC_VER
++#pragma warning(push)
++#pragma warning(disable: 4255) /* 'function' : no function prototype given: converting '()' to '(void)' */
++#pragma warning(disable: 4668) /* 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives' */
++#pragma warning(disable: 4820) /* 'bytes' bytes padding added after construct 'member_name' */
 +#endif
-+#ifdef __x86_64__
-+#ifdef __OpenBSD__
-+      ret = amd64_iopl(3);
-+      if (ret == -1) {
-+              cd64->notice_callback2("amd64_iopl: %s", strerror(errno));
-+              return 0;
-+      }
-+#elif defined __NetBSD__
-+      ret = x86_64_iopl(3);
-+      if (ret == -1) {
-+              cd64->notice_callback2("x86_64_iopl: %s", strerror(errno));
-+              return 0;
-+      }
++#include <windows.h>                            /* defines _WIN32 (checks for   */
++#ifdef _MSC_VER                                 /*  __CYGWIN__ must come first) */
++#pragma warning(pop)
 +#endif
+ #ifdef __CYGWIN__
+ #include <dlfcn.h>
+ 
+@@ -73,10 +86,8 @@ static short int (WINAPI *IsDriverInstal
+ static unsigned char (__stdcall *DlPortReadPortUchar)(unsigned short) = NULL;
+ static void (__stdcall *DlPortWritePortUchar)(unsigned short, unsigned char) = NULL;
+ 
+-static INLINE uint8_t inb(uint16_t);
+-static INLINE void outb(uint8_t, uint16_t);
+-static uint8_t (*input_byte)(uint16_t) = inb;
+-static void (*output_byte)(uint8_t, uint16_t) = outb;
++static uint8_t (*input_byte)(uint16_t) = inb2;
++static void (*output_byte)(uint8_t, uint16_t) = outb2;
+ #endif
+ 
+ #ifdef  __BEOS__
+@@ -774,9 +785,8 @@ static LONG new_exception_filter(LPEXCEP
+ #endif
+ #endif /* _WIN32 || __CYGWIN__ */
+ 
+-#if ((defined _WIN32 || defined __CYGWIN__ || defined __BEOS__) && \
+-    (defined __i386__ || defined __x86_64__)) || defined _MSC_VER
+-static INLINE uint8_t inb(uint16_t port) {
++#if defined __i386__ || defined __x86_64__ || defined _MSC_VER
++static INLINE uint8_t inb2(uint16_t port) {
+ 
+ #ifdef __BEOS__
+       st_ioport_t temp;
+@@ -785,27 +795,30 @@ static INLINE uint8_t inb(uint16_t port)
+       ioctl(io_portfd, 'r', &temp, 0);
+ 
+       return temp.data8;
+-#else /* Win32 */
++#elif defined _WIN32 || defined __CYGWIN__
+       if (io_driver_found) return input_byte(port);
+-      else {
++      else
+ #ifdef _MSC_VER
+ #ifdef _M_IX86
+-              return (unsigned char) _inp(port);
++              return (uint8_t) _inp(port);
+ #endif
+-#else
+-              unsigned char byte;
 +#endif
-+#ifdef __FreeBSD__
-       cd64->portdevfd = open("/dev/io", O_RDWR);
-       if (cd64->portdevfd == -1) {
-               cd64->portdevfd = 0;
++#endif /* _WIN32 || __CYGWIN__ */
++#if defined __MINGW32__ || defined __CYGWIN__ || \
++    ((defined __i386__ || defined __x86_64__) && !defined __BEOS__)
++      {
++              uint8_t byte;
+               __asm__ __volatile__
+               ("inb %1, %0"
+                 : "=a" (byte)
+                 : "d" (port)
+               );
+               return byte;
+-#endif
+       }
+ #endif
+ }
+ 
+-static INLINE void outb(uint8_t byte, uint16_t port) {
++static INLINE void outb2(uint8_t byte, uint16_t port) {
+ 
+ #ifdef __BEOS__
+       st_ioport_t temp;
+@@ -813,24 +826,27 @@ static INLINE void outb(uint8_t byte, ui
+       temp.port = port;
+       temp.data8 = byte;
+       ioctl(io_portfd, 'w', &temp, 0);
+-#else /* Win32 */
++#elif defined _WIN32 || defined __CYGWIN__
+       if (io_driver_found) output_byte(byte, port);
+-      else {
++      else
+ #ifdef _MSC_VER
+ #ifdef _M_IX86
+               _outp(port, byte);
+ #endif
+-#else
++#endif
++#endif /* _WIN32 || __CYGWIN__ */
++#if defined __MINGW32__ || defined __CYGWIN__ || \
++    ((defined __i386__ || defined __x86_64__) && !defined __BEOS__)
++      {
+               __asm__ __volatile__
+               ("outb %1, %0"
+                 :
+                 : "d" (port), "a" (byte)
+               );
+-#endif
+       }
+ #endif
+ }
+-#endif /* inb/outb defs */
++#endif /* inb2/outb2 defs */
+ 
+ int cd64_open_rawio(struct cd64_t *cd64) {
+ 
+@@ -1112,8 +1128,8 @@ int cd64_close_rawio(struct cd64_t *cd64
+       close_module(io_driver, cd64);
+       io_driver = NULL;
+       io_driver_found = 0;
+-      input_byte = inb;
+-      output_byte = outb;
++      input_byte = inb2;
++      output_byte = outb2;
+ #endif
+ 
+       return 1;
+@@ -1127,7 +1143,7 @@ static INLINE int cd64_wait_rawio(struct
+       i = 0;
+ 
+       if (cd64->using_ppa) {
+-              status = inb((uint16_t) (cd64->port+1));
++              status = inb2((uint16_t) (cd64->port+1));
+ 
+               while (status & 0x80) {
+                       i++;
+@@ -1136,15 +1152,15 @@ static INLINE int cd64_wait_rawio(struct
+                                * Try to knock some sense into it. */
+                               uint8_t dir = 1;
+                               status = 0x06 | (dir << 5);
+-                              outb(status, (uint16_t) (cd64->port+2));
++                              outb2(status, (uint16_t) (cd64->port+2));
+ 
+                               dir = 0;
+                               status = 0x04 | (dir << 5);
+-                              outb(status, (uint16_t) (cd64->port+2));
++                              outb2(status, (uint16_t) (cd64->port+2));
+                               status = 0x05 | (dir << 5);
+-                              outb(status, (uint16_t) (cd64->port+2));
++                              outb2(status, (uint16_t) (cd64->port+2));
+                               status = 0x04 | (dir << 5);
+-                              outb(status, (uint16_t) (cd64->port+2));
++                              outb2(status, (uint16_t) (cd64->port+2));
+ 
+                               reset_tries++;
+                               i = 0;
+@@ -1155,14 +1171,14 @@ static INLINE int cd64_wait_rawio(struct
+                               break;
+                       }
+ 
+-                      status = inb((uint16_t) (cd64->port+1));
++                      status = inb2((uint16_t) (cd64->port+1));
+               }
+       }
+       else { /* Comms link */
+-              status = inb((uint16_t) (cd64->port+2));
++              status = inb2((uint16_t) (cd64->port+2));
+               while (status & 1) {
+                       /* Do we need to handle a stuck situation here? */
+-                      status = inb((uint16_t) (cd64->port+2));
++                      status = inb2((uint16_t) (cd64->port+2));
+               }
+       }
+ 
+@@ -1181,10 +1197,10 @@ int cd64_xfer_rawio(struct cd64_t *cd64,
+               if (delayms) MSLEEP(delayms);
+               dir = 1;
+               ctl = 0x06 | (dir << 5);
+-              outb(ctl, (uint16_t) (cd64->port+2));
++              outb2(ctl, (uint16_t) (cd64->port+2));
+               if (delayms) MSLEEP(delayms);
+               if (rd) {
+-                      *rd = inb((uint16_t) cd64->port);
++                      *rd = inb2((uint16_t) cd64->port);
+ #if DEBUG_LOWLEVEL
+                       printf("got %xh", *rd);
+                       if (*rd > 0x20) printf(" (%c)", *rd);
+@@ -1195,10 +1211,10 @@ int cd64_xfer_rawio(struct cd64_t *cd64,
+               if (delayms) MSLEEP(delayms);
+               dir = 0;
+               ctl = 0x04 | (dir << 5);
+-              outb(ctl, (uint16_t) (cd64->port+2));
++              outb2(ctl, (uint16_t) (cd64->port+2));
+               if (delayms) MSLEEP(delayms);
+               if (wr) {
+-                      outb(*wr, (uint16_t) cd64->port);
++                      outb2(*wr, (uint16_t) cd64->port);
+ #if DEBUG_LOWLEVEL
+                       printf("put %xh", *wr);
+                       if (*wr > 0x20) printf(" (%c)", *wr);
+@@ -1207,15 +1223,15 @@ int cd64_xfer_rawio(struct cd64_t *cd64,
+               }
+               if (delayms) MSLEEP(delayms);
+               ctl = 0x05 | (dir << 5);
+-              outb(ctl, (uint16_t) (cd64->port+2));
++              outb2(ctl, (uint16_t) (cd64->port+2));
+               if (delayms) MSLEEP(delayms);
+               ctl = 0x04 | (dir << 5);
+-              outb(ctl, (uint16_t) (cd64->port+2));
++              outb2(ctl, (uint16_t) (cd64->port+2));
+       }
+       else { /* Comms link */
+-              outb(*wr, (uint16_t) cd64->port);
++              outb2(*wr, (uint16_t) cd64->port);
+               if (!cd64_wait_rawio(cd64)) { return 0; }
+-              *rd = inb((uint16_t) cd64->port);
++              *rd = inb2((uint16_t) cd64->port);
+       }
+ 
+       return 1;
Index: pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_cd64io.h
diff -u pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_cd64io.h:1.1 pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_cd64io.h:1.2
--- pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_cd64io.h:1.1   Wed Mar  7 12:34:55 2018
+++ pkgsrc/emulators/ucon64/patches/patch-backup_libcd64_cd64io.h       Sun Jul  7 22:47:57 2019
@@ -1,19 +1,77 @@
-$NetBSD: patch-backup_libcd64_cd64io.h,v 1.1 2018/03/07 12:34:55 wiz Exp $
+$NetBSD: patch-backup_libcd64_cd64io.h,v 1.2 2019/07/07 22:47:57 wiz Exp $
 
 Patch from upstream to improve build on NetBSD.
 
---- backup/libcd64/cd64io.h.orig       2015-11-29 19:31:07.000000000 +0000
+--- backup/libcd64/cd64io.h.orig       2018-03-07 11:09:59.000000000 +0000
 +++ backup/libcd64/cd64io.h
-@@ -34,10 +34,10 @@ int cd64_xfer_portdev(struct cd64_t *cd6
- #if defined __linux__ && (defined __i386__ || defined __x86_64__)
+@@ -30,32 +30,15 @@ int cd64_xfer_portdev(struct cd64_t *cd6
+ #endif
+ 
+ #ifdef CD64_USE_RAWIO
+-/* #define REALLY_SLOW_IO */
+-#if defined __linux__ && (defined __i386__ || defined __x86_64__)
++#ifdef __linux__
  #include <sys/io.h>
  #endif
--#ifdef __OpenBSD__
-+#if (defined __OpenBSD__ || defined __NetBSD__) && (defined __i386__ || defined __x86_64__)
+-#if (defined __OpenBSD__ || defined __NetBSD__) && (defined __i386__ || defined __x86_64__)
++#if defined __OpenBSD__ || defined __NetBSD__
  #include <sys/types.h>
  #include <machine/sysarch.h>
--#include <i386/pio.h>
-+#include <machine/pio.h>
- /* pio.h defines several I/O functions & macros, including the macros inb() and
-  * outb(). This shows that using a bit of inline assembly is not such a bad idea
-  * at all. */
+-#include <machine/pio.h>
+-/* pio.h defines several I/O functions & macros, including the macros inb() and
+- * outb(). This shows that using a bit of inline assembly is not such a bad idea
+- * at all. */
+-#undef inb
+-#define inb(port) __inb(port)
+-#undef outb
+-#define outb(data, port) __outb(port, data)
+ #endif
+ #ifdef __FreeBSD__
+ #include <fcntl.h>
+-#include <machine/cpufunc.h>
+-/* Almost the same story as under OpenBSD. cpufunc.h defines the macros inb()
+- * and outb(). We redefine them. Be sure _POSIX_SOURCE is not defined before
+- * including <machine/cpufunc.h>. */
+-#undef inb
+-#define inb(port) inbv(port)
+-#undef outb
+-#define outb(data, port) outbv(port, data)
+ #endif
+ #ifdef __BEOS__
+ #include <fcntl.h>
+@@ -68,24 +51,6 @@ int cd64_xfer_portdev(struct cd64_t *cd6
+ #pragma warning(pop)
+ #define F_OK 0
+ #endif
+-#ifdef __MSDOS__
+-#include <pc.h>                                 /* inportb() & outportb() */
+-#define inb(port) inportb(port)
+-#define outb(data, port) outportb(port, data)
+-#endif
+-#if defined _WIN32 || defined __CYGWIN__
+-#ifdef _MSC_VER
+-#pragma warning(push)
+-#pragma warning(disable: 4255) /* 'function' : no function prototype given: converting '()' to '(void)' */
+-#pragma warning(disable: 4668) /* 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives' */
+-#pragma warning(disable: 4820) /* 'bytes' bytes padding added after construct 'member_name' */
+-#endif
+-#include <windows.h>                            /* defines _WIN32 (checks for   */
+-#ifdef _MSC_VER                                 /*  __CYGWIN__ must come first) */
+-#pragma warning(pop)
+-#endif
+-#endif /* _WIN32 || __CYGWIN__ */
+-
+ int cd64_open_rawio(struct cd64_t *cd64);
+ int cd64_close_rawio(struct cd64_t *cd64);
+ int cd64_xfer_rawio(struct cd64_t *cd64, uint8_t *wr, uint8_t *rd, int delayms);
+@@ -99,8 +64,8 @@ int cd64_xfer_rawio(struct cd64_t *cd64,
+ #pragma warning(disable: 4668) /* 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives' */
+ #pragma warning(disable: 4820) /* 'bytes' bytes padding added after construct 'member_name' */
+ #endif
+-#include <windows.h>
+-#ifdef _MSC_VER
++#include <windows.h>                            /* defines _WIN32 (checks for   */
++#ifdef _MSC_VER                                 /*  __CYGWIN__ must come first) */
+ #pragma warning(pop)
+ #endif
+ #define MSLEEP(x) Sleep(x)
Index: pkgsrc/emulators/ucon64/patches/patch-configure
diff -u pkgsrc/emulators/ucon64/patches/patch-configure:1.1 pkgsrc/emulators/ucon64/patches/patch-configure:1.2
--- pkgsrc/emulators/ucon64/patches/patch-configure:1.1 Wed Mar  7 12:34:55 2018
+++ pkgsrc/emulators/ucon64/patches/patch-configure     Sun Jul  7 22:47:57 2019
@@ -1,24 +1,15 @@
-$NetBSD: patch-configure,v 1.1 2018/03/07 12:34:55 wiz Exp $
+$NetBSD: patch-configure,v 1.2 2019/07/07 22:47:57 wiz Exp $
 
 Patch from upstream to improve build on NetBSD.
 
---- configure.orig     2017-04-28 17:02:28.000000000 +0000
+--- configure.orig     2019-05-30 15:37:45.000000000 +0000
 +++ configure
-@@ -629,7 +629,7 @@ RANLIB
- LIBOBJS
- DEFINE_USB_MAKE
- DEFINE_ZLIB_MAKE
--LIBI386_MAKE
-+LIBIOPL_NETBSD_MAKE
- DEFINE_LIBCD64_MAKE
- DEFINE_DISCMAGE_MAKE
- DEFINE_DLOPEN_MAKE
-@@ -3300,7 +3300,7 @@ $as_echo "#define USE_LIBCD64 1" >>confd
+@@ -3434,7 +3434,7 @@ fi
  
-   DEFINE_LIBCD64_MAKE="USE_LIBCD64=1"
- else
--      LIBI386_MAKE="-li386"
-+      LIBIOPL_NETBSD_MAKE="-lx86_64"
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libcd64" >&5
- $as_echo "$with_libcd64" >&6; }
+ if test $with_libcd64 = yes; then
+   CFLAGS0=$CFLAGS
+-  CFLAGS+=" -Ibackup/libcd64"
++  CFLAGS="$CFLAGS -Ibackup/libcd64"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include "ultra64/host/cd64lib.h"
Index: pkgsrc/emulators/ucon64/patches/patch-configure.in
diff -u pkgsrc/emulators/ucon64/patches/patch-configure.in:1.1 pkgsrc/emulators/ucon64/patches/patch-configure.in:1.2
--- pkgsrc/emulators/ucon64/patches/patch-configure.in:1.1      Wed Mar  7 12:34:55 2018
+++ pkgsrc/emulators/ucon64/patches/patch-configure.in  Sun Jul  7 22:47:57 2019
@@ -1,27 +1,15 @@
-$NetBSD: patch-configure.in,v 1.1 2018/03/07 12:34:55 wiz Exp $
+$NetBSD: patch-configure.in,v 1.2 2019/07/07 22:47:57 wiz Exp $
 
 Patch from upstream to improve build on NetBSD.
 
---- configure.in.orig  2017-04-28 17:01:51.000000000 +0000
+--- configure.in.orig  2019-05-30 15:24:12.000000000 +0000
 +++ configure.in
-@@ -139,13 +139,16 @@ if test $with_libcd64 = yes; then
-   AC_DEFINE(USE_LIBCD64, 1, [build with libcd64 support (default: no)])
-   DEFINE_LIBCD64_MAKE="USE_LIBCD64=1"
- else
--  dnl libi386 is necessary under OpenBSD, but only if libcd64 isn't enabled. The
--  dnl  reason is that libcd64 already (statically) links to libi386.
--  LIBI386_MAKE="-li386"
-+  dnl libi386 or libamd64 is necessary on OpenBSD, but only if libcd64 isn't
-+  dnl  enabled, because libcd64 already links to libi386 or libamd64.
-+dnl  LIBIOPL_MAKE="-li386"
-+  LIBIOPL_OPENBSD_MAKE="-lamd64"
-+  LIBIOPL_NETBSD_MAKE="-lx86_64"
+@@ -125,7 +125,7 @@ AC_ARG_WITH(libcd64,
+             with_libcd64=no)
+ if test $with_libcd64 = yes; then
+   CFLAGS0=$CFLAGS
+-  CFLAGS+=" -Ibackup/libcd64"
++  CFLAGS="$CFLAGS -Ibackup/libcd64"
+   AC_TRY_COMPILE([#include "ultra64/host/cd64lib.h"], , with_libcd64=yes, with_libcd64=no)
+   CFLAGS=$CFLAGS0
  fi
- AC_MSG_RESULT($with_libcd64)
- AC_SUBST(DEFINE_LIBCD64_MAKE)
--AC_SUBST(LIBI386_MAKE)
-+AC_SUBST(LIBIOPL_OPENBSD_MAKE)
-+AC_SUBST(LIBIOPL_NETBSD_MAKE)
- 
- 
- AC_MSG_CHECKING(whether to build without gzip and zip support)

Added files:

Index: pkgsrc/emulators/ucon64/patches/patch-libdiscmage_misc__z.h
diff -u /dev/null pkgsrc/emulators/ucon64/patches/patch-libdiscmage_misc__z.h:1.1
--- /dev/null   Sun Jul  7 22:47:57 2019
+++ pkgsrc/emulators/ucon64/patches/patch-libdiscmage_misc__z.h Sun Jul  7 22:47:57 2019
@@ -0,0 +1,23 @@
+$NetBSD: patch-libdiscmage_misc__z.h,v 1.1 2019/07/07 22:47:57 wiz Exp $
+
+Patch from upstream to improve build on NetBSD.
+
+--- libdiscmage/misc_z.h.orig  2017-05-05 10:26:38.000000000 +0000
++++ libdiscmage/misc_z.h
+@@ -1,7 +1,7 @@
+ /*
+ misc_z.h - miscellaneous zlib functions
+ 
+-Copyright (c) 2001 - 2004, 2016 - 2017 dbjh
++Copyright (c) 2001 - 2004, 2016 - 2017, 2019 dbjh
+ 
+ 
+ This program is free software; you can redistribute it and/or modify
+@@ -58,6 +58,7 @@ extern off_t q_fsize2 (const char *filen
+ #define fseek(FILE, OFFSET, MODE) fseek2(FILE, OFFSET, MODE)
+ #define fread(BUF, SIZE, NUM, FILE) fread2(BUF, SIZE, NUM, FILE)
+ #define fgetc(FILE) fgetc2(FILE)
++#undef  fgets                                   // necessary on (at least) NetBSD
+ #define fgets(BUF, MAXLEN, FILE) fgets2(BUF, MAXLEN, FILE)
+ #undef  feof                                    // necessary on (at least) Cygwin
+ #define feof(FILE) feof2(FILE)
Index: pkgsrc/emulators/ucon64/patches/patch-misc_archive.h
diff -u /dev/null pkgsrc/emulators/ucon64/patches/patch-misc_archive.h:1.1
--- /dev/null   Sun Jul  7 22:47:57 2019
+++ pkgsrc/emulators/ucon64/patches/patch-misc_archive.h        Sun Jul  7 22:47:57 2019
@@ -0,0 +1,23 @@
+$NetBSD: patch-misc_archive.h,v 1.1 2019/07/07 22:47:57 wiz Exp $
+
+Patch from upstream to improve build on NetBSD.
+
+--- misc/archive.h.orig        2017-05-05 09:40:40.000000000 +0000
++++ misc/archive.h
+@@ -1,7 +1,7 @@
+ /*
+ archive.h - g(un)zip and unzip support
+ 
+-Copyright (c) 2001 - 2004, 2015 - 2017 dbjh
++Copyright (c) 2001 - 2004, 2015 - 2017, 2019 dbjh
+ 
+ 
+ This program is free software; you can redistribute it and/or modify
+@@ -58,6 +58,7 @@ extern off_t fsizeof2 (const char *filen
+ #define fseek(FILE, OFFSET, MODE) fseek2(FILE, OFFSET, MODE)
+ #define fread(BUF, SIZE, NUM, FILE) fread2(BUF, SIZE, NUM, FILE)
+ #define fgetc(FILE) fgetc2(FILE)
++#undef  fgets                                   // necessary on (at least) NetBSD
+ #define fgets(BUF, MAXLEN, FILE) fgets2(BUF, MAXLEN, FILE)
+ #undef  feof                                    // necessary on (at least) Cygwin
+ #define feof(FILE) feof2(FILE)



Home | Main Index | Thread Index | Old Index