[36098] trunk/dports/science/hdf5

jochen at macports.org jochen at macports.org
Thu Apr 17 15:44:41 PDT 2008


Revision: 36098
          http://trac.macosforge.org/projects/macports/changeset/36098
Author:   jochen at macports.org
Date:     2008-04-17 15:44:35 -0700 (Thu, 17 Apr 2008)

Log Message:
-----------
add patch from HDF5 support to resove test-failures

Modified Paths:
--------------
    trunk/dports/science/hdf5/Portfile

Added Paths:
-----------
    trunk/dports/science/hdf5/files/patch-gnu-flags.diff

Modified: trunk/dports/science/hdf5/Portfile
===================================================================
--- trunk/dports/science/hdf5/Portfile	2008-04-17 19:45:30 UTC (rev 36097)
+++ trunk/dports/science/hdf5/Portfile	2008-04-17 22:44:35 UTC (rev 36098)
@@ -7,7 +7,7 @@
 # We should provide a hdf5-devel port for 1.8 at this time, I guess.
 name                hdf5
 version             1.6.7
-revision            1
+revision            2
 categories          science
 maintainers         nomaintainer
 
@@ -21,7 +21,8 @@
                     rmd160 2dbbcccd32986dcd66ce804c5e90ac6c949b71f6
 
 depends_lib         port:zlib
-patchfiles          patch-commence.diff patch-c-commence.diff \
+patchfiles          patch-gnu-flags.diff \
+                    patch-commence.diff patch-c-commence.diff \
                     patch-fortran-commence.diff patch-H5f90i.diff \
                     patch-H5PropList.cpp.diff
 

Added: trunk/dports/science/hdf5/files/patch-gnu-flags.diff
===================================================================
--- trunk/dports/science/hdf5/files/patch-gnu-flags.diff	                        (rev 0)
+++ trunk/dports/science/hdf5/files/patch-gnu-flags.diff	2008-04-17 22:44:35 UTC (rev 36098)
@@ -0,0 +1,282 @@
+--- config/gnu-flags.orig	2008-04-17 20:13:12.000000000 +0200
++++ config/gnu-flags	2008-04-17 20:13:28.000000000 +0200
+@@ -26,7 +26,7 @@
+ #   cc_version:   Version number: 2.91.60, 2.7.2.1
+ #
+ if test X = "X$cc_flags_set"; then
+-    cc_version="`$CC $CFLAGS -v 2>&1 |grep 'gcc version' |\
++    cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |grep 'gcc version' |\
+ 	        sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"
+     cc_vendor=`echo $cc_version |sed 's/\([a-z]*\).*/\1/'`
+     cc_version=`echo $cc_version |sed 's/[-a-z]//g'`
+@@ -130,7 +130,7 @@
+                     # architecture-specific optimizations cause problems
+                     # for some users who build binaries to be used on
+                     # multiple architectures.
+-                    #arch="-march=i686"
++                    # arch="-march=i686"
+             ;;
+     esac
+ 
+@@ -142,14 +142,14 @@
+     esac
+ 
+     # General
+-    CFLAGS="$CFLAGS $arch -ansi"
++    H5_CFLAGS="$H5_CFLAGS $arch -ansi -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline"
+ 
+     # Production
+     case "$cc_vendor-$cc_version" in
+       gcc-2.95.[34])
+         PROD_CFLAGS="-O3"
+         ;;
+-      gcc-3.[0-4]*|gcc-4.[012]*)
++      gcc-3.[0-4]*|gcc-4.[0123]*)
+         # The optimization level is reduced for gcc 3.* and 4.* due to problems
+         # with code generation for src/H5Tconv.c with the -O2 & -O3 
+         # optimization levels (which shows up as failures for various integer
+@@ -170,7 +170,7 @@
+     PROD_CPPFLAGS=
+ 
+     # Debug
+-    DEBUG_CFLAGS="-g -fverbose-asm -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline"
++    DEBUG_CFLAGS="-g -fverbose-asm"
+     DEBUG_CPPFLAGS=
+ 
+     # Profile
+@@ -188,135 +188,196 @@
+ # the information from the previous version and adding modifications to that.
+ case "$cc_vendor-$cc_version" in
+ 
+-# Closer to the gcc 4.1 release, we should check for additional flags to
++# Closer to the gcc 4.2 release, we should check for additional flags to
+ # include and break it out into it's own section, like the other versions
+ # below. -QAK
+-  gcc-4.[01]*)
++  gcc-4.[123]*)
++    # Replace -ansi flag with -std=c99 flag
++    H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
++
++    # Disable warnings about using 'long long' type
++    H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
++
++    # Append warning flags from gcc-3* case
++    # (don't use -Wpadded flag for normal builds, many of the warnings its
++    #   issuing can't be fixed and they are making it hard to detect other,
++    #   more important warnings)
++    #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
++    H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
++
++    # Append warning flags from gcc-3.2* case
++    H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar"
++
++    # Enable mort format checking flags, beyond the basic -Wformat included
++    # in -Wall
++    H5_CFLAGS="$H5_CFLAGS -Wformat-nonliteral -Wformat-security -Wformat-y2k"
++
++    # The "unreachable code" warning does not appear to be reliable yet...
++    H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
++
++    # Append warning flags from gcc-3.3* case
++    H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
++
++    # Append warning flags from gcc-3.4* case
++    H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
++
++    # Replace old -W flag with new -Wextra flag
++    H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
++
++    # Append more extra warning flags that only gcc4.0+ know about
++    H5_CFLAGS="$H5_CFLAGS -Wmissing-field-initializers -Wvariadic-macros"
++
++    # Append more extra warning flags that only gcc4.1+ know about
++    H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var"
++
++    # Try out the new "stack protector" feature in gcc 4.1
++    # (Strictly speaking this isn't really a "warning" flag, so it's added to
++    #   the debugging flags)
++    #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all"
++    ;;
++
++  gcc-4.0*)
+     # Replace -ansi flag with -std=c99 flag
+-    CFLAGS="`echo $CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
++    H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
+ 
+     # Disable warnings about using 'long long' type
+-    CFLAGS="$CFLAGS -Wno-long-long"
++    H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
+ 
+     # Append warning flags from gcc-3* case
+     # (don't use -Wpadded flag for normal builds, many of the warnings its
+     #   issuing can't be fixed and they are making it hard to detect other,
+     #   more important warnings)
+-    #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
++    #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
++    H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
+ 
+     # Append warning flags from gcc-3.2* case
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar"
++    H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar"
+ 
+     # The "format=2" warning generates too many warnings about valid
+     # usage in the library.
+-    #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wformat=2"
++    #CFLAGS="$CFLAGS -Wformat=2"
+ 
+     # The "unreachable code" warning does not appear to be reliable yet...
+-    #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wunreachable-code"
++    #CFLAGS="$CFLAGS -Wunreachable-code"
+ 
+     # Append warning flags from gcc-3.3* case
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wendif-labels"
++    H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
+ 
+     # Append warning flags from gcc-3.4* case
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
++    H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
+ 
+     # Replace old -W flag with new -Wextra flag
+-    DEBUG_CFLAGS="`echo $DEBUG_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
++    H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+ 
+     # Append more extra warning flags that only gcc4.0+ know about
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wvariadic-macros"
++    H5_CFLAGS="$H5_CFLAGS -Wmissing-field-initializers -Wvariadic-macros"
+     ;;
+ 
+   gcc-3.4*)
+     # Replace -ansi flag with -std=c99 flag
+-    CFLAGS="`echo $CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
++    H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
+ 
+     # Disable warnings about using 'long long' type
+-    CFLAGS="$CFLAGS -Wno-long-long"
++    H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
+ 
+     # Append warning flags from gcc-3* case
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
++    # (don't use -Wpadded flag for normal builds, many of the warnings its
++    #   issuing can't be fixed and they are making it hard to detect other,
++    #   more important warnings)
++    #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
++    H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
+ 
+     # Append warning flags from gcc-3.2* case
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar"
++    H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar"
+ 
+     # The "format=2" warning generates too many warnings about valid
+     # usage in the library.
+-    #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wformat=2"
++    #CFLAGS="$CFLAGS -Wformat=2"
+ 
+     # The "unreachable code" warning does not appear to be reliable yet...
+-    #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wunreachable-code"
++    #CFLAGS="$CFLAGS -Wunreachable-code"
+ 
+     # Append warning flags from gcc-3.3* case
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wendif-labels"
++    H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
+ 
+     # Append more extra warning flags that only gcc3.4+ know about
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
++    H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
+ 
+     # Replace old -W flag with new -Wextra flag
+-    DEBUG_CFLAGS="`echo $DEBUG_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
++    H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+     ;;
+ 
+   gcc-3.3*)
+     # Replace -ansi flag with -std=c99 flag
+-    CFLAGS="`echo $CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
++    H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
+ 
+     # Disable warnings about using 'long long' type
+-    CFLAGS="$CFLAGS -Wno-long-long"
++    H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
+ 
+     # Append warning flags from gcc-3* case
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
++    # (don't use -Wpadded flag for normal builds, many of the warnings its
++    #   issuing can't be fixed and they are making it hard to detect other,
++    #   more important warnings)
++    #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
++    H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
+ 
+     # Append warning flags from gcc-3.2* case
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar"
++    H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar"
+ 
+     # The "format=2" warning generates too many warnings about valid
+     # usage in the library.
+-    #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wformat=2"
++    #CFLAGS="$CFLAGS -Wformat=2"
+ 
+     # The "unreachable code" warning does not appear to be reliable yet...
+-    #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wunreachable-code"
++    #CFLAGS="$CFLAGS -Wunreachable-code"
+ 
+     # Append more extra warning flags that only gcc3.3+ know about
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wendif-labels"
++    H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
+     ;;
+ 
+   gcc-3.2*)
+     # Replace -ansi flag with -std=c99 flag
+-    CFLAGS="`echo $CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
++    H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
+ 
+     # Disable warnings about using 'long long' type
+-    CFLAGS="$CFLAGS -Wno-long-long"
++    H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
+ 
+     # Append warning flags from gcc-3* case
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
++    # (don't use -Wpadded flag for normal builds, many of the warnings its
++    #   issuing can't be fixed and they are making it hard to detect other,
++    #   more important warnings)
++    #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
++    H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
+ 
+     # Append more extra warning flags that only gcc3.2+ know about
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar"
++    H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar"
+ 
+     # The "format=2" warning generates too many warnings about valid
+     # usage in the library.
+-    #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wformat=2"
++    #CFLAGS="$CFLAGS -Wformat=2"
+ 
+     # The "unreachable code" warning does not appear to be reliable yet...
+-    #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wunreachable-code"
++    #CFLAGS="$CFLAGS -Wunreachable-code"
+     ;;
+ 
+   gcc-3*)
+     # Replace -ansi flag with -std=c99 flag
+-    CFLAGS="`echo $CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
++    H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
+ 
+     # Disable warnings about using 'long long' type
+-    CFLAGS="$CFLAGS -Wno-long-long"
++    H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
+ 
+     # Append some extra warning flags that only gcc3+ know about
+-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
++    # (don't use -Wpadded flag for normal builds, many of the warnings its
++    #   issuing can't be fixed and they are making it hard to detect other,
++    #   more important warnings)
++    #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
++    H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
+     ;;
+ 
+   gcc-2.9[56]*)
+     # Disable warnings about using 'long long' type
+-    CFLAGS="$CFLAGS -Wno-long-long"
++    H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
+     ;;
+ esac
+ 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080417/7b32c9bb/attachment.html


More information about the macports-changes mailing list