diff options
author | bapt <bapt@FreeBSD.org> | 2014-04-08 23:19:11 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2014-04-08 23:19:11 +0800 |
commit | a888734645cb03f3ad9f6527d044d320d54ac1e9 (patch) | |
tree | 24b66cddd7df28883a0d67c8d8fa044ae9eebf3c /science/gnudatalanguage | |
parent | 914d13052a8198351f55872494f72b8f383d219b (diff) | |
download | freebsd-ports-gnome-a888734645cb03f3ad9f6527d044d320d54ac1e9.tar.gz freebsd-ports-gnome-a888734645cb03f3ad9f6527d044d320d54ac1e9.tar.zst freebsd-ports-gnome-a888734645cb03f3ad9f6527d044d320d54ac1e9.zip |
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
Diffstat (limited to 'science/gnudatalanguage')
-rw-r--r-- | science/gnudatalanguage/Makefile | 4 | ||||
-rw-r--r-- | science/gnudatalanguage/files/patch-src__base64.hpp | 38 | ||||
-rw-r--r-- | science/gnudatalanguage/files/patch-src__basic_fun.cpp | 11 | ||||
-rw-r--r-- | science/gnudatalanguage/files/patch-src__gsl_fun.cpp | 20 | ||||
-rw-r--r-- | science/gnudatalanguage/files/patch-src__str.cpp | 38 |
5 files changed, 109 insertions, 2 deletions
diff --git a/science/gnudatalanguage/Makefile b/science/gnudatalanguage/Makefile index 5e5014c206cb..c25ef99e7da2 100644 --- a/science/gnudatalanguage/Makefile +++ b/science/gnudatalanguage/Makefile @@ -36,10 +36,10 @@ LIB_DEPENDS+= libplplotd.so:${PORTSDIR}/math/plplot \ 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 diff --git a/science/gnudatalanguage/files/patch-src__base64.hpp b/science/gnudatalanguage/files/patch-src__base64.hpp new file mode 100644 index 000000000000..0da18e077044 --- /dev/null +++ b/science/gnudatalanguage/files/patch-src__base64.hpp @@ -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; diff --git a/science/gnudatalanguage/files/patch-src__basic_fun.cpp b/science/gnudatalanguage/files/patch-src__basic_fun.cpp new file mode 100644 index 000000000000..0dffa910a81e --- /dev/null +++ b/science/gnudatalanguage/files/patch-src__basic_fun.cpp @@ -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; diff --git a/science/gnudatalanguage/files/patch-src__gsl_fun.cpp b/science/gnudatalanguage/files/patch-src__gsl_fun.cpp new file mode 100644 index 000000000000..96096d93a753 --- /dev/null +++ b/science/gnudatalanguage/files/patch-src__gsl_fun.cpp @@ -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> diff --git a/science/gnudatalanguage/files/patch-src__str.cpp b/science/gnudatalanguage/files/patch-src__str.cpp new file mode 100644 index 000000000000..e5082a6db1a3 --- /dev/null +++ b/science/gnudatalanguage/files/patch-src__str.cpp @@ -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]); + } + |