From 0901f2e76041f1f629de88730584a8b6cab92c80 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Tue, 12 Jan 2016 17:02:18 -0700 Subject: [PATCH] Update to 0.9.6 - Drop setting -DH5_USE_16_API and -fPIC - Drop plplot patch applied upstream - Add patch to fix file_move test - Run tests with Xvfb and metacity - Use %license --- .gitignore | 2 + gdl-file_move.patch | 13 +++++ gdl-formats.patch | 111 ++++++++++++++++++++++++++++++++++++ gdl-plplot.patch | 134 -------------------------------------------- gdl.spec | 59 +++++++++++++------ sources | 2 +- 6 files changed, 168 insertions(+), 153 deletions(-) create mode 100644 gdl-file_move.patch create mode 100644 gdl-formats.patch delete mode 100644 gdl-plplot.patch diff --git a/.gitignore b/.gitignore index 9e26e65..19f061e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ gdl-0.9rc4.tar.gz /gdl-0.9.3.tar.gz /gdl-0.9.4.tar.gz /gdl-0.9.5.tar.gz +/gdl-0.9.6.tar.gz +/gdl-0.9.6v2.tgz diff --git a/gdl-file_move.patch b/gdl-file_move.patch new file mode 100644 index 0000000..ac2eb7a --- /dev/null +++ b/gdl-file_move.patch @@ -0,0 +1,13 @@ +Author: Ole Streicher +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 + diff --git a/gdl-formats.patch b/gdl-formats.patch new file mode 100644 index 0000000..105fa9c --- /dev/null +++ b/gdl-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 <>" ++; 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 <>" +- if ~FILE_TEST("formats.fl") then MESSAGE, /cont, "missing file <>" +- 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 <>" else soft='fl' ++ if ~FILE_TEST(file_fmt_gdl) then MESSAGE, /cont, "missing file <>" 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/gdl-plplot.patch b/gdl-plplot.patch deleted file mode 100644 index 70ad1bd..0000000 --- a/gdl-plplot.patch +++ /dev/null @@ -1,134 +0,0 @@ -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 -+ 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(( *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 && iN_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/gdl.spec b/gdl.spec index e9b3290..f08adc9 100644 --- a/gdl.spec +++ b/gdl.spec @@ -1,23 +1,26 @@ %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: gdl -Version: 0.9.5 -Release: 10%{?dist} +Version: 0.9.6 +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}.tar.gz +Source0: http://downloads.sourceforge.net/gnudatalanguage/%{name}-%{version}v2.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 -# Add plplot 5.11.0 support -# https://sourceforge.net/p/gnudatalanguage/bugs/643/ -Patch2: gdl-plplot.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 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -54,6 +57,9 @@ BuildRequires: pslib-devel BuildRequires: udunits2-devel BuildRequires: wxGTK-devel BuildRequires: cmake +# For tests +BuildRequires: xorg-x11-server-Xvfb +BuildRequires: metacity # Needed to pull in drivers Requires: plplot Requires: %{name}-common = %{version}-%{release} @@ -96,7 +102,9 @@ Provides: %{name}-runtime = %{version}-%{release} %setup -q rm -rf src/antlr %patch1 -p1 -b .antlr -%patch2 -p1 -b .plplot +%patch2 -p1 -b .file_move +%patch3 -p1 -b .formats + pushd src for f in *.g do @@ -116,10 +124,9 @@ popd # --with-mpich=%{_libdir}/mpich2 \ %build -export CPPFLAGS="-DH5_USE_16_API" # Build convenience .a libraries with -fPIC -export CFLAGS="$RPM_OPT_FLAGS -fPIC" -export CXXFLAGS="$RPM_OPT_FLAGS -fPIC" +#export CFLAGS="$RPM_OPT_FLAGS -fPIC" +#export CXXFLAGS="$RPM_OPT_FLAGS -fPIC" mkdir build build-python #Build the standalone executable pushd build @@ -134,7 +141,6 @@ popd %install -rm -rf $RPM_BUILD_ROOT pushd build make install DESTDIR=$RPM_BUILD_ROOT popd @@ -154,25 +160,34 @@ install -m 0644 %SOURCE2 $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d %check cd build -# test_execute expects to use DISPLAY +# test_bug_3275334 and window_background appear to need to read from display # test_bug_3147146 failure # https://sourceforge.net/p/gnudatalanguage/bugs/619/ +# test_bug_3285659 failure +# https://sourceforge.net/p/gnudatalanguage/bugs/387/ +# test_routine_names failure +# https://sourceforge.net/p/gnudatalanguage/bugs/647/ # test_zip - https://sourceforge.net/p/gnudatalanguage/bugs/632/ +cat > xrun.sh < - 0.9.6-1 +- Update to 0.9.6 +- Drop setting -DH5_USE_16_API and -fPIC +- Drop plplot patch applied upstream +- Add patch to fix file_move test +- Run tests with Xvfb and metacity +- Use %%license + * Sun Oct 04 2015 Rex Dieter - 0.9.5-10 - rebuild (GraphicsMagick) diff --git a/sources b/sources index 7c0f279..f1c7404 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2d02283c544820729479a57545d5b599 gdl-0.9.5.tar.gz +6e97c4b005c1850e4b844fd3b8d96098 gdl-0.9.6v2.tgz