[142654] trunk/dports/science/nco

ryandesign at macports.org ryandesign at macports.org
Sat Dec 12 06:40:20 PST 2015


Revision: 142654
          https://trac.macports.org/changeset/142654
Author:   ryandesign at macports.org
Date:     2015-11-18 12:33:48 -0800 (Wed, 18 Nov 2015)
Log Message:
-----------
nco: update to 4.5.3 and fix build failure with gsl 2 (#49609; maintainer timeout)

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

Added Paths:
-----------
    trunk/dports/science/nco/files/
    trunk/dports/science/nco/files/gsl-2.patch

Modified: trunk/dports/science/nco/Portfile
===================================================================
--- trunk/dports/science/nco/Portfile	2015-11-18 19:16:23 UTC (rev 142653)
+++ trunk/dports/science/nco/Portfile	2015-11-18 20:33:48 UTC (rev 142654)
@@ -5,8 +5,7 @@
 PortGroup           compilers 1.0
 PortGroup           github 1.0
 
-github.setup        nco nco 4.5.2
-revision            3
+github.setup        nco nco 4.5.3
 platforms           darwin
 maintainers         takeshi
 license             GPL-3
@@ -18,8 +17,8 @@
 compilers.choose    cc cxx
 compilers.setup     -clang -dragonegg -llvm -gfortran
 
-checksums           rmd160  d64c2447ae02273264d43c1fe1f74934160e0553 \
-                    sha256  db4dee684d1ac30b7abfd1b74084f33e2c7cb4c517089bef0caceb94d9f2659f
+checksums           rmd160  c3d893b84fa531f50c8fb6bc461856d80557c86b \
+                    sha256  725e5d93cdc369752839eb3c34c4fbdb02e680f64c4247c975931335d6dae1c6
 
 homepage            http://nco.sourceforge.net/
 long_description \
@@ -49,6 +48,8 @@
                     port:texinfo
 depends_run         port:wget
 
+patchfiles-append   gsl-2.patch
+
 configure.env       HAVE_ANTLR=yes ANTLR_ROOT=${prefix} \
                     PATH_TO_NCGEN=${prefix}/bin/ncgen
 configure.cppflags-append   -I/usr/include/malloc \

Added: trunk/dports/science/nco/files/gsl-2.patch
===================================================================
--- trunk/dports/science/nco/files/gsl-2.patch	                        (rev 0)
+++ trunk/dports/science/nco/files/gsl-2.patch	2015-11-18 20:33:48 UTC (rev 142654)
@@ -0,0 +1,278 @@
+Fix build with gsl 2
+https://github.com/nco/nco/issues/19
+https://github.com/nco/nco/commit/4d2ef537ec6c47c86a6bb14b0bd5ae82086c4bb3
+https://github.com/nco/nco/commit/112cf8c18177103a6a6ff27a16af2aef62d9c3b3
+--- config.h.in.orig	2015-10-20 20:55:09.000000000 -0500
++++ config.h.in	2015-11-18 14:25:57.000000000 -0600
+@@ -418,9 +418,15 @@
+ /* Building TeXInfo documentation requires version greater than 4.8 */
+ #undef MAKEINFO_VERSION
+ 
++/* GSL major version number */
++#undef NCO_GSL_MAJOR_VERSION
++
+ /* GSL minor version number */
+ #undef NCO_GSL_MINOR_VERSION
+ 
++/* GSL version number */
++#undef NCO_GSL_VERSION
++
+ /* POSIX extended regular expressions available */
+ #undef NCO_HAVE_REGEX_FUNCTIONALITY
+ 
+--- configure.orig	2015-10-20 20:55:09.000000000 -0500
++++ configure	2015-11-18 14:25:57.000000000 -0600
+@@ -19770,17 +19770,31 @@
+     elif test "${enable_gsl}" = 'yes'; then
+ # Assumes GSL version in form 1.[0-9]+  extract minor version only
+ 	GSL_VER="`${GSL_CONFIG} --version`"
+-	GSL_VER=`echo "${GSL_VER}" | sed -e 's/^1\.//'`
++	GSL_MAJOR="`echo "${GSL_VER}" | cut -d '.' -f 1`"
++	GSL_MINOR="`echo "${GSL_VER}" | cut -d '.' -f 2`"
++        GSL_VER=`expr $GSL_MAJOR \* 100 + $GSL_MINOR`
+ 	if test "x${GSL_VER}" = 'x'; then
+ 	    # 20100115: Fix for machines like bluefire that lack gsl-config
+-	    GSL_VER='4'
++	    GSL_VER='104'
++            GSL_MAJOR='1'
++            GSL_MINOR='4'
+ 	fi
+ 
+ $as_echo "#define ENABLE_GSL 1" >>confdefs.h
+ 
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define NCO_GSL_MINOR_VERSION ${GSL_VER}
++#define NCO_GSL_MINOR_VERSION ${GSL_MINOR}
++_ACEOF
++
++
++cat >>confdefs.h <<_ACEOF
++#define NCO_GSL_MAJOR_VERSION ${GSL_MAJOR}
++_ACEOF
++
++
++cat >>confdefs.h <<_ACEOF
++#define NCO_GSL_VERSION ${GSL_VER}
+ _ACEOF
+ 
+ 	{ $as_echo "$as_me:${as_lineno-$LINENO}: GSL support enabled" >&5
+--- data/gsl_sf.in.orig	2015-10-20 20:55:09.000000000 -0500
++++ data/gsl_sf.in	2015-11-18 14:25:51.000000000 -0600
+@@ -200,13 +200,17 @@
+ 
+   // d2,d3 identical
+   d2=gsl_sf_legendre_Plm(time.int()-1,0,0.7);
+-  d3=time;
+-  gsl_sf_legendre_Plm_array(9,0,0.7,&d3);
++
++    
++  // not in gsl 2.0
++  //gsl_sf_legendre_Plm_array(9,0,0.7,&d3);
+ 
+   // d4,d5 identical
+   d4=gsl_sf_legendre_sphPlm(leg,0,0.7);
+-  d5=leg.double();
+-  gsl_sf_legendre_sphPlm_array(3,0,0.7,&d5);
++  
++
++  // not in gsl 2.0
++  // gsl_sf_legendre_sphPlm_array(3,0,0.7,&d5);
+ 
+ 
+   if( fabs(d0.total()-d1.total() ) >0.01){
+@@ -214,14 +218,14 @@
+      nbr_err++;	
+   }
+ 
+-
+-  if( fabs(d2.total()-d3.total() ) >0.01){
++  
++  if( fabs(d2.total()- 1.56887  ) >0.01){
+      print("ERROR: d2:Legendre functions\n");
+      nbr_err++;	
+   }
+ 
+ 
+-  if( fabs(d4.avg()-d5.avg() ) >0.01){
++  if( fabs(d4.ttl()- 0.628677 ) >0.01){
+      print("ERROR: d4:Legendre functions\n");
+      nbr_err++;	
+   }
+--- src/nco++/fmc_gsl_cls.cc.orig	2015-10-20 20:55:09.000000000 -0500
++++ src/nco++/fmc_gsl_cls.cc	2015-11-18 14:25:51.000000000 -0600
+@@ -117,10 +117,10 @@
+     gpr_vtr.push_back(gpr_cls("gsl_sf_debye_3",f_unn(gsl_sf_debye_3_e),hnd_fnc_x,NC_DOUBLE));
+     gpr_vtr.push_back(gpr_cls("gsl_sf_debye_4",f_unn(gsl_sf_debye_4_e),hnd_fnc_x,NC_DOUBLE));
+ 
+-# if NCO_GSL_MINOR_VERSION >= 8
++# if NCO_GSL_VERSION >= 108
+       gpr_vtr.push_back(gpr_cls("gsl_sf_debye_5",f_unn(gsl_sf_debye_5_e),hnd_fnc_x,NC_DOUBLE));
+       gpr_vtr.push_back(gpr_cls("gsl_sf_debye_6",f_unn(gsl_sf_debye_6_e),hnd_fnc_x,NC_DOUBLE));
+-# endif // NCO_GSL_MINOR_VERSION < 8
++# endif // NCO_GSL_VERSION < 8
+     
+     // Dilogarithm
+     // not implemented as all involve complex numbers
+@@ -131,10 +131,10 @@
+     gpr_vtr.push_back(gpr_cls("gsl_sf_ellint_Kcomp",f_unn(gsl_sf_ellint_Kcomp_e),hnd_fnc_nd,P1DBLMD));
+     gpr_vtr.push_back(gpr_cls("gsl_sf_ellint_Ecomp",f_unn(gsl_sf_ellint_Ecomp_e),hnd_fnc_nd,P1DBLMD));
+ 
+-# if NCO_GSL_MINOR_VERSION >= 9 
++# if NCO_GSL_VERSION >= 109 
+       gpr_vtr.push_back(gpr_cls("gsl_sf_ellint_Pcomp",f_unn(gsl_sf_ellint_Pcomp_e),hnd_fnc_nd,P2DBLMD));
+       gpr_vtr.push_back(gpr_cls("gsl_sf_ellint_Dcomp",f_unn(gsl_sf_ellint_Dcomp_e),hnd_fnc_nd,P1DBLMD));
+-# endif // NCO_GSL_MINOR_VERSION < 9
++# endif // NCO_GSL_VERSION < 9
+  
+     gpr_vtr.push_back(gpr_cls("gsl_sf_ellint_F",f_unn(gsl_sf_ellint_F_e),hnd_fnc_nd,P2DBLMD));
+     gpr_vtr.push_back(gpr_cls("gsl_sf_ellint_E",f_unn(gsl_sf_ellint_E_e),hnd_fnc_nd,P2DBLMD));
+@@ -178,10 +178,10 @@
+     gpr_vtr.push_back(gpr_cls("gsl_sf_expint_E1_scaled",f_unn(gsl_sf_expint_E1_scaled_e),hnd_fnc_x,NC_DOUBLE));
+     gpr_vtr.push_back(gpr_cls("gsl_sf_expint_E2_scaled",f_unn(gsl_sf_expint_E2_scaled_e),hnd_fnc_x,NC_DOUBLE));
+ 
+-# if NCO_GSL_MINOR_VERSION >= 10 
++# if NCO_GSL_VERSION >= 110 
+       gpr_vtr.push_back(gpr_cls("gsl_sf_expint_En",f_unn(gsl_sf_expint_En_e),hnd_fnc_xd,NC_INT));
+       gpr_vtr.push_back(gpr_cls("gsl_sf_expint_En_scaled",f_unn(gsl_sf_expint_En_scaled_e),hnd_fnc_xd,NC_INT));
+-# endif // NCO_GSL_MINOR_VERSION < 10
++# endif // NCO_GSL_VERSION < 10
+ 
+     gpr_vtr.push_back(gpr_cls("gsl_sf_expint_Ei",f_unn(gsl_sf_expint_Ei_e),hnd_fnc_x,NC_DOUBLE));
+     gpr_vtr.push_back(gpr_cls("gsl_sf_expint_Ei_scaled",f_unn(gsl_sf_expint_Ei_scaled_e),hnd_fnc_x,NC_DOUBLE));
+@@ -271,10 +271,17 @@
+     gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_Q1",f_unn(gsl_sf_legendre_Q1_e),hnd_fnc_x,NC_DOUBLE));
+     gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_Ql",f_unn(gsl_sf_legendre_Ql_e),hnd_fnc_xd,NC_INT));
+     gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_Plm",f_unn(gsl_sf_legendre_Plm_e),hnd_fnc_iid));
++
++    #if NCO_GSL_VERSION < 200    
+     gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_Plm_array",f_unn(gsl_sf_legendre_Plm_array),hnd_fnc_iidpd,PLEGEND));
++    #endif
+     // gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_Plm_deriv_array",f_unn(gsl_sf_legendre_Plm_deriv_array),));
+     gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_sphPlm",f_unn(gsl_sf_legendre_sphPlm_e),hnd_fnc_iid));
++
++    #if NCO_GSL_VERSION < 200    
+     gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_sphPlm_array",f_unn(gsl_sf_legendre_sphPlm_array),hnd_fnc_iidpd,PLEGEND));
++    #endif
++
+     // gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_sphPlm_deriv_array",f_unn(gsl_sf_legendre_sphPlm_deriv_array),));
+     // gpr_vtr.push_back(gpr_cls("gsl_sf_legendre_array_size",f_unn(gsl_sf_legendre_array_size),));
+     gpr_vtr.push_back(gpr_cls("gsl_sf_conicalP_half",f_unn(gsl_sf_conicalP_half_e),hnd_fnc_nd,P2DBL));
+@@ -309,9 +316,9 @@
+     // gpr_vtr.push_back(gpr_cls("gsl_sf_complex_psi",f_unn(gsl_sf_complex_psi_e),hnd_fnc_x,NC_DOUBLE));
+     gpr_vtr.push_back(gpr_cls("gsl_sf_psi_1_int",f_unn(gsl_sf_psi_1_int_e),hnd_fnc_x,NC_INT));
+    
+-# if NCO_GSL_MINOR_VERSION >= 5 
++# if NCO_GSL_VERSION >= 105 
+       gpr_vtr.push_back(gpr_cls("gsl_sf_psi_1",f_unn(gsl_sf_psi_1_e),hnd_fnc_x,NC_DOUBLE));
+-# endif // NCO_GSL_MINOR_VERSION < 5
++# endif // NCO_GSL_VERSION < 105
+ 
+     gpr_vtr.push_back(gpr_cls("gsl_sf_psi_n",f_unn(gsl_sf_psi_n_e),hnd_fnc_xd,NC_INT));
+     
+@@ -332,10 +339,10 @@
+     gpr_vtr.push_back(gpr_cls("gsl_sf_zeta_int",f_unn(gsl_sf_zeta_int_e),hnd_fnc_x,NC_INT));
+     gpr_vtr.push_back(gpr_cls("gsl_sf_zeta",f_unn(gsl_sf_zeta_e),hnd_fnc_x,NC_DOUBLE));
+ 
+-# if NCO_GSL_MINOR_VERSION >= 5 
++# if NCO_GSL_VERSION >= 105 
+       gpr_vtr.push_back(gpr_cls("gsl_sf_zetam1",f_unn(gsl_sf_zetam1_e),hnd_fnc_x,NC_DOUBLE));
+       gpr_vtr.push_back(gpr_cls("gsl_sf_zetam1_int",f_unn(gsl_sf_zetam1_int_e),hnd_fnc_x,NC_INT));
+-# endif // NCO_GSL_MINOR_VERSION < 5
++# endif // NCO_GSL_VERSION < 105
+     
+     gpr_vtr.push_back(gpr_cls("gsl_sf_hzeta",f_unn(gsl_sf_hzeta_e),hnd_fnc_nd,P2DBL));
+     gpr_vtr.push_back(gpr_cls("gsl_sf_eta_int",f_unn(gsl_sf_eta_int_e),hnd_fnc_x,NC_INT));
+@@ -386,7 +393,7 @@
+     gpr_vtr.push_back(gpr_cls("gsl_cdf_exponential_Q",f_unn(gsl_cdf_exponential_Q),hnd_fnc_nd,P2DBLX));
+     gpr_vtr.push_back(gpr_cls("gsl_cdf_exponential_Pinv",f_unn(gsl_cdf_exponential_Pinv),hnd_fnc_nd,P2DBLX));
+     gpr_vtr.push_back(gpr_cls("gsl_cdf_exponential_Qinv",f_unn(gsl_cdf_exponential_Qinv),hnd_fnc_nd,P2DBLX));
+-# if NCO_GSL_MINOR_VERSION >= 6
++# if NCO_GSL_VERSION >= 106
+     gpr_vtr.push_back(gpr_cls("gsl_cdf_exppow_P",f_unn(gsl_cdf_exppow_P),hnd_fnc_nd,P3DBLX));
+     gpr_vtr.push_back(gpr_cls("gsl_cdf_exppow_Q",f_unn(gsl_cdf_exppow_Q),hnd_fnc_nd,P3DBLX));
+ # endif
+@@ -397,10 +404,10 @@
+ 
+     gpr_vtr.push_back(gpr_cls("gsl_cdf_fdist_P",f_unn(gsl_cdf_fdist_P),hnd_fnc_nd,P3DBLX));
+     gpr_vtr.push_back(gpr_cls("gsl_cdf_fdist_Q",f_unn(gsl_cdf_fdist_Q),hnd_fnc_nd,P3DBLX));
+-# if NCO_GSL_MINOR_VERSION >= 8 
++# if NCO_GSL_VERSION >= 108 
+     gpr_vtr.push_back(gpr_cls("gsl_cdf_fdist_Pinv",f_unn(gsl_cdf_fdist_Pinv),hnd_fnc_nd,P3DBLX));
+     gpr_vtr.push_back(gpr_cls("gsl_cdf_fdist_Qinv",f_unn(gsl_cdf_fdist_Qinv),hnd_fnc_nd,P3DBLX));
+-# endif // NCO_GSL_MINOR_VERSION < 8
++# endif // NCO_GSL_VERSION < 8
+ 
+     gpr_vtr.push_back(gpr_cls("gsl_cdf_beta_P",f_unn(gsl_cdf_beta_P),hnd_fnc_nd,P3DBLX));
+     gpr_vtr.push_back(gpr_cls("gsl_cdf_beta_Q",f_unn(gsl_cdf_beta_Q),hnd_fnc_nd,P3DBLX));
+@@ -474,7 +481,7 @@
+   gpr_vtr.push_back(gpr_cls("gsl_ran_beta_pdf",f_unn(gsl_ran_beta_pdf),hnd_fnc_nd,P3DBLX));
+ 
+   gpr_vtr.push_back(gpr_cls("gsl_ran_binomial",f_unn(gsl_ran_binomial),hnd_fnc_udrdu));
+-# if NCO_GSL_MINOR_VERSION >= 7 
++# if NCO_GSL_VERSION >= 107 
+   gpr_vtr.push_back(gpr_cls("gsl_ran_binomial_knuth",f_unn(gsl_ran_binomial_knuth),hnd_fnc_udrdu));
+ # endif
+   gpr_vtr.push_back(gpr_cls("gsl_ran_binomial_tpe",f_unn(gsl_ran_binomial_tpe),hnd_fnc_udrdu));
+@@ -508,16 +515,18 @@
+   gpr_vtr.push_back(gpr_cls("gsl_ran_gamma",f_unn(gsl_ran_gamma),hnd_fnc_rnd,P2DBLX));
+   gpr_vtr.push_back(gpr_cls("gsl_ran_gamma_int",f_unn(gsl_ran_gamma_int),hnd_fnc_ru));
+   gpr_vtr.push_back(gpr_cls("gsl_ran_gamma_pdf",f_unn(gsl_ran_gamma_pdf),hnd_fnc_nd,P3DBLX));
+-# if NCO_GSL_MINOR_VERSION >= 8 
++# if NCO_GSL_VERSION >= 108 
+   gpr_vtr.push_back(gpr_cls("gsl_ran_gamma_mt",f_unn(gsl_ran_gamma_mt),hnd_fnc_rnd,P2DBLX));
+   gpr_vtr.push_back(gpr_cls("gsl_ran_gamma_knuth",f_unn(gsl_ran_gamma_knuth),hnd_fnc_rnd,P2DBLX));
+-# endif // NCO_GSL_MINOR_VERSION < 8
++# endif // NCO_GSL_VERSION < 108
+ 
+   gpr_vtr.push_back(gpr_cls("gsl_ran_gaussian",f_unn(gsl_ran_gaussian),hnd_fnc_rnd,P1DBLX));
+   gpr_vtr.push_back(gpr_cls("gsl_ran_gaussian_ratio_method",f_unn(gsl_ran_gaussian_ratio_method),hnd_fnc_rnd,P1DBLX));
+-# if NCO_GSL_MINOR_VERSION >= 8 
++
++# if NCO_GSL_VERSION >= 108 
+   gpr_vtr.push_back(gpr_cls("gsl_ran_gaussian_ziggurat",f_unn(gsl_ran_gaussian_ziggurat),hnd_fnc_rnd,P1DBLX));
+ # endif // NCO_GSL_MINOR_VERSION < 8
++
+   gpr_vtr.push_back(gpr_cls("gsl_ran_gaussian_pdf",f_unn(gsl_ran_gaussian_pdf),hnd_fnc_nd,P2DBLX));
+ 
+   gpr_vtr.push_back(gpr_cls("gsl_ran_ugaussian",f_unn(gsl_ran_ugaussian),hnd_fnc_rnd,P0DBLX));
+@@ -747,9 +756,11 @@
+   }
+ 
+   gpr_vtr.push_back(gpr_cls("gsl_stats_covariance",f_unn(ncap_void),hnd_fnc_stat4,PS_COV));
+-# if NCO_GSL_MINOR_VERSION >= 10
++
++# if NCO_GSLVERSION >= 110
+   gpr_vtr.push_back(gpr_cls("gsl_stats_correlation",f_unn(ncap_void),hnd_fnc_stat4,PS_COR));
+-# endif // NCO_GSL_MINOR_VERSION < 10
++# endif // NCO_GSL_VERSION < 110
++
+   gpr_vtr.push_back(gpr_cls("gsl_stats_pvariance",f_unn(ncap_void),hnd_fnc_stat4,PS_PVAR));
+   gpr_vtr.push_back(gpr_cls("gsl_stats_ttest",f_unn(ncap_void),hnd_fnc_stat4,PS_TTST));
+ 
+@@ -3620,7 +3631,7 @@
+      default: nco_dfl_case_nc_type_err(); break;    
+      }  break;  
+   
+-# if NCO_GSL_MINOR_VERSION >= 10
++# if NCO_GSL_VERSION >= 110
+    case PS_COR:
+      switch(var_arr[0]->type){
+        case NC_FLOAT:  r_val=gsl_stats_float_correlation( var_arr[0]->val.fp,d1_srd,var_arr[3]->val.fp,d2_srd,sz1 );break;
+--- src/nco++/fmc_gsl_cls.hh.orig	2015-10-20 20:55:09.000000000 -0500
++++ src/nco++/fmc_gsl_cls.hh	2015-11-18 14:25:51.000000000 -0600
+@@ -40,11 +40,11 @@
+ #include "ncap2_utl.hh"
+ #include "vtl_cls.hh"
+ 
+-#ifndef NCO_GSL_MINOR_VERSION
++#ifndef NCO_GSL_VERSION
+ #ifdef _MSC_VER
+-# define NCO_GSL_MINOR_VERSION 7
++# define NCO_GSL_VERSION 107
+ #else
+-# define NCO_GSL_MINOR_VERSION 12
++# define NCO_GSL_VERSION 112
+ #endif // _MSC_VER
+ #endif // NCO_GSL_MINOR_VERSION
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/d8788322/attachment.html>


More information about the macports-changes mailing list