[packages/tora] - up to 3.2

baggins baggins at pld-linux.org
Sat Jul 16 09:39:40 CEST 2022


commit d46265192b9557f21289297b7200feb1f531c55c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Jul 16 09:39:29 2022 +0200

    - up to 3.2

 gethostname.patch     | 21 -------------
 i18n.patch            | 17 +++++++++++
 missing-header.patch  | 21 +++++++++++++
 qscintilla.patch      | 27 ++++++-----------
 qt-5.11.0.patch       | 69 +++++++++++++++++++++++++++++++++++++++++++
 tora-build.patch      | 10 -------
 tora-gcc.patch        | 21 -------------
 tora-postgresql.patch | 45 ----------------------------
 tora.desktop          | 11 -------
 tora.spec             | 81 ++++++++++++++++++++-------------------------------
 10 files changed, 147 insertions(+), 176 deletions(-)
---
diff --git a/tora.spec b/tora.spec
index 5510e59..7facae1 100644
--- a/tora.spec
+++ b/tora.spec
@@ -6,31 +6,30 @@
 Summary:	A graphical toolkit for database developers and administrators
 Summary(pl.UTF-8):	Zestaw graficznych narzędzi dla programistów i administratorów baz danych
 Name:		tora
-Version:	2.1.3
-Release:	10
+Version:	3.2
+Release:	1
 License:	GPL v2
 Group:		Applications/Databases/Interfaces
-Source0:	http://downloads.sourceforge.net/tora/%{name}-%{version}.tar.gz
-# Source0-md5:	ea4a75a9daeaf58492413e3f7fe40293
-Source1:	%{name}.desktop
-Patch0:		%{name}-postgresql.patch
-Patch1:		%{name}-gcc.patch
-Patch2:		%{name}-build.patch
-Patch3:		gethostname.patch
-Patch4:		qscintilla.patch
-URL:		http://tora.sourceforge.net/
-BuildRequires:	QtCore-devel
-BuildRequires:	QtGui-devel
-BuildRequires:	QtNetwork-devel
-BuildRequires:	QtSql-devel
-BuildRequires:	QtXml-devel
+Source0:	https://github.com/tora-tool/tora/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	9a08df5eb9ca8a8c26d05540fc57d103
+Patch0:		qscintilla.patch
+Patch1:		qt-5.11.0.patch
+Patch2:		missing-header.patch
+Patch3:		i18n.patch
+URL:		https://github.com/tora-tool/tora
+BuildRequires:	Qt5Core-devel
+BuildRequires:	Qt5Gui-devel
+BuildRequires:	Qt5Network-devel
+BuildRequires:	Qt5Sql-devel
+BuildRequires:	Qt5Xml-devel
 BuildRequires:	cppunit-devel
+BuildRequires:	loki-devel
 %{?with_instantclient:BuildRequires:	oracle-instantclient-devel}
 BuildRequires:	pcre-devel
 BuildRequires:	postgresql-devel
-BuildRequires:	qscintilla2-qt4-devel
-BuildRequires:	qt4-build
-BuildRequires:	qt4-linguist
+BuildRequires:	qscintilla2-qt5-devel
+BuildRequires:	qt5-build
+BuildRequires:	qt5-linguist
 BuildRequires:	texinfo
 BuildRequires:	xorg-lib-libICE-devel
 Suggests:	QtSql-pgsql
@@ -60,27 +59,19 @@ być obsługiwane poprzez ODBC.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-%patch4 -p1
-
-rm -f src/moc_*
 
 %build
-%{__libtoolize}
-%{__aclocal} -I config/m4
-%{__autoconf}
-%{__automake}
-%configure \
-	--libdir=%{_datadir}/%{name} \
-	--with-qt-libraries=%{_libdir} \
+mkdir -p build
+cd build
+%cmake ../ \
 %if %{with oracle}
-	%if %{with instantclient}
-	--with-instant-client \
-	--with-oracle-includes=%{_includedir}/oracle/client \
-	--with-oracle-libraries=%{_libdir} \
-	%endif
-	--with-oracle
+	-DENABLE_ORACLE=ON \
+%if %{with instantclient}
+	-DORACLE_PATH_INCLUDES=%{_includedir}/oracle/client \
+	-DORACLE_PATH_LIB=%{_libdir} \
+%endif
 %else
-	--without-oracle
+	-DENABLE_ORACLE=OFF \
 %endif
 
 %{__make}
@@ -88,30 +79,20 @@ rm -f src/moc_*
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
-%{__make} install \
+
+%{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
 cp -p src/icons/tora.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
 cp -a src/templates $RPM_BUILD_ROOT%{_datadir}/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post	-p /sbin/postshell
--/usr/sbin/fix-info-dir -c %{_infodir}
-
-%postun	-p /sbin/postshell
--/usr/sbin/fix-info-dir -c %{_infodir}
-
 %files
 %defattr(644,root,root,755)
-%doc BUGS NEWS README TODO
+%doc NEWS README TODO
 %attr(755,root,root) %{_bindir}/*
-%dir %{_datadir}/%{name}
-%{_datadir}/%{name}/help
-%{_datadir}/%{name}/templates
-%{_datadir}/%{name}/*.qm
+%{_datadir}/%{name}
 %{_desktopdir}/*.desktop
 %{_pixmapsdir}/*.xpm
-%{_infodir}/tora*
diff --git a/gethostname.patch b/gethostname.patch
deleted file mode 100644
index 3ee922f..0000000
--- a/gethostname.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- tora-2.1.3/src/toreport.cpp~	2010-01-14 17:39:02.000000000 +0100
-+++ tora-2.1.3/src/toreport.cpp	2013-07-14 14:40:34.485230193 +0200
-@@ -47,6 +47,8 @@
- #include "toextract.h"
- #include "toreport.h"
- 
-+#include <unistd.h>
-+
- #include <qapplication.h>
- #include <qdatetime.h>
- #ifdef Q_OS_WIN32
---- tora-2.1.3/src/toextract.cpp~	2010-02-02 19:25:43.000000000 +0100
-+++ tora-2.1.3/src/toextract.cpp	2013-07-14 14:40:06.098262267 +0200
-@@ -46,6 +46,7 @@
- #include "toextract.h"
- 
- #include <stdio.h>
-+#include <unistd.h>
- 
- #include <qapplication.h>
- #include <qlabel.h>
diff --git a/i18n.patch b/i18n.patch
new file mode 100644
index 0000000..aba31e4
--- /dev/null
+++ b/i18n.patch
@@ -0,0 +1,17 @@
+--- tora-3.2/src/CMakeLists.txt~	2017-07-04 23:35:39.000000000 +0200
++++ tora-3.2/src/CMakeLists.txt	2022-07-16 09:05:37.238076944 +0200
+@@ -988,12 +988,12 @@
+ 
+     # Unix install
+     install(TARGETS ${EXE_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX})
+-    install(FILES ${TORA_I18N_QM} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/tora-${VERSION}/i18n)
++    install(FILES ${TORA_I18N_QM} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/tora/i18n)
+     install(TARGETS ${PROVIDER_ORACLE} RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX}/tora-${VERSION})
+     install(TARGETS ${PROVIDER_TERADATA} RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX}/tora-${VERSION})
+     install(FILES tora.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/ )
+     add_definitions(-DPROVIDERS_PATH=\"${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/tora-${VERSION}\")
+-    add_definitions(-DSHARE_DIR=\"${CMAKE_INSTALL_PREFIX}/share/tora-${VERSION}\")
++    add_definitions(-DSHARE_DIR=\"${CMAKE_INSTALL_PREFIX}/share/tora\")
+ ENDIF()
+ 
+ #set (FILES_TO_TRANSLATE ${TORA_UI_SRC} ${TORA_SOURCES} ${TORA_MOC_CLASSES})
diff --git a/missing-header.patch b/missing-header.patch
new file mode 100644
index 0000000..272054b
--- /dev/null
+++ b/missing-header.patch
@@ -0,0 +1,21 @@
+From 503fb876bd5664b455d234ba21294735a8972c91 Mon Sep 17 00:00:00 2001
+From: Ivan Brezina <ibrezina at ibrezina.net>
+Date: Wed, 5 Jul 2017 10:07:14 +0200
+Subject: [PATCH] linux fix
+
+---
+ src/editor/tosqltext.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/editor/tosqltext.cpp b/src/editor/tosqltext.cpp
+index c329daf0..60935c12 100644
+--- a/src/editor/tosqltext.cpp
++++ b/src/editor/tosqltext.cpp
+@@ -50,6 +50,7 @@
+ #include <QToolTip>
+ #endif
+ 
++#include <QMenu>
+ #include <QListWidget>
+ #include <QVBoxLayout>
+ #include <QApplication>
diff --git a/qscintilla.patch b/qscintilla.patch
index 8d58d0a..45ad2a9 100644
--- a/qscintilla.patch
+++ b/qscintilla.patch
@@ -1,20 +1,11 @@
---- tora-2.1.3/config/m4/qtkde.m4~	2009-10-23 18:19:57.000000000 +0200
-+++ tora-2.1.3/config/m4/qtkde.m4	2019-09-21 14:31:04.023094843 +0200
-@@ -112,7 +112,7 @@
-     @LIB_DCOP@ \
-     @LIB_KHTML@ \
-     $scin_ldflags"
--  LIBS="-lqscintilla2"
-+  LIBS="-lqscintilla2_qt4"
+--- tora-3.2/cmake/modules/FindQScintilla.cmake~	2017-07-04 23:35:39.000000000 +0200
++++ tora-3.2/cmake/modules/FindQScintilla.cmake	2022-07-16 08:17:16.878361755 +0200
+@@ -84,7 +84,7 @@
+     SET(LIBRARYPATH ${QT5_WIDGETSLIBRARYPATH} "/usr/lib/" "/usr/local/lib")
+     MESSAGE("QScintilla2 LIBPATH \"${LIBRARYPATH}\"")
  
-   AC_LANG_PUSH(C++)
- 
-@@ -148,7 +148,7 @@
- 
-   AC_DEFINE_UNQUOTED(QSCINTILLA_DLL, 1, [True if on Windows.])
-   AC_SUBST(QSCINTILLA_CXXFLAGS, $scin_cflags)
--  AC_SUBST(QSCINTILLA_LDFLAGS, "$scin_ldflags -lqscintilla2")
-+  AC_SUBST(QSCINTILLA_LDFLAGS, "$scin_ldflags -lqscintilla2_qt4")
-   AC_MSG_RESULT(yes)
- ])
+-    FIND_LIBRARY(QSCINTILLA_LIBRARY NAMES qscintilla2-qt5 qt5scintilla2 libqscintilla2.so libqscintilla2.a qscintilla2.lib PATHS ${LIBRARYPATH})
++    FIND_LIBRARY(QSCINTILLA_LIBRARY NAMES qscintilla2_qt5 qscintilla2-qt5 qt5scintilla2 libqscintilla2.so libqscintilla2.a qscintilla2.lib PATHS ${LIBRARYPATH})
  
+     # Check
+     IF(QSCINTILLA_LIBRARY)
diff --git a/qt-5.11.0.patch b/qt-5.11.0.patch
new file mode 100644
index 0000000..d9e50ee
--- /dev/null
+++ b/qt-5.11.0.patch
@@ -0,0 +1,69 @@
+From afbff9ec3b93f0e90f02953d1bdd859a0f9a72ab Mon Sep 17 00:00:00 2001
+From: ibre5041 <ibre5041 at ibrezina.net>
+Date: Wed, 30 May 2018 23:22:05 +0200
+Subject: [PATCH] fix for bug #96 - missing #include <QButtonGroup>
+
+---
+ src/tools/tobrowser.cpp  | 1 +
+ src/tools/toscript.cpp   | 1 +
+ src/tools/tosecurity.cpp | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/src/tools/tobrowser.cpp b/src/tools/tobrowser.cpp
+index 895be336..69a4c6b6 100644
+--- a/src/tools/tobrowser.cpp
++++ b/src/tools/tobrowser.cpp
+@@ -65,6 +65,7 @@
+ #include <QInputDialog>
+ #include <QSplitter>
+ #include <QToolBar>
++#include <QButtonGroup>
+ 
+ #include "icons/addindex.xpm"
+ #include "icons/addtable.xpm"
+diff --git a/src/tools/toscript.cpp b/src/tools/toscript.cpp
+index bc74fc8c..aff26158 100644
+--- a/src/tools/toscript.cpp
++++ b/src/tools/toscript.cpp
+@@ -56,6 +56,7 @@
+ #include <QSplitter>
+ #include <QtCore/QTextStream>
+ #include <QToolBar>
++#include <QButtonGroup>
+ 
+ #include "icons/execute.xpm"
+ #include "icons/toscript.xpm"
+diff --git a/src/tools/tosecurity.cpp b/src/tools/tosecurity.cpp
+index 17f5c3b0..b2694928 100644
+--- a/src/tools/tosecurity.cpp
++++ b/src/tools/tosecurity.cpp
+@@ -46,6 +46,7 @@
+ 
+ #include <QSplitter>
+ #include <QToolBar>
++#include <QButtonGroup>
+ 
+ #include "icons/addrole.xpm"
+ #include "icons/adduser.xpm"
+
+From 1852446c42c36d71b856fe09e1444b52052ca86d Mon Sep 17 00:00:00 2001
+From: Ivan Brezina <ibrezina at ibrezina.net>
+Date: Wed, 27 Jun 2018 19:11:09 +0200
+Subject: [PATCH] fix for bug #101
+
+---
+ src/widgets/tohelp.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/widgets/tohelp.cpp b/src/widgets/tohelp.cpp
+index 69e3c6a1..4ffd6cea 100644
+--- a/src/widgets/tohelp.cpp
++++ b/src/widgets/tohelp.cpp
+@@ -43,6 +43,7 @@
+ #include "core/toconfiguration.h"
+ #include "ts_log/ts_log_utils.h"
+ 
++#include <QAction>
+ #include <QMessageBox>
+ #include <QtCore/QSettings>
+ 
diff --git a/tora-build.patch b/tora-build.patch
deleted file mode 100644
index 1c92f20..0000000
--- a/tora-build.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- tora-2.1.3/src/Makefile.am~	2010-09-19 20:07:44.000000000 +0200
-+++ tora-2.1.3/src/Makefile.am	2011-09-26 13:56:18.587738602 +0200
-@@ -316,6 +316,7 @@
- BUILT_SOURCES = \
- 	moc_toabout.cpp \
- 	moc_toalert.cpp \
-+	moc_toawr.cpp \
- 	moc_toanalyze.cpp \
- 	moc_tobackup.cpp \
- 	moc_tobarchart.cpp \
diff --git a/tora-gcc.patch b/tora-gcc.patch
deleted file mode 100644
index c80a72b..0000000
--- a/tora-gcc.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- tora-2.1.2/config/m4/oracle.m4~	2009-10-23 18:19:57.000000000 +0200
-+++ tora-2.1.2/config/m4/oracle.m4	2010-09-11 01:11:18.232423513 +0200
-@@ -212,6 +212,7 @@
- #include <oci.h>
- #include <iostream>
- #include <fstream>
-+#include <cstdlib>
- using namespace std;
- 
- int main(int c, char **v) {
---- tora-2.1.3/src/toplsqltext.cpp~	2010-07-27 19:10:39.000000000 +0200
-+++ tora-2.1.3/src/toplsqltext.cpp	2019-09-21 14:27:23.043097560 +0200
-@@ -77,7 +77,7 @@
-     { "LOOP", "Loop", NULL, false, false},
-     { "WHILE", "Loop", NULL, false, false},
-     { "FOR", "Loop", NULL, false, false},
--    { NULL, NULL, false, false}
-+    { NULL, NULL, NULL, false, false}
- };
- 
- 
diff --git a/tora-postgresql.patch b/tora-postgresql.patch
deleted file mode 100644
index c1da58e..0000000
--- a/tora-postgresql.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -ur tora-2.0.0-gcc/config/m4/postgresql.m4 tora-2.0.0/config/m4/postgresql.m4
---- tora-2.0.0-gcc/config/m4/postgresql.m4	2008-11-03 21:32:20.000000000 +0100
-+++ tora-2.0.0/config/m4/postgresql.m4	2009-09-04 13:40:05.626436760 +0200
-@@ -6,7 +6,7 @@
-   AC_CHECK_DECL([PQcancel],
-                 [ac_pg_cancel=yes],
-                 [ac_pg_cancel=no],
--                [#include <postgresql/libpq-fe.h>])
-+                [#include <libpq-fe.h>])
- 
-   if test $ac_pg_cancel = yes; then
-     AC_DEFINE([LIBPQ_DECL_CANCEL], 1, [Define if libpg-fe.h declares PQcancel.])
-diff -ur tora-2.0.0-gcc/configure.ac tora-2.0.0/configure.ac
---- tora-2.0.0-gcc/configure.ac	2008-09-14 23:54:41.000000000 +0200
-+++ tora-2.0.0/configure.ac	2009-09-04 13:37:15.446425066 +0200
-@@ -28,7 +28,7 @@
- fi
- # Checks for header files.
- # AC_HEADER_STDC
--AC_CHECK_HEADERS(unistd.h sys/param.h sys/time.h time.h sys/mkdev.h sys/sysmacros.h string.h memory.h fcntl.h dirent.h sys/ndir.h ndir.h alloca.h locale.h utime.h postgresql/libpq-fe.h)
-+AC_CHECK_HEADERS(unistd.h sys/param.h sys/time.h time.h sys/mkdev.h sys/sysmacros.h string.h memory.h fcntl.h dirent.h sys/ndir.h ndir.h alloca.h locale.h utime.h libpq-fe.h)
- AC_HEADER_MAJOR
- AC_FUNC_ALLOCA
- AC_FUNC_MALLOC
-diff -ur tora-2.0.0-gcc/src/toqsqlconnection.cpp tora-2.0.0/src/toqsqlconnection.cpp
---- tora-2.0.0-gcc/src/toqsqlconnection.cpp	2008-09-14 23:54:40.000000000 +0200
-+++ tora-2.0.0/src/toqsqlconnection.cpp	2009-09-04 13:39:41.136783352 +0200
-@@ -67,7 +67,7 @@
- #include <QGridLayout>
- #include <QString>
- 
--#ifdef HAVE_POSTGRESQL_LIBPQ_FE_H
-+#ifdef HAVE_LIBPQ_FE_H
- #ifdef CMAKE_BUILD
-   // There is different location of pgsql includes sometimes
-   // E.g. /usr/include/pgsql on suse etc. Cmake hadles it
-@@ -75,7 +75,7 @@
-   #include <libpq-fe.h>
- #else
-   // This is for autotools
--  #include <postgresql/libpq-fe.h>
-+  #include <libpq-fe.h>
- #endif
- #endif
- 
diff --git a/tora.desktop b/tora.desktop
deleted file mode 100644
index 8bfb60b..0000000
--- a/tora.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Name=TOra
-Name[pl]=TOra
-Comment=Toolkit For Oracle and other databases
-Comment[pl]=Zestaw narzędzi dla Oracle i innych baz danych
-Icon=tora
-Exec=tora
-Terminal=false
-Type=Application
-Categories=Qt;KDE;Development;
-# vi: encoding=utf-8
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tora.git/commitdiff/d46265192b9557f21289297b7200feb1f531c55c



More information about the pld-cvs-commit mailing list