Submitted By:            Pierre Labastie <pierre dot labastie at neuf dot fr>
Date:                    2017-08-27
Initial Package Version: 2.40.1
Upstream Status:         Unknown
Origin:                  https://github.com/elkrejzi/pacman/blob/master/pkgbuild/graphviz/graphviz-qt5.patch
                         Addition of patch for cmd/gvedit/Makefile.am by P. Labastie
Description:             Fixes use of Qt5

diff -Naur graphviz-2.40.1.old/cmd/gvedit/csettings.cpp graphviz-2.40.1.new/cmd/gvedit/csettings.cpp
--- graphviz-2.40.1.old/cmd/gvedit/csettings.cpp	2016-09-08 06:45:03.000000000 +0200
+++ graphviz-2.40.1.new/cmd/gvedit/csettings.cpp	2017-08-28 17:05:32.226578375 +0200
@@ -16,7 +16,7 @@
 #include "csettings.h"
 #include "qmessagebox.h"
 #include "qfiledialog.h"
-#include <QtGui>
+#include <QtWidgets>
 #include <qfile.h>
 #include "mdichild.h"
 #include "string.h"
diff -Naur graphviz-2.40.1.old/cmd/gvedit/imageviewer.h graphviz-2.40.1.new/cmd/gvedit/imageviewer.h
--- graphviz-2.40.1.old/cmd/gvedit/imageviewer.h	2016-08-09 23:02:09.000000000 +0200
+++ graphviz-2.40.1.new/cmd/gvedit/imageviewer.h	2017-08-28 17:05:32.226578375 +0200
@@ -15,7 +15,7 @@
 
 #ifndef IMAGEVIEWER_H
 #define IMAGEVIEWER_H
-#include <QtGui>
+#include <QtWidgets>
 #include <QMainWindow>
 #include <QPrinter>
 
diff -Naur graphviz-2.40.1.old/cmd/gvedit/mainwindow.cpp graphviz-2.40.1.new/cmd/gvedit/mainwindow.cpp
--- graphviz-2.40.1.old/cmd/gvedit/mainwindow.cpp	2016-09-20 06:45:02.000000000 +0200
+++ graphviz-2.40.1.new/cmd/gvedit/mainwindow.cpp	2017-08-28 17:05:32.226578375 +0200
@@ -11,7 +11,7 @@
  * Contributors: See CVS logs. Details at http://www.graphviz.org/
  *************************************************************************/
 
-#include <QtGui>
+#include <QtWidgets>
 #include <qframe.h>
 #include "mainwindow.h"
 #include "mdichild.h"
diff -Naur graphviz-2.40.1.old/cmd/gvedit/Makefile.am graphviz-2.40.1.new/cmd/gvedit/Makefile.am
--- graphviz-2.40.1.old/cmd/gvedit/Makefile.am	2016-09-20 06:45:02.000000000 +0200
+++ graphviz-2.40.1.new/cmd/gvedit/Makefile.am	2017-08-28 17:06:21.012476088 +0200
@@ -30,6 +30,8 @@
 	-DDEMAND_LOADING=1 \
 	-DGVEDIT_DATADIR=\""$(pkgdatadir)/gvedit"\"
 
+gvedit_CXXFLAGS = -fPIC
+
 gvedit_LDADD = \
 	$(top_builddir)/lib/gvc/libgvc.la \
 	$(top_builddir)/lib/cgraph/libcgraph.la \
diff -Naur graphviz-2.40.1.old/cmd/gvedit/mdichild.cpp graphviz-2.40.1.new/cmd/gvedit/mdichild.cpp
--- graphviz-2.40.1.old/cmd/gvedit/mdichild.cpp	2016-08-09 23:02:09.000000000 +0200
+++ graphviz-2.40.1.new/cmd/gvedit/mdichild.cpp	2017-08-28 17:05:32.226578375 +0200
@@ -12,7 +12,7 @@
  *************************************************************************/
 
 
-#include <QtGui>
+#include <QtWidgets>
 
 #include "mdichild.h"
 #include "mainwindow.h"
diff -Naur graphviz-2.40.1.old/cmd/gvedit/ui_settings.h graphviz-2.40.1.new/cmd/gvedit/ui_settings.h
--- graphviz-2.40.1.old/cmd/gvedit/ui_settings.h	2016-09-08 06:45:03.000000000 +0200
+++ graphviz-2.40.1.new/cmd/gvedit/ui_settings.h	2017-08-28 17:05:32.226578375 +0200
@@ -10,22 +10,22 @@
 #ifndef UI_SETTINGS_H
 #define UI_SETTINGS_H
 
-#include <QtCore/QVariant>
-#include <QtGui/QAction>
-#include <QtGui/QApplication>
-#include <QtGui/QButtonGroup>
-#include <QtGui/QComboBox>
-#include <QtGui/QDialog>
-#include <QtGui/QFrame>
-#include <QtGui/QHBoxLayout>
-#include <QtGui/QHeaderView>
-#include <QtGui/QLabel>
-#include <QtGui/QLineEdit>
-#include <QtGui/QPushButton>
-#include <QtGui/QSpacerItem>
-#include <QtGui/QTextEdit>
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QWidget>
+#include <QVariant>
+#include <QAction>
+#include <QApplication>
+#include <QButtonGroup>
+#include <QComboBox>
+#include <QDialog>
+#include <QFrame>
+#include <QHBoxLayout>
+#include <QHeaderView>
+#include <QLabel>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QSpacerItem>
+#include <QTextEdit>
+#include <QVBoxLayout>
+#include <QWidget>
 
 QT_BEGIN_NAMESPACE
 
diff -Naur graphviz-2.40.1.old/configure.ac graphviz-2.40.1.new/configure.ac
--- graphviz-2.40.1.old/configure.ac	2016-12-22 06:44:41.000000000 +0100
+++ graphviz-2.40.1.new/configure.ac	2017-08-28 17:05:32.227578435 +0200
@@ -2561,10 +2561,10 @@
   use_qt="No (disabled)"
 else
 
-  AC_CHECK_PROGS(QMAKE,qmake-qt4 qmake-qt3 qmake,false)
+  AC_CHECK_PROGS(QMAKE,qmake-qt5 qmake,false)
   if test "$QMAKE" != "false"; then
-    PKG_CHECK_MODULES(QTCORE, [QtCore],[
-      PKG_CHECK_MODULES(QTGUI, [QtGui],[
+    PKG_CHECK_MODULES(QTCORE, [Qt5Core],[
+      PKG_CHECK_MODULES(QTGUI, [Qt5Widgets Qt5PrintSupport],[
 	use_qt="Yes"
       ],[
         use_qt="No (QtGui not available)"