Add patch to change plplot SetOpt to setopt
This commit is contained in:
parent
0b059af847
commit
4e598952f3
87
gdl-setopt.patch
Normal file
87
gdl-setopt.patch
Normal file
@ -0,0 +1,87 @@
|
||||
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<PLINT>(floor(scale*540. +0.5));
|
||||
yleng=static_cast<PLINT>(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();
|
||||
|
4
gdl.spec
4
gdl.spec
@ -20,6 +20,8 @@ Patch1: gdl-0.9rc4-antlr-auto.patch
|
||||
Patch2: gdl-strsplit.patch
|
||||
# Use std::string and add a missing #include <string>
|
||||
Patch3: gdl-string.patch
|
||||
# Use plplot setopt instead of SetOpt
|
||||
Patch4: gdl-setopt.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
#RHEL doesn't have the needed antlr version/headers, has old plplot
|
||||
@ -88,6 +90,7 @@ Provides: %{name}-runtime = %{version}-%{release}
|
||||
%endif
|
||||
%patch2 -p1 -b .strsplit
|
||||
%patch3 -p1 -b .string
|
||||
%patch4 -p1 -b .setopt
|
||||
%if !0%{?rhel}
|
||||
rm -rf src/antlr
|
||||
%endif
|
||||
@ -176,6 +179,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
- Rebuild for plplot 5.9.8
|
||||
- Add upstream patch to fix strsplit and str_sep
|
||||
- Add patch to fix compile issues with string
|
||||
- Add patch to change plplot SetOpt to setopt
|
||||
|
||||
* Tue May 17 2011 Orion Poplawski <orion@cora.nwra.com> - 0.9.1-3
|
||||
- Rebuild for hdf5 1.8.7
|
||||
|
Loading…
Reference in New Issue
Block a user