Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jul 2018 09:38:55 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r475876 - in head/games/xpacman: . files
Message-ID:  <201807300938.w6U9ctVq029549@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Mon Jul 30 09:38:55 2018
New Revision: 475876
URL: https://svnweb.freebsd.org/changeset/ports/475876

Log:
  games/xpacman: Fix build with Clang 6
  
  ./shapes.h:63:38: error: constant expression evaluates to 240 which cannot be narrowed to type 'char' [-Wc++11-narrowing]
  static SHAPETYPE pacman0_bits[]=    {0xf0, 0x0f, 0xf0, 0x0f, 0xfc, 0x3f, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x3f, 0xfc, 0x3f, 0xf0, 0x0f, 0xf0, 0x0f};
                                       ^~~~
  
  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p475478_s336801/logs/errors/xpacman-1.002.log

Added:
  head/games/xpacman/files/patch-pac.h   (contents, props changed)
Modified:
  head/games/xpacman/Makefile

Modified: head/games/xpacman/Makefile
==============================================================================
--- head/games/xpacman/Makefile	Mon Jul 30 09:38:14 2018	(r475875)
+++ head/games/xpacman/Makefile	Mon Jul 30 09:38:55 2018	(r475876)
@@ -14,9 +14,13 @@ LICENSE=	GPLv2
 
 RUN_DEPENDS+=	${LOCALBASE}/share/fonts/misc/9x18.pcf.gz:x11-fonts/font-misc-misc
 
+USES=	compiler
+
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS+=--enable-doublesize
-CPPFLAGS+=	-I${LOCALBASE}/include
+# Build ignores CFLAGS, CXXFLAGS
+CPPFLAGS+=	-I${LOCALBASE}/include ${CPPFLAGS_${CHOSEN_COMPILER_TYPE}}
+CPPFLAGS_clang=	-Wno-c++11-narrowing
 LDFLAGS+=	-L${LOCALBASE}/lib
 USE_XORG=	x11 xext
 PLIST_FILES=	bin/pacman

Added: head/games/xpacman/files/patch-pac.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xpacman/files/patch-pac.h	Mon Jul 30 09:38:55 2018	(r475876)
@@ -0,0 +1,15 @@
+./pac.h:36:30: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
+#define PACTITLE "Pacman v. "VERSION" \xa9 1995,1999,2000 by Roar Thron\xe6s"
+                             ^
+
+--- pac.h.orig	2018-07-30 09:36:15 UTC
++++ pac.h
+@@ -33,7 +33,7 @@ void writetext(); //just draw text
+                   
+ //change my name and you will be sued!!!!!!!!!!!!!!!!!!!!!!!!!!
+ #ifndef VMS
+-#define PACTITLE "Pacman v. "VERSION" \xa9 1995,1999,2000 by Roar Thron\xe6s"
++#define PACTITLE "Pacman v. " VERSION " \xa9 1995,1999,2000 by Roar Thron\xe6s"
+ #else
+ #define PACTITLE "Pacman v. 1_002 \xa9 1995,1999,2000 by Roar Thron\xe6s"
+ #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807300938.w6U9ctVq029549>