pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/games/craft Make games/craft build again.
details: https://anonhg.NetBSD.org/pkgsrc/rev/4f3d19cb6bdf
branches: trunk
changeset: 442691:4f3d19cb6bdf
user: dholland <dholland%pkgsrc.org@localhost>
date: Sun Nov 29 03:11:54 2020 +0000
description:
Make games/craft build again.
The custom C++ preprocessor thingy has been choking for a while on
clang; recently gcc's jointed the party. Work around this by building
it with -g instead of -O2. (For me at least with gcc, while -O2
produces a tool that gives spurious syntax errors, plain -O gives one
that loops forever instead, which isn't an improvement.)
Maybe someday someone will bother to find out where the undefined
behavior is.
Also build the actual game with -Wno-return-type to silence complaints
about dead functions not declared as dead and similar, and while here
adjust things so it still installs correctly regardless of umask.
diffstat:
games/craft/Makefile | 10 ++++++++--
games/craft/distinfo | 3 ++-
games/craft/patches/patch-Makefile | 23 +++++++++++++++++++++++
3 files changed, 33 insertions(+), 3 deletions(-)
diffs (77 lines):
diff -r 226792275e10 -r 4f3d19cb6bdf games/craft/Makefile
--- a/games/craft/Makefile Sun Nov 29 02:24:20 2020 +0000
+++ b/games/craft/Makefile Sun Nov 29 03:11:54 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.34 2019/11/03 19:28:47 rillig Exp $
+# $NetBSD: Makefile,v 1.35 2020/11/29 03:11:54 dholland Exp $
DISTNAME= craftcc35
PKGNAME= craft-3.5
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= games x11
MASTER_SITES= http://ibiblio.org/pub/linux/games/strategy/
EXTRACT_SUFX= .tar.Z
@@ -38,6 +38,11 @@
INSTALLATION_DIRS= bin
+.include "../../mk/compiler.mk"
+.if !empty(PKGSRC_COMPILER:Mclang) || !empty(PKGSRC_COMPILER:Mgcc)
+CFLAGS+=-Wno-return-type
+.endif
+
post-extract:
find ${WRKSRC} -type f -name '*~' -print | xargs rm -f
for f in `find ${WRKSRC} -name "*.hc" -type f -print`; do \
@@ -47,6 +52,7 @@
${CHMOD} a-x ${WRKSRC}/html/pic/craft.gif.old
${CHMOD} a-x ${WRKSRC}/html/craftcc.html
rm -f ${WRKSRC}/hcc/hcc
+ ${CHMOD} -R go+rX ${WRKSRC}/hcraft ${WRKSRC}/buttons ${WRKSRC}/html
.include "../../x11/libX11/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 226792275e10 -r 4f3d19cb6bdf games/craft/distinfo
--- a/games/craft/distinfo Sun Nov 29 02:24:20 2020 +0000
+++ b/games/craft/distinfo Sun Nov 29 03:11:54 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2015/11/03 20:56:46 agc Exp $
+$NetBSD: distinfo,v 1.14 2020/11/29 03:11:54 dholland Exp $
SHA1 (craft-jumbo-patch-20140913.gz) = 8bb0f2e67bda9e8e7cb093db3625958f0fd6ed39
RMD160 (craft-jumbo-patch-20140913.gz) = 95d696f9ccd227f23f28cb898b9af54c7fbc18ad
@@ -8,5 +8,6 @@
RMD160 (craftcc35.tar.Z) = 402a2c2ca37df4d86381b434437395424199859e
SHA512 (craftcc35.tar.Z) = 8b83e98eb352ed1a7ec391c80906c84f50bd72d57a804f629a160597e31cf8df9cf83ec9dd2a78e4dee0147482a359c3a47844693f9be38abee7dcf730a4c67d
Size (craftcc35.tar.Z) = 3123677 bytes
+SHA1 (patch-Makefile) = 1f6074b445c70fbb5fea5a373dcfa4556310ef60
SHA1 (patch-craft.hc) = 21bfc32566d3f0ccee65fe52871704457ffaa1cc
SHA1 (patch-object__handler.hc) = c5143b605d37aef793ffa07b9191d777a5b9c8f3
diff -r 226792275e10 -r 4f3d19cb6bdf games/craft/patches/patch-Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/craft/patches/patch-Makefile Sun Nov 29 03:11:54 2020 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-Makefile,v 1.1 2020/11/29 03:11:54 dholland Exp $
+
+Build the preprocessor front end thingy with -g instead of with -O2.
+
+With -O2 it crashes with a message about EOF inside a string constant;
+this has been happening with clang for a while and gcc recently joined
+the party. With just -O, it loops forever instead for me, which isn't
+an improvement.
+
+This should serve as a workaround until someone gets around to
+figuring out where the undefined behavior is.
+
+--- Makefile~ 2020-11-29 02:36:49.745300963 +0000
++++ Makefile
+@@ -42,7 +42,7 @@ depend:
+ @false
+
+ ${HCC}: hcc/hcc.cc
+- ${CXX} ${CFLAGS} hcc/hcc.cc -o hcc/hcc
++ ${CXX} ${CFLAGS:S/-O2/-g/} hcc/hcc.cc -o hcc/hcc
+
+ install:
+ [ -d ${DESTDIR} ]
Home |
Main Index |
Thread Index |
Old Index