pkgsrc-Changes archive

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

CVS commit: pkgsrc/games/craft



Module Name:    pkgsrc
Committed By:   dholland
Date:           Sun Nov 29 03:11:55 UTC 2020

Modified Files:
        pkgsrc/games/craft: Makefile distinfo
Added Files:
        pkgsrc/games/craft/patches: patch-Makefile

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 pkgsrc/games/craft/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/games/craft/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/games/craft/patches/patch-Makefile

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

Modified files:

Index: pkgsrc/games/craft/Makefile
diff -u pkgsrc/games/craft/Makefile:1.34 pkgsrc/games/craft/Makefile:1.35
--- pkgsrc/games/craft/Makefile:1.34    Sun Nov  3 19:28:47 2019
+++ pkgsrc/games/craft/Makefile Sun Nov 29 03:11:54 2020
@@ -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 @@ SUBST_SED.buttons=   -e 's+buttons+${PREFI
 
 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 @@ post-extract:
        ${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"

Index: pkgsrc/games/craft/distinfo
diff -u pkgsrc/games/craft/distinfo:1.13 pkgsrc/games/craft/distinfo:1.14
--- pkgsrc/games/craft/distinfo:1.13    Tue Nov  3 20:56:46 2015
+++ pkgsrc/games/craft/distinfo Sun Nov 29 03:11:54 2020
@@ -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 @@ SHA1 (craftcc35.tar.Z) = 8862b9001aa7d75
 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

Added files:

Index: pkgsrc/games/craft/patches/patch-Makefile
diff -u /dev/null pkgsrc/games/craft/patches/patch-Makefile:1.1
--- /dev/null   Sun Nov 29 03:11:55 2020
+++ pkgsrc/games/craft/patches/patch-Makefile   Sun Nov 29 03:11:54 2020
@@ -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