Subject: pkg/22179: Fix pkgsrc/time/xtu for gcc3.3 case
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jonathan@perkin.org.uk>
List: netbsd-bugs
Date: 07/18/2003 13:01:09
>Number:         22179
>Category:       pkg
>Synopsis:       Fix pkgsrc/time/xtu for gcc3.3 case
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 18 13:02:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Perkin
>Release:        N/A
>Organization:
British Broadcasting Corporation
>Environment:
SunOS build0 5.8 Generic_108528-15 sun4u sparc SUNW,UltraSPARC-IIi-cEngine
>Description:
GCC 3.3 deprecated multi-line string literals, and so compilation of
pkgsrc/time/xtu fails.  This also seems to break compilation using
sunforte7 compiler.  Fix is below.

Also take the opportunity to future-proof my email address.
>How-To-Repeat:
===> Building for xtu-1.1
cd /home/jonp/pkgsrc/time/xtu/work/xtu-1.1 && /home/jonp/npkg/gcc-3.3/bin/gcc *.
c -o xtu -I/usr/openwin/include  -Wl,-R/usr/openwin/lib -L/usr/openwin/lib -lX11
 -lXext
In file included from TolleUhr.c:48:
xturc.h:4:28: missing terminating " character
xturc.h:5:3: invalid preprocessing directive #A
xturc.h:6:3: invalid preprocessing directive #first
xturc.h:8:3: invalid preprocessing directive #geometry
In file included from TolleUhr.c:48:
xturc.h:9: error: parse error before "geometry"
xturc.h:9:17: invalid suffix "x200" on integer constant
[...]
>Fix:
http://www.perkin.org.uk/projects/netbsd/xtu.patch

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/time/xtu/Makefile,v
retrieving revision 1.2
diff -u -u -r1.2 Makefile
--- Makefile    2003/03/14 19:37:58     1.2
+++ Makefile    2003/07/18 12:53:01
@@ -5,11 +5,17 @@
 CATEGORIES=            time
 MASTER_SITES=          http://core.de/~coto/xtu/
 
-MAINTAINER=            sketch@rd.bbc.co.uk
+MAINTAINER=            jonathan@perkin.org.uk
 HOMEPAGE=              http://core.de/~coto/xtu/
 COMMENT=               Small configurable X11 analog clock
 
 USE_X11=               yes
+
+post-configure:
+       ${CP} ${WRKSRC}/xturc.h ${WRKSRC}/xturc.h.orig
+       ${SED} -e '/"$$/,/^"/s/\"//' \
+              -e '5,109s/\(.*\)/\"\1\"/' \
+              ${WRKSRC}/xturc.h.orig > ${WRKSRC}/xturc.h
 
 do-build:
        cd ${WRKSRC} && ${CC} *.c -o xtu -I${X11BASE}/include ${X11_LDFLAGS} -lX11 -lXext
>Release-Note:
>Audit-Trail:
>Unformatted: