Hello community,

here is the log from the commit of package zhu3d for openSUSE:Factory checked 
in at 2018-03-22 12:06:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zhu3d (Old)
 and      /work/SRC/openSUSE:Factory/.zhu3d.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "zhu3d"

Thu Mar 22 12:06:38 2018 rev:7 rq:589686 version:4.2.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/zhu3d/zhu3d.changes      2013-04-29 
10:04:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.zhu3d.new/zhu3d.changes 2018-03-22 
12:11:32.099871265 +0100
@@ -1,0 +2,7 @@
+Thu Mar  1 10:05:42 UTC 2018 - [email protected]
+
+- Added zhu3d-4.2.6-qt5.patch and enabled Qt5 build where possible
+
+- Spec cleanup
+
+-------------------------------------------------------------------

New:
----
  zhu3d-4.2.6-qt5.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ zhu3d.spec ++++++
--- /var/tmp/diff_new_pack.vBugB8/_old  2018-03-22 12:11:33.111834995 +0100
+++ /var/tmp/diff_new_pack.vBugB8/_new  2018-03-22 12:11:33.119834708 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package zhu3d
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2006 Víctor Fernández Martínez. Valencia, Spain.
 # openSuse  (c) 2006 [email protected]
 # Copyright (c) 2006 Pavel Nemec [email protected]
@@ -20,31 +20,39 @@
 
 
 Name:           zhu3d
+Version:        4.2.6
+Release:        0
 Summary:        OpenGL-based equation viewer and solver
 License:        GPL-3.0
 Group:          Productivity/Scientific/Math
-Version:        4.2.6
-Release:        0
-Url:            http://sourceforge.net/projects/zhu3d/
-Source0:        
http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+Url:            https://sourceforge.net/projects/zhu3d/
+Source0:        
https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
 Source1:        %{name}.desktop
 Patch0:         %{name}-pri.patch
 # PATCH-FIX-OPENSUSE zhu3d-no-compilation-date.patch - fix "W: 
file-contains-current-date"
 Patch2:         %{name}-no-compilation-date.patch
 # PATCH-FIX-OPENSUSE zhu3d-ppc.patch - fixes ppc build
 Patch3:         zhu3d-ppc.patch 
-
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-
+# PATCH-FIX-UPSTREAM zhu3d-4.2.6-qt5.patch -- courtesy of gentoo
+Patch4:         %{name}-4.2.6-qt5.patch
 BuildRequires:  Mesa-devel
 BuildRequires:  fdupes
+BuildRequires:  hicolor-icon-theme
+BuildRequires:  update-desktop-files
 %if 0%{?suse_version} >= 1220
 BuildRequires:  Mesa-libGLU-devel
 %endif
+%if 0%{?suse_version} >= 1315
+BuildRequires:  pkgconfig(Qt5Gui)
+BuildRequires:  pkgconfig(Qt5OpenGL)
+BuildRequires:  pkgconfig(Qt5PrintSupport)
+BuildRequires:  pkgconfig(Qt5Widgets)
+%else
 BuildRequires:  libqt4-devel > 4.3
 BuildRequires:  libqt4-sql
 BuildRequires:  libqt4-x11
-BuildRequires:  update-desktop-files
+%endif
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 With Zhu3D you can view, animate and solve up to three functions in
@@ -65,43 +73,44 @@
 %patch0
 %patch2 -p1
 %patch3 -p1
+%if 0%{?suse_version} >= 1315
+%patch4 -p1
+%endif
 find . -type f -print0|xargs -0 chmod -x
 sed -i 's/\r//' readme.txt license.gpl src/changelog.txt
 
 %build
+%if 0%{?suse_version} >= 1315
+%qmake5 SYSDIR=%{_datadir}
+%else
 qmake SYSDIR=%{_datadir} QMAKE_CFLAGS_RELEASE="%{optflags}" 
QMAKE_CXXFLAGS_RELEASE="%{optflags}"
-make
+%endif
+make %{?_smp_mflags}
 
 %install
 # Program binary
-mkdir -p %{buildroot}%{_bindir}
-cp -f %{name} %{buildroot}%{_bindir}
+install -Dm0755 %{name} %{buildroot}%{_bindir}/%{name}
 
 # Other program files
 mkdir -p %{buildroot}%{_datadir}/%{name}
 cp -a -f work system %{buildroot}%{_datadir}/%{name}
 
 # Desktop entry
-mkdir -p %{buildroot}%{_datadir}/applications
-cp -f %SOURCE1 %{buildroot}%{_datadir}/applications
+install -Dm0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
 
 # Desktop icon
-install -m 0755 -d %{buildroot}%{_datadir}/icons/hicolor/64x64/apps
-install -m 0755 -d %{buildroot}%{_datadir}/pixmaps
-install -m 0644 system/icons/%{name}.png 
%{buildroot}%{_datadir}/icons/hicolor/64x64/apps
-install -m 0644 system/icons/%{name}.png 
%{buildroot}%{_datadir}/pixmaps/%{name}.png
+install -Dm0644 system/icons/%{name}.png 
%{buildroot}%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
+install -Dm0644 system/icons/%{name}.png 
%{buildroot}%{_datadir}/pixmaps/%{name}.png
 
 %fdupes -s %{buildroot}%{_datadir}
 
 %files
 %defattr(-,root,root)
+%doc license.gpl readme.txt src/changelog.txt
 %{_bindir}/%{name}
-%{_datadir}/%{name}/*
-%{_datadir}/applications/*
-# %{_datadir}/icons/hicolor/64x64/apps/*
-%{_datadir}/icons/hicolor/
+%{_datadir}/%{name}
+%{_datadir}/applications/%{name}.desktop
+%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
 %{_datadir}/pixmaps/zhu3d.png
-%dir %{_datadir}/%{name}
-%doc license.gpl readme.txt src/changelog.txt
 
 %changelog

++++++ zhu3d-4.2.6-qt5.patch ++++++
>From 4557d1111c030d9fa4449500b5624024abe9fc8a Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <[email protected]>
Date: Tue, 9 Jan 2018 01:01:01 +0100
Subject: [PATCH 1/2] Initial port to Qt5

---
 src/legedit.cpp    | 14 +++++++-------
 src/mainwindow.cpp |  2 +-
 src/property.cpp   |  4 ++--
 src/usredit.cpp    |  2 +-
 zhu3d.pro          |  3 +--
 5 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/src/legedit.cpp b/src/legedit.cpp
index b0f5b28..9ce44b0 100644
--- a/src/legedit.cpp
+++ b/src/legedit.cpp
@@ -89,13 +89,13 @@ void legWidget::createAxesTable() {
        axesTable->setColumnCount(7);
 
        axesTable->setHorizontalHeaderLabels(columnLabels);
-       axesTable->horizontalHeader()->setResizeMode(0, 
QHeaderView::Interactive);
-       axesTable->horizontalHeader()->setResizeMode(1, 
QHeaderView::Interactive);
-       axesTable->horizontalHeader()->setResizeMode(2, QHeaderView::Fixed);
-       axesTable->horizontalHeader()->setResizeMode(3, QHeaderView::Fixed);
-       axesTable->horizontalHeader()->setResizeMode(4, QHeaderView::Fixed);
-       axesTable->horizontalHeader()->setResizeMode(5, QHeaderView::Fixed);
-       axesTable->horizontalHeader()->setResizeMode(6, QHeaderView::Fixed);
+       axesTable->horizontalHeader()->setSectionResizeMode(0, 
QHeaderView::Interactive);
+       axesTable->horizontalHeader()->setSectionResizeMode(1, 
QHeaderView::Interactive);
+       axesTable->horizontalHeader()->setSectionResizeMode(2, 
QHeaderView::Fixed);
+       axesTable->horizontalHeader()->setSectionResizeMode(3, 
QHeaderView::Fixed);
+       axesTable->horizontalHeader()->setSectionResizeMode(4, 
QHeaderView::Fixed);
+       axesTable->horizontalHeader()->setSectionResizeMode(5, 
QHeaderView::Fixed);
+       axesTable->horizontalHeader()->setSectionResizeMode(6, 
QHeaderView::Fixed);
        axesTable->verticalHeader()->show();
        axesTable->setShowGrid(true);
 
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 970f1bf..48d23af 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1804,7 +1804,7 @@ void MaiWindow::benchmarkSlot() {
        QMessageBox::information(
                this,
                tr("Benchmark"),
-               result.toAscii().data()
+               result.toLatin1().data()
                );
 
        /** Restore and perform updates */
diff --git a/src/property.cpp b/src/property.cpp
index eff4442..99216d7 100644
--- a/src/property.cpp
+++ b/src/property.cpp
@@ -138,11 +138,11 @@ void iniITL() {
  ** Copy a QString to a plain old character-string
 ****************************************************************************/
 void q2cstrcpy(char *str, const QString qstr) {
-       strcpy(str, qstr.toAscii().data());
+       strcpy(str, qstr.toLatin1().data());
 }
 
 char *q2cstrcpy(const QString qstr) {
-       return qstr.toAscii().data();
+       return qstr.toLatin1().data();
 }
 
 
diff --git a/src/usredit.cpp b/src/usredit.cpp
index 18b58d5..6088906 100644
--- a/src/usredit.cpp
+++ b/src/usredit.cpp
@@ -128,7 +128,7 @@ void usrWidget::createUsrTable() {
        QStringList columnLabel(tr("Item"));
 
        usrTable->setHorizontalHeaderLabels(columnLabel);
-       usrTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
+       usrTable->horizontalHeader()->setSectionResizeMode(0, 
QHeaderView::Stretch);
        usrTable->verticalHeader()->show();
        usrTable->setShowGrid(true);
 
diff --git a/zhu3d.pro b/zhu3d.pro
index efa3d53..cae8b78 100644
--- a/zhu3d.pro
+++ b/zhu3d.pro
@@ -47,8 +47,7 @@
 TEMPLATE  = app
 CONFIG   += release
 TARGET    = zhu3d
-QT       += opengl
-
+QT       += opengl printsupport widgets
 
 # ============================================================================
 # Workaround for Qt4-4.8.4 and missing reference to 'gluPerspective'
-- 
2.15.1


>From fac5c787ef8e82d92c75c91554508211e1320418 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <[email protected]>
Date: Tue, 9 Jan 2018 01:20:55 +0100
Subject: [PATCH 2/2] Drop PostScript option, unsupported by Qt5PrintSupport

---
 src/glwidget.cpp  | 35 -----------------------------------
 src/picedit.cpp   |  6 ------
 src/ui/picedit.ui | 10 ----------
 3 files changed, 51 deletions(-)

diff --git a/src/glwidget.cpp b/src/glwidget.cpp
index 1719ec0..6343f1e 100644
--- a/src/glwidget.cpp
+++ b/src/glwidget.cpp
@@ -910,41 +910,6 @@ void OGLWidget::savePic() {
                        QApplication::restoreOverrideCursor();
                        break;
                }
-
-               case PS: {
-                       fileName=QFileDialog::getSaveFileName(
-                                       this,
-                                       tr("Save as *.ps"),
-                                       workDir,
-                                       "Images (*.ps)");
-
-                       if(fileName.isEmpty())
-                               return;
-
-                       /** Complete filename */
-                       if(!fileName.toUpper().endsWith(".PS"))
-                               fileName+=".ps";
-
-                       /** Set up printer */
-                       QApplication::setOverrideCursor(Qt::WaitCursor);
-                       QPrinter printer(QPrinter::HighResolution);
-                       printer.setOutputFormat(QPrinter::PostScriptFormat);
-                       printer.setResolution(pic.dpi);
-                       printer.setOutputFileName(fileName);    // Enables 
toFile automatically
-                       printer.setFullPage(true);
-
-                       /** "Print" over painter */
-                       QImage image=pixmap.toImage();
-                       QPainter painter(&printer);
-                       QRect rect=painter.viewport();
-                       QSize size=image.size();
-                       size.scale(rect.size(), Qt::KeepAspectRatio);
-                       painter.setViewport(0, 0, size.width(), size.height());
-                       painter.setWindow(image.rect());
-                       painter.drawImage(0, 0, image);
-                       QApplication::restoreOverrideCursor();
-                       break;
-               }
        }
 }
 
diff --git a/src/picedit.cpp b/src/picedit.cpp
index 149c9d3..74383a7 100644
--- a/src/picedit.cpp
+++ b/src/picedit.cpp
@@ -49,7 +49,6 @@ picWidget::picWidget(QWidget *parent) : QWidget(parent) {
        connect(pngFmt, SIGNAL(clicked()), this, SLOT(pngSlot()));
        connect(jpgFmt, SIGNAL(clicked()), this, SLOT(jpgSlot()));
        connect(pdfFmt, SIGNAL(clicked()), this, SLOT(pdfSlot()));
-       connect(psFmt,  SIGNAL(clicked()), this, SLOT(psSlot()));
 }
 
 
@@ -71,11 +70,6 @@ void picWidget::switchBox() {
                                qual->setEnabled(false);
                                dpi->setEnabled(false);
                                break;
-               case PS:
-                               psFmt->setChecked(true);
-                               qual->setEnabled(false);
-                               dpi->setEnabled(true);
-                               break;
        }
 }
 
diff --git a/src/ui/picedit.ui b/src/ui/picedit.ui
index 12e6148..9a498f2 100644
--- a/src/ui/picedit.ui
+++ b/src/ui/picedit.ui
@@ -263,16 +263,6 @@
           </property>
          </widget>
         </item>
-        <item>
-         <widget class="QRadioButton" name="psFmt" >
-          <property name="toolTip" >
-           <string>PostScript</string>
-          </property>
-          <property name="text" >
-           <string>PS</string>
-          </property>
-         </widget>
-        </item>
        </layout>
       </item>
       <item row="0" column="0" >
-- 
2.15.1


Reply via email to