diff --git a/.gitignore b/.gitignore index 0326331..52c9906 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ gdl-0.9rc4.tar.gz /gdl-0.9.tar.gz /gdl-0.9.1.tar.gz +/gdl-0.9.2.tar.gz diff --git a/gdl-0.9rc3-antlr.patch b/gdl-0.9rc3-antlr.patch deleted file mode 100644 index e325dd1..0000000 --- a/gdl-0.9rc3-antlr.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- gdl-0.9rc3/configure.antlr 2009-09-11 10:04:09.000000000 -0600 -+++ gdl-0.9rc3/configure 2009-10-15 11:11:06.707875846 -0600 -@@ -23525,7 +23525,7 @@ - - - --ac_config_files="$ac_config_files Makefile src/Makefile src/antlr/Makefile" -+ac_config_files="$ac_config_files Makefile src/Makefile" - - - cat >confcache <<\_ACEOF -@@ -24130,7 +24130,6 @@ - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; -- "src/antlr/Makefile") CONFIG_FILES="$CONFIG_FILES src/antlr/Makefile" ;; - - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 - echo "$as_me: error: invalid argument: $ac_config_target" >&2;} ---- gdl-0.9rc3/src/Makefile.in.antlr 2009-09-11 10:04:09.000000000 -0600 -+++ gdl-0.9rc3/src/Makefile.in 2009-10-15 11:10:12.689817337 -0600 -@@ -55,7 +55,7 @@ - libLTLIBRARIES_INSTALL = $(INSTALL) - LTLIBRARIES = $(lib_LTLIBRARIES) - @BUILDASLIBRARY_TRUE@libgdl_la_DEPENDENCIES = \ --@BUILDASLIBRARY_TRUE@ $(top_builddir)/src/antlr/libantlr.la -+@BUILDASLIBRARY_TRUE@ -lantlr - am__libgdl_la_SOURCES_DIST = accessdesc.hpp arrayindex.hpp \ - assocdata.cpp assocdata.hpp basegdl.hpp basic_fun_cl.cpp \ - basic_fun_cl.hpp basic_fun.cpp basic_fun.hpp basic_fun_jmg.cpp \ -@@ -236,7 +236,7 @@ - @BUILDASLIBRARY_FALSE@ gdl-gdl.$(OBJEXT) - gdl_OBJECTS = $(am_gdl_OBJECTS) - @BUILDASLIBRARY_FALSE@gdl_DEPENDENCIES = \ --@BUILDASLIBRARY_FALSE@ $(top_builddir)/src/antlr/libantlr.a -+@BUILDASLIBRARY_FALSE@ -lantlr - gdl_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(gdl_CXXFLAGS) $(CXXFLAGS) \ - $(gdl_LDFLAGS) $(LDFLAGS) -o $@ -@@ -395,7 +395,6 @@ - - # set the include path found by configure - INCLUDES = $(EXT_INCLUDES) $(all_includes) --SUBDIRS = antlr - noinst_HEADERS = gdlwidget.hpp prognode.hpp prognodeexpr.hpp - cpp_hpp_files = accessdesc.hpp arrayindex.hpp assocdata.cpp assocdata.hpp \ - basegdl.hpp basic_fun_cl.cpp basic_fun_cl.hpp basic_fun.cpp basic_fun.hpp \ -@@ -442,7 +441,7 @@ - @BUILDASLIBRARY_FALSE@gdl_CXXFLAGS = $(AM_CXXFLAGS) - # the library search path. - @BUILDASLIBRARY_FALSE@gdl_LDFLAGS = $(all_libraries) --@BUILDASLIBRARY_FALSE@gdl_LDADD = $(top_builddir)/src/antlr/libantlr.a -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 -+@BUILDASLIBRARY_FALSE@gdl_LDADD = -lantlr -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 - - # build as library (for python module) - @BUILDASLIBRARY_TRUE@lib_LTLIBRARIES = libgdl.la -@@ -452,7 +451,7 @@ - # netCDF and HDF define some same symbols - # hence -z muldefs has to be passed to the linker - @BUILDASLIBRARY_TRUE@@DARWIN_TRUE@libgdl_la_LDFLAGS = $(all_libraries) -Wl,-m --@BUILDASLIBRARY_TRUE@libgdl_la_LIBADD = $(top_builddir)/src/antlr/libantlr.la -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 -+@BUILDASLIBRARY_TRUE@libgdl_la_LIBADD = -lantlr -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 - all: all-recursive - - .SUFFIXES: diff --git a/gdl-0.9rc4-antlr-auto.patch b/gdl-0.9rc4-antlr-auto.patch deleted file mode 100644 index 18179e2..0000000 --- a/gdl-0.9rc4-antlr-auto.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -up gdl-0.9rc4/configure.in.antlr-auto gdl-0.9rc4/configure.in ---- gdl-0.9rc4/configure.in.antlr-auto 2010-02-03 15:33:19.000000000 -0700 -+++ gdl-0.9rc4/configure.in 2010-02-03 15:34:22.271329291 -0700 -@@ -988,7 +988,7 @@ dnl AC_CHECK_FUNCS(strdup strtod strtol - dnl perform program name transformation - dnl AC_ARG_PROGRAM - --AC_CONFIG_FILES(Makefile src/Makefile src/antlr/Makefile src/pro/Makefile src/pro/dicom/Makefile testsuite/Makefile doc/Makefile) -+AC_CONFIG_FILES(Makefile src/Makefile src/pro/Makefile src/pro/dicom/Makefile testsuite/Makefile doc/Makefile) - AC_OUTPUT - - dnl == summary table ======================================= -diff -up gdl-0.9rc4/src/Makefile.am.antlr-auto gdl-0.9rc4/src/Makefile.am ---- gdl-0.9rc4/src/Makefile.am.antlr-auto 2010-02-02 11:13:51.000000000 -0700 -+++ gdl-0.9rc4/src/Makefile.am 2010-02-03 15:34:48.470350773 -0700 -@@ -1,6 +1,6 @@ - # set the include path found by configure - INCLUDES = $(EXT_INCLUDES) $(all_includes) --SUBDIRS = antlr pro -+SUBDIRS = pro - noinst_HEADERS = gdlwidget.hpp prognode.hpp prognodeexpr.hpp - - cpp_hpp_files = accessdesc.hpp arrayindex.hpp assocdata.cpp assocdata.hpp \ -@@ -56,7 +56,7 @@ gdl_SOURCES = $(cpp_hpp_files) gdl.cpp - gdl_CXXFLAGS = $(AM_CXXFLAGS) - # the library search path. - gdl_LDFLAGS = $(all_libraries) --gdl_LDADD = $(top_builddir)/src/antlr/libantlr.a -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 -+gdl_LDADD = -lantlr -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 - endif - - # build as library (for python module) -@@ -72,6 +72,6 @@ else - libgdl_la_LDFLAGS = $(all_libraries) -Wl,-z,muldefs - endif - --libgdl_la_LIBADD = $(top_builddir)/src/antlr/libantlr.la -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 -+libgdl_la_LIBADD = -lantlr -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 - endif - diff --git a/gdl-setopt.patch b/gdl-setopt.patch deleted file mode 100644 index 83a2ef8..0000000 --- a/gdl-setopt.patch +++ /dev/null @@ -1,87 +0,0 @@ -diff -up gdl-0.9.1/src/deviceps.hpp.setopt gdl-0.9.1/src/deviceps.hpp ---- gdl-0.9.1/src/deviceps.hpp.setopt 2010-10-17 07:22:20.000000000 -0600 -+++ gdl-0.9.1/src/deviceps.hpp 2011-08-18 14:56:38.317009205 -0600 -@@ -60,14 +60,14 @@ class DevicePS: public Graphics - if (XPageSize != 0. && YPageSize == 0.) {a=XPageSize/16.5*540/720; scale=1.;} - char as[32]; - sprintf(as, "%f",a); -- actStream->SetOpt( "a", as); // this necessary to keep labels from looking stretched (plplot bug) -+ actStream->setopt( "a", as); // this necessary to keep labels from looking stretched (plplot bug) - // but plrender -a is also buggy: aspect ratios are not exactly correct - xleng=static_cast(floor(scale*540. +0.5)); - yleng=static_cast(floor(scale*720. +0.5)); - // setting this without plrender -a makes the labels stretched (plplot bug) - actStream->spage( xp, yp, xleng, yleng, xoff, yoff); - -- actStream->SetOpt( "ori","1"); // portrait (upright) -+ actStream->setopt( "ori","1"); // portrait (upright) - - // no pause on destruction - actStream->spause( false); -@@ -84,8 +84,8 @@ class DevicePS: public Graphics - - // default: black+white (IDL behaviour) - //actStream->scolor( color); // has no effect -- if (color == 0) { actStream->SetOpt( "drvopt","text=0,color=0"); } -- else { actStream->SetOpt( "drvopt","text=0,color=1");} -+ if (color == 0) { actStream->setopt( "drvopt","text=0,color=0"); } -+ else { actStream->setopt( "drvopt","text=0,color=1");} - color=0; - - actStream->Init(); -diff -up gdl-0.9.1/src/devicesvg.hpp.setopt gdl-0.9.1/src/devicesvg.hpp ---- gdl-0.9.1/src/devicesvg.hpp.setopt 2010-01-28 12:15:05.000000000 -0700 -+++ gdl-0.9.1/src/devicesvg.hpp 2011-08-18 14:51:35.030990927 -0600 -@@ -55,7 +55,7 @@ class DeviceSVG : public Graphics - // actStream->scmap0( r, g, b, ctSize); - actStream->scmap1( r, g, b, ctSize); - -- actStream->SetOpt( "drvopt","text_clipping=1"); // clear drvopt -+ actStream->setopt( "drvopt","text_clipping=1"); // clear drvopt - - actStream->Init(); - -diff -up gdl-0.9.1/src/devicewin.hpp.setopt gdl-0.9.1/src/devicewin.hpp ---- gdl-0.9.1/src/devicewin.hpp.setopt 2010-01-28 12:15:05.000000000 -0700 -+++ gdl-0.9.1/src/devicewin.hpp 2011-08-18 14:51:15.992680297 -0600 -@@ -214,10 +214,10 @@ public: - static char buf[ 256]; - strncpy( buf, title.c_str(), 255); - buf[ 255] = 0; -- winList[ wIx]->SetOpt( "plwindow", buf); -+ winList[ wIx]->setopt( "plwindow", buf); - - // we want color (and the driver options need to be overwritten) -- winList[ wIx]->SetOpt( "drvopt","color=1"); -+ winList[ wIx]->setopt( "drvopt","color=1"); - - // set color map - PLINT r[ctSize], g[ctSize], b[ctSize]; -diff -up gdl-0.9.1/src/devicex.hpp.setopt gdl-0.9.1/src/devicex.hpp ---- gdl-0.9.1/src/devicex.hpp.setopt 2011-03-28 11:28:48.000000000 -0600 -+++ gdl-0.9.1/src/devicex.hpp 2011-08-18 14:51:23.603404716 -0600 -@@ -431,10 +431,10 @@ public: - static char buf[ 256]; - strncpy( buf, title.c_str(), 255); - buf[ 255] = 0; -- winList[ wIx]->SetOpt( "plwindow", buf); -+ winList[ wIx]->setopt( "plwindow", buf); - - // we use our own window handling -- winList[ wIx]->SetOpt( "drvopt","usepth=0"); -+ winList[ wIx]->setopt( "drvopt","usepth=0"); - - // set color map - PLINT r[ctSize], g[ctSize], b[ctSize]; -diff -up gdl-0.9.1/src/devicez.hpp.setopt gdl-0.9.1/src/devicez.hpp ---- gdl-0.9.1/src/devicez.hpp.setopt 2010-01-28 12:15:05.000000000 -0700 -+++ gdl-0.9.1/src/devicez.hpp 2011-08-18 14:51:39.148841821 -0600 -@@ -129,7 +129,7 @@ class DeviceZ: public Graphics - { r[ i] = g[ i] = b[ i] = i;} - actStream->scmap1( r, g, b, ctSize); - -- actStream->SetOpt( "drvopt","text=0"); // clear drvopt -+ actStream->setopt( "drvopt","text=0"); // clear drvopt - - actStream->Init(); - diff --git a/gdl-shared.patch b/gdl-shared.patch new file mode 100644 index 0000000..d838156 --- /dev/null +++ b/gdl-shared.patch @@ -0,0 +1,11 @@ +--- gdl-0.9.2/src/Makefile.am.shared 2011-11-09 12:49:19.552936409 -0700 ++++ gdl-0.9.2/src/Makefile.am 2011-11-11 16:09:57.795281527 -0700 +@@ -75,7 +75,7 @@ + if DARWIN + libgdl_la_LDFLAGS = $(all_libraries) -Wl,-m + else +-libgdl_la_LDFLAGS = $(all_libraries) -Wl,-z,muldefs ++libgdl_la_LDFLAGS = -rpath $(libdir) $(all_libraries) -Wl,-z,muldefs + endif + + libgdl_la_LIBADD = -lantlr -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 diff --git a/gdl-string.patch b/gdl-string.patch deleted file mode 100644 index 0525a6e..0000000 --- a/gdl-string.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -up gdl-0.9.1/src/gdlgstream.cpp.includes gdl-0.9.1/src/gdlgstream.cpp ---- gdl-0.9.1/src/gdlgstream.cpp.includes 2010-11-17 00:24:55.000000000 -0700 -+++ gdl-0.9.1/src/gdlgstream.cpp 2011-08-18 13:17:08.547167104 -0600 -@@ -201,7 +201,7 @@ const char * GDLGStream::TranslateFormat - // skip conversion if the string is empty - if (len == 0) return in; - -- const string fonts[] = { -+ const std::string fonts[] = { - "#fn", // !0 : unused - "#fn", // !1 : unused - "#fn", // !2 : unused -@@ -240,7 +240,7 @@ const char * GDLGStream::TranslateFormat - int curr_lev = 0; // (incremented with #u, decremented with #d) - int curr_pos = 0; // (current position in string) - int save_pos = 0; // (position in string used in !S/!R save/restore) -- string out = string(""); -+ std::string out = std::string(""); - - for (size_t i = 0; i < len; i++) { - if (in[i] == '!' && in[i + 1] != '!') -diff -up gdl-0.9.1/src/gdlgstream.hpp.includes gdl-0.9.1/src/gdlgstream.hpp ---- gdl-0.9.1/src/gdlgstream.hpp.includes 2010-06-11 09:09:51.000000000 -0600 -+++ gdl-0.9.1/src/gdlgstream.hpp 2011-08-18 13:10:41.285235153 -0600 -@@ -50,7 +50,7 @@ public: - { - // std::cerr << "GDLGStream()" << std::endl; - if (!checkPlplotDriver(driver)) -- ThrowGDLException(string("PLplot installation lacks the requested driver: ") + driver); -+ ThrowGDLException(std::string("PLplot installation lacks the requested driver: ") + driver); - } - - virtual ~GDLGStream() -@@ -103,7 +103,7 @@ if( devNames.empty())// == NULL) - - // devNames = new std::vector( numdevs_plus_one - 1); - for( int i = 0; i < numdevs_plus_one - 1; ++i) -- devNames.push_back(string(devnames[ i])); -+ devNames.push_back(std::string(devnames[ i])); - - free(devnames); - } -@@ -111,7 +111,7 @@ if( devNames.empty())// == NULL) - // for debug - std::vector devnamesDbg = devNames; - --return std::find( devNames.begin(), devNames.end(), string( driver)) != devNames.end(); -+return std::find( devNames.begin(), devNames.end(), std::string( driver)) != devNames.end(); - - // checking if a given driver is in the list - // bool supported = false; diff --git a/gdl-strsplit.patch b/gdl-strsplit.patch deleted file mode 100644 index 01b5ddd..0000000 --- a/gdl-strsplit.patch +++ /dev/null @@ -1,94 +0,0 @@ ---- gdl-0.9.1/src/pro/strsplit.pro 2010-10-15 18:19:37.000000000 -0600 -+++ gdl/src/pro/strsplit.pro 2011-08-18 10:54:44.103069143 -0600 -@@ -14,8 +14,11 @@ - ; 30-Jun-2009 : Alain Coulais : will allow 1D string : 'string' and ['string'] - ; 14-Apr-2010 : Alain Coulais : complete re-writing - ; Jun-2010 : Lea Noreskal : /preserve_null and other improvments --; 15-Oct-2010 : Alain Coulais : bug in COUNT, activating no --; exclusive keywords, better managment of (missing/void) inputs -+; 15-Oct-2010 : Alain Coulais : bug in COUNT, -+; activating no exclusive keywords, -+; better managment of (missing/void) inputs -+; 11-Aug-2011 : Alain Coulais : solving conflits due to -+; /preserve_null and /regex; curing bugs in special cases - ; - ; LICENCE: - ; Copyright (C) -@@ -108,17 +111,20 @@ - ; When no Pattern is provided, default pattern is white space (' ') - ; - short_cut=0 -+; - if (STRLEN(local_input1) EQ 0) then begin - short_cut=1 -- resu='' -+ if KEYWORD_SET(extract) then resu='' else resu=0 - endif - if (N_PARAMS() EQ 2) then begin - if (STRLEN(input2) EQ 0) then begin - short_cut=1 -- resu='' -+ if KEYWORD_SET(extract) then resu='' else resu=0 - endif - endif - ; -+; When no Pattern is provided, default pattern is white space (' ') -+; - if ((short_cut EQ 0) AND (N_PARAMS() EQ 1)) then begin - resu=STRTOK(local_input1, extract=extract, preserve_null=preserve_null) - endif -@@ -126,8 +132,9 @@ - if ((short_cut EQ 0) AND (N_PARAMS() EQ 2)) then begin - ;; - ;; AC 14-Oct-2010: may be not fully OK -- if KEYWORD_SET(regex) and ~KEYWORD_SET(preserve_null) then begin -- resu=STRTOK(local_input1, input2, extract=extract, REGEX=regex) -+ if KEYWORD_SET(regex) then begin -+ resu=STRTOK(local_input1, input2, extract=extract,$ -+ REGEX=regex, preserve_null=preserve_null) - endif else begin - resu=0 - beg=0 -@@ -143,17 +150,13 @@ - if KEYWORD_SET(extract) then begin - if (beg eq 1) then resu=[0,resu] - if N_ELEMENTS(resu) EQ 1 then begin -- - if (beg eq 0) then begin - resu=local_input1 - endif else begin - resu=STRMID(local_input1, resu[0]+1) - endelse -- -- endif else begin -- -+ endif else begin - sresu=STRARR(N_ELEMENTS(resu)) -- - if (beg eq 0) then begin - sresu[0]=STRMID(local_input1, 0, resu[1]) - endif else begin -@@ -168,12 +171,12 @@ - ;stop - resu=sresu - endelse -- -+ ;; - if NOT(KEYWORD_SET(preserve_null)) then begin - ok=WHERE(STRLEN(resu) GT 0, nb_ok) - if (nb_ok GT 0) then resu=resu[ok] else resu='' - endif -- -+ ;; going back to the case /extract not set - endif else begin - if N_ELEMENTS(resu) GT 1 then resu[1:*]=resu[1:*]+1 else resu=0 - if (beg EQ 1) then resu[0]=resu[0]+1 -@@ -209,6 +212,8 @@ - ; - if KEYWORD_SET(test) then STOP - ; -+if (SIZE(resu,/type) NE 7) then resu=LONG(resu) -+; - return, resu - ; - end diff --git a/gdl.spec b/gdl.spec index 094f3e8..bfb4800 100644 --- a/gdl.spec +++ b/gdl.spec @@ -1,8 +1,8 @@ %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: gdl -Version: 0.9.1 -Release: 4%{?dist} +Version: 0.9.2 +Release: 1%{?dist} Summary: GNU Data Language Group: Applications/Engineering @@ -14,14 +14,9 @@ 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 -Patch0: gdl-0.9rc3-antlr.patch -Patch1: gdl-0.9rc4-antlr-auto.patch -# Upstream patch to fix strsplit -Patch2: gdl-strsplit.patch -# Use std::string and add a missing #include -Patch3: gdl-string.patch -# Use plplot setopt instead of SetOpt -Patch4: gdl-setopt.patch +Patch1: gdl-antlr-auto.patch +# Force build of libgdl.so +Patch2: gdl-shared.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) #RHEL doesn't have the needed antlr version/headers, has old plplot @@ -85,12 +80,9 @@ Provides: %{name}-runtime = %{version}-%{release} %prep %setup -q -n %{name}-%{version} %if !0%{?rhel} -#patch0 -p1 -b .antlr %patch1 -p1 -b .antlr-auto %endif -%patch2 -p1 -b .strsplit -%patch3 -p1 -b .string -%patch4 -p1 -b .setopt +%patch2 -p1 -b .shared %if !0%{?rhel} rm -rf src/antlr %endif @@ -104,6 +96,7 @@ autoreconf --install --with-fftw \\\ --with-udunits \\\ --with-grib \\\ + --with-pslib=no \\\ --with-wxWidgets \\\ %{plplot_config} \\\ INCLUDES="-I%{_includedir}/udunits2" \\\ @@ -126,7 +119,7 @@ make %{?_smp_mflags} popd #Build the python module pushd build-python -%configure %{configure_opts} --enable-python_module +%configure %{configure_opts} --enable-python_module --with-hdf=no make %{?_smp_mflags} popd @@ -135,7 +128,7 @@ popd rm -rf $RPM_BUILD_ROOT pushd build make install DESTDIR=$RPM_BUILD_ROOT -rm -r $RPM_BUILD_ROOT%{_libdir} +#rm -r $RPM_BUILD_ROOT%{_libdir} popd # Install the python module @@ -175,6 +168,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Nov 11 2011 Orion Poplawski - 0.9.2-1 +- Update to 0.9.2 +- Drop upstreamed patches +- Drop hdf support from python module, add patch to force building of python + shared library + * Thu Aug 18 2011 Orion Poplawski - 0.9.1-4 - Rebuild for plplot 5.9.8 - Add upstream patch to fix strsplit and str_sep diff --git a/sources b/sources index 686137e..3cd7ffe 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -be576675aa1c37f0c1a2b1eb8889a960 gdl-0.9.1.tar.gz +7178304e6737a8dca910d2c1061ff63c gdl-0.9.2.tar.gz