summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2016-03-15 23:26:42 +0000
committerSébastien Fabbro <bicatali@gentoo.org>2016-03-18 20:10:03 +0000
commit4d6a3a72b00cea14939552570f83a3d19b0f7a08 (patch)
treef50d9e0d3c99a04fc8fe34a794b474161cf2f5e0 /dev-lang/gdl
parentsci-libs/grib_api: removed old (diff)
downloadgentoo-4d6a3a72b00cea14939552570f83a3d19b0f7a08.tar.gz
gentoo-4d6a3a72b00cea14939552570f83a3d19b0f7a08.tar.bz2
gentoo-4d6a3a72b00cea14939552570f83a3d19b0f7a08.zip
dev-lang/gdl: Version bump with various patches from Fedora and Debian
Package-Manager: portage-2.2.27
Diffstat (limited to 'dev-lang/gdl')
-rw-r--r--dev-lang/gdl/Manifest1
-rw-r--r--dev-lang/gdl/files/0.9.6-disable-tests-hanging-under-xvfb-run.patch80
-rw-r--r--dev-lang/gdl/files/0.9.6-fix-file-move.patch14
-rw-r--r--dev-lang/gdl/files/0.9.6-fix-python-function-call.patch30
-rw-r--r--dev-lang/gdl/files/0.9.6-formats.patch111
-rw-r--r--dev-lang/gdl/files/0.9.6-fun-fix.patch56
-rw-r--r--dev-lang/gdl/files/0.9.6-gcc6.patch31
-rw-r--r--dev-lang/gdl/files/0.9.6-python-use-path-and-startup.patch20
-rw-r--r--dev-lang/gdl/gdl-0.9.6.ebuild157
9 files changed, 500 insertions, 0 deletions
diff --git a/dev-lang/gdl/Manifest b/dev-lang/gdl/Manifest
index 6c3ef6237932..d8a611fd833c 100644
--- a/dev-lang/gdl/Manifest
+++ b/dev-lang/gdl/Manifest
@@ -1 +1,2 @@
DIST gdl-0.9.5.tar.gz 2341992 SHA256 cc9635e836b5ea456cad93f8a07d589aed8649668fbd14c4aad22091991137e2 SHA512 10f004956fedc1ae5a99a9398f82e64982267a59637fc8823591b9573df9ce136b303a0fcebd774475b9bea266a640e2b66cd590c85b57b6cf505f40448e0d3a WHIRLPOOL 6ef59fc574ce26e798d30e9b4fdec9f49b82933b500901c8013c60de884ed6601d99c58ecd17221191cea121914dffce4c59211ce86b2c43fb40d43ce7ce033b
+DIST gdl-0.9.6v2.tgz 1777167 SHA256 cfb005ee1d9c843b26cc474618225ce68a1f0bfaeddcd45bf63a0a8fb62eedb4 SHA512 a816ee2e3822af380a1131a6138263c33560db7286cd699b864da305a1103d5afc881a1cd3574d2e243bfb7e65e759e46322c5e55c66ec15620d9c514565c2c5 WHIRLPOOL 1437816b807b8414b423c777ad0a3af4088a885548526741a5cf31f2ad802087efc52d1db6555d3a09c9e94baec526443e55182b6a1088f58d2843d8ffb47df6
diff --git a/dev-lang/gdl/files/0.9.6-disable-tests-hanging-under-xvfb-run.patch b/dev-lang/gdl/files/0.9.6-disable-tests-hanging-under-xvfb-run.patch
new file mode 100644
index 000000000000..6ce92aff0ab7
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-disable-tests-hanging-under-xvfb-run.patch
@@ -0,0 +1,80 @@
+Description: Disable tests which work fine with local X but hang under xvfb-run
+Author: Axel Beckert <abe@debian.org>
+Last-Update: 2014-10-10
+
+--- a/testsuite/Makefile.am
++++ b/testsuite/Makefile.am
+@@ -18,7 +18,6 @@
+ test_bug_2876372.pro \
+ test_bug_2892631.pro \
+ test_bug_2949487.pro \
+- test_bug_2974380.pro \
+ test_bug_3033108.pro \
+ test_bug_3054361.pro \
+ test_bug_3055720.pro \
+@@ -43,7 +42,6 @@
+ test_bug_3152899.pro \
+ test_bug_3189072.pro \
+ test_bug_3199465.pro \
+- test_bug_3275334.pro \
+ test_bug_3285659.pro \
+ test_bug_3286031.pro \
+ test_bug_3288652.pro \
+@@ -74,16 +72,12 @@
+ test_ce.pro \
+ test_clip.pro \
+ test_common.pro \
+- test_congrid.pro \
+ test_constants.pro \
+ test_convert_coord.pro \
+ test_correlate.pro \
+ test_deriv.pro \
+- test_device.pro \
+ test_dicom.pro \
+ test_erfinv.pro \
+- test_execute.pro \
+- test_extra_keywords.pro \
+ test_fft.pro \
+ test_fft_dim.pro \
+ test_fft_leak.pro \
+@@ -122,7 +116,6 @@
+ test_memory.pro \
+ test_message.pro \
+ test_modulo.pro \
+- test_moment.pro \
+ test_mpfit.pro \
+ test_multiroots.pro \
+ test_nans_in_sort_and_median.pro \
+@@ -130,10 +123,8 @@
+ test_netcdf.pro \
+ test_null.pro \
+ test_obj_new.pro \
+- test_plot_oo.pro \
+ test_plotting_ranges.pro \
+ test_pmulti.pro \
+- test_pmulti_basic.pro \
+ test_postscript.pro \
+ test_product.pro \
+ test_ps_decomposed.pro \
+@@ -144,7 +135,6 @@
+ test_python_module_2.pro \
+ test_qromb.pro \
+ test_qromo.pro \
+- test_random.pro \
+ test_readf.pro \
+ test_reads.pro \
+ test_rebin.pro \
+@@ -167,13 +157,11 @@
+ test_suite.pro \
+ test_systime.pro \
+ test_trisol.pro \
+- test_tv.pro \
+ test_typename.pro \
+ test_url.pro \
+ test_voigt.pro \
+ test_wait.pro \
+ test_wavelet.pro \
+- test_window_background.pro \
+ test_where.pro \
+ test_zeropoly.pro \
+ test_zip.pro \
diff --git a/dev-lang/gdl/files/0.9.6-fix-file-move.patch b/dev-lang/gdl/files/0.9.6-fix-file-move.patch
new file mode 100644
index 000000000000..31d4f066f49c
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-fix-file-move.patch
@@ -0,0 +1,14 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Remove trailing slash at the end of dir when moving files specified by wildcard
+Forwarded: https://sourceforge.net/p/gnudatalanguage/patches/97/
+--- a/src/pro/file_move.pro
++++ b/src/pro/file_move.pro
+@@ -31,7 +31,7 @@
+ res=FILE_SEARCH(dir, FILE_BASENAME(source[ii]), /fully)
+
+ for jj=0,N_ELEMENTS(res)-1 do begin
+- if(FILE_DIRNAME(res[jj], /MARK_DIRECTORY) eq dir) then flist=[flist, res[jj]] ;
++ if(FILE_DIRNAME(res[jj]) eq dir) then flist=[flist, res[jj]] ;
+ ;print, 'dir ', dir, ' res ', FILE_DIRNAME(res[jj])
+ endfor
+
diff --git a/dev-lang/gdl/files/0.9.6-fix-python-function-call.patch b/dev-lang/gdl/files/0.9.6-fix-python-function-call.patch
new file mode 100644
index 000000000000..fe90774e5c7b
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-fix-python-function-call.patch
@@ -0,0 +1,30 @@
+Author: Ole Streicher <olebole@debian.org>
+Bug: https://sourceforge.net/p/gnudatalanguage/bugs/377
+Bug: https://sourceforge.net/p/gnudatalanguage/bugs/679
+Forwarded: https://sourceforge.net/p/gnudatalanguage/patches/91
+ https://sourceforge.net/p/gnudatalanguage/patches/92
+Description: Fix Python calling GDL functions
+ * user defined functions crash
+ * data arrays of 64 bit element size are not completely converted to Python
+--- a/src/pythongdl.cpp
++++ b/src/pythongdl.cpp
+@@ -329,7 +329,7 @@
+ }
+ }
+
+- sub = proList[ proIx];
++ sub = funList[ proIx];
+ }
+ }
+ else
+--- a/src/topython.cpp
++++ b/src/topython.cpp
+@@ -67,7 +67,7 @@
+ // TODO: free the memory: PyArray_Free(PyObject* op, void* ptr) ?
+ throw GDLException("Failed to convert array to python.");
+ }
+- memcpy(PyArray_DATA(ret), DataAddr(), this->N_Elements() * sizeof(Sp::t));
++ memcpy(PyArray_DATA(ret), DataAddr(), this->N_Elements() * Data_<Sp>::Sizeof());
+ return ret;
+ }
+
diff --git a/dev-lang/gdl/files/0.9.6-formats.patch b/dev-lang/gdl/files/0.9.6-formats.patch
new file mode 100644
index 000000000000..105fa9cb8eff
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-formats.patch
@@ -0,0 +1,111 @@
+diff -up gdl-0.9.6/testsuite/test_formats.pro.formats gdl-0.9.6/testsuite/test_formats.pro
+--- gdl-0.9.6/testsuite/test_formats.pro.formats 2015-09-06 13:15:01.000000000 -0600
++++ gdl-0.9.6/testsuite/test_formats.pro 2016-01-12 14:26:18.811283030 -0700
+@@ -13,6 +13,10 @@
+ ; is OK for negative input, wrong for positive one !!
+ ; -- extra "\ ^J" added in GDL between the Re/Im parts for (D)Complex
+ ;
++; Changes:
++; 2016-01612 : AC various changes for better managing paths,
++; expecially for Cmake automatic tests !
++;
+ ; md5sum of current version of "formats.idl" (-1 et 12 ...)
+ ; 5d1cfbc31312a833f62033e297f986a2 formats.idl
+ ;
+@@ -53,7 +57,10 @@ end
+ pro GENERATE_FORMATS_FILE, nb_cases, verbose=verbose, test=test
+ ;
+ filename='formats.'+GDL_IDL_FL()
+-;
++if FILE_TEST(filename) then begin
++ FILE_MOVE, filename, filename+'_old', /overwrite
++ MESSAGE,/cont, 'Copy of old file <<'+filename+'_old'+'>> done.'
++endif
+ ; value to be write : one negative, one positive
+ ;
+ struct_neg = {BYTE:-1b,short:-1us,ushort:-1us, $
+@@ -104,17 +111,53 @@ soft=GDL_IDL_FL(/verbose)
+ ;
+ GENERATE_FORMATS_FILE, nb_cases, verbose=verbose
+ ;
+-if (soft NE 'idl') AND ~FILE_TEST("formats.idl") then MESSAGE, "missing reference file <<formats.idl>>"
++; locating then read back the reference idl.xdr:
++;
++; we need to add the current dir. into the path because new file(s)
++; are writtent in it. Do we have a simple way to check whether a dir
++; is already in !PATH ?
++;
++CD, current=current
++new_path=!path+PATH_SEP(/SEARCH_PATH)+current
++list_of_dirs=STRSPLIT(new_path, PATH_SEP(/SEARCH_PATH), /EXTRACT)
++;
++; only this reference file is mandatory !
++;
++filename='formats.idl'
++file_fmt_idl=FILE_SEARCH(list_of_dirs+PATH_SEP()+filename)
++;
++if (soft NE 'idl') AND (STRLEN(file_fmt_idl) EQ 0) then begin
++ MESSAGE, 'reference file <<'+filename+'>> not found in the !PATH', /continue
++ if KEYWORD_SET(no_exit) OR KEYWORD_SET(test) then STOP
++ EXIT, status=1
++endif
++if N_ELEMENTS(file_fmt_idl) GT 1 then print, 'multiple reference file <<'+filename+'>> found !'
++file_fmt_idl=file_fmt_idl[0]
++;
++filename='formats.gdl'
++file_fmt_gdl=FILE_SEARCH(list_of_dirs+PATH_SEP()+filename)
++if N_ELEMENTS(file_fmt_gdl) GT 1 then begin
++ print, 'multiple reference file <<'+filename+'>> found ! First used !!'
++ print, TRANSPOSE(file_fmt_gdl)
++ file_fmt_gdl=file_fmt_gdl[0]
++endif
++;
++filename='formats.fl'
++file_fmt_fl=FILE_SEARCH(list_of_dirs+PATH_SEP()+filename)
++if N_ELEMENTS(file_fmt_fl) GT 1 then begin
++ print, 'multiple reference file <<'+filename+'>> found !'
++ print, TRANSPOSE(file_fmt_fl)
++ file_fmt_fl=file_fmt_fl[0]
++endif
+ ;
+ if (soft EQ 'idl') then begin
+- if ~FILE_TEST("formats.gdl") then MESSAGE, /cont, "missing file <<formats.gdl>>"
+- if ~FILE_TEST("formats.fl") then MESSAGE, /cont, "missing file <<formats.fl>>"
+- if ~FILE_TEST("formats.gdl") AND ~FILE_TEST("formats.fl") then begin
+- MESSAGE, /cont, "No useful file found for comparison. Just Reference file written."
+- endif
+- if FILE_TEST("formats.gdl") then soft='gdl' else begin
+- if FILE_TEST("formats.fl") then soft='fl'
+- endelse
++ soft=''
++ if ~FILE_TEST(file_fmt_fl) then MESSAGE, /cont, "missing file <<formats.fl>>" else soft='fl'
++ if ~FILE_TEST(file_fmt_gdl) then MESSAGE, /cont, "missing file <<formats.gdl>>" else soft='gdl'
++ if (soft EQ '') then begin
++ MESSAGE, /cont, "No useful file found for comparison. Just Reference file written."
++ return
++ endif
+ endif
+ ;
+ ; reading back the 2 files : one created ("formats.gdl" or
+@@ -123,9 +166,10 @@ endif
+ print, "Files to be compared : formats.idl, formats."+soft
+ ;
+ GET_LUN, lun1
+-OPENR, lun1, "formats.idl"
++OPENR, lun1, file_fmt_idl
+ GET_LUN, lun2
+-OPENR, lun2, "formats."+soft
++if (soft EQ 'gdl') then OPENR, lun2, file_fmt_gdl
++if (soft EQ 'fl') then OPENR, lun2, file_fmt_fl
+ ;
+ ref=STRING("")
+ val=STRING("")
+@@ -155,7 +199,7 @@ CLOSE, lun1, lun2
+ FREE_LUN, lun1, lun2
+ ;
+ if (nb_errors GT 0) then begin
+- MESSAGE, /continue, 'Using a "diff formats.idl formats.gdl" in a shell'
++ MESSAGE, /continue, 'Using a "diff formats.idl formats.{gdl|fl}" in a shell'
+ MESSAGE, /continue, 'should help to debug !'
+ endif
+ ;
diff --git a/dev-lang/gdl/files/0.9.6-fun-fix.patch b/dev-lang/gdl/files/0.9.6-fun-fix.patch
new file mode 100644
index 000000000000..7151d0a36a5d
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-fun-fix.patch
@@ -0,0 +1,56 @@
+Author: Vitaliy Tomin <highwaystar@users.sf.net>
+Description: Fix direct calling of direct function calls from Python
+Bug: http://sourceforge.net/p/gnudatalanguage/bugs/678
+--- a/src/pythongdl.cpp
++++ b/src/pythongdl.cpp
+@@ -392,25 +392,31 @@
+
+ BaseGDL* retValGDL = NULL;
+ Guard<BaseGDL> retValGDL_guard;
+- if( functionCall)
+- {
+- if( libCall)
+- retValGDL = static_cast<DLibFun*>(static_cast<EnvT*>(e)->
+- GetPro())->Fun()( static_cast<EnvT*>(e));
+- else
+- retValGDL = interpreter->call_fun(static_cast<DSubUD*>
+- (static_cast<EnvUDT*>(e)
+- ->GetPro())->GetTree());
+- retValGDL_guard.Reset( retValGDL);
+- }
+- else
+- {
+- if( libCall)
+- static_cast<DLibPro*>(e->GetPro())->Pro()(static_cast<EnvT*>(e)); // throws
+- else
+- interpreter->call_pro(static_cast<DSubUD*>
+- (e->GetPro())->GetTree()); //throws
+- }
++
++ if (functionCall) {
++ DLibFun* sub_fun_chk = dynamic_cast<DLibFun *>(static_cast<EnvT *>(e)->GetPro());
++ if (sub_fun_chk) {
++ //handle direct call function first
++ if (sub_fun_chk->DirectCall()) {
++ BaseGDL* directCallParameter = e->GetParDefined(0);
++ retValGDL = static_cast<DLibFunDirect*>(sub_fun_chk)->FunDirect()(directCallParameter, true /*isReference*/);
++ }
++ } else if (libCall)
++ retValGDL = static_cast<DLibFun *>(static_cast<EnvT *>(e)->GetPro())
++ ->Fun()(static_cast<EnvT *>(e));
++ else
++ retValGDL = interpreter->call_fun(
++ static_cast<DSubUD *>(static_cast<EnvUDT *>(e)->GetPro())
++ ->GetTree());
++ retValGDL_guard.Reset(retValGDL);
++ } else {
++ if (libCall)
++ static_cast<DLibPro *>(e->GetPro())
++ ->Pro()(static_cast<EnvT *>(e)); // throws
++ else
++ interpreter->call_pro(
++ static_cast<DSubUD *>(e->GetPro())->GetTree()); // throws
++ }
+
+ // copy back args and keywords
+ success = CopyArgToPython( parRef, kwRef, *e, argTuple, kwDict);
diff --git a/dev-lang/gdl/files/0.9.6-gcc6.patch b/dev-lang/gdl/files/0.9.6-gcc6.patch
new file mode 100644
index 000000000000..e017255b0bef
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-gcc6.patch
@@ -0,0 +1,31 @@
+diff -up gdl-0.9.6/src/specializations.hpp.gcc6 gdl-0.9.6/src/specializations.hpp
+--- gdl-0.9.6/src/specializations.hpp.gcc6 2015-08-24 15:26:47.000000000 -0600
++++ gdl-0.9.6/src/specializations.hpp 2016-03-03 16:30:46.694379312 -0700
+@@ -534,16 +534,6 @@ void Data_<SpDString>::MinMax( DLong* mi
+
+ // default_io.cpp
+ template<>
+-std::istream& operator>>(std::istream& i, Data_<SpDFloat>& data_);
+-template<>
+-std::istream& operator>>(std::istream& i, Data_<SpDDouble>& data_);
+-template<>
+-std::istream& operator>>(std::istream& i, Data_<SpDComplex>& data_);
+-template<>
+-std::istream& operator>>(std::istream& i, Data_<SpDComplexDbl>& data_);
+-template<>
+-std::istream& operator>>(std::istream& is, Data_<SpDString>& data_);
+-template<>
+ std::ostream& Data_<SpDLong>::ToStream(std::ostream& o, SizeT w, SizeT* actPosPtr);
+ template<>
+ std::ostream& Data_<SpDULong>::ToStream(std::ostream& o, SizeT w, SizeT* actPosPtr);
+--- gdl-0.9.6/src/typedefs.hpp.gcc6 2014/08/09 15:33:29 1.76
++++ gdl-0.9.6/src/typedefs.hpp 2016/02/04 22:48:46 1.77
+@@ -235,7 +235,7 @@
+
+ Guard& operator=( Guard& r)
+ {
+- if( &r == this) return;
++ if( &r == this) return *this;
+ delete guarded;
+ guarded = r.guarded;
+ r.guarded = NULL;
diff --git a/dev-lang/gdl/files/0.9.6-python-use-path-and-startup.patch b/dev-lang/gdl/files/0.9.6-python-use-path-and-startup.patch
new file mode 100644
index 000000000000..a76cd8cb6275
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-python-use-path-and-startup.patch
@@ -0,0 +1,20 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Initialize GDL path if one is defined
+Forwarded: https://sourceforge.net/p/gnudatalanguage/patches/93/
+--- a/src/pythongdl.cpp
++++ b/src/pythongdl.cpp
+@@ -537,6 +537,14 @@
+ // instantiate the interpreter (creates $MAIN$ environment)
+ interpreter = new DInterpreter();
+
++ string gdlPath=GetEnvString("GDL_PATH");
++ if( gdlPath == "") gdlPath=GetEnvString("IDL_PATH");
++ if( gdlPath == "")
++ {
++ gdlPath = "+" GDLDATADIR "/lib";
++ }
++ SysVar::SetGDLPath( gdlPath);
++
+ PyObject* m = Py_InitModule("GDL", GDLMethods);
+
+ gdlError = PyErr_NewException((char*)"GDL.error", NULL, NULL);
diff --git a/dev-lang/gdl/gdl-0.9.6.ebuild b/dev-lang/gdl/gdl-0.9.6.ebuild
new file mode 100644
index 000000000000..e656de49c2b0
--- /dev/null
+++ b/dev-lang/gdl/gdl-0.9.6.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils python-r1 wxwidgets toolchain-funcs virtualx
+
+DESCRIPTION="GNU Data Language"
+HOMEPAGE="http://gnudatalanguage.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gnudatalanguage/${P}v2.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+eigen fftw grib gshhs hdf hdf5 imagemagick netcdf openmp
+ png proj postscript python static-libs udunits wxwidgets"
+
+RDEPEND="
+ dev-cpp/antlr-cpp:2=
+ sci-libs/gsl:0=
+ sci-libs/plplot:0=[-dynamic]
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ sys-libs/zlib:0=
+ x11-libs/libX11:0=
+ fftw? ( sci-libs/fftw:3.0= )
+ grib? ( sci-libs/grib_api:0= )
+ gshhs? ( sci-geosciences/gshhs-data sci-geosciences/gshhs:0= )
+ hdf? ( sci-libs/hdf:0= )
+ hdf5? ( sci-libs/hdf5:0= )
+ imagemagick? (
+ || (
+ media-gfx/graphicsmagick[cxx]
+ media-gfx/imagemagick[cxx]
+ )
+ )
+ netcdf? ( sci-libs/netcdf )
+ proj? ( sci-libs/proj )
+ postscript? ( dev-libs/pslib )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ )
+ udunits? ( sci-libs/udunits )
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
+
+DEPEND="${RDEPEND}
+ dev-java/antlr:0[java(+),script(+)]
+ virtual/pkgconfig
+ eigen? ( dev-cpp/eigen:3 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}"/0.9.2-include.patch
+ "${FILESDIR}"/0.9.5-antlr.patch
+ "${FILESDIR}"/0.9.5-png.patch
+ "${FILESDIR}"/0.9.6-fix-file-move.patch
+ "${FILESDIR}"/0.9.6-fix-python-function-call.patch
+ "${FILESDIR}"/0.9.6-fun-fix.patch
+ "${FILESDIR}"/0.9.6-python-use-path-and-startup.patch
+ "${FILESDIR}"/0.9.6-disable-tests-hanging-under-xvfb-run.patch
+ "${FILESDIR}"/0.9.6-gcc6.patch
+ "${FILESDIR}"/0.9.6-formats.patch
+)
+
+pkg_pretend() {
+ use openmp && [[ $(tc-getCXX)$ == *g++* ]] && \
+ [[ ${MERGE_TYPE} != binary ]] && ! tc-has-openmp && \
+ die "You are using gcc but without OpenMP capabilities that you requested"
+}
+
+src_prepare() {
+ use wxwidgets && need-wxwidgets unicode
+ use hdf5 && has_version sci-libs/hdf5[mpi] && export CXX=mpicxx
+
+ # make sure antlr includes are from system and rebuild the sources with it
+ # https://sourceforge.net/tracker/?func=detail&atid=618685&aid=3465878&group_id=97659
+ rm -r src/antlr || die
+ einfo "Regenerating grammar"
+ pushd src > /dev/null
+ local i
+ for i in *.g; do antlr ${i} || die ; done
+ popd > /dev/null
+
+ # gentoo: avoid install files in datadir directory
+ # and manually install them in src_install
+ sed -e '/AUTHORS/d' -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ # MPI is still very buggy
+ # x11=off does not compile
+ local mycmakeargs=(
+ -DMPICH=OFF
+ -DBUNDLED_ANTLR=OFF
+ -DX11=ON
+ -DEIGEN3="(usex eigen)"
+ -DFFTW="(usex fftw)"
+ -DGRIB="(usex grib)"
+ -DGSHHS="(usex gshhs)"
+ -DHDF="(usex hdf)"
+ -DHDF5="(usex hdf5)"
+ -DLIBPROJ4="(usex proj)"
+ -DNETCDF="(usex netcdf)"
+ -DOPENMP="(usex openmp)"
+ -DPNGLIB="(usex png)"
+ -DPSLIB="(usex postscript)"
+ -DUDUNITS="(usex udunits)"
+ -DWXWIDGETS="(usex wxwidgets)"
+ )
+ if use imagemagick; then
+ if has_version media-gfx/graphicsmagick[cxx]; then
+ mycmakeargs+=( -DGRAPHICSMAGICK=ON -DMAGICK=OFF )
+ else
+ mycmakeargs+=( -DGRAPHICSMAGICK=OFF -DMAGICK=ON )
+ fi
+ else
+ mycmakeargs+=( -DGRAPHICSMAGICK=OFF -DMAGICK=OFF )
+ fi
+ configuration() {
+ mycmakeargs+=( $@ )
+ cmake-utils_src_configure
+ }
+ configuration -DPYTHON_MODULE=OFF -DPYTHON=OFF
+ use python && python_foreach_impl configuration -DPYTHON_MODULE=ON -DPYTHON=ON
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use python && python_foreach_impl cmake-utils_src_make
+}
+
+src_test() {
+ # there is check target instead of the ctest to define some LDPATH
+ virtx emake -C "${BUILD_DIR}" check
+}
+
+src_install() {
+ cmake-utils_src_install
+ if use python; then
+ installation() {
+ mv src/libgdl.so GDL.so || die
+ python_domodule GDL.so
+ }
+ python_foreach_impl run_in_build_dir installation
+ dodoc PYTHON.txt
+ fi
+ #dodoc AUTHORS README
+ echo "GDL_PATH=\"+${EROOT%/}/usr/share/gnudatalanguage\"" > 50gdl
+ doenvd 50gdl
+}