pkgsrc-Users archive

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

Re: GCC 6 vs abiword-plugins, aliados, xmahjongg?



xmahjongg builds now.

aliados has a legit warning (-Wnarrowing which is now fatal). I tried to
fix it. also someone says make_pair changed in C++11 and I can't really
C++ so just changed to C++03. does it behave correctly with the attached
patch? not sure how to use it.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/aliados/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	18 Aug 2015 07:31:07 -0000	1.10
+++ Makefile	10 Apr 2018 05:06:24 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=		aliados-0.2.0
-PKGREVISION=		2
+PKGREVISION=		3
 CATEGORIES=		emulators
 MASTER_SITES=		http://www.arrakis.es/~ninsesabe/aliados/
 EXTRACT_SUFX=		.tgz
@@ -12,7 +12,7 @@
 COMMENT=		CP/M 80 emulator
 
 GNU_CONFIGURE=		YES
-USE_LANGUAGES=		c c++
+USE_LANGUAGES=		c c++03
 USE_NCURSES=		yes # tigetstr tparm setupterm
 
 INSTALLATION_DIRS=	bin share/doc/aliados
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/aliados/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- distinfo	3 Nov 2015 20:30:55 -0000	1.6
+++ distinfo	10 Apr 2018 05:06:24 -0000
@@ -7,4 +7,4 @@
 SHA1 (patch-configure) = 737e114f2eac860a29e4984c2f973e4233238477
 SHA1 (patch-configure.ac) = c5c5300f48deee8aae633eeb7528b6aec9e6a908
 SHA1 (patch-cpm.cpp) = cd7350f8d854c10ec3afefb15df37855680a4ed9
-SHA1 (patch-realconsole.cpp) = 3dda687f9964399820b69fdd04ce2d8b23bdfdd3
+SHA1 (patch-realconsole.cpp) = 8fd49b769ed727ae8d220279c8989c6accb0796a
Index: patches/patch-realconsole.cpp
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/aliados/patches/patch-realconsole.cpp,v
retrieving revision 1.1
diff -u -r1.1 patch-realconsole.cpp
--- patches/patch-realconsole.cpp	16 Oct 2013 23:59:36 -0000	1.1
+++ patches/patch-realconsole.cpp	10 Apr 2018 05:06:24 -0000
@@ -1,5 +1,13 @@
 $NetBSD: patch-realconsole.cpp,v 1.1 2013/10/16 23:59:36 roy Exp $
 
+Don't require a ncurses header.
+Provide fallback definitions for things from above ncurses header.
+
+One of the charset characters is interpunct, which is multibyte
+handle multibyte output (fixes compilation with -Wnarrowing)
+
+handle non-variadic tparm
+
 --- realconsole.cpp.orig	2005-05-14 21:11:38.000000000 +0000
 +++ realconsole.cpp
 @@ -5,11 +5,15 @@
@@ -19,7 +27,58 @@
  #include <termios.h>
  #include <unistd.h>
  #include <fcntl.h>
-@@ -223,7 +227,7 @@ inline void calltparm (const char * str,
+@@ -17,6 +21,7 @@
+ 
+ #include <stdlib.h>
+ #include <sys/ioctl.h>
++#include <wchar.h>
+ 
+ // This is from ncurses.
+ #ifdef TIOCGSIZE
+@@ -55,7 +60,7 @@ public:
+ 	void deactivate ();
+ 	bool charavailable ();
+ 	unsigned char charin ();
+-	void charout (unsigned char c);
++	void charout (wchar_t c);
+ 	void left ();
+ 	void right ();
+ 	unsigned lines ();
+@@ -118,7 +123,7 @@ size_t dim_array (const C (&) [N])
+ { return N; }
+ 
+ 
+-unsigned char charset [256]= {
++wchar_t charset [256]= {
+         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
+         0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 
+         0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 
+@@ -153,12 +158,12 @@ unsigned char charset [256]= {
+         0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF,
+ };
+ 
+-inline void docharoutraw (unsigned char c)
++inline void docharoutraw (wchar_t c)
+ {
+-	write (STDOUT_FILENO, & c, 1);
++	write (STDOUT_FILENO, & c, sizeof(wchar_t));
+ }
+ 
+-inline void docharout (unsigned char c)
++inline void docharout (wchar_t c)
+ {
+ 	docharoutraw (charset [c] );
+ }
+@@ -209,7 +214,7 @@ inline const char * mytigetstr (const ch
+ 
+ int putfunc (int ic)
+ {
+-	docharoutraw (static_cast <unsigned char> (ic) );
++	docharoutraw (static_cast <wchar_t> (ic) );
+ 	return 0;
+ }
+ 
+@@ -223,7 +228,7 @@ inline void calltparm (const char * str,
  {
  	if (str != NULL)
  	{
@@ -28,3 +87,12 @@
  	}
  }
  
+@@ -761,7 +766,7 @@ unsigned char RealConsole::In::charin ()
+ 	return c;
+ }
+ 
+-void RealConsole::In::charout (unsigned char c)
++void RealConsole::In::charout (wchar_t c)
+ {
+ 	#ifdef NO_CURSES
+ 


Home | Main Index | Thread Index | Old Index