pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/emulators/ucon64 ucon64: add patches from upstream to ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3e308b3f688d
branches:  trunk
changeset: 376738:3e308b3f688d
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Wed Mar 07 12:34:55 2018 +0000

description:
ucon64: add patches from upstream to improve build on NetBSD.

Bump PKGREVISION.

diffstat:

 emulators/ucon64/Makefile                                |  12 ++-
 emulators/ucon64/PLIST                                   |   3 +-
 emulators/ucon64/distinfo                                |  15 ++-
 emulators/ucon64/patches/patch-Makefile                  |  70 +++++++++++++++-
 emulators/ucon64/patches/patch-backup_libcd64_Makefile   |  54 ++++++++++++
 emulators/ucon64/patches/patch-backup_libcd64_cd64io.c   |  39 ++++++++
 emulators/ucon64/patches/patch-backup_libcd64_cd64io.h   |  19 ++++
 emulators/ucon64/patches/patch-config.mak.in             |  13 ++
 emulators/ucon64/patches/patch-configure                 |  24 +++++
 emulators/ucon64/patches/patch-configure.in              |  27 ++++++
 emulators/ucon64/patches/patch-libdiscmage_libdiscmage.h |  25 ++++-
 emulators/ucon64/patches/patch-misc_parallel.c           |  54 ++++++++++++
 emulators/ucon64/patches/patch-misc_unzip.h              |  12 +-
 13 files changed, 347 insertions(+), 20 deletions(-)

diffs (truncated from 472 to 300 lines):

diff -r 07f9a8ec6559 -r 3e308b3f688d emulators/ucon64/Makefile
--- a/emulators/ucon64/Makefile Wed Mar 07 12:20:20 2018 +0000
+++ b/emulators/ucon64/Makefile Wed Mar 07 12:34:55 2018 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.11 2018/03/04 15:20:02 wiz Exp $
+# $NetBSD: Makefile,v 1.12 2018/03/07 12:34:55 wiz Exp $
 
 DISTNAME=              ucon64-2.1.0-src
 PKGNAME=               ${DISTNAME:S/-src//}
+PKGREVISION=           1
 CATEGORIES=            emulators
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=ucon64/}
 
@@ -18,10 +19,17 @@
 USE_TOOLS+=            gmake
 CHECK_PORTABILITY_SKIP+=install_beos.sh
 
-INSTALLATION_DIRS=     bin share/examples/ucon64 share/doc/ucon64/images
+.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_DATA} ${WRKSRC}/[a-z]*.txt \
                ${DESTDIR}${PREFIX}/share/examples/ucon64
        ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/*.html \
diff -r 07f9a8ec6559 -r 3e308b3f688d emulators/ucon64/PLIST
--- a/emulators/ucon64/PLIST    Wed Mar 07 12:20:20 2018 +0000
+++ b/emulators/ucon64/PLIST    Wed Mar 07 12:34:55 2018 +0000
@@ -1,5 +1,6 @@
-@comment $NetBSD: PLIST,v 1.3 2018/03/04 15:20:02 wiz Exp $
+@comment $NetBSD: PLIST,v 1.4 2018/03/07 12:34:55 wiz Exp $
 bin/ucon64
+lib/libdiscmage.so
 share/doc/ucon64/changes.html
 share/doc/ucon64/developers.html
 share/doc/ucon64/faq.html
diff -r 07f9a8ec6559 -r 3e308b3f688d emulators/ucon64/distinfo
--- a/emulators/ucon64/distinfo Wed Mar 07 12:20:20 2018 +0000
+++ b/emulators/ucon64/distinfo Wed Mar 07 12:34:55 2018 +0000
@@ -1,9 +1,16 @@
-$NetBSD: distinfo,v 1.8 2018/03/04 15:20:02 wiz Exp $
+$NetBSD: distinfo,v 1.9 2018/03/07 12:34:55 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) = 6e9ad6f6c02d109aee3a71f7abb3b68d43cedf15
-SHA1 (patch-libdiscmage_libdiscmage.h) = 07a52a12091c8220ba5fa50fd7926e77c772208d
-SHA1 (patch-misc_unzip.h) = 25434ddffb3ff1f5d69530ff08d70791bd4ac2ba
+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
diff -r 07f9a8ec6559 -r 3e308b3f688d emulators/ucon64/patches/patch-Makefile
--- a/emulators/ucon64/patches/patch-Makefile   Wed Mar 07 12:20:20 2018 +0000
+++ b/emulators/ucon64/patches/patch-Makefile   Wed Mar 07 12:34:55 2018 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-Makefile,v 1.1 2018/03/04 15:20:02 wiz Exp $
+$NetBSD: patch-Makefile,v 1.2 2018/03/07 12:34:55 wiz Exp $
 
-Do not hardcode -O3.
+Patch from upstream to improve build on NetBSD.
 
 --- Makefile.orig      2017-08-05 23:02:35.000000000 +0000
 +++ Makefile
@@ -13,3 +13,69 @@
  LDFLAGS0:=$(LDFLAGS)
  ifeq ($(findstring darwin,$(OSTYPE)),) # false if OSTYPE contains "darwin"
  # On Mac OS X using -s gives the following warning:
+@@ -54,9 +54,14 @@ endif
+ 
+ else                                    # UNIX, BeOS or Mac OS X (Darwin)
+ 
++ifdef USE_PARALLEL
+ ifeq ($(findstring openbsd,$(OSTYPE)),openbsd) # for example "openbsd3.4"
+-# i386_iopl() is located in libi386.a
+-LDFLAGS+=$(LIBI386)
++# i386_iopl() is located in libi386.a. Use -lamd64 for amd64_iopl().
++LDFLAGS+=$(LIBIOPL_OPENBSD)
++endif
++ifeq ($(findstring netbsd,$(OSTYPE)),netbsd)
++LDFLAGS+=$(LIBIOPL_NETBSD)
++endif
+ endif
+ 
+ ifdef USE_DISCMAGE
+@@ -72,10 +77,12 @@ ifdef DLOPEN
+ ifneq ($(OSTYPE),beos)
+ ifeq ($(findstring freebsd,$(OSTYPE)),) # false if OSTYPE contains "freebsd"
+ ifeq ($(findstring openbsd,$(OSTYPE)),) # false if OSTYPE contains "openbsd"
++ifeq ($(findstring netbsd,$(OSTYPE)),)  # false if OSTYPE contains "netbsd"
+ LDFLAGS+=-ldl
+ endif
+ endif
+ endif
++endif
+ 
+ else                                    # DLOPEN
+ ifdef USE_DISCMAGE                      # GNU specific: "simply expanded variable"
+@@ -231,7 +238,7 @@ ifdef USE_DISCMAGE
+ .PHONY: libdiscmage/$(FULLLIBNAME_DM)
+ libdiscmage/$(FULLLIBNAME_DM):
+ ifeq ($(GCC_WIN),1)
+-      cd libdiscmage && CFLAGS=$(CFLAGS0) LDFLAGS=$(LDFLAGS0) $(MAKE)
++      cd libdiscmage && CFLAGS="$(CFLAGS0)" LDFLAGS="$(LDFLAGS0)" $(MAKE)
+ else
+ ifdef DJGPP
+       cd libdiscmage
+@@ -240,7 +247,7 @@ ifdef DJGPP
+       $(MAKE)
+       cd ..
+ else
+-      cd libdiscmage && CFLAGS=$(CFLAGS0) LDFLAGS=$(LDFLAGS0) $(MAKE)
++      cd libdiscmage && CFLAGS="$(CFLAGS0)" LDFLAGS="$(LDFLAGS0)" $(MAKE)
+ endif                                   # DJGPP
+ endif                                   # GCC_WIN
+ endif                                   # USE_DISCMAGE
+@@ -250,7 +257,7 @@ ifdef USE_LIBCD64
+ #.PHONY: backup/libcd64/libcd64.a  Do not force linking an executable.
+ backup/libcd64/libcd64.a:
+ ifeq ($(GCC_WIN),1)
+-      cd backup/libcd64 && CFLAGS=$(CFLAGS0) LDFLAGS=$(LDFLAGS0) $(MAKE)
++      cd backup/libcd64 && CFLAGS="$(CFLAGS0)" LDFLAGS="$(LDFLAGS0)" $(MAKE)
+ else
+ ifdef DJGPP
+       cd backup/libcd64
+@@ -259,7 +266,7 @@ ifdef DJGPP
+       $(MAKE)
+       cd ../..
+ else
+-      cd backup/libcd64 && CFLAGS=$(CFLAGS0) LDFLAGS=$(LDFLAGS0) $(MAKE)
++      cd backup/libcd64 && CFLAGS="$(CFLAGS0)" LDFLAGS="$(LDFLAGS0)" $(MAKE)
+ endif                                   # DJGPP
+ endif                                   # GCC_WIN
+ endif                                   # USE_LIBCD64
diff -r 07f9a8ec6559 -r 3e308b3f688d emulators/ucon64/patches/patch-backup_libcd64_Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/ucon64/patches/patch-backup_libcd64_Makefile    Wed Mar 07 12:34:55 2018 +0000
@@ -0,0 +1,54 @@
+$NetBSD: patch-backup_libcd64_Makefile,v 1.1 2018/03/07 12:34:55 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
+@@ -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
+ endif
+ 
+ ifndef DJGPP
+@@ -40,14 +40,6 @@ LDFLAGS+=-Wl,--out-implib,libcd64dll.a
+ endif
+ 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
+ 
+@@ -90,8 +82,18 @@ 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
++#LIBS+=/usr/lib/libi386.a
++#LDFLAGS+=-li386
++LIBS+=/usr/lib/libamd64.a
++LDFLAGS+=-lamd64
++RAWIO=1
++endif
++
++ifeq ($(findstring NetBSD,$(OSTYPE)),NetBSD)
++#LIBS+=/usr/lib/libi386.a
++#LDFLAGS+=-li386
++LIBS+=/usr/lib/libx86_64.a
++LDFLAGS+=-lx86_64
+ RAWIO=1
+ endif
+ 
diff -r 07f9a8ec6559 -r 3e308b3f688d emulators/ucon64/patches/patch-backup_libcd64_cd64io.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/ucon64/patches/patch-backup_libcd64_cd64io.c    Wed Mar 07 12:34:55 2018 +0000
@@ -0,0 +1,39 @@
+$NetBSD: patch-backup_libcd64_cd64io.c,v 1.1 2018/03/07 12:34:55 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
+@@ -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__
++#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;
++      }
++#endif
++#endif
++#ifdef __FreeBSD__
+       cd64->portdevfd = open("/dev/io", O_RDWR);
+       if (cd64->portdevfd == -1) {
+               cd64->portdevfd = 0;
diff -r 07f9a8ec6559 -r 3e308b3f688d emulators/ucon64/patches/patch-backup_libcd64_cd64io.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/ucon64/patches/patch-backup_libcd64_cd64io.h    Wed Mar 07 12:34:55 2018 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-backup_libcd64_cd64io.h,v 1.1 2018/03/07 12:34:55 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
+@@ -34,10 +34,10 @@ int cd64_xfer_portdev(struct cd64_t *cd6
+ #if defined __linux__ && (defined __i386__ || defined __x86_64__)
+ #include <sys/io.h>
+ #endif
+-#ifdef __OpenBSD__
++#if (defined __OpenBSD__ || defined __NetBSD__) && (defined __i386__ || defined __x86_64__)
+ #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. */
diff -r 07f9a8ec6559 -r 3e308b3f688d emulators/ucon64/patches/patch-config.mak.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/ucon64/patches/patch-config.mak.in      Wed Mar 07 12:34:55 2018 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-config.mak.in,v 1.1 2018/03/07 12:34:55 wiz Exp $
+
+Patch from upstream to improve build on NetBSD.
+
+--- config.mak.in.orig 2017-04-26 18:39:41.000000000 +0000
++++ config.mak.in
+@@ -7,4 +7,5 @@
+ 
+ CC=@CC@
+ CFLAGS+=@DEFS@
+-LIBI386=@LIBI386_MAKE@
++LIBIOPL_OPENBSD=@LIBIOPL_OPENBSD_MAKE@
++LIBIOPL_NETBSD=@LIBIOPL_NETBSD_MAKE@
diff -r 07f9a8ec6559 -r 3e308b3f688d emulators/ucon64/patches/patch-configure
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/ucon64/patches/patch-configure  Wed Mar 07 12:34:55 2018 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-configure,v 1.1 2018/03/07 12:34:55 wiz Exp $
+
+Patch from upstream to improve build on NetBSD.
+
+--- configure.orig     2017-04-28 17:02:28.000000000 +0000
++++ configure



Home | Main Index | Thread Index | Old Index