Update to 0.9.7
This commit is contained in:
parent
a38d99d98f
commit
f133519c78
@ -1,7 +1,7 @@
|
||||
diff -up gdl-0.9.5/src/CMakeLists.txt.antlr gdl-0.9.5/src/CMakeLists.txt
|
||||
--- gdl-0.9.5/src/CMakeLists.txt.antlr 2014-10-07 09:24:59.389706766 -0600
|
||||
+++ gdl-0.9.5/src/CMakeLists.txt 2014-10-07 09:25:55.311423547 -0600
|
||||
@@ -262,9 +262,7 @@ widget.cpp
|
||||
diff -up gdl-0.9.7rc1-20161104/src/CMakeLists.txt.antlr gdl-0.9.7rc1-20161104/src/CMakeLists.txt
|
||||
--- gdl-0.9.7rc1-20161104/src/CMakeLists.txt.antlr 2016-10-19 15:14:13.000000000 -0600
|
||||
+++ gdl-0.9.7rc1-20161104/src/CMakeLists.txt 2016-11-04 16:03:32.618417108 -0600
|
||||
@@ -266,9 +266,7 @@ widget.cpp
|
||||
widget.hpp
|
||||
)
|
||||
|
||||
@ -11,8 +11,8 @@ diff -up gdl-0.9.5/src/CMakeLists.txt.antlr gdl-0.9.5/src/CMakeLists.txt
|
||||
+include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR})
|
||||
link_directories(${LINK_DIRECTORIES})
|
||||
|
||||
if(PYTHON_MODULE) #libgdl
|
||||
@@ -275,7 +273,6 @@ else(PYTHON_MODULE) #gdl
|
||||
if(PYTHON_MODULE) #GDL.so
|
||||
@@ -282,7 +280,6 @@ else(PYTHON_MODULE) #GDL.so
|
||||
add_executable(gdl ${SOURCES})
|
||||
endif(PYTHON_MODULE)
|
||||
|
52
gdl-array.patch
Normal file
52
gdl-array.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 965eb0af7a532740637c96ac31f7fc5d022d1953 Mon Sep 17 00:00:00 2001
|
||||
From: Gilles Duvert <gilles-duvert@users.sourceforge.net>
|
||||
Date: Tue, 24 Jan 2017 10:05:41 +0000
|
||||
Subject: [PATCH] reverted to previous version since correction of bug#709 was
|
||||
making a mess with array dimensions.
|
||||
|
||||
---
|
||||
src/accessdesc.hpp | 3 ++-
|
||||
src/dimension.hpp | 16 +++++++++-------
|
||||
2 files changed, 11 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/accessdesc.hpp b/src/accessdesc.hpp
|
||||
index 0309d11..b4d78a9 100644
|
||||
--- a/src/accessdesc.hpp
|
||||
+++ b/src/accessdesc.hpp
|
||||
@@ -317,7 +317,8 @@ class DotAccessDescT
|
||||
// dim >> topDim;
|
||||
dim >> ix[d]->GetDim();
|
||||
}
|
||||
- dim.Purge();
|
||||
+// Was added to solve bug 709 but may have side effects.
|
||||
+// dim.Purge();
|
||||
}
|
||||
|
||||
private:
|
||||
diff --git a/src/dimension.hpp b/src/dimension.hpp
|
||||
index 6469648..1345ff5 100644
|
||||
--- a/src/dimension.hpp
|
||||
+++ b/src/dimension.hpp
|
||||
@@ -378,13 +378,15 @@ class dimension
|
||||
// throw away unused ranks (ie. ranks == 1)
|
||||
void Purge()
|
||||
{
|
||||
- //old version: produce bug #709
|
||||
-// for(; rank>1 && dim[rank-1] <= 1; --rank);
|
||||
- int m=rank-1;
|
||||
- for (; m>0; --m) if (dim[m]<=1) {
|
||||
- for (int j=m; j<rank-1; ++j) dim[j]=dim[j+1];
|
||||
- rank--;
|
||||
- }
|
||||
+ //The following line produces bug #709
|
||||
+ for(; rank>1 && dim[rank-1] <= 1; --rank);
|
||||
+// However those following lines are too strict: test=fltarr(1, 1, 114) & help,test
|
||||
+// gives: TEST FLOAT = Array[1, 114] instead of good answer TEST FLOAT = Array[1, 1, 114]
|
||||
+// int m=rank-1;
|
||||
+// for (; m>0; --m) if (dim[m]<=1) {
|
||||
+// for (int j=m; j<rank-1; ++j) dim[j]=dim[j+1];
|
||||
+// rank--;
|
||||
+// }
|
||||
}
|
||||
|
||||
// set the rank to r (pads 1s) if it is smaller than r
|
20
gdl-cxx11thread.patch
Normal file
20
gdl-cxx11thread.patch
Normal file
@ -0,0 +1,20 @@
|
||||
Author: Ole Streicher <olebole@debian.org>
|
||||
Description: Fix problems in the release candidate.
|
||||
--- a/src/dinterpreter.cpp
|
||||
+++ b/src/dinterpreter.cpp
|
||||
@@ -1270,7 +1270,14 @@
|
||||
void *inputThread(void*) {
|
||||
#endif
|
||||
while (1) {
|
||||
- char ch = getchar(); if (ch==EOF) return NULL;
|
||||
+ char ch = getchar();
|
||||
+ if (ch==EOF) {
|
||||
+#ifdef HAVE_CXX11THREAD
|
||||
+ return;
|
||||
+#else
|
||||
+ return NULL;
|
||||
+#endif
|
||||
+ }
|
||||
inputstr += ch;
|
||||
if (ch == '\n')
|
||||
break;
|
@ -1,13 +0,0 @@
|
||||
Author: Ole Streicher <olebole@debian.org>
|
||||
Description: Remove trailing slash at the end of dir when moving files specified by wildcard
|
||||
--- 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
|
||||
|
@ -1,111 +0,0 @@
|
||||
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
|
||||
;
|
@ -18,14 +18,3 @@ diff -up gdl-0.9.6/src/specializations.hpp.gcc6 gdl-0.9.6/src/specializations.hp
|
||||
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;
|
||||
|
48
gdl.spec
48
gdl.spec
@ -1,26 +1,20 @@
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
|
||||
Name: gdl
|
||||
Version: 0.9.6
|
||||
Release: 10%{?dist}
|
||||
Version: 0.9.7
|
||||
Release: 1%{?dist}
|
||||
Summary: GNU Data Language
|
||||
|
||||
Group: Applications/Engineering
|
||||
License: GPLv2+
|
||||
URL: http://gnudatalanguage.sourceforge.net/
|
||||
Source0: http://downloads.sourceforge.net/gnudatalanguage/%{name}-%{version}v2.tgz
|
||||
Source0: http://downloads.sourceforge.net/gnudatalanguage/%{name}-%{version}.tgz
|
||||
Source1: gdl.csh
|
||||
Source2: gdl.sh
|
||||
Source3: makecvstarball
|
||||
# Build with system antlr library. Request for upstream change here:
|
||||
# https://sourceforge.net/tracker/index.php?func=detail&aid=2685215&group_id=97659&atid=618686
|
||||
Patch1: gdl-0.9-antlr-cmake.patch
|
||||
# Fix file_move test
|
||||
# https://sourceforge.net/p/gnudatalanguage/patches/97/
|
||||
Patch2: gdl-file_move.patch
|
||||
# Fix test_formats
|
||||
# https://sourceforge.net/p/gnudatalanguage/bugs/684/
|
||||
Patch3: gdl-formats.patch
|
||||
Patch1: gdl-antlr.patch
|
||||
# Fix problem with arra generation
|
||||
Patch2: gdl-array.patch
|
||||
# Fix build with gcc 6
|
||||
# https://sourceforge.net/p/gnudatalanguage/bugs/686/
|
||||
# https://sourceforge.net/p/gnudatalanguage/bugs/688/
|
||||
@ -45,7 +39,7 @@ BuildRequires: java
|
||||
BuildRequires: readline-devel, ncurses-devel
|
||||
BuildRequires: gsl-devel, plplot-devel, GraphicsMagick-c++-devel
|
||||
BuildRequires: netcdf-devel, hdf5-devel, libjpeg-devel
|
||||
BuildRequires: python-devel, numpy, python-matplotlib
|
||||
BuildRequires: python2-devel, numpy, python-matplotlib
|
||||
BuildRequires: fftw-devel, hdf-static
|
||||
%if 0%{?fedora} >= 21
|
||||
BuildRequires: grib_api-devel
|
||||
@ -58,6 +52,11 @@ BuildRequires: eigen3-static
|
||||
#TODO - Build with mpi support
|
||||
#BuildRequires: mpich2-devel
|
||||
BuildRequires: pslib-devel
|
||||
# qhull too old on EPEL7
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
BuildRequires: qhull-devel
|
||||
%global cmake_qhull -DQHULL=ON
|
||||
%endif
|
||||
BuildRequires: udunits2-devel
|
||||
BuildRequires: wxGTK-devel
|
||||
BuildRequires: cmake
|
||||
@ -103,11 +102,10 @@ Provides: %{name}-runtime = %{version}-%{release}
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q -n %{name}-%{version}
|
||||
rm -rf src/antlr
|
||||
%patch1 -p1 -b .antlr
|
||||
%patch2 -p1 -b .file_move
|
||||
%patch3 -p1 -b .formats
|
||||
%patch2 -p1 -b .array
|
||||
%patch4 -p1 -b .gcc6
|
||||
|
||||
pushd src
|
||||
@ -123,6 +121,7 @@ popd
|
||||
-DUDUNITS_INCLUDE_DIR=%{_includedir}/udunits2 \\\
|
||||
-DGRIB=ON \\\
|
||||
-DOPENMP=ON \\\
|
||||
%{?cmake_qhull} \\\
|
||||
%{nil}
|
||||
# TODO - build an mpi version
|
||||
# INCLUDES="-I/usr/include/mpich2" \
|
||||
@ -140,7 +139,7 @@ make %{?_smp_mflags}
|
||||
popd
|
||||
#Build the python module
|
||||
pushd build-python
|
||||
%{cmake} %{cmake_opts} -DPYTHON_MODULE=ON -DPYTHON_VERSION=%{python_version} ..
|
||||
%{cmake} %{cmake_opts} -DPYTHON_MODULE=ON -DPYTHON_VERSION=%{python2_version} ..
|
||||
make %{?_smp_mflags}
|
||||
popd
|
||||
|
||||
@ -151,10 +150,9 @@ make install DESTDIR=$RPM_BUILD_ROOT
|
||||
popd
|
||||
pushd build-python
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
# Install the python module
|
||||
install -d -m 0755 $RPM_BUILD_ROOT/%{python_sitearch}
|
||||
cp -p src/libgdl.so \
|
||||
$RPM_BUILD_ROOT/%{python_sitearch}/GDL.so
|
||||
# Install the python module in the right location
|
||||
install -d -m 0755 $RPM_BUILD_ROOT/%{python2_sitearch}
|
||||
mv $RPM_BUILD_ROOT%{_prefix}/lib/site-python/GDL.so $RPM_BUILD_ROOT%{python2_sitearch}/GDL.so
|
||||
popd
|
||||
|
||||
# Install the profile file to set GDL_PATH
|
||||
@ -176,7 +174,7 @@ cd build
|
||||
cat > xrun.sh <<'EOF'
|
||||
metacity &
|
||||
sleep 2
|
||||
failing_tests='test_(bug_(3275334|3285659)|routine_names|sem|window_background)'
|
||||
failing_tests='test_(bug_3275334|sem|window_background)'
|
||||
%ifarch aarch64 ppc
|
||||
# test_fix fails currently on arm
|
||||
# https://sourceforge.net/p/gnudatalanguage/bugs/622/
|
||||
@ -199,7 +197,6 @@ xvfb-run ./xrun.sh
|
||||
|
||||
|
||||
%files
|
||||
%{!?_licensedir:%global license %doc}
|
||||
%license COPYING
|
||||
%doc AUTHORS ChangeLog HACKING NEWS README TODO
|
||||
%config(noreplace) %{_sysconfdir}/profile.d/gdl.*sh
|
||||
@ -210,10 +207,13 @@ xvfb-run ./xrun.sh
|
||||
%{_datadir}/gnudatalanguage/
|
||||
|
||||
%files python
|
||||
%{python_sitearch}/GDL.so
|
||||
%{python2_sitearch}/GDL.so
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Feb 1 2017 Orion Poplawski <orion@cora.nwra.com> - 0.9.7-1
|
||||
- Update to 0.9.7
|
||||
|
||||
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.9.6-10
|
||||
- Rebuild for readline 7.x
|
||||
|
||||
|
@ -1,9 +1,5 @@
|
||||
#!/bin/sh
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
date=$1
|
||||
else
|
||||
date=`date +%Y%m%d`
|
||||
fi
|
||||
cvs -z3 -d :pserver:anonymous@gnudatalanguage.cvs.sourceforge.net:/cvsroot/gnudatalanguage export -D ${date} -d gdl-0.9rc4-${date} gdl
|
||||
tar cjf gdl-0.9rc4-${date}.tar.bz2 gdl-0.9rc4-${date}
|
||||
ver=$1
|
||||
date=`date +%Y%m%d`
|
||||
cvs -z3 -d :pserver:anonymous@gnudatalanguage.cvs.sourceforge.net:/cvsroot/gnudatalanguage export -D ${date} -d gdl-${ver}-${date} gdl
|
||||
tar caf gdl-${ver}-${date}.tar.xz gdl-${ver}-${date}
|
||||
|
Loading…
Reference in New Issue
Block a user