[80257] trunk/dports/science/ncarg

takeshi at macports.org takeshi at macports.org
Thu Jul 7 15:43:30 PDT 2011


Revision: 80257
          http://trac.macports.org/changeset/80257
Author:   takeshi at macports.org
Date:     2011-07-07 15:43:30 -0700 (Thu, 07 Jul 2011)
Log Message:
-----------
ncarg: updated for 6.0.0

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

Removed Paths:
-------------
    trunk/dports/science/ncarg/files/patch-ncarg2d-src-libncarg-ezmap-mapngb.c.diff

Modified: trunk/dports/science/ncarg/Portfile
===================================================================
--- trunk/dports/science/ncarg/Portfile	2011-07-07 22:42:04 UTC (rev 80256)
+++ trunk/dports/science/ncarg/Portfile	2011-07-07 22:43:30 UTC (rev 80257)
@@ -4,8 +4,7 @@
 PortSystem                  1.0
 
 name                        ncarg
-version                     5.2.1
-revision                    1
+version                     6.0.0
 categories                  science
 maintainers                 takeshi
 description                 language for scientific data processing and visualization
@@ -19,16 +18,28 @@
 
 homepage                    http://www.ncl.ucar.edu/
 platforms                   darwin
-master_sites                http://www.earthsystemgrid.org/
+master_sites                http://www.earthsystemgrid.org/:ncl
+master_sites                http://www.ncl.ucar.edu/Download/files/:g2clib
 
-distname                    ncl_${name}_src-${version}
+distname                    ncl_${name}-${version}
 worksrcdir                  ncl_${name}-${version}
-checksums           md5     c7ba4847961f38bbbac30ac042eab43a \
-                    sha1    069d3c2a20b58358c6547a70bdb9e65bc9de6881 \
-                    rmd160  ed16827e4a4d3588f23f8ac9d2e48429d06e05f8
+set ncl_src             ${distname}${extract.suffix}
+set g2clib_version      1.2.1
+set g2clib_src          g2clib_with_changes-${g2clib_version}${extract.suffix}
+set g2clib_worksrcdir   g2clib-${g2clib_version}-patches
+distfiles           ${ncl_src}:ncl \
+                    ${g2clib_src}:g2clib
+checksums   ${ncl_src} \
+                    md5     0afca904b8f51abdd3efada4c0dbaa42 \
+                    sha1    949dc8fc823256c1a036aa06a3e68805a4099009 \
+                    rmd160  e5214051eb23e8cc58e0d579a382c80476d570d7 \
+            ${g2clib_src} \
+                    md5     253327b963bf054c69f70df227e83cfb \
+                    sha1    a0ae0849da6c2aba427cf4384c88433e67cc8f77 \
+                    rmd160  0bea38746c9fb4eeeedb4546a5cb8b1a3936f7ee
 
-depends_lib                 port:jpeg6b     \
-                            path:lib/pkgconfig/cairo.pc:cairo \
+
+depends_lib                 path:lib/pkgconfig/cairo.pc:cairo \
                             port:proj       \
                             port:gdal       \
                             port:udunits2   \
@@ -45,21 +56,25 @@
 use_parallel_build          no
 universal_variant           no
 
-fetch {
-    if {![file exists ${distpath}/${distfiles}]} {
+pre-fetch {
+    if {![file exists ${distpath}/${distname}${extract.suffix}]} {
         xinstall -d ${distpath}
-        ui_error "Download ${distfiles} manually and place it in ${distpath}.\n \
+        ui_error "Download ${distname}${extract.suffix} manually and place it in ${distpath}.\n \
             See instructions on ${homepage}/Download/index.shtml"
     }
 }
 
 set usedap y
 
-patchfiles  patch-ncarg2d-src-libncarg-ezmap-mapngb.c.diff
 if {$build_arch eq "x86_64"} {
     patchfiles-append           patch-config-ymake.diff
 }
 post-patch {
+    reinplace "s|INC=-I/usr/include|INC=${configure.cppflags} ${configure.cflags}|" ${workpath}/${g2clib_worksrcdir}/makefile
+    reinplace "s|CC=gcc -fPIC|CC=${configure.cc}|" ${workpath}/${g2clib_worksrcdir}/makefile
+    if {$build_arch eq "x86_64" || $build_arc eq "ppc64"} {
+        reinplace "s|-DUSE_PNG$|-DUSE_PNG -D__64BIT__|" ${workpath}/${g2clib_worksrcdir}/makefile
+    }
     foreach f {Darwin Darwin_Intel} {
         if {[variant_isset g95]} {
             reinplace "s|-lgfortran|-lf95|" ${worksrcpath}/config/${f}
@@ -103,6 +118,8 @@
 #define NetCDF4lib -lnetcdf -lhdf5_hl -lhdf5 -lz -lsz -lmfhdf -ldf -lcurl -lidn -lssl -lcrypto|" ${worksrcpath}/config/${f}
 
 pre-configure {
+    system "cd ${workpath}/${g2clib_worksrcdir}; make all"
+    file copy ${workpath}/${g2clib_worksrcdir}/libgrib2c.a ${worksrcpath}
     system "cd ${worksrcpath}/config; \
         make -f Makefile.ini; \
         ./ymake -config `pwd`"
@@ -127,8 +144,11 @@
 y
 y
 y
-${prefix}/lib/jpeg6b/lib ${prefix}/lib/ ${prefix}/lib/hdfeos5/lib ${prefix}/lib
-${prefix}/include/freetype2 ${prefix}/include/udunits2 ${prefix}/lib/jpeg6b/include ${prefix}/lib/hdfeos5/include ${prefix}/include
+y
+y
+y
+${worksrcpath} ${prefix}/lib ${prefix}/lib/hdfeos5/lib ${prefix}/lib
+${prefix}/include/freetype2 ${prefix}/include/udunits2 ${prefix}/lib/hdfeos5/include ${prefix}/include
 
 
 EOF"

Deleted: trunk/dports/science/ncarg/files/patch-ncarg2d-src-libncarg-ezmap-mapngb.c.diff
===================================================================
--- trunk/dports/science/ncarg/files/patch-ncarg2d-src-libncarg-ezmap-mapngb.c.diff	2011-07-07 22:42:04 UTC (rev 80256)
+++ trunk/dports/science/ncarg/files/patch-ncarg2d-src-libncarg-ezmap-mapngb.c.diff	2011-07-07 22:43:30 UTC (rev 80257)
@@ -1,11 +0,0 @@
---- ncarg2d/src/libncarg/ezmap/mapngb.c.orig	2010-07-24 14:53:37.000000000 -0500
-+++ ncarg2d/src/libncarg/ezmap/mapngb.c	2011-01-22 03:59:02.000000000 -0600
-@@ -78,7 +78,7 @@
-   png_init_io(png_ptr,fp);
-   png_read_info(png_ptr,read_info_ptr);
-   png_get_IHDR(png_ptr,read_info_ptr,&width,&height,&bit_depth,
--               &color_type,&interlace_type,int_p_NULL,int_p_NULL);
-+               &color_type,&interlace_type,(int*)NULL,(int*)NULL);
-   channels=png_get_channels(png_ptr,read_info_ptr);
-   rowbytes=png_get_rowbytes(png_ptr,read_info_ptr);
-   if (bit_depth<8) {png_set_packing(png_ptr);}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110707/192d13e0/attachment.html>


More information about the macports-changes mailing list