[gdl] Rebuild for plplot 5.9.8 Add upstream patch to fix strsplit and str_sep
Orion Poplawski
orion at fedoraproject.org
Thu Aug 18 17:00:18 UTC 2011
commit f996f4e9b6cffefbfde67ef70dd1acbb1aa48d53
Author: Orion Poplawski <orion at cora.nwra.com>
Date: Thu Aug 18 11:00:06 2011 -0600
Rebuild for plplot 5.9.8
Add upstream patch to fix strsplit and str_sep
gdl-0.9rc4-wx-config.patch | 27 -------------
gdl-strsplit.patch | 94 ++++++++++++++++++++++++++++++++++++++++++++
gdl.spec | 17 ++++++--
3 files changed, 106 insertions(+), 32 deletions(-)
---
diff --git a/gdl-strsplit.patch b/gdl-strsplit.patch
new file mode 100644
index 0000000..01b5ddd
--- /dev/null
+++ b/gdl-strsplit.patch
@@ -0,0 +1,94 @@
+--- 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 ab36a26..1254025 100644
--- a/gdl.spec
+++ b/gdl.spec
@@ -2,7 +2,7 @@
Name: gdl
Version: 0.9.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: GNU Data Language
Group: Applications/Engineering
@@ -14,8 +14,10 @@ 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
-Patch4: gdl-0.9rc3-antlr.patch
-Patch5: gdl-0.9rc4-antlr-auto.patch
+Patch0: gdl-0.9rc3-antlr.patch
+Patch1: gdl-0.9rc4-antlr-auto.patch
+# Upstream patch to fix strsplit
+Patch2: gdl-strsplit.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#RHEL doesn't have the needed antlr version/headers, has old plplot
@@ -79,9 +81,10 @@ Provides: %{name}-runtime = %{version}-%{release}
%prep
%setup -q -n %{name}-%{version}
%if !0%{?rhel}
-#patch4 -p1 -b .antlr
-%patch5 -p1 -b .antlr-auto
+#patch0 -p1 -b .antlr
+%patch1 -p1 -b .antlr-auto
%endif
+%patch2 -p1 -b .strsplit
%if !0%{?rhel}
rm -rf src/antlr
%endif
@@ -166,6 +169,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Thu Aug 18 2011 Orion Poplawski <orion at cora.nwra.com> - 0.9.1-4
+- Rebuild for plplot 5.9.8
+- Add upstream patch to fix strsplit and str_sep
+
* Tue May 17 2011 Orion Poplawski <orion at cora.nwra.com> - 0.9.1-3
- Rebuild for hdf5 1.8.7
More information about the scm-commits
mailing list