[kst] s/qt-devel/qt4-devel/
Rex Dieter
rdieter at fedoraproject.org
Tue Mar 19 13:05:03 UTC 2013
commit 9ebbefddc5aef29e6671e92b1011b96aaae19871
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Tue Mar 19 08:04:40 2013 -0500
s/qt-devel/qt4-devel/
- drop extraneous buildrequires
- fix build on arm
- use build options: -Dkst_release=1 -Dkst_verbose=1
kst-2.0.6-fix-qreal-vs-double-for-arm.patch | 85 +++++++++++++++++++++++++++
kst-except.diff | 12 ----
kst.spec | 22 ++++++-
3 files changed, 103 insertions(+), 16 deletions(-)
---
diff --git a/kst-2.0.6-fix-qreal-vs-double-for-arm.patch b/kst-2.0.6-fix-qreal-vs-double-for-arm.patch
new file mode 100644
index 0000000..39ff4f5
--- /dev/null
+++ b/kst-2.0.6-fix-qreal-vs-double-for-arm.patch
@@ -0,0 +1,85 @@
+diff -up kst-2.0.6/src/libkstapp/applicationsettingsdialog.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstapp/applicationsettingsdialog.cpp
+diff -up kst-2.0.6/src/libkstapp/arrowitem.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstapp/arrowitem.cpp
+--- kst-2.0.6/src/libkstapp/arrowitem.cpp.fix-qreal-vs-double-for-arm 2012-07-22 08:24:59.000000000 -0500
++++ kst-2.0.6/src/libkstapp/arrowitem.cpp 2013-03-19 07:28:05.890643783 -0500
+@@ -65,7 +65,7 @@ void ArrowItem::paint(QPainter *painter)
+ double sina = sin(theta);
+ double cosa = cos(theta);
+ double yin = sqrt(3.0) * deltax;
+- double x1, y1, x2, y2;
++ qreal x1, y1, x2, y2;
+ QMatrix m(cosa, sina, -sina, cosa, 0.0, 0.0);
+
+ m.map( deltax, yin, &x1, &y1);
+@@ -86,7 +86,7 @@ void ArrowItem::paint(QPainter *painter)
+ double sina = sin(theta);
+ double cosa = cos(theta);
+ double yin = sqrt(3.0) * deltax;
+- double x1, y1, x2, y2;
++ qreal x1, y1, x2, y2;
+ QMatrix m(cosa, sina, -sina, cosa, 0.0, 0.0);
+
+ m.map( deltax, yin, &x1, &y1);
+diff -up kst-2.0.6/src/libkstapp/mainwindow.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstapp/mainwindow.cpp
+--- kst-2.0.6/src/libkstapp/mainwindow.cpp.fix-qreal-vs-double-for-arm 2012-07-22 08:24:59.000000000 -0500
++++ kst-2.0.6/src/libkstapp/mainwindow.cpp 2013-03-19 07:28:05.890643783 -0500
+@@ -673,7 +673,7 @@ void MainWindow::savePrinterDefaults(QPr
+ _dialogDefaults->setValue("print/landscape", printer->orientation() == QPrinter::Landscape);
+ _dialogDefaults->setValue("print/paperSize", int(printer->paperSize()));
+
+- double left, top, right, bottom;
++ qreal left, top, right, bottom;
+ printer->getPageMargins(&left, &top, &right, &bottom, QPrinter::Millimeter);
+ _dialogDefaults->setValue("print/topLeftMargin", QPointF(left, top));
+ _dialogDefaults->setValue("print/bottomRightMargin", QPointF(right, bottom));
+diff -up kst-2.0.6/src/libkstapp/plotitem.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstapp/plotitem.cpp
+--- kst-2.0.6/src/libkstapp/plotitem.cpp.fix-qreal-vs-double-for-arm 2012-07-22 08:24:59.000000000 -0500
++++ kst-2.0.6/src/libkstapp/plotitem.cpp 2013-03-19 07:28:05.892643758 -0500
+@@ -975,7 +975,7 @@ void PlotItem::paintPlot(QPainter *paint
+ }
+ if (isUseAxisScale()) {
+ QFont font(painter->font());
+- qreal pointSize = qMax((font.pointSizeF() * _numberAxisLabelScaleFactor), ApplicationSettings::self()->minimumFontSize());
++ qreal pointSize = qMax((font.pointSizeF() * _numberAxisLabelScaleFactor), (qreal)(ApplicationSettings::self()->minimumFontSize()));
+
+ font.setPointSizeF(pointSize);
+ painter->setFont(font);
+@@ -2699,7 +2699,7 @@ void PlotItem::computedRelationalMax(qre
+ if (relation->ignoreAutoScale())
+ continue;
+
+- qreal min, max;
++ double min, max;
+ relation->yRange(projectionRect().left(),
+ projectionRect().right(),
+ &min, &max);
+@@ -2707,11 +2707,11 @@ void PlotItem::computedRelationalMax(qre
+ //If the axis is in log mode, the lower extent will be the
+ //minimum value larger than zero.
+ if (yAxis()->axisLog())
+- minimum = minimum <= 0.0 ? min : qMin(min, minimum);
++ minimum = minimum <= 0.0 ? min : qMin((qreal)min, minimum);
+ else
+- minimum = qMin(min, minimum);
++ minimum = qMin((qreal)min, minimum);
+
+- maximum = qMax(max, maximum);
++ maximum = qMax((qreal)max, maximum);
+ }
+ }
+ }
+diff -up kst-2.0.6/src/libkstapp/plotrenderitem.cpp.fix-qreal-vs-double-for-arm kst-2.0.6/src/libkstapp/plotrenderitem.cpp
+--- kst-2.0.6/src/libkstapp/plotrenderitem.cpp.fix-qreal-vs-double-for-arm 2012-07-22 08:24:59.000000000 -0500
++++ kst-2.0.6/src/libkstapp/plotrenderitem.cpp 2013-03-19 07:28:05.889643795 -0500
+@@ -712,9 +712,9 @@ void PlotRenderItem::highlightNearestDat
+ bool bFoundImage = false;
+
+ qreal distance, minDistance = 1.0E300;
+- qreal x, y;
++ double x, y;
+ QPointF matchedPoint;
+- qreal imageZ;
++ double imageZ;
+ qreal dxPerPix = double(projectionRect().width())/double(rect().width());
+
+ foreach(RelationPtr relation, relationList()) {
diff --git a/kst.spec b/kst.spec
index c46d028..5d000a6 100644
--- a/kst.spec
+++ b/kst.spec
@@ -1,6 +1,6 @@
Name: kst
Version: 2.0.6
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A data viewing program
Group: Applications/Engineering
@@ -9,6 +9,11 @@ URL: http://kst-plot.kde.org/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+## upstreamable patches
+# fix qreal = double assumptions for arm
+# patch adapted from ubunutu's fix-qreal-vs-double-for-arm.diff for kst-2.0.3
+Patch50: kst-2.0.6-fix-qreal-vs-double-for-arm.patch
+
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
@@ -21,7 +26,7 @@ BuildRequires: netcdf-devel
%endif
BuildRequires: getdata-devel muParser-devel
BuildRequires: desktop-file-utils
-BuildRequires: autoconf automake qt-devel
+BuildRequires: qt4-devel
%description
Kst is a real-time data viewing and plotting tool with basic data analysis
@@ -92,10 +97,13 @@ A plugin allowing kst to open and read data in getdata (dirfile) format.
%prep
%setup -q
+%patch50 -p1 -b .fix-qreal-vs-double-for-arm
+
%build
%cmake -Dkst_merge_files=1 -Dkst_rpath=0 \
-Dkst_install_prefix=%{_prefix} -Dkst_install_libdir=%{_lib} \
- -Dkst_test=1 cmake
+ -Dkst_test=1 -Dkst_release=1 -Dkst_verbose=1 \
+ cmake/
make %{?_smp_mflags} kst2
%check
@@ -104,7 +112,7 @@ make %{?_smp_mflags} kst2
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
-make DESTDIR=%{buildroot} SUID_ROOT="" install
+make install/fast DESTDIR=%{buildroot}
rm -f %{buildroot}%{_bindir}/test_*
%clean
@@ -173,6 +181,12 @@ rm -rf %{buildroot}
#%{_datadir}/services/kst/kstdata_dirfilesource.desktop
%changelog
+* Tue Mar 19 2013 Rex Dieter <rdieter at fedoraproject.org> 2.0.6-3
+- s/qt-devel/qt4-devel/
+- drop extraneous buildrequires
+- fix build on arm
+- use build options: -Dkst_release=1 -Dkst_verbose=1
+
* Wed Feb 20 2013 Jon Ciesla <limburgher at gmail.com> - 2.0.6-2
- Fix cfitsio deps.
More information about the scm-commits
mailing list