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.diff -r1.86 -r1.87 pkgsrc/textproc/icu/Makefile
(richard)
@@ -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 | |||
3 | DISTNAME= icu4c-52_1-src | 3 | DISTNAME= icu4c-52_1-src | |
4 | PKGNAME= ${DISTNAME:S/4c//:S/-src//:S/_/./g} | 4 | PKGNAME= ${DISTNAME:S/4c//:S/-src//:S/_/./g} | |
5 | CATEGORIES= textproc | 5 | CATEGORIES= textproc | |
6 | MASTER_SITES= http://download.icu-project.org/files/icu4c/${PKGVERSION_NOREV}/ | 6 | MASTER_SITES= http://download.icu-project.org/files/icu4c/${PKGVERSION_NOREV}/ | |
7 | EXTRACT_SUFX= .tgz | 7 | EXTRACT_SUFX= .tgz | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= http://www.icu-project.org/ | 10 | HOMEPAGE= http://www.icu-project.org/ | |
11 | COMMENT= Robust and full-featured Unicode services | 11 | COMMENT= Robust and full-featured Unicode services | |
12 | LICENSE= mit | 12 | LICENSE= mit | |
13 | 13 | |||
14 | WRKSRC= ${WRKDIR}/icu/source | 14 | WRKSRC= ${WRKDIR}/icu/source | |
@@ -32,27 +32,26 @@ CONFIGURE_ARGS+= --disable-threads | @@ -32,27 +32,26 @@ CONFIGURE_ARGS+= --disable-threads | |||
32 | PLIST_SUBST+= MH_NAME=mh-bsd-gcc | 32 | PLIST_SUBST+= MH_NAME=mh-bsd-gcc | |
33 | .elif ${OPSYS} == "Linux" | 33 | .elif ${OPSYS} == "Linux" | |
34 | PLIST_SUBST+= MH_NAME=mh-linux | 34 | PLIST_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*) | |
37 | PLIST_SUBST+= MH_NAME=mh-solaris-gcc | 37 | PLIST_SUBST+= MH_NAME=mh-solaris-gcc | |
38 | . else | 38 | . else | |
39 | PLIST_SUBST+= MH_NAME=mh-solaris | 39 | PLIST_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].*) | |
42 | BUILDLINK_TRANSFORM+= rm:-D__STDC__=0 | 42 | BUILDLINK_TRANSFORM+= rm:-D__STDC__=0 | |
43 | . endif | 43 | . endif | |
44 | BUILDLINK_TRANSFORM+= rm:-ansi | 44 | BUILDLINK_TRANSFORM+= rm:-ansi | |
45 | CFLAGS.SunOS+= -std=c99 | |||
46 | .elif ${OPSYS} == "IRIX" | 45 | .elif ${OPSYS} == "IRIX" | |
47 | PLIST_SUBST+= MH_NAME=mh-irix | 46 | PLIST_SUBST+= MH_NAME=mh-irix | |
48 | .elif ${OPSYS} == "Darwin" | 47 | .elif ${OPSYS} == "Darwin" | |
49 | PLIST_SUBST+= MH_NAME=mh-darwin | 48 | PLIST_SUBST+= MH_NAME=mh-darwin | |
50 | .elif ${OPSYS} == "Cygwin" | 49 | .elif ${OPSYS} == "Cygwin" | |
51 | PLIST_SUBST+= MH_NAME=mh-cygwin | 50 | PLIST_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. | |
55 | PLIST_SUBST+= MH_NAME=mh-unknown | 54 | PLIST_SUBST+= MH_NAME=mh-unknown | |
56 | .endif | 55 | .endif | |
57 | 56 | |||
58 | .if ${OPSYS} == "Darwin" || ${OPSYS} == "Cygwin" | 57 | .if ${OPSYS} == "Darwin" || ${OPSYS} == "Cygwin" |
@@ -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 | |||
3 | SHA1 (icu4c-52_1-src.tgz) = 6de440b71668f1a65a9344cdaf7a437291416781 | 3 | SHA1 (icu4c-52_1-src.tgz) = 6de440b71668f1a65a9344cdaf7a437291416781 | |
4 | RMD160 (icu4c-52_1-src.tgz) = cbfbb18c3991ba55ebb50c607d5208cbfeb9fce3 | 4 | RMD160 (icu4c-52_1-src.tgz) = cbfbb18c3991ba55ebb50c607d5208cbfeb9fce3 | |
5 | Size (icu4c-52_1-src.tgz) = 23875368 bytes | 5 | Size (icu4c-52_1-src.tgz) = 23875368 bytes | |
6 | SHA1 (patch-aa) = fcbebb03f4a48294faeebd600fee989cab351230 | 6 | SHA1 (patch-aa) = fcbebb03f4a48294faeebd600fee989cab351230 | |
7 | SHA1 (patch-ab) = 32f0e4c241535e37e4cad9b871ed3d36b4184199 | 7 | SHA1 (patch-ab) = 32f0e4c241535e37e4cad9b871ed3d36b4184199 | |
8 | SHA1 (patch-ac) = e7cee161315321d2580074054d87714b55319886 | 8 | SHA1 (patch-ac) = e7cee161315321d2580074054d87714b55319886 | |
9 | SHA1 (patch-acinclude.m4) = 40ddfb09cbc951928296c35e8a4303cf7fbe7e17 | |||
9 | SHA1 (patch-ad) = 8189e81e9c624e3b7a42f9af65a4b2f334747284 | 10 | SHA1 (patch-ad) = 8189e81e9c624e3b7a42f9af65a4b2f334747284 | |
10 | SHA1 (patch-af) = dcfbaf16844292a9ae57536ae2fb62fd1659d067 | 11 | SHA1 (patch-af) = dcfbaf16844292a9ae57536ae2fb62fd1659d067 | |
11 | SHA1 (patch-common_Makefile.in) = 20fa472bd0e5e5fac15153774a58a8ce034d1996 | 12 | SHA1 (patch-common_Makefile.in) = 20fa472bd0e5e5fac15153774a58a8ce034d1996 | |
12 | SHA1 (patch-common_putilimp.h) = a68faa97c2bffeecaca1586e26f5bbe48e71b262 | 13 | SHA1 (patch-common_putilimp.h) = a68faa97c2bffeecaca1586e26f5bbe48e71b262 | |
13 | SHA1 (patch-common_unicode_platform.h) = 82786dff790782eb07cdc527061de33e771ec63c | 14 | SHA1 (patch-common_unicode_platform.h) = 82786dff790782eb07cdc527061de33e771ec63c | |
14 | SHA1 (patch-common_uposixdefs.h) = abe1989ea4312702e5d0172b662409957b3e2d91 | 15 | SHA1 (patch-common_uposixdefs.h) = abe1989ea4312702e5d0172b662409957b3e2d91 | |
15 | SHA1 (patch-config_icu-config-bottom) = 168b89ee9180d4ae545125866ee91eb004010501 | 16 | SHA1 (patch-config_icu-config-bottom) = 168b89ee9180d4ae545125866ee91eb004010501 | |
16 | SHA1 (patch-config_mh-cygwin) = e3aa7a926244b448ce12ab2f89156348a02c0659 | 17 | SHA1 (patch-config_mh-cygwin) = e3aa7a926244b448ce12ab2f89156348a02c0659 | |
17 | SHA1 (patch-configure) = 05998976e3fb37a75d47476d3e8409794deccd31 | 18 | SHA1 (patch-config_mh-solaris-gcc) = f81fec8f0d232b9125c7ea7ec334b78872aa2025 | |
19 | SHA1 (patch-configure) = f8151a2b51cdfd1d6a1d9d8cf316a52c5eae7050 | |||
18 | SHA1 (patch-data_Makefile.in) = a5dcfe848a0444f0a1c036b7f4e343468bf3b3d1 | 20 | SHA1 (patch-data_Makefile.in) = a5dcfe848a0444f0a1c036b7f4e343468bf3b3d1 | |
19 | SHA1 (patch-i18n_Makefile.in) = 935965c0418994271d844a4c908cd9e1fe8279fd | 21 | SHA1 (patch-i18n_Makefile.in) = 935965c0418994271d844a4c908cd9e1fe8279fd | |
20 | SHA1 (patch-io_Makefile.in) = f5f5eabb31ea7120130d13c397fab1feddd30447 | 22 | SHA1 (patch-io_Makefile.in) = f5f5eabb31ea7120130d13c397fab1feddd30447 | |
21 | SHA1 (patch-layout_Makefile.in) = 6914279785c618d4078d4595a9097df006043eed | 23 | SHA1 (patch-layout_Makefile.in) = 6914279785c618d4078d4595a9097df006043eed | |
22 | SHA1 (patch-layoutex_Makefile.in) = b1284874108d22b1ca6803c98b1ce9bd6d1682fe | 24 | SHA1 (patch-layoutex_Makefile.in) = b1284874108d22b1ca6803c98b1ce9bd6d1682fe | |
23 | SHA1 (patch-stubdata_Makefile.in) = 358c84811cd8138fed2e108d33f8bcfdac1ac585 | 25 | SHA1 (patch-stubdata_Makefile.in) = 358c84811cd8138fed2e108d33f8bcfdac1ac585 | |
24 | SHA1 (patch-tools_ctestfw_Makefile.in) = 7d7874baee8785b6f1c889e7db1dd4acff5d5797 | 26 | SHA1 (patch-tools_ctestfw_Makefile.in) = 7d7874baee8785b6f1c889e7db1dd4acff5d5797 | |
25 | SHA1 (patch-tools_toolutil_Makefile.in) = be08c92bef0f367f502a712acbad869952102cc8 | 27 | SHA1 (patch-tools_toolutil_Makefile.in) = be08c92bef0f367f502a712acbad869952102cc8 |
$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
$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
@@ -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 | |||
3 | Portability fix. | 3 | Portability fix. | |
4 | Solaris seems to need -std=c99 with recent pkgsrc so keep it | |||
5 | and 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" |