Wed Dec 4 21:02:23 2013 UTC ()
Fix solaris build for icu, namely problems in general with CFLAGS/CXXFLAGS
from typos in configure and acinclude.m4 to needing to add the flags to
properly generate dependency files with gcc.


(richard)
diff -r1.86 -r1.87 pkgsrc/textproc/icu/Makefile
diff -r1.42 -r1.43 pkgsrc/textproc/icu/distinfo
diff -r0 -r1.1 pkgsrc/textproc/icu/patches/patch-acinclude.m4
diff -r0 -r1.1 pkgsrc/textproc/icu/patches/patch-config_mh-solaris-gcc
diff -r1.1 -r1.2 pkgsrc/textproc/icu/patches/patch-configure

cvs diff -r1.86 -r1.87 pkgsrc/textproc/icu/Makefile (expand / switch to unified diff)

--- pkgsrc/textproc/icu/Makefile 2013/10/19 08:47:36 1.86
+++ pkgsrc/textproc/icu/Makefile 2013/12/04 21:02:23 1.87
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.86 2013/10/19 08:47:36 adam Exp $ 1# $NetBSD: Makefile,v 1.87 2013/12/04 21:02:23 richard Exp $
2 2
3DISTNAME= icu4c-52_1-src 3DISTNAME= icu4c-52_1-src
4PKGNAME= ${DISTNAME:S/4c//:S/-src//:S/_/./g} 4PKGNAME= ${DISTNAME:S/4c//:S/-src//:S/_/./g}
5CATEGORIES= textproc 5CATEGORIES= textproc
6MASTER_SITES= http://download.icu-project.org/files/icu4c/${PKGVERSION_NOREV}/ 6MASTER_SITES= http://download.icu-project.org/files/icu4c/${PKGVERSION_NOREV}/
7EXTRACT_SUFX= .tgz 7EXTRACT_SUFX= .tgz
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= http://www.icu-project.org/ 10HOMEPAGE= http://www.icu-project.org/
11COMMENT= Robust and full-featured Unicode services 11COMMENT= Robust and full-featured Unicode services
12LICENSE= mit 12LICENSE= mit
13 13
14WRKSRC= ${WRKDIR}/icu/source 14WRKSRC= ${WRKDIR}/icu/source
@@ -32,27 +32,26 @@ CONFIGURE_ARGS+= --disable-threads @@ -32,27 +32,26 @@ CONFIGURE_ARGS+= --disable-threads
32PLIST_SUBST+= MH_NAME=mh-bsd-gcc 32PLIST_SUBST+= MH_NAME=mh-bsd-gcc
33.elif ${OPSYS} == "Linux" 33.elif ${OPSYS} == "Linux"
34PLIST_SUBST+= MH_NAME=mh-linux 34PLIST_SUBST+= MH_NAME=mh-linux
35.elif ${OPSYS} == "SunOS" 35.elif ${OPSYS} == "SunOS"
36. if !empty(CC_VERSION:Mgcc*) 36. if !empty(CC_VERSION:Mgcc*)
37PLIST_SUBST+= MH_NAME=mh-solaris-gcc 37PLIST_SUBST+= MH_NAME=mh-solaris-gcc
38. else 38. else
39PLIST_SUBST+= MH_NAME=mh-solaris 39PLIST_SUBST+= MH_NAME=mh-solaris
40. endif 40. endif
41. if !empty(CC_VERSION:Mgcc-4.[6-9].*) 41. if !empty(CC_VERSION:Mgcc-4.[6-9].*)
42BUILDLINK_TRANSFORM+= rm:-D__STDC__=0 42BUILDLINK_TRANSFORM+= rm:-D__STDC__=0
43. endif 43. endif
44BUILDLINK_TRANSFORM+= rm:-ansi 44BUILDLINK_TRANSFORM+= rm:-ansi
45CFLAGS.SunOS+= -std=c99 
46.elif ${OPSYS} == "IRIX" 45.elif ${OPSYS} == "IRIX"
47PLIST_SUBST+= MH_NAME=mh-irix 46PLIST_SUBST+= MH_NAME=mh-irix
48.elif ${OPSYS} == "Darwin" 47.elif ${OPSYS} == "Darwin"
49PLIST_SUBST+= MH_NAME=mh-darwin 48PLIST_SUBST+= MH_NAME=mh-darwin
50.elif ${OPSYS} == "Cygwin" 49.elif ${OPSYS} == "Cygwin"
51PLIST_SUBST+= MH_NAME=mh-cygwin 50PLIST_SUBST+= MH_NAME=mh-cygwin
52.else 51.else
53# For unknown systems, set the filename to mh-unknown so that the user 52# For unknown systems, set the filename to mh-unknown so that the user
54# gets a warning about missing files. 53# gets a warning about missing files.
55PLIST_SUBST+= MH_NAME=mh-unknown 54PLIST_SUBST+= MH_NAME=mh-unknown
56.endif 55.endif
57 56
58.if ${OPSYS} == "Darwin" || ${OPSYS} == "Cygwin" 57.if ${OPSYS} == "Darwin" || ${OPSYS} == "Cygwin"

cvs diff -r1.42 -r1.43 pkgsrc/textproc/icu/distinfo (expand / switch to unified diff)

--- pkgsrc/textproc/icu/distinfo 2013/12/03 21:16:06 1.42
+++ pkgsrc/textproc/icu/distinfo 2013/12/04 21:02:23 1.43
@@ -1,25 +1,27 @@ @@ -1,25 +1,27 @@
1$NetBSD: distinfo,v 1.42 2013/12/03 21:16:06 bsiegert Exp $ 1$NetBSD: distinfo,v 1.43 2013/12/04 21:02:23 richard Exp $
2 2
3SHA1 (icu4c-52_1-src.tgz) = 6de440b71668f1a65a9344cdaf7a437291416781 3SHA1 (icu4c-52_1-src.tgz) = 6de440b71668f1a65a9344cdaf7a437291416781
4RMD160 (icu4c-52_1-src.tgz) = cbfbb18c3991ba55ebb50c607d5208cbfeb9fce3 4RMD160 (icu4c-52_1-src.tgz) = cbfbb18c3991ba55ebb50c607d5208cbfeb9fce3
5Size (icu4c-52_1-src.tgz) = 23875368 bytes 5Size (icu4c-52_1-src.tgz) = 23875368 bytes
6SHA1 (patch-aa) = fcbebb03f4a48294faeebd600fee989cab351230 6SHA1 (patch-aa) = fcbebb03f4a48294faeebd600fee989cab351230
7SHA1 (patch-ab) = 32f0e4c241535e37e4cad9b871ed3d36b4184199 7SHA1 (patch-ab) = 32f0e4c241535e37e4cad9b871ed3d36b4184199
8SHA1 (patch-ac) = e7cee161315321d2580074054d87714b55319886 8SHA1 (patch-ac) = e7cee161315321d2580074054d87714b55319886
 9SHA1 (patch-acinclude.m4) = 40ddfb09cbc951928296c35e8a4303cf7fbe7e17
9SHA1 (patch-ad) = 8189e81e9c624e3b7a42f9af65a4b2f334747284 10SHA1 (patch-ad) = 8189e81e9c624e3b7a42f9af65a4b2f334747284
10SHA1 (patch-af) = dcfbaf16844292a9ae57536ae2fb62fd1659d067 11SHA1 (patch-af) = dcfbaf16844292a9ae57536ae2fb62fd1659d067
11SHA1 (patch-common_Makefile.in) = 20fa472bd0e5e5fac15153774a58a8ce034d1996 12SHA1 (patch-common_Makefile.in) = 20fa472bd0e5e5fac15153774a58a8ce034d1996
12SHA1 (patch-common_putilimp.h) = a68faa97c2bffeecaca1586e26f5bbe48e71b262 13SHA1 (patch-common_putilimp.h) = a68faa97c2bffeecaca1586e26f5bbe48e71b262
13SHA1 (patch-common_unicode_platform.h) = 82786dff790782eb07cdc527061de33e771ec63c 14SHA1 (patch-common_unicode_platform.h) = 82786dff790782eb07cdc527061de33e771ec63c
14SHA1 (patch-common_uposixdefs.h) = abe1989ea4312702e5d0172b662409957b3e2d91 15SHA1 (patch-common_uposixdefs.h) = abe1989ea4312702e5d0172b662409957b3e2d91
15SHA1 (patch-config_icu-config-bottom) = 168b89ee9180d4ae545125866ee91eb004010501 16SHA1 (patch-config_icu-config-bottom) = 168b89ee9180d4ae545125866ee91eb004010501
16SHA1 (patch-config_mh-cygwin) = e3aa7a926244b448ce12ab2f89156348a02c0659 17SHA1 (patch-config_mh-cygwin) = e3aa7a926244b448ce12ab2f89156348a02c0659
17SHA1 (patch-configure) = 05998976e3fb37a75d47476d3e8409794deccd31 18SHA1 (patch-config_mh-solaris-gcc) = f81fec8f0d232b9125c7ea7ec334b78872aa2025
 19SHA1 (patch-configure) = f8151a2b51cdfd1d6a1d9d8cf316a52c5eae7050
18SHA1 (patch-data_Makefile.in) = a5dcfe848a0444f0a1c036b7f4e343468bf3b3d1 20SHA1 (patch-data_Makefile.in) = a5dcfe848a0444f0a1c036b7f4e343468bf3b3d1
19SHA1 (patch-i18n_Makefile.in) = 935965c0418994271d844a4c908cd9e1fe8279fd 21SHA1 (patch-i18n_Makefile.in) = 935965c0418994271d844a4c908cd9e1fe8279fd
20SHA1 (patch-io_Makefile.in) = f5f5eabb31ea7120130d13c397fab1feddd30447 22SHA1 (patch-io_Makefile.in) = f5f5eabb31ea7120130d13c397fab1feddd30447
21SHA1 (patch-layout_Makefile.in) = 6914279785c618d4078d4595a9097df006043eed 23SHA1 (patch-layout_Makefile.in) = 6914279785c618d4078d4595a9097df006043eed
22SHA1 (patch-layoutex_Makefile.in) = b1284874108d22b1ca6803c98b1ce9bd6d1682fe 24SHA1 (patch-layoutex_Makefile.in) = b1284874108d22b1ca6803c98b1ce9bd6d1682fe
23SHA1 (patch-stubdata_Makefile.in) = 358c84811cd8138fed2e108d33f8bcfdac1ac585 25SHA1 (patch-stubdata_Makefile.in) = 358c84811cd8138fed2e108d33f8bcfdac1ac585
24SHA1 (patch-tools_ctestfw_Makefile.in) = 7d7874baee8785b6f1c889e7db1dd4acff5d5797 26SHA1 (patch-tools_ctestfw_Makefile.in) = 7d7874baee8785b6f1c889e7db1dd4acff5d5797
25SHA1 (patch-tools_toolutil_Makefile.in) = be08c92bef0f367f502a712acbad869952102cc8 27SHA1 (patch-tools_toolutil_Makefile.in) = be08c92bef0f367f502a712acbad869952102cc8

File Added: pkgsrc/textproc/icu/patches/patch-acinclude.m4
$NetBSD: patch-acinclude.m4,v 1.1 2013/12/04 21:02:23 richard Exp $

Solaris seems to need -std=c99 with recent pkgsrc so keep it
and at the same time fix a typo involving CXXFLAGS.

--- acinclude.m4.orig	2013-10-04 20:54:58.000000000 +0000
+++ acinclude.m4
@@ -262,7 +262,7 @@ AC_DEFUN([AC_CHECK_64BIT_LIBS],
                     if test "$CAN_BUILD_64" != yes; then
                         # Nope. back out changes.
                         CFLAGS="${CFLAGS_OLD}"
-                        CXXFLAGS="${CFLAGS_OLD}"
+                        CXXFLAGS="${CXXFLAGS_OLD}"
                         # 2. try xarch=v9 [deprecated]
                         ## TODO: cross compile: the following won't work.
                         SPARCV9=`isainfo -n 2>&1 | grep sparcv9`
@@ -457,9 +457,6 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE],
         if test "$GCC" = yes
         then
             case "${host}" in
-            *-*-solaris*)
-                # Don't use -std=c99 option on Solaris/GCC
-                ;;
             *)
                 # Do not use -ansi. It limits us to C90, and it breaks some platforms.
                 # We use -std=c99 to disable the gnu99 defaults and its associated warnings

File Added: pkgsrc/textproc/icu/patches/Attic/patch-config_mh-solaris-gcc
$NetBSD: patch-config_mh-solaris-gcc,v 1.1 2013/12/04 21:02:23 richard Exp $

sys/feature_tests.h needs hints found in CFLAGS/CXXFLAGS while
generating depency files.

--- config/mh-solaris-gcc.orig	2013-10-04 20:50:00.000000000 +0000
+++ config/mh-solaris-gcc
@@ -9,8 +9,8 @@ SHAREDLIBCXXFLAGS = -fPIC
 SHAREDLIBCPPFLAGS = -DPIC
 
 ## Commands to generate dependency files
-GEN_DEPS.c= 	$(CC) -E -MM $(DEFS) $(CPPFLAGS)
-GEN_DEPS.cc=	$(CXX) -E -MM $(DEFS) $(CPPFLAGS)
+GEN_DEPS.c= 	$(CC) -E -MM $(DEFS) $(CPPFLAGS) $(CFLAGS)
+GEN_DEPS.cc=	$(CXX) -E -MM $(DEFS) $(CPPFLAGS) $(CXXFLAGS)
 
 ## These are the library specific LDFLAGS
 LDFLAGSICUDT=-nodefaultlibs -nostdlib

cvs diff -r1.1 -r1.2 pkgsrc/textproc/icu/patches/patch-configure (expand / switch to unified diff)

--- pkgsrc/textproc/icu/patches/patch-configure 2013/10/19 08:47:36 1.1
+++ pkgsrc/textproc/icu/patches/patch-configure 2013/12/04 21:02:23 1.2
@@ -1,20 +1,41 @@ @@ -1,20 +1,41 @@
1$NetBSD: patch-configure,v 1.1 2013/10/19 08:47:36 adam Exp $ 1$NetBSD: patch-configure,v 1.2 2013/12/04 21:02:23 richard Exp $
2 2
3Portability fix. 3Portability fix.
 4Solaris seems to need -std=c99 with recent pkgsrc so keep it
 5and at the same time fix a typo involving CXXFLAGS.
4 6
5--- configure.orig 2013-10-19 08:15:50.000000000 +0000 7--- configure.orig 2013-10-04 20:54:58.000000000 +0000
6+++ configure 8+++ configure
7@@ -7442,13 +7442,13 @@ fi 9@@ -4083,9 +4083,6 @@ $as_echo "$ac_use_strict_options" >&6; }
 10 if test "$GCC" = yes
 11 then
 12 case "${host}" in
 13- *-*-solaris*)
 14- # Don't use -std=c99 option on Solaris/GCC
 15- ;;
 16 *)
 17 # Do not use -ansi. It limits us to C90, and it breaks some platforms.
 18 # We use -std=c99 to disable the gnu99 defaults and its associated warnings
 19@@ -4578,7 +4575,7 @@ fi
 20 if test "$CAN_BUILD_64" != yes; then
 21 # Nope. back out changes.
 22 CFLAGS="${CFLAGS_OLD}"
 23- CXXFLAGS="${CFLAGS_OLD}"
 24+ CXXFLAGS="${CXXFLAGS_OLD}"
 25 # 2. try xarch=v9 [deprecated]
 26 ## TODO: cross compile: the following won't work.
 27 SPARCV9=`isainfo -n 2>&1 | grep sparcv9`
 28@@ -7442,13 +7439,13 @@ fi
8 # Now that we're done using CPPFLAGS etc. for tests, we can change it 29 # Now that we're done using CPPFLAGS etc. for tests, we can change it
9 # for build. 30 # for build.
10  31
11-if test "${CC}" == "clang"; then 32-if test "${CC}" == "clang"; then
12+if test "${CC}" = "clang"; then 33+if test "${CC}" = "clang"; then
13 CLANGCFLAGS="-Qunused-arguments -Wno-parentheses-equality" 34 CLANGCFLAGS="-Qunused-arguments -Wno-parentheses-equality"
14 else 35 else
15 CLANGCFLAGS="" 36 CLANGCFLAGS=""
16 fi 37 fi
17  38
18-if test "${CXX}" == "clang++"; then 39-if test "${CXX}" == "clang++"; then
19+if test "${CXX}" = "clang++"; then 40+if test "${CXX}" = "clang++"; then
20 CLANGCXXFLAGS="-Qunused-arguments -Wno-parentheses-equality" 41 CLANGCXXFLAGS="-Qunused-arguments -Wno-parentheses-equality"