summaryrefslogtreecommitdiff
path: root/games/gnuchess
diff options
context:
space:
mode:
authorjmc <jmc>2002-03-15 04:59:16 +0000
committerjmc <jmc>2002-03-15 04:59:16 +0000
commit1b2a3055351cc3e6560a54fa2f1addc1ec1478a6 (patch)
tree2d6eb6e55b8e67d073929471893299f53a520968 /games/gnuchess
parent2f09b97bc6b98887f192884f136a492d71b0771d (diff)
downloadpkgsrc-1b2a3055351cc3e6560a54fa2f1addc1ec1478a6.tar.gz
Check gcc version and for powerpc downgrade CFLAGS to just -O as anything above
that causes bad code generation and core dumps.
Diffstat (limited to 'games/gnuchess')
-rw-r--r--games/gnuchess/Makefile10
-rw-r--r--games/gnuchess/distinfo4
-rw-r--r--games/gnuchess/patches/patch-aa8
3 files changed, 15 insertions, 7 deletions
diff --git a/games/gnuchess/Makefile b/games/gnuchess/Makefile
index d789ad44f29..22b638fa3e9 100644
--- a/games/gnuchess/Makefile
+++ b/games/gnuchess/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2001/11/29 01:12:33 hubertf Exp $
+# $NetBSD: Makefile,v 1.14 2002/03/15 04:59:16 jmc Exp $
# FreeBSD Id: Makefile,v 1.6 1999/01/27 07:41:12 fenner Exp
#
@@ -24,6 +24,14 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/src
BOOKDIR= ${PREFIX}/lib/gnuchess
DOCDIR= ${PREFIX}/share/doc/gnuchess
+# powerpc egcs has problems with -O2 here
+GCC_VERSION!= gcc --version
+.if (${GCC_VERSION:C/-.*$$//} == egcs) && (${MACHINE_ARCH} == "powerpc")
+CONFIGURE_ENV+= CFLAGS="-O -Winline -Wmissing-prototypes -funroll-loops"
+.else
+CONFIGURE_ENV+= CFLAGS="-O3 -Winline -Wmissing-prototypes -funroll-loops -fomit-frame-pointer"
+.endif
+
post-build:
${SED} -e "s|@PREFIX@|${PREFIX}|g" \
${FILESDIR}/gnuchessx.sh > ${WRKDIR}/gnuchessx.sh
diff --git a/games/gnuchess/distinfo b/games/gnuchess/distinfo
index 6a635764b77..33faed58702 100644
--- a/games/gnuchess/distinfo
+++ b/games/gnuchess/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.3 2001/11/11 07:54:55 jlam Exp $
+$NetBSD: distinfo,v 1.4 2002/03/15 04:59:16 jmc Exp $
SHA1 (chess-5.00.tar.gz) = 86b364d60aab4a2ec5932fb800ef4857251a84cd
Size (chess-5.00.tar.gz) = 157211 bytes
SHA1 (gnu500+.patch) = 3ca10daf2beff6f0c03dd9f6c66bea52b8aca6cd
Size (gnu500+.patch) = 9293 bytes
-SHA1 (patch-aa) = 186f8b8eeed1457f4ea50e353d09f1bd039795e8
+SHA1 (patch-aa) = a177d1ac87ae739f62974a277b55c173521cf7d2
SHA1 (patch-ab) = 093285e9955f23f6ab324cae3e768779a28010ff
SHA1 (patch-ac) = f027b84d724ce0380784f2a6a67b1998fd119eee
SHA1 (patch-ad) = 186f7ff808f105cc58f4ea32853dd7bc31faedef
diff --git a/games/gnuchess/patches/patch-aa b/games/gnuchess/patches/patch-aa
index 247fdf0c428..6385434a6cf 100644
--- a/games/gnuchess/patches/patch-aa
+++ b/games/gnuchess/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.4 2000/10/15 01:53:40 jlam Exp $
+$NetBSD: patch-aa,v 1.5 2002/03/15 04:59:16 jmc Exp $
---- Makefile.in.orig Sat Oct 23 11:43:36 1999
-+++ Makefile.in
+--- Makefile.in.orig Fri Mar 15 04:46:43 2002
++++ Makefile.in Fri Mar 15 04:52:04 2002
@@ -43,7 +43,7 @@
prefix = @prefix@
@@ -16,7 +16,7 @@ $NetBSD: patch-aa,v 1.4 2000/10/15 01:53:40 jlam Exp $
INTERFACE=
-CFLAGS=-O3 -Winline -Wmissing-prototypes -funroll-loops -fomit-frame-pointer $(MACHINE) $(INTERFACE)
-+CFLAGS=-O3 -Winline -Wmissing-prototypes -funroll-loops -fomit-frame-pointer $(MACHINE) $(INTERFACE) -DLIBDIR=\"${LIBDIR}/\"
++CFLAGS=@CFLAGS@ $(MACHINE) $(INTERFACE) -DLIBDIR=\"${LIBDIR}/\"
# Not normally needed unless debugging or profiling.
# Debugging