[99379] trunk/dports/science/ncarg

takeshi at macports.org takeshi at macports.org
Sat Nov 3 23:29:42 PDT 2012


Revision: 99379
          http://trac.macports.org//changeset/99379
Author:   takeshi at macports.org
Date:     2012-11-03 23:29:42 -0700 (Sat, 03 Nov 2012)
Log Message:
-----------
ncarg: updated for 6.1.0. added license. link against own libraries, not in /lib

Modified Paths:
--------------
    trunk/dports/science/ncarg/Portfile
    trunk/dports/science/ncarg/files/patch-config-ymake.diff

Removed Paths:
-------------
    trunk/dports/science/ncarg/files/patch-dec_png.c.diff
    trunk/dports/science/ncarg/files/patch-enc_png.c.diff

Modified: trunk/dports/science/ncarg/Portfile
===================================================================
--- trunk/dports/science/ncarg/Portfile	2012-11-04 04:46:47 UTC (rev 99378)
+++ trunk/dports/science/ncarg/Portfile	2012-11-04 06:29:42 UTC (rev 99379)
@@ -4,10 +4,10 @@
 PortSystem                  1.0
 
 name                        ncarg
-version                     6.0.0
-revision                    10
+version                     6.1.0
 categories                  science
 maintainers                 takeshi
+license                     {UCAR-Unidata public-domain BSD LGPL-3 GPL-3}
 description                 language for scientific data processing and visualization
 long_description \
     The NCAR Command Language (NCL), a product of           \
@@ -25,21 +25,23 @@
 distname                    ncl_${name}-${version}
 worksrcdir                  ncl_${name}-${version}
 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
+set g2clib_version      1.2.3
+set g2clib_src          g2clib-${g2clib_version}-patch${extract.suffix}
+set g2clib_worksrcdir   g2clib-${g2clib_version}-patch
 distfiles           ${ncl_src}:ncl \
                     ${g2clib_src}:g2clib
+checksums           ncl_ncarg-6.1.0.tar.gz \
+                    g2clib-1.2.3-patch.tar.gz \
+
 checksums   ${ncl_src} \
-                    md5     0afca904b8f51abdd3efada4c0dbaa42 \
-                    sha1    949dc8fc823256c1a036aa06a3e68805a4099009 \
-                    rmd160  e5214051eb23e8cc58e0d579a382c80476d570d7 \
+                    md5     e6eaef55ca0288535cf9e4203bb3874b \
+                    sha1    445aa78714434b4979acd1db8ae1dc9d3356a146 \
+                    rmd160  7736c69f21565deaf85e51a67d199c08994afa61 \
             ${g2clib_src} \
-                    md5     253327b963bf054c69f70df227e83cfb \
-                    sha1    a0ae0849da6c2aba427cf4384c88433e67cc8f77 \
-                    rmd160  0bea38746c9fb4eeeedb4546a5cb8b1a3936f7ee
+                    md5     43eb24f168300f34e0d4e5a7260aba59 \
+                    sha1    5da7cc7319253b80ee0d9693753212d33f32c2b0 \
+                    rmd160  e67d9430bb03a255716763f72e31eddb6d1d5516
 
-
 depends_lib                 path:lib/pkgconfig/cairo.pc:cairo \
                             port:proj       \
                             port:gdal       \
@@ -68,16 +70,16 @@
 set usedap y
 
 patch.dir                   ${workpath}
-patchfiles                  patch-dec_png.c.diff patch-enc_png.c.diff
 if {$build_arch eq "x86_64"} {
     patchfiles-append           patch-config-ymake.diff
 }
 
 post-patch {
+    reinplace "s|hdf/||" ${worksrcpath}/ni/src/ncl/FileSupport.c
     reinplace "s| -lsz||g" ${worksrcpath}/Configure
     reinplace "s| -lsz||g" ${worksrcpath}/config/Project
     reinplace "s|g\\\\+\\\\+|${configure.cc}|" ${worksrcpath}/ni/src/ncl/yMakefile
-    reinplace "s|INC=-I/usr/include|INC=${configure.cppflags} ${configure.cflags}|" ${workpath}/${g2clib_worksrcdir}/makefile
+    reinplace "s|INC=-I/usr/local/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_arch eq "ppc64"} {
         reinplace "s|-DUSE_PNG$|-DUSE_PNG -D__64BIT__|" ${workpath}/${g2clib_worksrcdir}/makefile
@@ -101,11 +103,11 @@
         reinplace "s|-lXext$|-lXext\\
 #define ArchRecLibSearch    -L${prefix}/lib\\
 #define ArchRecIncSearch    -I${prefix}/include\\
-#define CcOptions -fPIC -ansi -D_DARWIN_C_SOURCE -DH5_USE_16_API \\
+#define CcOptions -fPIC -ansi -D_DARWIN_C_SOURCE \\
 #define COptimizeFlag ${configure.cflags}\\
 #define FOptimizeFlag ${configure.fflags}\\
 #define ManRoot ${destroot}${prefix}/share/man\\
-#define NetCDF4lib -lnetcdf\\
+#define NetCDFlib -lnetcdf\\
 #define HDFEOS5lib -lhe5_hdfeos -lGctp -lhdf5|" ${worksrcpath}/config/${f}
     }
     if {[variant_isset g95]} {
@@ -118,6 +120,9 @@
         reinplace "s|hdf\/||" ${worksrcpath}/${f}
     }
     reinplace "s|\$\(NCARGGKSCAIROLIB\) \$\(NCARGCLIB\)|\$(NCARGGKSCAIROLIB) \$(NCARGGKSLIB) \$(NCARGCLIB)|" ${worksrcpath}/config/Project
+    foreach exlib {sphere3.1_dp fftpack5_dp} {
+        reinplace "s|-l${exlib}|\$(EXTERNALSRC)/${exlib}/lib${exlib}.a|g" ${worksrcpath}/config/Project
+    }
     if {[variant_isset accelerate]} {
         reinplace "s|-llapack_ncl|-framework Accelerate|g" ${worksrcpath}/config/Project
         if {[variant_isset g95] || ([string match *64* $build_arch] && ${os.major} >= 10)} {
@@ -125,9 +130,17 @@
         } else {
             reinplace "s|-lblas_ncl|-framework Accelerate|g" ${worksrcpath}/config/Project
         }
+        foreach f {Darwin Darwin_Intel} {
+            reinplace "/LAPACKLIB/d" ${worksrcpath}/config/${f}
+            reinplace "/BLASLIB/d" ${worksrcpath}/config/${f}
+        }
         reinplace "s|-L\$(LAPACKSRC)||" ${worksrcpath}/config/Project
         reinplace "s|-L\$(BLASSRC)||" ${worksrcpath}/config/Project
         reinplace "s|blas lapack ||" ${worksrcpath}/external/yMakefile
+    } else {
+        foreach exlib {lapack blas} {
+            reinplace "s|-l${exlib}_ncl|\$(EXTERNALSRC)/${exlib}/lib${exlib}_ncl.a|g" ${worksrcpath}/config/Project
+        }
     }
 }
 
@@ -202,6 +215,7 @@
 variant g95 conflicts gcc43 gcc44 gcc45 description {compile with g95} {
     configure.fc            ${prefix}/bin/g95
     depends_build-append    port:g95
+    configure.fflags-append -fno-second-underscore
 }
 
 variant gcc43 conflicts gcc44 gcc45 g95 description {compile with gcc 4.3} {

Modified: trunk/dports/science/ncarg/files/patch-config-ymake.diff
===================================================================
--- trunk/dports/science/ncarg/files/patch-config-ymake.diff	2012-11-04 04:46:47 UTC (rev 99378)
+++ trunk/dports/science/ncarg/files/patch-config-ymake.diff	2012-11-04 06:29:42 UTC (rev 99379)
@@ -1,12 +1,11 @@
---- ncl_ncarg-6.0.0/config/ymake.orig	2009-12-23 17:02:49.000000000 +0900
-+++ ncl_ncarg-6.0.0/config/ymake	2009-12-23 17:12:25.000000000 +0900
-@@ -415,8 +415,9 @@
-             set vendor  = Apple
+--- ncl_ncarg-6.1.0/config/ymake.orig	2012-10-28 11:55:53.000000000 +0900
++++ ncl_ncarg-6.1.0/config/ymake	2012-11-03 16:07:20.000000000 +0900
+@@ -416,8 +416,8 @@
              breaksw
          case    i386:
+         case    x86_64:
 -            set model   = $mach
 -            set arch    = $mach
-+        case  x86_64:
 +            set model   = x86_64
 +            set arch    = x86_64
              set sysincs = Darwin_Intel

Deleted: trunk/dports/science/ncarg/files/patch-dec_png.c.diff
===================================================================
--- trunk/dports/science/ncarg/files/patch-dec_png.c.diff	2012-11-04 04:46:47 UTC (rev 99378)
+++ trunk/dports/science/ncarg/files/patch-dec_png.c.diff	2012-11-04 06:29:42 UTC (rev 99379)
@@ -1,11 +0,0 @@
---- g2clib-1.2.1-patches/dec_png.c.orig	2011-02-10 07:53:25.000000000 +0900
-+++ g2clib-1.2.1-patches/dec_png.c	2012-09-06 09:30:41.000000000 +0900
-@@ -88,7 +88,7 @@
- 
- /*    Set new custom read function    */
- 
--    png_set_read_fn(png_ptr,(voidp)&read_io_ptr,(png_rw_ptr)user_read_data);
-+    png_set_read_fn(png_ptr,(png_voidp)&read_io_ptr,(png_rw_ptr)user_read_data);
- /*     png_init_io(png_ptr, fptr);   */
- 
- /*     Read and decode PNG stream   */

Deleted: trunk/dports/science/ncarg/files/patch-enc_png.c.diff
===================================================================
--- trunk/dports/science/ncarg/files/patch-enc_png.c.diff	2012-11-04 04:46:47 UTC (rev 99378)
+++ trunk/dports/science/ncarg/files/patch-enc_png.c.diff	2012-11-04 06:29:42 UTC (rev 99379)
@@ -1,11 +0,0 @@
---- g2clib-1.2.1-patches/enc_png.c.orig	2011-02-10 07:53:25.000000000 +0900
-+++ g2clib-1.2.1-patches/enc_png.c	2012-09-06 09:31:00.000000000 +0900
-@@ -88,7 +88,7 @@
- 
- /*    Set new custom write functions    */
- 
--    png_set_write_fn(png_ptr,(voidp)&write_io_ptr,(png_rw_ptr)user_write_data,
-+    png_set_write_fn(png_ptr,(png_voidp)&write_io_ptr,(png_rw_ptr)user_write_data,
-                     (png_flush_ptr)user_flush_data);
- /*    png_init_io(png_ptr, fptr);   */
- /*    png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);  */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121103/65b33f81/attachment-0001.html>


More information about the macports-changes mailing list