Sat Mar 31 20:17:13 2012 UTC ()
Make CFLAGS.SunOS specific to gcc>=4.6

On SunOS, gcc 4.6 and later enable c99 and XPG6 features for c++, but
the configure check for iconv uses plain c and gets a pre-XPG6 prototype
for iconv(). This inconsistency then leads to failure when building
preconv.


(hans)
diff -r1.62 -r1.63 pkgsrc/textproc/groff/Makefile

cvs diff -r1.62 -r1.63 pkgsrc/textproc/groff/Makefile (expand / switch to unified diff)

--- pkgsrc/textproc/groff/Makefile 2012/02/29 13:34:24 1.62
+++ pkgsrc/textproc/groff/Makefile 2012/03/31 20:17:13 1.63
@@ -1,39 +1,37 @@ @@ -1,39 +1,37 @@
1# $NetBSD: Makefile,v 1.62 2012/02/29 13:34:24 hans Exp $ 1# $NetBSD: Makefile,v 1.63 2012/03/31 20:17:13 hans Exp $
2# 2#
3 3
4DISTNAME= groff-1.20.1 4DISTNAME= groff-1.20.1
5PKGREVISION= 5 5PKGREVISION= 5
6CATEGORIES= textproc 6CATEGORIES= textproc
7MASTER_SITES= ${MASTER_SITE_GNU:=groff/} 7MASTER_SITES= ${MASTER_SITE_GNU:=groff/}
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= http://www.gnu.org/software/groff/groff.html 10HOMEPAGE= http://www.gnu.org/software/groff/groff.html
11COMMENT= GNU roff text processing suite 11COMMENT= GNU roff text processing suite
12 12
13CHECK_PERMS= NO 13CHECK_PERMS= NO
14MAKE_JOBS_SAFE= NO 14MAKE_JOBS_SAFE= NO
15 15
16PKG_DESTDIR_SUPPORT= user-destdir 16PKG_DESTDIR_SUPPORT= user-destdir
17INSTALLATION_DIRS= share/groff/site-tmac 17INSTALLATION_DIRS= share/groff/site-tmac
18 18
19USE_LANGUAGES= c c++ 19USE_LANGUAGES= c c++
20GNU_CONFIGURE= YES 20GNU_CONFIGURE= YES
21CONFIGURE_ENV+= PERLPATH=${PERL5:Q} 21CONFIGURE_ENV+= PERLPATH=${PERL5:Q}
22USE_TOOLS+= perl:run sed:run awk:run 22USE_TOOLS+= perl:run sed:run awk:run
23USE_FEATURES= getopt_long 23USE_FEATURES= getopt_long
24 24
25CFLAGS.SunOS+= -std=c99 -D_XOPEN_SOURCE=600 
26 
27INFO_FILES= YES 25INFO_FILES= YES
28 26
29REPLACE_AWK+= font/devlj4/generate/special.awk 27REPLACE_AWK+= font/devlj4/generate/special.awk
30REPLACE_PERL+= contrib/groffer/perl/func.pl 28REPLACE_PERL+= contrib/groffer/perl/func.pl
31REPLACE_PERL+= contrib/groffer/perl/groffer.pl 29REPLACE_PERL+= contrib/groffer/perl/groffer.pl
32REPLACE_PERL+= contrib/groffer/perl/man.pl 30REPLACE_PERL+= contrib/groffer/perl/man.pl
33REPLACE_PERL+= contrib/groffer/perl/perl_test.pl 31REPLACE_PERL+= contrib/groffer/perl/perl_test.pl
34REPLACE_PERL+= contrib/groffer/perl/roff2.pl 32REPLACE_PERL+= contrib/groffer/perl/roff2.pl
35REPLACE_PERL+= src/roff/grog/grog.pl 33REPLACE_PERL+= src/roff/grog/grog.pl
36 34
37REPLACE_INTERPRETER+= sed 35REPLACE_INTERPRETER+= sed
38REPLACE.sed.old= .*/sed 36REPLACE.sed.old= .*/sed
39REPLACE.sed.new= ${SED} 37REPLACE.sed.new= ${SED}
@@ -48,26 +46,31 @@ PLIST_SRC+= PLIST @@ -48,26 +46,31 @@ PLIST_SRC+= PLIST
48 46
49.if ${OPSYS} == "SunOS" 47.if ${OPSYS} == "SunOS"
50PLIST_SUBST+= GNU_PREFIX="g" 48PLIST_SUBST+= GNU_PREFIX="g"
51 49
52.else 50.else
53PLIST_SUBST+= GNU_PREFIX="" 51PLIST_SUBST+= GNU_PREFIX=""
54.endif 52.endif
55 53
56BUILD_DEFS+= PAPERSIZE 54BUILD_DEFS+= PAPERSIZE
57.if defined(PAPERSIZE) 55.if defined(PAPERSIZE)
58CONFIGURE_ENV+= PAGE=${PAPERSIZE:Q} 56CONFIGURE_ENV+= PAGE=${PAPERSIZE:Q}
59.endif 57.endif
60 58
 59.include "../../mk/compiler.mk"
 60.if !empty(CC_VERSION:Mgcc-4.[6-9].*)
 61CFLAGS.SunOS+= -std=c99 -D_XOPEN_SOURCE=600
 62.endif
 63
61# Usually the mdoc.local "volume-operating-system" definition is for 64# Usually the mdoc.local "volume-operating-system" definition is for
62# the operating system name often displayed on top of man pages. And 65# the operating system name often displayed on top of man pages. And
63# "operating-system" is for the default .Os value (operating system 66# "operating-system" is for the default .Os value (operating system
64# and version/release) and is usually displayed at bottom of man page. 67# and version/release) and is usually displayed at bottom of man page.
65# XXX Use "pkgsrc" as default .Os value. 68# XXX Use "pkgsrc" as default .Os value.
66# Also, avoid having pre-patched groff.info-2 installed (install uses wildcard) 69# Also, avoid having pre-patched groff.info-2 installed (install uses wildcard)
67post-patch: 70post-patch:
68 ${SED} -e "s,@@VOLUME_OPERATING_SYSTEM@@,${OPSYS},g" \ 71 ${SED} -e "s,@@VOLUME_OPERATING_SYSTEM@@,${OPSYS},g" \
69 -e "s,@@OPERATING_SYSTEM@@,pkgsrc,g" \ 72 -e "s,@@OPERATING_SYSTEM@@,pkgsrc,g" \
70 ${FILESDIR}/mdoc.local > ${WRKDIR}/mdoc.local 73 ${FILESDIR}/mdoc.local > ${WRKDIR}/mdoc.local
71 @${RM} ${WRKSRC}/doc/groff.info-2.orig 74 @${RM} ${WRKSRC}/doc/groff.info-2.orig
72 75
73# Groff installs its own man and ms macros as mgan and mgs if the 76# Groff installs its own man and ms macros as mgan and mgs if the