summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-lang/gdl
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-lang/gdl')
-rw-r--r--dev-lang/gdl/Manifest2
-rw-r--r--dev-lang/gdl/files/0.9.2-antlr.patch76
-rw-r--r--dev-lang/gdl/files/0.9.2-include.patch10
-rw-r--r--dev-lang/gdl/files/0.9.2-proj4.patch27
-rw-r--r--dev-lang/gdl/files/0.9.2-semaphore.patch22
-rw-r--r--dev-lang/gdl/files/0.9.3-plwidth.patch158
-rw-r--r--dev-lang/gdl/files/0.9.4-gsl.patch62
-rw-r--r--dev-lang/gdl/files/0.9.4-plplot.patch18
-rw-r--r--dev-lang/gdl/files/0.9.4-python.patch12
-rw-r--r--dev-lang/gdl/files/0.9.4-python2.patch17
-rw-r--r--dev-lang/gdl/files/0.9.4-reorder.patch380
-rw-r--r--dev-lang/gdl/files/0.9.5-antlr.patch91
-rw-r--r--dev-lang/gdl/files/0.9.5-plplot.patch134
-rw-r--r--dev-lang/gdl/files/0.9.5-png.patch15
-rw-r--r--dev-lang/gdl/files/0.9.5-proj4.patch41
-rw-r--r--dev-lang/gdl/gdl-0.9.4.ebuild161
-rw-r--r--dev-lang/gdl/gdl-0.9.5.ebuild156
-rw-r--r--dev-lang/gdl/metadata.xml21
18 files changed, 1403 insertions, 0 deletions
diff --git a/dev-lang/gdl/Manifest b/dev-lang/gdl/Manifest
new file mode 100644
index 000000000000..4a390d7fcd98
--- /dev/null
+++ b/dev-lang/gdl/Manifest
@@ -0,0 +1,2 @@
+DIST gdl-0.9.4.tar.gz 2191342 SHA256 e18010cd874cad7b1fd8c752e9386571156e1fb066f2d27ecbcc15bbfc9514fa SHA512 46921eb3333a6b890187a6c75f71758e5e234b76d61a194e17de81ace10760659a4a676060490a5ef7374fd1acadf47c7f565133c19ea165e04c54a577b3c723 WHIRLPOOL a760fcf37e47235e3d21c8c852b65560894e29cfe3684bfee6e83f2d1d060dcaa41a2f9e60e41cbae55d9e5a2036518a5aad22cfd6f07b951a978e1ba2446eae
+DIST gdl-0.9.5.tar.gz 2341992 SHA256 cc9635e836b5ea456cad93f8a07d589aed8649668fbd14c4aad22091991137e2 SHA512 10f004956fedc1ae5a99a9398f82e64982267a59637fc8823591b9573df9ce136b303a0fcebd774475b9bea266a640e2b66cd590c85b57b6cf505f40448e0d3a WHIRLPOOL 6ef59fc574ce26e798d30e9b4fdec9f49b82933b500901c8013c60de884ed6601d99c58ecd17221191cea121914dffce4c59211ce86b2c43fb40d43ce7ce033b
diff --git a/dev-lang/gdl/files/0.9.2-antlr.patch b/dev-lang/gdl/files/0.9.2-antlr.patch
new file mode 100644
index 000000000000..9c8e6abb2358
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.2-antlr.patch
@@ -0,0 +1,76 @@
+diff -Nur gdl-0.9.2.orig/CMakeLists.txt gdl-0.9.2/CMakeLists.txt
+--- gdl-0.9.2.orig/CMakeLists.txt 2011-12-22 20:18:17.000000000 +0000
++++ gdl-0.9.2/CMakeLists.txt 2011-12-22 20:32:20.000000000 +0000
+@@ -94,6 +94,8 @@
+
+ set(GDL_DATA_DIR "/share/gnudatalanguage" CACHE PATH "Choose data install directory relative to CMAKE_INSTALL_PREFIX")
+
++set(BUNDLED_ANTLR OFF CACHE BOOL "Use bundled ANTLR grammar ?")
++set(ANTLRDIR "" CACHE PATH "Specify the system ANTLR directory tree")
+
+ # check for 64-bit OS
+ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
+@@ -143,9 +145,15 @@
+ # mpi
+ check_include_file(mpi.h HAVE_MPI_H)
+
+-# SA: whithout it compilation of antlr fails if there's a conflicting
+-# version of antlr in system-wide directories
+-include_directories(src)
++if(BUNDLED_ANTLR)
++ # SA: whithout it compilation of antlr fails if there's a conflicting
++ # version of antlr in system-wide directories
++ include_directories(src)
++else(BUNDLED_ANTLR)
++ find_package(ANTLR QUIET)
++ set(LIBRARIES ${LIBRARIES} ${ANTLR_LIBRARIES})
++ include_directories(${ANTLR_INCLUDE_DIR})
++endif(BUNDLED_ANTLR)
+
+ # Ncurses MANDATORY
+ # -DNCURSESDIR=DIR
+diff -Nur gdl-0.9.2.orig/CMakeModules/FindANTLR.cmake gdl-0.9.2/CMakeModules/FindANTLR.cmake
+--- gdl-0.9.2.orig/CMakeModules/FindANTLR.cmake 1970-01-01 01:00:00.000000000 +0100
++++ gdl-0.9.2/CMakeModules/FindANTLR.cmake 2011-12-22 21:03:34.000000000 +0000
+@@ -0,0 +1,11 @@
++
++
++find_library(ANTLR_LIBRARIES NAMES antlr)
++find_path(ANTLR_INCLUDE_DIR NAMES antlr/ANTLRUtil.hpp)
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(ANTLR DEFAULT_MSG ANTLR_LIBRARIES ANTLR_INCLUDE_DIR)
++
++mark_as_advanced(
++ANTLR_LIBRARIES
++ANTLR_INCLUDE_DIR
++)
+diff -Nur gdl-0.9.2.orig/src/CMakeLists.txt gdl-0.9.2/src/CMakeLists.txt
+--- gdl-0.9.2.orig/src/CMakeLists.txt 2011-12-22 20:18:17.000000000 +0000
++++ gdl-0.9.2/src/CMakeLists.txt 2011-12-22 20:31:27.000000000 +0000
+@@ -224,9 +224,8 @@
+ widget.cpp
+ )
+
+-add_subdirectory(antlr)
+
+-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/antlr ${CMAKE_BINARY_DIR})
++include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR})
+ link_directories(${LINK_DIRECTORIES})
+
+ if(PYTHON_MODULE) #libgdl
+@@ -237,8 +236,13 @@
+ add_executable(gdl ${SOURCES})
+ endif(PYTHON_MODULE)
+
+-add_dependencies(gdl antlr) # be sure that antlr is built before gdl
+-target_link_libraries(gdl antlr) # link antlr against gdl
++if(BUNDLED_ANTLR)
++ add_subdirectory(antlr)
++ include_directories(${CMAKE_SOURCE_DIR}/src/antlr)
++ add_dependencies(gdl antlr) # be sure that antlr is built before gdl
++ target_link_libraries(gdl antlr) # link antlr against gdl
++endif(BUNDLED_ANTLR)
++
+ target_link_libraries(gdl ${LIBRARIES})
+ add_definitions(-DHAVE_CONFIG_H)
+
diff --git a/dev-lang/gdl/files/0.9.2-include.patch b/dev-lang/gdl/files/0.9.2-include.patch
new file mode 100644
index 000000000000..49613da16e21
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.2-include.patch
@@ -0,0 +1,10 @@
+--- gdl-0.9.2.orig/src/cformat.g 2010-07-25 17:59:19.000000000 +0100
++++ gdl-0.9.2/src/cformat.g 2012-06-21 16:34:12.000000000 +0100
+@@ -16,6 +16,7 @@
+ ***************************************************************************/
+
+ header "pre_include_cpp" {
++#include <cstdlib>
+ #include "includefirst.hpp"
+ }
+
diff --git a/dev-lang/gdl/files/0.9.2-proj4.patch b/dev-lang/gdl/files/0.9.2-proj4.patch
new file mode 100644
index 000000000000..594b6d5cbae8
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.2-proj4.patch
@@ -0,0 +1,27 @@
+--- gdl-0.9.2.orig/CMakeLists.txt 2011-12-22 20:18:17.000000000 +0000
++++ gdl-0.9.2/CMakeLists.txt 2011-12-24 06:12:08.000000000 +0000
+@@ -412,17 +420,17 @@
+ find_package(Libproj4 QUIET)
+ if(LIBPROJ4_FOUND)
+ set(CMAKE_REQUIRED_LIBRARIES ${LIBPROJ4_LIBRARIES} ${GSL_LIBRARIES} m)
+- check_library_exists("${LIBPROJ4_LIBRARIES}" proj_init "" USE_LIBPROJ4_NEW)
+- if(USE_LIBPROJ4_NEW)
++ check_library_exists("${LIBPROJ4_LIBRARIES}" proj_init "" USE_LIBPROJ4)
++ if(USE_LIBPROJ4)
+ set(USE_LIBPROJ4 1)
+- else(USE_LIBPROJ4_NEW)
+- check_library_exists("${LIBPROJ4_LIBRARIES}" pj_init "" USE_LIBPROJ4)
+- if(NOT USE_LIBPROJ4)
++ else(USE_LIBPROJ4)
++ check_library_exists("${LIBPROJ4_LIBRARIES}" pj_init "" USE_LIBPROJ4_NEW)
++ if(NOT USE_LIBPROJ4_NEW)
+ message(FATAL_ERROR "Libproj4 is required but was not found.\n"
+ "Use -DLIBPROJ4DIR=DIR to specify the Libproj4 directory tree.\n"
+ "Use -DLIBPRJ4=OFF to not use it.")
+- endif(NOT USE_LIBPROJ4)
+- endif(USE_LIBPROJ4_NEW)
++ endif(NOT USE_LIBPROJ4_NEW)
++ endif(USE_LIBPROJ4)
+ include_directories(${LIBPROJ4_INCLUDE_DIR})
+ set(LIBRARIES ${LIBRARIES} ${LIBPROJ4_LIBRARIES})
+ set(CMAKE_REQUIRED_LIBRARIES)
diff --git a/dev-lang/gdl/files/0.9.2-semaphore.patch b/dev-lang/gdl/files/0.9.2-semaphore.patch
new file mode 100644
index 000000000000..f2a28042f8d1
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.2-semaphore.patch
@@ -0,0 +1,22 @@
+--- gdl-0.9.2/CMakeLists.txt 2011-11-06 22:39:45.000000000 +0000
++++ gdl-0.9.2/CMakeLists.txt.new 2012-06-21 00:02:42.000000000 +0100
+@@ -217,6 +217,19 @@
+ add_definitions(${OpenMP_CXX_FLAGS})
+ set(LIBRARIES ${LIBRARIES} ${OpenMP_CXX_FLAGS})
+ endif(OPENMP_FOUND)
++else(OPENMP)
++ # we need to define those semaphore posix symbols, do it with threads libs
++ find_package(Threads)
++ if(THREADS_FOUND)
++ set(LIBRARIES ${LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
++ else(THREADS_FOUND)
++ check_library_exists(rt sem_unlink "" HAVE_RT)
++ if(HAVE_RT)
++ set(LIBRARIES ${LIBRARIES} rt)
++ else(HAVE_RT)
++ message(FATAL_ERROR "Missing a POSIX semaphore symbols (rt or threads).\n")
++ endif(HAVE_RT)
++ endif(THREADS_FOUND)
+ endif(OPENMP)
+
+ # GSL MANDATORY
diff --git a/dev-lang/gdl/files/0.9.3-plwidth.patch b/dev-lang/gdl/files/0.9.3-plwidth.patch
new file mode 100644
index 000000000000..b09e1a88f5d3
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.3-plwidth.patch
@@ -0,0 +1,158 @@
+diff -up gdl-0.9.3/CMakeLists.txt.plwidth gdl-0.9.3/CMakeLists.txt
+--- gdl-0.9.3/CMakeLists.txt.plwidth 2013-08-27 16:55:33.806600443 -0600
++++ gdl-0.9.3/CMakeLists.txt 2013-08-27 16:55:36.589590528 -0600
+@@ -23,6 +23,7 @@ include(CheckLibraryExists)
+ include(CheckFunctionExists)
+ include(CheckSymbolExists)
+ include(CheckCSourceRuns)
++include(CheckCXXSourceCompiles)
+ include(FindPkgConfig)
+ include(FindPackageHandleStandardArgs)
+
+@@ -302,6 +303,18 @@ if(PLPLOT_FOUND)
+ message(STATUS "warning, due to old plplot library, [XYZ]TICKFORMAT option for plot axis will not be supported.\n"
+ "you should upgrade to plplot version > 5.9.6")
+ endif(HAVE_PLPLOT_SLABELFUNC)
++ set(CMAKE_REQUIRED_INCLUDES "${PLPLOT_INCLUDE_DIR}")
++ set(CMAKE_REQUIRED_LIBRARIES "${PLPLOT_LIBRARIES}")
++ check_cxx_source_compiles("
++#include <plplot/plstream.h>
++int main(int argc, char **argv) {
++ plstream *p = new plstream();
++ PLFLT w = 0.5;
++ p->width(w);
++}" HAVE_PLPLOT_WIDTH)
++ if(HAVE_PLPLOT_WIDTH)
++ set(HAVE_PLPLOT_WIDTH 1)
++ endif(HAVE_PLPLOT_WIDTH)
+ check_library_exists("${PLPLOT_LIBRARIES}" plstrl "" PLPLOT_PRIVATE_NOT_HIDDEN)
+ if(PLPLOT_PRIVATE_NOT_HIDDEN)
+ set(PLPLOT_PRIVATE_NOT_HIDDEN 1)
+diff -up gdl-0.9.3/config.h.cmake.plwidth gdl-0.9.3/config.h.cmake
+--- gdl-0.9.3/config.h.cmake.plwidth 2013-08-27 16:55:33.808600436 -0600
++++ gdl-0.9.3/config.h.cmake 2013-08-27 16:55:36.589590528 -0600
+@@ -28,6 +28,7 @@
+ #cmakedefine HAVE_NEXTTOWARD 1
+ #cmakedefine HAVE_OLDPLPLOT 1
+ #cmakedefine HAVE_PLPLOT_SLABELFUNC 1
++#cmakedefine HAVE_PLPLOT_WIDTH 1
+ #cmakedefine PLPLOT_PRIVATE_NOT_HIDDEN 1
+ #cmakedefine PLPLOT_HAS_LEGEND
+ #ifndef HAVE_STDINT_H
+diff -up gdl-0.9.3/src/plotting_contour.cpp.plwidth gdl-0.9.3/src/plotting_contour.cpp
+--- gdl-0.9.3/src/plotting_contour.cpp.plwidth 2013-08-27 16:55:33.883600169 -0600
++++ gdl-0.9.3/src/plotting_contour.cpp 2013-08-27 16:55:36.590590524 -0600
+@@ -705,7 +705,11 @@ namespace lib
+ actStream->pat(1,&ori,&spa);
+
+ if (docolors) actStream->Color ( ( *colors )[i%colors->N_Elements ( )], decomposed, (PLINT)colorindex_table_0_color );
++#if (HAVE_PLPLOT_WIDTH)
++ if (dothick) actStream->width ( static_cast<PLFLT>(( *thick )[i%thick->N_Elements ( )]));
++#else
+ if (dothick) actStream->wid ( ( *thick )[i%thick->N_Elements ( )]);
++#endif
+ if (dostyle) gdlLineStyle(actStream, ( *style )[i%style->N_Elements ( )]);
+ actStream->shade( map, xEl, yEl, isLog?doIt:NULL, xStart, xEnd, yStart, yEnd,
+ clevel[i], clevel[i+1],
+@@ -788,7 +792,11 @@ namespace lib
+ actStream->stransform(gdl3dTo2dTransformContour, &Data3d);
+ }
+ if (docolors) actStream->Color ( ( *colors )[i%colors->N_Elements ( )], decomposed, 2);
++#if (HAVE_PLPLOT_WIDTH)
++ if (dothick) actStream->width ( static_cast<PLFLT>(( *thick )[i%thick->N_Elements ( )]));
++#else
+ if (dothick) actStream->wid ( ( *thick )[i%thick->N_Elements ( )]);
++#endif
+ if (dostyle) gdlLineStyle(actStream, ( *style )[i%style->N_Elements ( )]);
+ if (dolabels) actStream->setcontlabelparam ( LABELOFFSET, (PLFLT) label_size, LABELSPACING,
+ (PLINT)(*labels)[i%labels->N_Elements()] );
+diff -up gdl-0.9.3/src/plotting.cpp.plwidth gdl-0.9.3/src/plotting.cpp
+--- gdl-0.9.3/src/plotting.cpp.plwidth 2013-08-27 16:55:33.886600158 -0600
++++ gdl-0.9.3/src/plotting.cpp 2013-08-27 16:58:33.707952697 -0600
+@@ -1891,7 +1891,11 @@ namespace lib
+ DFloatGDL* charthickVect=e->GetKWAs<DFloatGDL>( charthickIx );
+ charthick=(*charthickVect)[0];
+ }
++#if (HAVE_PLPLOT_WIDTH)
++ a->width(static_cast<PLFLT>(charthick));
++#else
+ a->wid(charthick);
++#endif
+ }
+
+ void gdlSetAxisCharsize(EnvT *e, GDLGStream *a, string axis)
+@@ -1919,7 +1923,11 @@ namespace lib
+
+ e->AssureFloatScalarKWIfPresent("THICK", thick);
+ if ( thick<=0.0 ) thick=1.0;
++#if (HAVE_PLPLOT_WIDTH)
++ a->width(static_cast<PLFLT>(thick));
++#else
+ a->wid(static_cast<PLINT>(floor(thick-0.5)));
++#endif
+ }
+
+ //LINESTYLE
+@@ -2932,7 +2940,11 @@ namespace lib
+ a->smaj((PLFLT)OtherAxisSizeInMm, 1.0); //set base ticks to default 0.02 viewport converted to mm.
+ a->smin((PLFLT)OtherAxisSizeInMm/2.0,1.0); //idem min (plplt defaults)
+ //thick for box and ticks.
++#if (HAVE_PLPLOT_WIDTH)
++ a->width(static_cast<PLFLT>(Thick));
++#else
+ a->wid(Thick);
++#endif
+ //ticks or grid eventually with style and length:
+ if (abs(TickLen)<1e-6) Opt=""; else Opt="st"; //remove ticks if ticklen=0
+ if (TickLen<0) {Opt+="i"; TickLen=-TickLen;}
+@@ -2977,7 +2989,11 @@ namespace lib
+ else if (axis=="Y") a->box("", 0.0, 0 , Opt.c_str(), 0.0, 0);
+ }
+ //reset charsize & thick
++#if (HAVE_PLPLOT_WIDTH)
++ a->width(1.0);
++#else
+ a->wid(1);
++#endif
+ a->sizeChar(1.0);
+ }
+ return 0;
+@@ -3120,7 +3136,11 @@ namespace lib
+ a->smaj((PLFLT)OtherAxisSizeInMm, 1.0); //set base ticks to default 0.02 viewport converted to mm.
+ a->smin((PLFLT)OtherAxisSizeInMm/2.0,1.0); //idem min (plplt defaults)
+ //thick for box and ticks.
++#if (HAVE_PLPLOT_WIDTH)
++ a->width(static_cast<PLFLT>(Thick));
++#else
+ a->wid(Thick);
++#endif
+ //ticks or grid eventually with style and length:
+ if (abs(TickLen)<1e-6) Opt=""; else Opt="st"; //remove ticks if ticklen=0
+ if (TickLen<0) {Opt+="i"; TickLen=-TickLen;}
+@@ -3145,7 +3165,11 @@ namespace lib
+ else if (axis=="Z") a->box3("","",0,0,"","",0,0, Opt.c_str(), "", TickInterval, Minor);
+ }
+ //reset charsize & thick
++#if (HAVE_PLPLOT_WIDTH)
++ a->width(1.0);
++#else
+ a->wid(1);
++#endif
+ a->sizeChar(1.0);
+ }
+ return 0;
+diff -up gdl-0.9.3/src/plotting_xyouts.cpp.plwidth gdl-0.9.3/src/plotting_xyouts.cpp
+--- gdl-0.9.3/src/plotting_xyouts.cpp.plwidth 2013-08-27 16:55:33.892600137 -0600
++++ gdl-0.9.3/src/plotting_xyouts.cpp 2013-08-27 16:55:36.591590521 -0600
+@@ -339,7 +339,11 @@ namespace lib
+ //plot!
+ if (docharsize) actStream->sizeChar(( *size )[i%size->N_Elements ( )]);
+ if (docolor) actStream->Color ( ( *color )[i%color->N_Elements ( )], decomposed, 2);
++#if (HAVE_PLPLOT_WIDTH)
++ if (docharthick) actStream->width ( static_cast<PLFLT>(( *charthick )[i%charthick->N_Elements ( )]));
++#else
+ if (docharthick) actStream->wid ( ( *charthick )[i%charthick->N_Elements ( )]);
++#endif
+ //orientation word is not orientation page depending on axes increment direction [0..1] vs. [1..0]
+ PLFLT oriD=(( *orientation )[i%orientation->N_Elements ( )]); //ori DEVICE
+ PLFLT oriW=oriD; //ori WORLD
diff --git a/dev-lang/gdl/files/0.9.4-gsl.patch b/dev-lang/gdl/files/0.9.4-gsl.patch
new file mode 100644
index 000000000000..3a96a41adcde
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.4-gsl.patch
@@ -0,0 +1,62 @@
+diff -up gdl-0.9.4/src/gsl_matrix.cpp.gsl gdl-0.9.4/src/gsl_matrix.cpp
+--- gdl-0.9.4/src/gsl_matrix.cpp.gsl 2013-09-20 10:10:02.000000000 -0600
++++ gdl-0.9.4/src/gsl_matrix.cpp 2013-10-03 13:50:41.089660703 -0600
+@@ -41,10 +41,11 @@ namespace lib {
+ const int szdbl=sizeof(DDouble);
+ const int szflt=sizeof(DFloat);
+ const int szlng=sizeof(DLong);
++ const int szlng64=sizeof(DLong64);
+
+ void ludc_pro( EnvT* e)
+ {
+- // cout << szdbl << " " <<szflt << " " << szlng << endl;
++ // cout << szdbl << " " <<szflt << " " << szlng << " " szlng64 << endl;
+
+ SizeT nParam=e->NParam(1);
+ // if( nParam == 0)
+@@ -120,9 +121,15 @@ namespace lib {
+ dimension dim1(&n, (SizeT) 1);
+ BaseGDL** p1D = &e->GetPar( 1);
+ GDLDelete((*p1D));
+- *p1D = new DLongGDL(dim1, BaseGDL::NOZERO);
+- memcpy(&(*(DLongGDL*) *p1D)[0], p->data,
+- p0->Dim(0)*szlng);
++ if (sizeof(size_t) == szlng) {
++ *p1D = new DLongGDL(dim1, BaseGDL::NOZERO);
++ memcpy(&(*(DLongGDL*) *p1D)[0], p->data,
++ p0->Dim(0)*szlng);
++ } else {
++ *p1D = new DLong64GDL(dim1, BaseGDL::NOZERO);
++ memcpy(&(*(DLong64GDL*) *p1D)[0], p->data,
++ p0->Dim(0)*szlng64);
++ }
+
+ // gsl_matrix_free(mat);
+ // gsl_permutation_free(p);
+@@ -189,10 +196,15 @@ namespace lib {
+ GDLGuard<gsl_matrix> g1(mat,gsl_matrix_free);
+ memcpy(mat->data, &(*p0D)[0], nEl*szdbl);
+
+- DLongGDL* p1L =e->GetParAs<DLongGDL>(1);
+ gsl_permutation *p = gsl_permutation_alloc (nEl1);
+ GDLGuard<gsl_permutation> g2(p,gsl_permutation_free);
+- memcpy(p->data, &(*p1L)[0], nEl1*szlng);
++ if (sizeof(size_t) == szlng) {
++ DLongGDL* p1L =e->GetParAs<DLongGDL>(1);
++ memcpy(p->data, &(*p1L)[0], nEl1*szlng);
++ } else {
++ DLong64GDL* p1L =e->GetParAs<DLong64GDL>(1);
++ memcpy(p->data, &(*p1L)[0], nEl1*szlng64);
++ }
+
+ DDoubleGDL *p2D = e->GetParAs<DDoubleGDL>(2);
+ gsl_vector *b = gsl_vector_alloc(nEl2);
+@@ -222,7 +234,7 @@ namespace lib {
+ DDoubleGDL* res = new DDoubleGDL( p2->Dim(), BaseGDL::NOZERO);
+ memcpy(&(*res)[0], x->data, nEl1*szdbl);
+
+-// gsl_matrix_free(mat);
++// gsl_matrix_free(mat);Parameter
+ // gsl_vector_free(x);
+ // gsl_permutation_free(p);
+ // b ???
diff --git a/dev-lang/gdl/files/0.9.4-plplot.patch b/dev-lang/gdl/files/0.9.4-plplot.patch
new file mode 100644
index 000000000000..fac18ec5e699
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.4-plplot.patch
@@ -0,0 +1,18 @@
+ CMakeModules/FindPlplot.cmake | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeModules/FindPlplot.cmake b/CMakeModules/FindPlplot.cmake
+index a503f8c..cdaeb24 100644
+--- a/CMakeModules/FindPlplot.cmake
++++ b/CMakeModules/FindPlplot.cmake
+@@ -9,8 +9,8 @@
+ #
+
+
+-find_library(PLPLOT_LIBRARY NAMES plplotd)
+-find_library(PLPLOTCXX_LIBRARY NAMES plplotcxxd)
++find_library(PLPLOT_LIBRARY NAMES plplotd plplot)
++find_library(PLPLOTCXX_LIBRARY NAMES plplotcxxd plplotcxx)
+ set(PLPLOT_LIBRARIES ${PLPLOT_LIBRARY} ${PLPLOTCXX_LIBRARY})
+ find_path(PLPLOT_INCLUDE_DIR NAMES plplot/plplot.h)
+ include(FindPackageHandleStandardArgs)
diff --git a/dev-lang/gdl/files/0.9.4-python.patch b/dev-lang/gdl/files/0.9.4-python.patch
new file mode 100644
index 000000000000..709f8c140cd0
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.4-python.patch
@@ -0,0 +1,12 @@
+diff -up gdl-0.9.4/src/pythongdl.cpp.python gdl-0.9.4/src/pythongdl.cpp
+--- gdl-0.9.4/src/pythongdl.cpp.python 2013-07-26 03:30:32.000000000 -0600
++++ gdl-0.9.4/src/pythongdl.cpp 2013-09-30 10:24:27.092666180 -0600
+@@ -373,7 +373,7 @@ PyObject *GDLSub( PyObject *self, PyObje
+ if( libCall)
+ e = new EnvT( NULL, sub);
+ else
+- e = new EnvUDT( NULL, sub);
++ e = new EnvUDT( NULL, static_cast<DSubUD*>(sub));
+
+ Guard< EnvBaseT> e_guard( e);
+
diff --git a/dev-lang/gdl/files/0.9.4-python2.patch b/dev-lang/gdl/files/0.9.4-python2.patch
new file mode 100644
index 000000000000..8dc92324a581
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.4-python2.patch
@@ -0,0 +1,17 @@
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1fda8ee..e2170b2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -615,8 +615,8 @@ if(PYTHON OR PYTHON_MODULE)
+ else()
+ set(PythonLibs_FIND_VERSION 2)
+ endif()
+- find_package(PythonLibs)
+ include(FindPythonInterp)
++ find_package(PythonLibs)
+ endif()
+ set(USE_PYTHON ${PYTHONLIBS_FOUND})
+ if(PYTHONLIBS_FOUND)
diff --git a/dev-lang/gdl/files/0.9.4-reorder.patch b/dev-lang/gdl/files/0.9.4-reorder.patch
new file mode 100644
index 000000000000..d871757a29d0
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.4-reorder.patch
@@ -0,0 +1,380 @@
+diff -up gdl-0.9.4/src/allix.hpp.reorder gdl-0.9.4/src/allix.hpp
+--- gdl-0.9.4/src/allix.hpp.reorder 2012-12-11 10:39:35.000000000 -0700
++++ gdl-0.9.4/src/allix.hpp 2013-10-04 10:59:22.666594845 -0600
+@@ -344,9 +344,9 @@ private:
+ public:
+ AllIxAllIndexedT( ArrayIndexVectorT* ixList_, SizeT acRank_, SizeT nIx_, const SizeT* varStride_)
+ : ixList( ixList_)
++ , varStride( varStride_)
+ , acRank( acRank_)
+ , nIx( nIx_)
+- , varStride( varStride_)
+ {}
+ ~AllIxAllIndexedT() {}
+
+@@ -384,11 +384,11 @@ private:
+ public:
+ AllIxNewMultiT( ArrayIndexVectorT* ixList_, SizeT acRank_, SizeT nIx_, const SizeT* varStride_, SizeT* nIterLimit_, SizeT* stride_)
+ : ixList( ixList_)
+- , acRank( acRank_)
+- , nIx( nIx_)
+ , varStride( varStride_)
+ , nIterLimit( nIterLimit_)
+ , stride( stride_)
++ , acRank( acRank_)
++ , nIx( nIx_)
+ {
+ add = 0;
+ assert( varStride[0] == 1);
+@@ -440,10 +440,10 @@ private:
+ public:
+ AllIxNewMulti2DT( ArrayIndexVectorT* ixList_, SizeT nIx_, const SizeT* varStride_, SizeT* nIterLimit_, SizeT* stride_)
+ : ixList( ixList_)
+- , nIx( nIx_)
+ , varStride( varStride_)
+ , nIterLimit( nIterLimit_)
+ , stride( stride_)
++ , nIx( nIx_)
+ {
+ add = 0;
+ if( !(*ixList)[0]->Indexed())
+@@ -499,11 +499,11 @@ private:
+ public:
+ AllIxNewMultiNoneIndexedT( ArrayIndexVectorT* ixList_, SizeT acRank_, SizeT nIx_, const SizeT* varStride_, SizeT* nIterLimit_, SizeT* stride_)
+ : ixList( ixList_)
+- , acRank( acRank_)
+- , nIx( nIx_)
+ , varStride( varStride_)
+ , nIterLimit( nIterLimit_)
+ , stride( stride_)
++ , acRank( acRank_)
++ , nIx( nIx_)
+ {
+ assert( varStride[0] == 1);
+ add = 0;
+@@ -548,10 +548,10 @@ private:
+ public:
+ AllIxNewMultiNoneIndexed2DT( ArrayIndexVectorT* ixList_, SizeT nIx_, const SizeT* varStride_, SizeT* nIterLimit_, SizeT* stride_)
+ : ixList( ixList_)
+- , nIx( nIx_)
+ , varStride( varStride_)
+ , nIterLimit( nIterLimit_)
+ , stride( stride_)
++ , nIx( nIx_)
+ {
+ assert( varStride[0] == 1);
+ ixListStride[0] = (*ixList)[0]->GetStride();
+@@ -593,11 +593,11 @@ public:
+ AllIxNewMultiOneVariableIndexNoIndexT( RankT gt1Rank, SizeT add_,
+ ArrayIndexVectorT* ixList_, SizeT acRank_, SizeT nIx_, const SizeT* varStride_, SizeT* nIterLimit_, SizeT* stride_)
+ : ixList( ixList_)
+- , acRank( acRank_)
+- , nIx( nIx_)
+ , varStride( varStride_)
+ , nIterLimit( nIterLimit_)
+ , stride( stride_)
++ , acRank( acRank_)
++ , nIx( nIx_)
+ , add( add_)
+ , variableIndex( gt1Rank)
+ {
+@@ -642,11 +642,11 @@ public:
+ SizeT acRank_, SizeT nIx_, const SizeT* varStride_,
+ SizeT* nIterLimit_, SizeT* stride_)
+ : ixList( ixList_)
+- , acRank( acRank_)
+- , nIx( nIx_)
+ , varStride( varStride_)
+ , nIterLimit( nIterLimit_)
+ , stride( stride_)
++ , acRank( acRank_)
++ , nIx( nIx_)
+ , add( add_)
+ , variableIndex( gt1Rank)
+ {
+diff -up gdl-0.9.4/src/arrayindex.hpp.reorder gdl-0.9.4/src/arrayindex.hpp
+--- gdl-0.9.4/src/arrayindex.hpp.reorder 2013-09-17 10:46:19.000000000 -0600
++++ gdl-0.9.4/src/arrayindex.hpp 2013-10-04 11:00:58.849879562 -0600
+@@ -303,7 +303,7 @@ private:
+ RangeT s;
+ BaseGDL* rawData; // for overloaded object indexing
+
+- CArrayIndexScalar( const CArrayIndexScalar& c): s( c.s), sInit( c.sInit)
++ CArrayIndexScalar( const CArrayIndexScalar& c): sInit( c.sInit), s( c.s)
+ {
+ assert( c.rawData != NULL);
+ rawData = c.rawData->Dup();
+diff -up gdl-0.9.4/src/arrayindexlistnoassoct.hpp.reorder gdl-0.9.4/src/arrayindexlistnoassoct.hpp
+--- gdl-0.9.4/src/arrayindexlistnoassoct.hpp.reorder 2013-07-04 17:24:44.000000000 -0600
++++ gdl-0.9.4/src/arrayindexlistnoassoct.hpp 2013-10-04 11:24:02.893867004 -0600
+@@ -59,8 +59,8 @@ public:
+ { nParam = 0;}
+
+ ArrayIndexListOneNoAssocT( const ArrayIndexListOneNoAssocT& cp):
+- cleanupIx(),
+ ArrayIndexListT( cp),
++ cleanupIx(),
+ ix( cp.ix->Dup()),
+ allIx( NULL)
+ {
+diff -up gdl-0.9.4/src/arrayindexlistt.hpp.reorder gdl-0.9.4/src/arrayindexlistt.hpp
+--- gdl-0.9.4/src/arrayindexlistt.hpp.reorder 2013-09-17 10:46:19.000000000 -0600
++++ gdl-0.9.4/src/arrayindexlistt.hpp 2013-10-04 11:23:35.607069888 -0600
+@@ -130,8 +130,8 @@ public:
+ { nParam = 0;}
+
+ ArrayIndexListOneT( const ArrayIndexListOneT& cp):
+- cleanupIx(),
+ ArrayIndexListT( cp),
++ cleanupIx(),
+ ix( cp.ix->Dup()),
+ allIx( NULL)
+ {
+diff -up gdl-0.9.4/src/deviceps.hpp.reorder gdl-0.9.4/src/deviceps.hpp
+--- gdl-0.9.4/src/deviceps.hpp.reorder 2013-07-03 15:48:06.000000000 -0600
++++ gdl-0.9.4/src/deviceps.hpp 2013-10-04 13:14:48.283746779 -0600
+@@ -441,9 +441,9 @@ private:
+ }
+
+ public:
+- DevicePS(): Graphics(), fileName( "gdl.ps"), actStream( NULL), color(0),
+- decomposed( 0), encapsulated(false), scale(1.), XPageSize(17.78), YPageSize(12.7),
+- XOffset(0.0),YOffset(0.0)
++ DevicePS(): Graphics(), fileName( "gdl.ps"), actStream( NULL),
++ XPageSize(17.78), YPageSize(12.7), XOffset(0.0),YOffset(0.0),
++ color(0), decomposed( 0), encapsulated(false), scale(1.)
+ {
+ name = "PS";
+
+diff -up gdl-0.9.4/src/dnode.cpp.reorder gdl-0.9.4/src/dnode.cpp
+--- gdl-0.9.4/src/dnode.cpp.reorder 2012-09-18 08:19:18.000000000 -0600
++++ gdl-0.9.4/src/dnode.cpp 2013-10-04 12:02:48.601416601 -0600
+@@ -55,9 +55,10 @@ DNode::DNode( const DNode& cp):
+ // keepRight( false),
+ CommonAST( cp), //down(), right(),
+ lineNumber( cp.getLine()), cData(NULL),
+- var(cp.var), arrIxList(NULL),arrIxListNoAssoc(NULL),
++ var(cp.var),
+ libFun( cp.libFun),
+ libPro( cp.libPro),
++ arrIxList(NULL),arrIxListNoAssoc(NULL),
+ labelStart( cp.labelStart), labelEnd( cp.labelEnd)
+ {
+ if( cp.cData != NULL) cData = cp.cData->Dup();
+diff -up gdl-0.9.4/src/dnode.hpp.reorder gdl-0.9.4/src/dnode.hpp
+diff -up gdl-0.9.4/src/dpro.cpp.reorder gdl-0.9.4/src/dpro.cpp
+--- gdl-0.9.4/src/dpro.cpp.reorder 2013-09-17 03:03:25.000000000 -0600
++++ gdl-0.9.4/src/dpro.cpp 2013-10-04 13:05:23.169223727 -0600
+@@ -200,8 +200,8 @@ DSubUD::~DSubUD()
+ DSubUD::DSubUD(const string& n,const string& o,const string& f) :
+ DSub(n,o), file(f),
+ tree( NULL),
+- labelList(),
+ compileOpt(GDLParser::NONE),
++ labelList(),
+ nForLoops( 0)
+ {
+ if( o != "")
+diff -up gdl-0.9.4/src/envt.cpp.reorder gdl-0.9.4/src/envt.cpp
+--- gdl-0.9.4/src/envt.cpp.reorder 2013-09-25 05:55:21.000000000 -0600
++++ gdl-0.9.4/src/envt.cpp 2013-10-04 13:08:17.081114086 -0600
+@@ -107,15 +107,15 @@ void EnvUDT::operator delete( void *ptr)
+
+
+ EnvBaseT::EnvBaseT( ProgNodeP cN, DSub* pro_):
+- env(),
+ toDestroy(),
++ env(),
+ pro(pro_),
+- extra(NULL),
+- newEnv(NULL),
+ callingNode( cN),
+ lineNumber( 0),
+- obj(false)
+- ,ptrToReturnValue(NULL)
++ obj(false),
++ extra(NULL),
++ newEnv(NULL),
++ ptrToReturnValue(NULL)
+ //, toDestroyInitialIndex( toDestroy.size())
+ {}
+
+diff -up gdl-0.9.4/src/envt.hpp.reorder gdl-0.9.4/src/envt.hpp
+--- gdl-0.9.4/src/envt.hpp.reorder 2013-09-26 04:47:48.000000000 -0600
++++ gdl-0.9.4/src/envt.hpp 2013-10-04 10:55:21.892428311 -0600
+@@ -863,7 +863,7 @@ public:
+ typedef SizeT size_type;
+ typedef EnvUDT* pointer_type;
+
+- EnvStackT(): sz(defaultStackDepth), top(0)
++ EnvStackT(): top(0), sz(defaultStackDepth)
+ {
+ envStackFrame = new EnvUDT* [ sz+1];
+ envStack = envStackFrame + 1;
+diff -up gdl-0.9.4/src/gdlexception.cpp.reorder gdl-0.9.4/src/gdlexception.cpp
+--- gdl-0.9.4/src/gdlexception.cpp.reorder 2013-06-23 17:07:32.000000000 -0600
++++ gdl-0.9.4/src/gdlexception.cpp 2013-10-04 14:00:32.102348401 -0600
+@@ -43,9 +43,9 @@ GDLException::GDLException(DLong eC, con
+ errorNodeP( NULL),
+ errorCode(eC),
+ line( 0), col( 0), prefix( pre),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {
+ if(decorate && interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+@@ -97,9 +97,9 @@ GDLException::GDLException(const RefDNod
+ errorNodeP( NULL),
+ errorCode(-1),
+ line( 0), col( 0), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {
+ if(interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+@@ -122,9 +122,9 @@ GDLException::GDLException(DLong eC, con
+ errorNodeP( NULL),
+ errorCode(eC),
+ line( 0), col( 0), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {
+ if(interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+@@ -148,9 +148,9 @@ GDLException::GDLException(const ProgNod
+ errorNodeP( eN),
+ errorCode(-1),
+ line( 0), col( 0), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {
+ if( overWriteNode && interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+@@ -177,9 +177,9 @@ GDLException::GDLException(DLong eC, con
+ errorNodeP( eN),
+ errorCode(eC),
+ line( 0), col( 0), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {
+ if( overWriteNode && interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+@@ -207,9 +207,9 @@ GDLException::GDLException(SizeT l, Size
+ errorNodeP( NULL),
+ errorCode(-1),
+ line( l), col( c), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {
+ if(interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+@@ -232,8 +232,8 @@ GDLException::GDLException(DLong eC, Siz
+ errorNodeP( NULL),
+ errorCode(eC),
+ line( l), col( c), prefix( true),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ arrayexprIndexeeFailed(false),
++ targetEnv( NULL)
+ {
+ if(interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+diff -up gdl-0.9.4/src/gdlexception.hpp.reorder gdl-0.9.4/src/gdlexception.hpp
+--- gdl-0.9.4/src/gdlexception.hpp.reorder 2013-06-23 17:07:32.000000000 -0600
++++ gdl-0.9.4/src/gdlexception.hpp 2013-10-04 11:12:58.332125288 -0600
+@@ -66,18 +66,18 @@ public:
+ errorNodeP( NULL),
+ errorCode(-1),
+ line( 0), col( 0), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {}
+ GDLException( DLong eC): ANTLRException(),
+ errorNode(static_cast<RefDNode>(antlr::nullAST)),
+ errorNodeP( NULL),
+ errorCode(eC),
+ line( 0), col( 0), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {}
+ GDLException(const std::string& s, bool pre = true, bool decorate=true);
+ GDLException(const RefDNode eN, const std::string& s);
+diff -up gdl-0.9.4/src/prognode.cpp.reorder gdl-0.9.4/src/prognode.cpp
+--- gdl-0.9.4/src/prognode.cpp.reorder 2013-09-27 18:47:49.000000000 -0600
++++ gdl-0.9.4/src/prognode.cpp 2013-10-04 14:01:11.490342867 -0600
+@@ -54,19 +54,19 @@ return nonCopyNodeLookupArray;
+
+ // tanslation RefDNode -> ProgNode
+ ProgNode::ProgNode( const RefDNode& refNode):
++ ttype( refNode->getType()),
++ text( refNode->getText()),
+ keepRight( false),
+ keepDown( false),
+ breakTarget( NULL),
+- ttype( refNode->getType()),
+- text( refNode->getText()),
+ down( NULL),
+ right( NULL),
+- lineNumber( refNode->getLine()),
+ cData( refNode->StealCData()), // stealing is crucial here because references might exist
++ var( refNode->var),
+ // as arrayindices
+- libPro( refNode->libPro),
+ libFun( refNode->libFun),
+- var( refNode->var),
++ libPro( refNode->libPro),
++ lineNumber( refNode->getLine()),
+ arrIxList( refNode->StealArrIxList()),
+ arrIxListNoAssoc( refNode->StealArrIxNoAssocList()),
+ // arrIxList( refNode->CloneArrIxList()),
+diff -up gdl-0.9.4/src/prognodeexpr.cpp.reorder gdl-0.9.4/src/prognodeexpr.cpp
+--- gdl-0.9.4/src/prognodeexpr.cpp.reorder 2013-09-26 05:08:39.000000000 -0600
++++ gdl-0.9.4/src/prognodeexpr.cpp 2013-10-04 13:20:36.660155916 -0600
+@@ -49,18 +49,18 @@ BinaryExprNC::BinaryExprNC( const RefDNo
+ }
+
+ ProgNode::ProgNode(): // for NULLProgNode
++ ttype( antlr::Token::NULL_TREE_LOOKAHEAD),
++ text( "NULLProgNode"),
+ keepRight( false),
+ keepDown( false),
+ breakTarget( NULL),
+- ttype( antlr::Token::NULL_TREE_LOOKAHEAD),
+- text( "NULLProgNode"),
+ down( NULL),
+ right( NULL),
+- lineNumber( 0),
+ cData( NULL),
+- libPro( NULL),
+- libFun( NULL),
+ var( NULL),
++ libFun( NULL),
++ libPro( NULL),
++ lineNumber( 0),
+ labelStart( 0),
+ labelEnd( 0)
+ {}
diff --git a/dev-lang/gdl/files/0.9.5-antlr.patch b/dev-lang/gdl/files/0.9.5-antlr.patch
new file mode 100644
index 000000000000..f5b627ab444e
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.5-antlr.patch
@@ -0,0 +1,91 @@
+ CMakeLists.txt | 14 +++++++++++---
+ CMakeModules/FindANTLR.cmake | 11 +++++++++++
+ src/CMakeLists.txt | 18 +++++++++++-------
+ 3 files changed, 33 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 407e39a..c4b3278 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -111,6 +111,8 @@ set(SZIPDIR "" CACHE PATH "GDL: Specify the SZip directory tree")
+
+ set(GDL_DATA_DIR "/share/gnudatalanguage" CACHE PATH "GDL: data directory relative to CMAKE_INSTALL_PREFIX")
+
++set(BUNDLED_ANTLR OFF CACHE BOOL "Use bundled ANTLR grammar ?")
++set(ANTLRDIR "" CACHE PATH "Specify the system ANTLR directory tree")
+
+ # check for 64-bit OS
+ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
+@@ -174,9 +176,15 @@ check_library_exists(m nexttoward "" HAVE_NEXTTOWARD)
+ # mpi
+ check_include_file(mpi.h HAVE_MPI_H)
+
+-# SA: whithout it compilation of antlr fails if there's a conflicting
+-# version of antlr in system-wide directories
+-include_directories(src)
++if(BUNDLED_ANTLR)
++ # SA: whithout it compilation of antlr fails if there's a conflicting
++ # version of antlr in system-wide directories
++ include_directories(src)
++else(BUNDLED_ANTLR)
++ find_package(ANTLR QUIET)
++ set(LIBRARIES ${LIBRARIES} ${ANTLR_LIBRARIES})
++ include_directories(${ANTLR_INCLUDE_DIR})
++endif(BUNDLED_ANTLR)
+
+ if(WIN32 AND NOT CYGWIN)
+ # For Win32 find Pdcureses instead of (N)Curses
+diff --git a/CMakeModules/FindANTLR.cmake b/CMakeModules/FindANTLR.cmake
+new file mode 100644
+index 0000000..b61cc5b
+--- /dev/null
++++ b/CMakeModules/FindANTLR.cmake
+@@ -0,0 +1,11 @@
++
++
++find_library(ANTLR_LIBRARIES NAMES antlr)
++find_path(ANTLR_INCLUDE_DIR NAMES antlr/ANTLRUtil.hpp)
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(ANTLR DEFAULT_MSG ANTLR_LIBRARIES ANTLR_INCLUDE_DIR)
++
++mark_as_advanced(
++ANTLR_LIBRARIES
++ANTLR_INCLUDE_DIR
++)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 1f7ffec..776a1fd 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -262,9 +262,8 @@ widget.cpp
+ widget.hpp
+ )
+
+-add_subdirectory(antlr)
+
+-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/antlr ${CMAKE_BINARY_DIR})
++include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR})
+ link_directories(${LINK_DIRECTORIES})
+
+ if(PYTHON_MODULE) #libgdl
+@@ -275,11 +274,16 @@ else(PYTHON_MODULE) #gdl
+ add_executable(gdl ${SOURCES})
+ endif(PYTHON_MODULE)
+
+-add_dependencies(gdl antlr) # be sure that antlr is built before gdl
+-target_link_libraries(gdl antlr) # link antlr against gdl
+-if (MINGW)
+-target_link_libraries(gdl ws2_32)
+-endif (MINGW)
++if(BUNDLED_ANTLR)
++ add_subdirectory(antlr)
++ include_directories(${CMAKE_SOURCE_DIR}/src/antlr)
++ add_dependencies(gdl antlr) # be sure that antlr is built before gdl
++ target_link_libraries(gdl antlr) # link antlr against gdl
++ if (MINGW)
++ target_link_libraries(gdl ws2_32)
++ endif (MINGW)
++endif(BUNDLED_ANTLR)
++
+ target_link_libraries(gdl ${LIBRARIES})
+ add_definitions(-DHAVE_CONFIG_H)
+
diff --git a/dev-lang/gdl/files/0.9.5-plplot.patch b/dev-lang/gdl/files/0.9.5-plplot.patch
new file mode 100644
index 000000000000..70ad1bd14ca1
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.5-plplot.patch
@@ -0,0 +1,134 @@
+diff -up gdl-0.9.5/CMakeLists.txt.plplot gdl-0.9.5/CMakeLists.txt
+--- gdl-0.9.5/CMakeLists.txt.plplot 2014-10-07 07:21:14.000000000 -0600
++++ gdl-0.9.5/CMakeLists.txt 2015-04-24 14:29:15.588067694 -0600
+@@ -386,7 +386,7 @@ if(PLPLOT_FOUND)
+ #}" HAVE_PLPLOT_WIDTH)
+
+ #give it a 2nd try...
+- check_library_exists("${PLPLOT_LIBRARIES}" c_plwidth "" HAVE_PLPLOT_WIDTH)
++ check_library_exists("${PLPLOT_LIBRARIES}" c_plwidth "" HAVE_PLPLOT_WIDTH)
+ if(HAVE_PLPLOT_WIDTH)
+ set(HAVE_PLPLOT_WIDTH 1)
+ endif(HAVE_PLPLOT_WIDTH)
+@@ -402,6 +402,11 @@ if(PLPLOT_FOUND)
+ else(PLPLOT_HAS_LEGEND)
+ message(STATUS "Your plplot lib is too old for some gdl functions, please upgrade.")
+ endif(PLPLOT_HAS_LEGEND)
++ check_cxx_source_compiles("#include <plplot/plstream.h>
++ main(){PLINT n; PLFLT x,y;plcallback::fill(n,&x,&y);}" PLPLOT_HAS_PLCALLBACK)
++ if(PLPLOT_HAS_PLCALLBACK)
++ set(PLPLOT_HAS_PLCALLBACK 1)
++ endif(PLPLOT_HAS_PLCALLBACK)
+ endif(PLPLOT_FOUND)
+
+ # GRAPHICSMAGICK is an alternative to the classical ImageMagick Lib.
+diff -up gdl-0.9.5/CMakeModules/FindPlplot.cmake.plplot gdl-0.9.5/CMakeModules/FindPlplot.cmake
+--- gdl-0.9.5/CMakeModules/FindPlplot.cmake.plplot 2011-08-19 04:18:51.000000000 -0600
++++ gdl-0.9.5/CMakeModules/FindPlplot.cmake 2015-04-24 13:54:56.915632230 -0600
+@@ -9,8 +9,12 @@
+ #
+
+
+-find_library(PLPLOT_LIBRARY NAMES plplotd)
+-find_library(PLPLOTCXX_LIBRARY NAMES plplotcxxd)
++find_library(PLPLOT_LIBRARY NAMES plplot)
++find_library(PLPLOTCXX_LIBRARY NAMES plplotcxx)
++if(NOT PLPLOT_LIBRARY)
++ find_library(PLPLOT_LIBRARY NAMES plplotd)
++ find_library(PLPLOTCXX_LIBRARY NAMES plplotcxxd)
++endif(NOT PLPLOT_LIBRARY)
+ set(PLPLOT_LIBRARIES ${PLPLOT_LIBRARY} ${PLPLOTCXX_LIBRARY})
+ find_path(PLPLOT_INCLUDE_DIR NAMES plplot/plplot.h)
+ include(FindPackageHandleStandardArgs)
+diff -up gdl-0.9.5/config.h.cmake.plplot gdl-0.9.5/config.h.cmake
+--- gdl-0.9.5/config.h.cmake.plplot 2014-08-30 14:13:43.000000000 -0600
++++ gdl-0.9.5/config.h.cmake 2015-04-24 13:39:22.259704608 -0600
+@@ -31,6 +31,12 @@
+ #cmakedefine HAVE_PLPLOT_WIDTH 1
+ #cmakedefine PLPLOT_PRIVATE_NOT_HIDDEN 1
+ #cmakedefine PLPLOT_HAS_LEGEND
++#cmakedefine PLPLOT_HAS_PLCALLBACK
++#ifdef PLPLOT_HAS_PLCALLBACK
++#define PLCALLBACK plcallback
++#else
++#define PLCALLBACK plstream
++#endif
+ #ifndef HAVE_STDINT_H
+ #cmakedefine HAVE_STDINT_H 1
+ #endif
+diff -up gdl-0.9.5/src/plotting_contour.cpp.plplot gdl-0.9.5/src/plotting_contour.cpp
+--- gdl-0.9.5/src/plotting_contour.cpp.plplot 2014-09-29 11:03:12.000000000 -0600
++++ gdl-0.9.5/src/plotting_contour.cpp 2015-04-24 13:39:22.267705191 -0600
+@@ -789,8 +789,8 @@ namespace lib
+ 1, value,
+ static_cast<PLFLT>(( *thick )[i%thick->N_Elements()]),
+ 0,0,0,0,
+- (plstream::fill), (oneDim),
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
++ (PLCALLBACK::fill), (oneDim),
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ }
+ actStream->psty(0);
+ // if (docolors) gdlSetGraphicsForegroundColorFromKw( e, actStream );
+@@ -808,8 +808,8 @@ namespace lib
+ clevel[i], maxmax,
+ 1,value,
+ 0,0,0,0,0,
+- plstream::fill, (oneDim), //Onedim is accelerator since rectangles are kept rectangles see plplot doc
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
++ PLCALLBACK::fill, (oneDim), //Onedim is accelerator since rectangles are kept rectangles see plplot doc
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ }
+ } else { //every other case of fill
+ // note that plshades is not protected against 1 level (color formula is
+@@ -818,8 +818,8 @@ namespace lib
+ if (nlevel>2 && !(docolors)) { //acceleration with shades when no c_colors are given. use continuous table1, decomposed or not.
+ //acceleration is most sensible when a (x,y) transform (rotate, stretch) is in place since plplot does not recompute the map.
+ actStream->shades( map, xEl, yEl, isLog?doIt:NULL, xStart, xEnd, yStart, yEnd,
+- clevel, nlevel, 1, 0, 0, plstream::fill, (oneDim),
+- (oneDim)?(plstream::tr1):(plstream::tr2),
++ clevel, nlevel, 1, 0, 0, PLCALLBACK::fill, (oneDim),
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2),
+ (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ }
+ else { //fill with colors defined with c_colors or n<=2
+@@ -832,8 +832,8 @@ namespace lib
+ clevel[i], maxmax,
+ 1,value,
+ 0,0,0,0,0,
+- plstream::fill, (oneDim), //Onedim is accelerator since rectangles are kept rectangles see plplot doc
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
++ PLCALLBACK::fill, (oneDim), //Onedim is accelerator since rectangles are kept rectangles see plplot doc
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ } else
+ printf(" Problem, sorry! plplot doesn't like to FILL with a single level!");
+ }
+@@ -854,7 +854,7 @@ namespace lib
+ if (doT3d) { //no label in T3D , bug in plplot...
+ actStream->setcontlabelparam ( LABELOFFSET, (PLFLT) label_size, LABELSPACING, 0 );
+ actStream->cont ( map, xEl, yEl, 1, xEl, 1, yEl, &( clevel[i] ), 1,
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ } else {
+ if (dolabels && i<labels->N_Elements())
+ {
+@@ -862,16 +862,16 @@ namespace lib
+ //else (lables thicker than contours) impossible with plplot...
+ actStream->setcontlabelparam ( LABELOFFSET, (PLFLT) label_size, LABELSPACING, 0 );
+ actStream->cont ( map, xEl, yEl, 1, xEl, 1, yEl, &( clevel[i] ), 1,
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2); //thick contours, no label
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2); //thick contours, no label
+ actStream->Thick(label_thick);
+ }
+ actStream->setcontlabelparam ( LABELOFFSET, (PLFLT) label_size, LABELSPACING*sqrt(label_size),(PLINT)(*labels)[i] );
+ actStream->cont ( map, xEl, yEl, 1, xEl, 1, yEl, &( clevel[i] ), 1,
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ if (!dothick) gdlSetPenThickness(e, actStream);
+ } else {
+ actStream->cont ( map, xEl, yEl, 1, xEl, 1, yEl, &( clevel[i] ), 1,
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ }
+ }
+ }
diff --git a/dev-lang/gdl/files/0.9.5-png.patch b/dev-lang/gdl/files/0.9.5-png.patch
new file mode 100644
index 000000000000..1140fcc9ac75
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.5-png.patch
@@ -0,0 +1,15 @@
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 407e39a..f24a087 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -270,7 +270,6 @@ if(PNGLIB)
+ set(USE_PNGLIB ${PNG_FOUND})
+ if(PNG_FOUND)
+ set(LIBRARIES ${LIBRARIES} ${PNG_LIBRARIES})
+- set(LINK_DIRECTORIES ${LINK_DIRECTORIES} ${PNG_LIBRARY_DIRS})
+ include_directories(${PNG_INCLUDE_DIRS})
+ else(PNG_FOUND)
+ message(FATAL_ERROR "libpng is required but was not found.\n"
diff --git a/dev-lang/gdl/files/0.9.5-proj4.patch b/dev-lang/gdl/files/0.9.5-proj4.patch
new file mode 100644
index 000000000000..4b2ebcca0a02
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.5-proj4.patch
@@ -0,0 +1,41 @@
+ CMakeLists.txt | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c4b3278..f9ed49d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -637,17 +637,17 @@ if(LIBPROJ4)
+ if(LIBPROJ4_FOUND)
+ set(CMAKE_REQUIRED_LIBRARIES ${LIBPROJ4_LIBRARIES} ${GSL_LIBRARIES} m)
+
+- check_library_exists("${LIBPROJ4_LIBRARIES}" pj_init "" USE_LIBPROJ4_NEW)
+- if(USE_LIBPROJ4_NEW)
++ check_library_exists("${LIBPROJ4_LIBRARIES}" pj_init "" USE_LIBPROJ4)
++ if(USE_LIBPROJ4)
+ # check_library_exists("${LIBPROJ4_LIBRARIES}" proj_init "" USE_LIBPROJ4)
+ # if(USE_LIBPROJ4)
+
+ # define USE_LIB_PROJ4 in any case
+ set(USE_LIBPROJ4 1)
+
+- else(USE_LIBPROJ4_NEW)
+- check_library_exists("${LIBPROJ4_LIBRARIES}" proj_init "" USE_LIBPROJ4)
+- if(NOT USE_LIBPROJ4)
++ else(USE_LIBPROJ4)
++ check_library_exists("${LIBPROJ4_LIBRARIES}" proj_init "" USE_LIBPROJ4_NEW)
++ if(NOT USE_LIBPROJ4_NEW)
+ # else(USE_LIBPROJ4)
+ # check_library_exists("${LIBPROJ4_LIBRARIES}" pj_init "" USE_LIBPROJ4_NEW)
+ # if(NOT USE_LIBPROJ4_NEW)
+@@ -656,8 +656,8 @@ if(LIBPROJ4)
+ "Use -DLIBPROJ4DIR=DIR to specify the Libproj4 directory tree.\n"
+ "Use -DLIBPRJ4=OFF to not use it.")
+
+- endif(NOT USE_LIBPROJ4)
+- endif(USE_LIBPROJ4_NEW)
++ endif(NOT USE_LIBPROJ4_NEW)
++ endif(USE_LIBPROJ4)
+ # endif(NOT USE_LIBPROJ4_NEW)
+ # endif(USE_LIBPROJ4)
+
diff --git a/dev-lang/gdl/gdl-0.9.4.ebuild b/dev-lang/gdl/gdl-0.9.4.ebuild
new file mode 100644
index 000000000000..05382dcb70e6
--- /dev/null
+++ b/dev-lang/gdl/gdl-0.9.4.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="2.8"
+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}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+eigen fftw grib gshhs hdf hdf5 imagemagick netcdf openmp
+ proj postscript python static-libs udunits wxwidgets"
+
+RDEPEND="
+ sci-libs/gsl:0=
+ sci-libs/plplot:0=[-dynamic]
+ sys-libs/ncurses:5=
+ 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:2.8[X,-odbc] )"
+
+DEPEND="${RDEPEND}
+ >=dev-java/antlr-2.7.7-r5:0[cxx,java,script]
+ virtual/pkgconfig
+ eigen? ( dev-cpp/eigen:3 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}"/0.9.2-antlr.patch
+ "${FILESDIR}"/0.9.2-include.patch
+ "${FILESDIR}"/0.9.2-proj4.patch
+ "${FILESDIR}"/0.9.2-semaphore.patch
+ "${FILESDIR}"/0.9.3-plwidth.patch
+ "${FILESDIR}"/0.9.4-gsl.patch
+ "${FILESDIR}"/0.9.4-python.patch
+ "${FILESDIR}"/0.9.4-reorder.patch
+ "${FILESDIR}"/0.9.4-plplot.patch
+ "${FILESDIR}"/0.9.4-python2.patch
+)
+
+pkg_setup() {
+ use openmp && [[ $(tc-getCXX)$ == *g++* ]] && ! tc-has-openmp && \
+ die "You have openmp enabled but your current g++ does not support it"
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ 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: use proj instead of libproj4 (libproj4 last update: 2004)
+ sed -i \
+ -e 's:proj4:proj:' \
+ -e 's:lib_proj\.h:proj_api\.h:g' \
+ CMakeModules/FindLibproj4.cmake src/math_utl.hpp || die
+
+ # gentoo: avoid install files in datadir directory
+ sed -i \
+ -e '/AUTHORS/d' \
+ CMakeLists.txt || die
+}
+
+src_configure() {
+ # MPI is still very buggy
+ # x11=off does not compile
+ local mycmakeargs=(
+ -DMPICH=OFF
+ -DBUNDLED_ANTLR=OFF
+ -DX11=ON
+ $(cmake-utils_use fftw)
+ $(cmake-utils_use eigen EIGEN3)
+ $(cmake-utils_use grib)
+ $(cmake-utils_use gshhs)
+ $(cmake-utils_use hdf)
+ $(cmake-utils_use hdf5)
+ $(cmake-utils_use netcdf)
+ $(cmake-utils_use openmp)
+ $(cmake-utils_use proj LIBPROJ4)
+ $(cmake-utils_use postscript PSLIB)
+ $(cmake-utils_use udunits)
+ $(cmake-utils_use 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
+ Xemake -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
+
+ echo "GDL_PATH=\"+${EROOT%/}/usr/share/gnudatalanguage\"" > 50gdl
+ doenvd 50gdl
+}
diff --git a/dev-lang/gdl/gdl-0.9.5.ebuild b/dev-lang/gdl/gdl-0.9.5.ebuild
new file mode 100644
index 000000000000..1f195bab8ecd
--- /dev/null
+++ b/dev-lang/gdl/gdl-0.9.5.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="2.8"
+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}.tar.gz"
+
+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="
+ sci-libs/gsl:0=
+ sci-libs/plplot:0=[-dynamic]
+ sys-libs/ncurses:5=
+ 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:2.8[X,-odbc] )"
+
+DEPEND="${RDEPEND}
+ >=dev-java/antlr-2.7.7-r5:0[cxx,java,script]
+ virtual/pkgconfig
+ eigen? ( dev-cpp/eigen:3 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}"/0.9.5-antlr.patch
+ "${FILESDIR}"/0.9.2-include.patch
+ "${FILESDIR}"/0.9.5-plplot.patch
+ "${FILESDIR}"/0.9.5-png.patch
+)
+
+pkg_setup() {
+ use openmp && [[ $(tc-getCXX)$ == *g++* ]] && ! tc-has-openmp && \
+ die "You have openmp enabled but your current g++ does not support it"
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ 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: use proj instead of libproj4 (libproj4 last update: 2004)
+ sed -i \
+ -e 's:proj4:proj:' \
+ -e 's:lib_proj\.h:proj_api\.h:g' \
+ CMakeModules/FindLibproj4.cmake src/math_utl.hpp || die
+
+ # gentoo: avoid install files in datadir directory
+ sed -i \
+ -e '/AUTHORS/d' \
+ CMakeLists.txt || die
+}
+
+src_configure() {
+ # MPI is still very buggy
+ # x11=off does not compile
+ local mycmakeargs=(
+ -DMPICH=OFF
+ -DBUNDLED_ANTLR=OFF
+ -DX11=ON
+ $(cmake-utils_use fftw)
+ $(cmake-utils_use eigen EIGEN3)
+ $(cmake-utils_use grib)
+ $(cmake-utils_use gshhs)
+ $(cmake-utils_use hdf)
+ $(cmake-utils_use hdf5)
+ $(cmake-utils_use netcdf)
+ $(cmake-utils_use openmp)
+ $(cmake-utils_use png PNGLIB)
+ $(cmake-utils_use proj LIBPROJ4)
+ $(cmake-utils_use postscript PSLIB)
+ $(cmake-utils_use udunits)
+ $(cmake-utils_use 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
+ Xemake -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
+
+ echo "GDL_PATH=\"+${EROOT%/}/usr/share/gnudatalanguage\"" > 50gdl
+ doenvd 50gdl
+}
diff --git a/dev-lang/gdl/metadata.xml b/dev-lang/gdl/metadata.xml
new file mode 100644
index 000000000000..8b80e5e849de
--- /dev/null
+++ b/dev-lang/gdl/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <longdescription lang="en">
+ A free IDL (Interactive Data Language) compatible incremental compiler
+ (ie. runs IDL programs). IDL is a registered trademark of ITT Visual
+ Information Solutions.
+</longdescription>
+ <use>
+ <flag name="eigen">Build matrix manipulation with <pkg>dev-cpp/eigen</pkg></flag>
+ <flag name="hdf">Add support for the Hierarchical Data Format v.4</flag>
+ <flag name="gshhs">Add support for projection adn continent maps with <pkg>sci-geosciences/gshhs-data</pkg></flag>
+ <flag name="grib">Add support for the meteorological GRIB format with <pkg>sci-libs/grib_api</pkg></flag>
+ <flag name="proj">Add support for <pkg>sci-libs/proj</pkg> (geographic projections)</flag>
+ <flag name="udunits">Add support for manipulating units of physical quantities</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">gnudatalanguage</remote-id>
+ </upstream>
+</pkgmetadata>