[kst] 2.0.7-3
Rex Dieter
rdieter at fedoraproject.org
Tue Aug 13 07:18:49 UTC 2013
commit 1f4fc13d241eac256c098e082fbfe2e11391dd8f
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Tue Aug 13 02:18:44 2013 -0500
2.0.7-3
- fix arm build
- update scriptlets
- tighten subpkg deps
- fix unowned dirs
kst-2.0.7-qreal.patch | 104 +++++++++++++++++++++++++++++++++++++++++++++++++
kst.spec | 41 +++++++++++++++----
2 files changed, 136 insertions(+), 9 deletions(-)
---
diff --git a/kst-2.0.7-qreal.patch b/kst-2.0.7-qreal.patch
new file mode 100644
index 0000000..7ebfe90
--- /dev/null
+++ b/kst-2.0.7-qreal.patch
@@ -0,0 +1,104 @@
+diff -up kst-2.0.7/src/libkstapp/circleitem.cpp.qreal kst-2.0.7/src/libkstapp/circleitem.cpp
+--- kst-2.0.7/src/libkstapp/circleitem.cpp.qreal 2013-06-27 01:41:22.000000000 -0500
++++ kst-2.0.7/src/libkstapp/circleitem.cpp 2013-08-13 01:31:29.012803851 -0500
+@@ -70,7 +70,7 @@ void CircleItem::creationPolygonChanged(
+ const QPolygonF poly = mapFromScene(view()->creationPolygon(View::MouseMove));
+ qreal dx = poly.last().x();
+ qreal dy = poly.last().y();
+- qreal r = qMax(qreal(2.0),sqrt(dx*dx + dy*dy));
++ qreal r = qMax(qreal(2.0),qSqrt(dx*dx + dy*dy));
+
+ QRectF newRect(-r, -r, 2.0*r, 2.0*r);
+ setViewRect(newRect);
+diff -up kst-2.0.7/src/libkstapp/plotrenderitem.cpp.qreal kst-2.0.7/src/libkstapp/plotrenderitem.cpp
+--- kst-2.0.7/src/libkstapp/plotrenderitem.cpp.qreal 2013-06-27 01:41:22.000000000 -0500
++++ kst-2.0.7/src/libkstapp/plotrenderitem.cpp 2013-08-13 01:42:30.564773288 -0500
+@@ -557,11 +557,11 @@ void PlotRenderItem::mouseMoveEvent(QGra
+
+ const QPointF p = event->pos();
+
+- double y = (p.y() - rect().bottom())/(rect().top()-rect().bottom())*(plotItem()->yMax()-plotItem()->yMin())+plotItem()->yMin();
++ qreal y = (p.y() - rect().bottom())/(rect().top()-rect().bottom())*(plotItem()->yMax()-plotItem()->yMin())+plotItem()->yMin();
+ y = qMin(y, plotItem()->yMax());
+ y = qMax(y, plotItem()->yMin());
+
+- double x = (p.x() - rect().left())/(rect().right()-rect().left())*(plotItem()->xMax()-plotItem()->xMin())+plotItem()->xMin();
++ qreal x = (p.x() - rect().left())/(rect().right()-rect().left())*(plotItem()->xMax()-plotItem()->xMin())+plotItem()->xMin();
+ x = qMin(x, plotItem()->xMax());
+ x = qMax(x, plotItem()->xMin());
+
+@@ -661,8 +661,8 @@ void PlotRenderItem::mouseReleaseEvent(Q
+ }
+ }
+
+-void PlotRenderItem::hoverYZoomMouseCursor(double y) {
+- double py;
++void PlotRenderItem::hoverYZoomMouseCursor(qreal y) {
++ qreal py;
+
+ py = (y-plotItem()->yMin())/(plotItem()->yMax() - plotItem()->yMin())*(rect().top()-rect().bottom()) + rect().bottom();
+ py = qMin(py, rect().bottom());
+@@ -676,8 +676,8 @@ void PlotRenderItem::hoverYZoomMouseCurs
+
+ }
+
+-void PlotRenderItem::hoverXZoomMouseCursor(double x) {
+- double px;
++void PlotRenderItem::hoverXZoomMouseCursor(qreal x) {
++ qreal px;
+
+ px = (x-plotItem()->xMin())/(plotItem()->xMax() - plotItem()->xMin())*(rect().right()-rect().left()) + rect().left();
+ px = qMax(px, rect().left());
+@@ -690,8 +690,8 @@ void PlotRenderItem::hoverXZoomMouseCurs
+ update(); //FIXME should optimize instead of redrawing entire curve!
+ }
+
+-void PlotRenderItem::dragYZoomMouseCursor(double y) {
+- double py;
++void PlotRenderItem::dragYZoomMouseCursor(qreal y) {
++ qreal py;
+
+ py = (y-plotItem()->yMin())/(plotItem()->yMax() - plotItem()->yMin())*(rect().top()-rect().bottom()) + rect().bottom();
+ py = qMin(py, rect().bottom());
+@@ -702,8 +702,8 @@ void PlotRenderItem::dragYZoomMouseCurso
+
+ }
+
+-void PlotRenderItem::dragXZoomMouseCursor(double x) {
+- double px;
++void PlotRenderItem::dragXZoomMouseCursor(qreal x) {
++ qreal px;
+
+ px = (x-plotItem()->xMin())/(plotItem()->xMax() - plotItem()->xMin())*(rect().right()-rect().left()) + rect().left();
+ px = qMax(px, rect().left());
+diff -up kst-2.0.7/src/libkstapp/plotrenderitem.h.qreal kst-2.0.7/src/libkstapp/plotrenderitem.h
+--- kst-2.0.7/src/libkstapp/plotrenderitem.h.qreal 2013-06-27 01:41:22.000000000 -0500
++++ kst-2.0.7/src/libkstapp/plotrenderitem.h 2013-08-13 01:43:39.756038046 -0500
+@@ -73,11 +73,11 @@ class PlotRenderItem : public ViewItem
+
+ QList<PlotItem*> sharedOrTiedPlots(bool sharedX, bool sharedY);
+
+- void hoverYZoomMouseCursor(double y);
+- void hoverXZoomMouseCursor(double x);
++ void hoverYZoomMouseCursor(qreal y);
++ void hoverXZoomMouseCursor(qreal x);
+
+- void dragYZoomMouseCursor(double y);
+- void dragXZoomMouseCursor(double x);
++ void dragYZoomMouseCursor(qreal y);
++ void dragXZoomMouseCursor(qreal x);
+ public Q_SLOTS:
+ virtual void edit();
+ virtual void raise();
+diff -up kst-2.0.7/src/libkstapp/view.cpp.qreal kst-2.0.7/src/libkstapp/view.cpp
+--- kst-2.0.7/src/libkstapp/view.cpp.qreal 2013-06-27 01:41:22.000000000 -0500
++++ kst-2.0.7/src/libkstapp/view.cpp 2013-08-12 15:24:42.354774073 -0500
+@@ -630,7 +630,7 @@ double View::resetPlotFontSizes(QList<Pl
+ // agressively. The behavior looks pretty good to me with 6.
+ qreal count = qMax(plots.count()-6, 1);
+
+- qreal newPointSize = qMax(pointSize/sqrt(count) , ApplicationSettings::self()->minimumFontSize());
++ qreal newPointSize = qMax(pointSize/qSqrt(count) , ApplicationSettings::self()->minimumFontSize());
+ if (newPointSize<pointSize) {
+ pointSize = newPointSize;
+ }
diff --git a/kst.spec b/kst.spec
index cb0bf3a..37706eb 100644
--- a/kst.spec
+++ b/kst.spec
@@ -1,6 +1,6 @@
Name: kst
Version: 2.0.7
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A data viewing program
Group: Applications/Engineering
@@ -10,6 +10,7 @@ Source0: http://downloads.sourceforge.net/%{name}/Kst-%{version}.tar.gz
# Fix calls to set_target_properties in KstMacros.cmake
# https://bugs.kde.org/show_bug.cgi?id=322286
Patch0: kst-properties.patch
+Patch1: kst-2.0.7-qreal.patch
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
@@ -57,7 +58,7 @@ Documentation, tutorial, and sample data for kst.
%package devel
Summary: Development libraries and headers for kst
Group: Applications/Engineering
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Headers and libraries required when building against kst.
@@ -65,7 +66,7 @@ Headers and libraries required when building against kst.
%package netcdf
Summary: netcdf datasource plugin for kst
Group: Applications/Engineering
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
%description netcdf
A plugin allowing kst to open and read data in netcdf format.
@@ -73,7 +74,7 @@ A plugin allowing kst to open and read data in netcdf format.
%package fits
Summary: fits datasource plugin for kst
Group: Applications/Engineering
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
# Hack because cfitsio won't run if it's internal library version
# doesn't perfectly match between installed library and compiled
# against library. Meh.
@@ -87,7 +88,7 @@ fits files.
%package getdata
Summary: getdata datasource plugin for kst
Group: Applications/Engineering
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
%description getdata
A plugin allowing kst to open and read data in getdata (dirfile) format.
@@ -95,6 +96,7 @@ A plugin allowing kst to open and read data in getdata (dirfile) format.
%prep
%setup -q
%patch0 -p1 -b .properties
+%patch1 -p1 -b .qreal
%build
# -Dkst_merge_files=1 is failing for now
@@ -112,10 +114,25 @@ make %{?_smp_mflags} kst2
mkdir -p %{buildroot}
make install/fast DESTDIR=%{buildroot}
rm -f %{buildroot}%{_bindir}/test_*
+# omit deprecated kde3-era stuff -- rex
+rm -fv %{buildroot}%{_datadir}/{applnk,mimelnk}
-%post -p /sbin/ldconfig
+%post
+/sbin/ldconfig
+touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
+
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+update-desktop-database -q &> /dev/null ||:
+
+%postun
+/sbin/ldconfig
+if [ $1 -eq 0 ] ; then
+touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
+gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+update-desktop-database -q &> /dev/null ||:
+fi
-%postun -p /sbin/ldconfig
%files
%doc INSTALL AUTHORS README COPYING COPYING-DOCS COPYING.LGPL
@@ -123,12 +140,12 @@ rm -f %{buildroot}%{_bindir}/test_*
#binaries
%{_bindir}/kst*
%{_libdir}/libkst*so.*
+%dir %{_libdir}/kst2
+%dir %{_libdir}/kst2/plugins
%{_libdir}/kst2/plugins/libkst2_dataobject*so
%{_libdir}/kst2/plugins/libkst2_fi*so
%{_datadir}/applications/kst2.desktop
-%{_datadir}/applnk/Graphics/kst2.desktop
-%{_datadir}/mimelink/application/x-kst2.desktop
#%{_datadir}/services/kst/kstplugin_*desktop
#%{_datadir}/servicetypes/kst/kst*desktop
#%{_datadir}/apps/kst/kstui.rc
@@ -173,6 +190,12 @@ rm -f %{buildroot}%{_bindir}/test_*
#%{_datadir}/services/kst/kstdata_dirfilesource.desktop
%changelog
+* Tue Aug 13 2013 Rex Dieter <rdieter at fedoraproject.org> - 2.0.7-3
+- fix arm build
+- update scriptlets
+- tighten subpkg deps
+- fix unowned dirs
+
* Thu Aug 01 2013 Jon Ciesla <limburgher at gmail.com> - 2.0.7-2
- Rebuild to fix broken dep. This 2.0.7-1 does not
- exist on arm, but the noarch subpackge was copied/tagged there.
More information about the scm-commits
mailing list