Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Apr 2014 15:19:11 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r350624 - in head/science/gnudatalanguage: . files
Message-ID:  <201404081519.s38FJBBM070517@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Tue Apr  8 15:19:11 2014
New Revision: 350624
URL: http://svnweb.freebsd.org/changeset/ports/350624
QAT: https://qat.redports.org/buildarchive/r350624/

Log:
  Fix build on freebsd 10 and 11 by using gcc but linking to libc++
  Add patches to fix build with libc++
  Whiel here switch to unicode version of wx
  While now in theory this should build with clang 3.3 on my test machine the compilation of some c++ files seems to enter a endless loop

Added:
  head/science/gnudatalanguage/files/patch-src__base64.hpp   (contents, props changed)
  head/science/gnudatalanguage/files/patch-src__basic_fun.cpp   (contents, props changed)
  head/science/gnudatalanguage/files/patch-src__gsl_fun.cpp   (contents, props changed)
  head/science/gnudatalanguage/files/patch-src__str.cpp   (contents, props changed)
Modified:
  head/science/gnudatalanguage/Makefile

Modified: head/science/gnudatalanguage/Makefile
==============================================================================
--- head/science/gnudatalanguage/Makefile	Tue Apr  8 15:16:39 2014	(r350623)
+++ head/science/gnudatalanguage/Makefile	Tue Apr  8 15:19:11 2014	(r350624)
@@ -36,10 +36,10 @@ LIB_DEPENDS+=	libplplotd.so:${PORTSDIR}/
 		libps.so:${PORTSDIR}/print/pslib	\
 		libgsl.so:${PORTSDIR}/math/gsl
 
-USE_GCC=	yes
 USE_WX=		2.8
+WX_UNICODE=	yes
 USE_XORG=	x11
-USES=		pkgconfig cmake dos2unix
+USES=		pkgconfig cmake dos2unix compiler:gcc-c++11-lib
 
 # Disable ncurses and readline from ports
 # Disable ImageMagick (does'nt work with plplot because dynamic drivers

Added: head/science/gnudatalanguage/files/patch-src__base64.hpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/gnudatalanguage/files/patch-src__base64.hpp	Tue Apr  8 15:19:11 2014	(r350624)
@@ -0,0 +1,38 @@
+--- ./src/base64.hpp.orig	2014-04-08 16:53:53.885118264 +0200
++++ ./src/base64.hpp	2014-04-08 16:53:54.105117486 +0200
+@@ -147,7 +147,7 @@
+ 						Warning("base64 decode error: unexpected fill char -- offset read?");
+ 						return false;
+ 					}
+-					if(!isspace(data[i-1])) {
++					if(!std::isspace(data[i-1])) {
+ 						//cerr << "base 64 decode error: illegal character '" << data[i-1] << "' (0x" << std::hex << (int)data[i-1] << std::dec << ")" << endl;
+ 						Warning("base 64 decode error: illegal character");
+ 						return false;
+@@ -165,7 +165,7 @@
+ 						Warning("base64 decode error: unexpected fill char -- offset read?");
+ 						return false;
+ 					}
+-					if(!isspace(data[i-1])) {
++					if(!std::isspace(data[i-1])) {
+ 						//cerr << "base 64 decode error: illegal character '" << data[i-1] << '\'' << endl;
+ 						Warning("base 64 decode error: illegal character");
+ 						return false;
+@@ -190,7 +190,7 @@
+ 					if(fillchar == data[i-1]) {
+ 						return true;
+ 					}
+-					if(!isspace(data[i-1])) {
++					if(!std::isspace(data[i-1])) {
+ 						//cerr << "base 64 decode error: illegal character '" << data[i-1] << '\'' << endl;
+ 						Warning("base 64 decode error: illegal character");
+ 						return false;
+@@ -215,7 +215,7 @@
+ 					if(fillchar == data[i-1]) {
+ 						return true;
+ 					}
+-					if(!isspace(data[i-1])) {
++					if(!std::isspace(data[i-1])) {
+ 						//cerr << "base 64 decode error: illegal character '" << data[i-1] << '\'' << endl;
+ 						Warning("base 64 decode error: illegal character");
+ 						return false;

Added: head/science/gnudatalanguage/files/patch-src__basic_fun.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/gnudatalanguage/files/patch-src__basic_fun.cpp	Tue Apr  8 15:19:11 2014	(r350624)
@@ -0,0 +1,11 @@
+--- ./src/basic_fun.cpp.orig	2014-04-08 16:53:53.916118121 +0200
++++ ./src/basic_fun.cpp	2014-04-08 16:53:54.109117445 +0200
+@@ -6412,7 +6412,7 @@
+       while (p < e) 
+       {
+         // scheme = 1*[ lowalpha | digit | "+" | "-" | "." ]
+-        if (!isalpha(*p) && !isdigit(*p) && *p != '+' && *p != '.' && *p != '-') 
++        if (!std::isalpha(*p) && !std::isdigit(*p) && *p != '+' && *p != '.' && *p != '-') 
+         {
+           if (e + 1 < ue) goto parse_port;
+           else goto just_path;

Added: head/science/gnudatalanguage/files/patch-src__gsl_fun.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/gnudatalanguage/files/patch-src__gsl_fun.cpp	Tue Apr  8 15:19:11 2014	(r350624)
@@ -0,0 +1,20 @@
+--- ./src/gsl_fun.cpp.orig	2014-04-08 16:53:53.901118160 +0200
++++ ./src/gsl_fun.cpp	2014-04-08 16:53:54.111117458 +0200
+@@ -3378,7 +3378,7 @@
+       e->AssureScalarPar<DStringGDL>(0, tmpname);    
+       name.reserve(tmpname.length());
+       for (string::iterator it = tmpname.begin(); it < tmpname.end(); it++) 
+-        if (*it != ' ' && *it != '_') name.append(1, (char)tolower(*it));
++        if (*it != ' ' && *it != '_') name.append(1, (char)std::tolower(*it));
+     }
+ 
+ #ifdef USE_UDUNITS
+@@ -3889,7 +3889,7 @@
+ 	  res[j] = sign * sphPlm.val;
+ 	*/
+ 	res[j] = sign * gsl_sf_legendre_sphPlm(l, abs(m), cos(theta[j * step_theta]));
+-	res[j] *= exp(complex<T_phi>(0., m * phi[j * step_phi]));
++	res[j] *= T_res(std::exp(complex<T_phi>(0., m * phi[j * step_phi])));
+       }
+   }
+   template <class T_phi, class T_res>

Added: head/science/gnudatalanguage/files/patch-src__str.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/gnudatalanguage/files/patch-src__str.cpp	Tue Apr  8 15:19:11 2014	(r350624)
@@ -0,0 +1,38 @@
+--- ./src/str.cpp.orig	2014-04-08 16:53:53.954118000 +0200
++++ ./src/str.cpp	2014-04-08 16:58:59.524163473 +0200
+@@ -180,7 +180,7 @@
+   ArrayGuard<char> guard( r);
+   r[len]=0;
+   for(unsigned i=0;i<len;i++)
+-    r[i]=toupper(sCStr[i]);
++    r[i]=std::toupper(sCStr[i]);
+   return string(r);
+ }
+ void StrUpCaseInplace( string& s)
+@@ -191,7 +191,7 @@
+ //   ArrayGuard<char> guard( r);
+ //   r[len]=0;
+   for(unsigned i=0;i<len;i++)
+-    s[i]=toupper(s[i]);
++    s[i]=std::toupper(s[i]);
+ //   return string(r);
+ }
+ 
+@@ -203,7 +203,7 @@
+   ArrayGuard<char> guard( r);
+   r[len]=0;
+   for(unsigned i=0;i<len;i++)
+-    r[i]=tolower(sCStr[i]);
++    r[i]=std::tolower(sCStr[i]);
+   return string(r);
+ }
+ void StrLowCaseInplace(string& s)
+@@ -211,7 +211,7 @@
+   unsigned len=s.length();
+ //   char const *sCStr=s.c_str();
+   for(unsigned i=0;i<len;i++)
+-    s[i]=tolower(s[i]);
++    s[i]=std::tolower(s[i]);
+ //     s[i]=tolower(sCStr[i]);
+ }
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404081519.s38FJBBM070517>