From 817251cde9e7d09f89f2ec8624a196e052abf0c9 Mon Sep 17 00:00:00 2001 From: ellson Date: Sun, 3 Apr 2011 21:44:29 +0000 Subject: [PATCH] make it build with qt4 --- cmd/gvedit/.cvsignore | 4 ++++ cmd/gvedit/Makefile.am | 8 ++++++++ cmd/gvedit/gvedit.pro | 10 ---------- cmd/gvedit/gvedit.pro.in | 19 +++++++++++++++++++ cmd/gvedit/images/Makefile.am | 2 ++ cmd/gvedit/main.cpp | 1 + cmd/gvedit/mainwindow.cpp | 2 +- cmd/gvedit/ui/Makefile.am | 1 + cmd/gvmap/.cvsignore | 5 ++++- configure.ac | 1 + graphviz.spec.in | 17 +++++++++++++++++ 11 files changed, 58 insertions(+), 12 deletions(-) delete mode 100644 cmd/gvedit/gvedit.pro create mode 100644 cmd/gvedit/gvedit.pro.in diff --git a/cmd/gvedit/.cvsignore b/cmd/gvedit/.cvsignore index 3dda72986..a7b3371dc 100644 --- a/cmd/gvedit/.cvsignore +++ b/cmd/gvedit/.cvsignore @@ -1,2 +1,6 @@ Makefile.in Makefile +qMakefile +moc_* +qrc_mdi.cpp +gvedit diff --git a/cmd/gvedit/Makefile.am b/cmd/gvedit/Makefile.am index 3489828a6..ea2cb3171 100644 --- a/cmd/gvedit/Makefile.am +++ b/cmd/gvedit/Makefile.am @@ -3,6 +3,14 @@ SUBDIRS = ui images +all: gvedit + +qMakefile: gvedit.pro + qmake-qt4 -o qMakefile gvedit.pro + +gvedit: main.cpp qMakefile + $(MAKE) -f qMakefile prefix=${prefix} libdir=${libdir} + EXTRA_DIST = csettings.cpp csettings.h document1.png document2.png \ gvedit.pro gvedit.ncb gvedit.sln gvedit.vcproj gvedit.vcproj.RESEARCH.arif.user gvedit.vcproj.user \ imageviewer.cpp imageviewer.h \ diff --git a/cmd/gvedit/gvedit.pro b/cmd/gvedit/gvedit.pro deleted file mode 100644 index cc8f1911f..000000000 --- a/cmd/gvedit/gvedit.pro +++ /dev/null @@ -1,10 +0,0 @@ - -DEFINES += HAVE_CONFIG_H GVEDIT_DATADIR=/Users/erg/share/graphviz/gvedit -LIBS += -L/Users/erg/lib -lgvc -lgraph -lcdt -INCLUDEPATH += ../../lib/gvc ../../lib/common ../../lib/pathplan ../../lib/graph ../../lib/cdt ../.. - -CONFIG += qt -HEADERS = mainwindow.h mdichild.h csettings.h imageviewer.h ui_settings.h -SOURCES = main.cpp mainwindow.cpp mdichild.cpp csettings.cpp imageviewer.cpp -RESOURCES = mdi.qrc - diff --git a/cmd/gvedit/gvedit.pro.in b/cmd/gvedit/gvedit.pro.in new file mode 100644 index 000000000..4ebdc8511 --- /dev/null +++ b/cmd/gvedit/gvedit.pro.in @@ -0,0 +1,19 @@ + +DEFINES += HAVE_CONFIG_H GVEDIT_DATADIR=@datadir@/graphviz/gvedit +LIBS += -L@libdir@ -lgvc -lgraph -lcdt +INCLUDEPATH += \ + /usr/include/Qt \ + /usr/include/QtCore \ + /usr/include/QtGui \ + ../../lib/gvc \ + ../../lib/common \ + ../../lib/pathplan \ + ../../lib/graph \ + ../../lib/cdt \ + ../.. + +CONFIG += qt +HEADERS = mainwindow.h mdichild.h csettings.h imageviewer.h ui_settings.h +SOURCES = main.cpp mainwindow.cpp mdichild.cpp csettings.cpp imageviewer.cpp +RESOURCES = mdi.qrc + diff --git a/cmd/gvedit/images/Makefile.am b/cmd/gvedit/images/Makefile.am index 7c1fcc1ff..dc488c779 100644 --- a/cmd/gvedit/images/Makefile.am +++ b/cmd/gvedit/images/Makefile.am @@ -1,5 +1,7 @@ # $Id$ $Revision$ ## Process this file with automake to produce Makefile.in +all: + EXTRA_DIST = copy.png cut.png export.png icon.png new.png open.png \ paste.png run.png save.png save_as.png settings.png diff --git a/cmd/gvedit/main.cpp b/cmd/gvedit/main.cpp index 96c53eeb2..bba01f936 100644 --- a/cmd/gvedit/main.cpp +++ b/cmd/gvedit/main.cpp @@ -18,6 +18,7 @@ #ifdef WIN32_DLL #include "windows.h" #endif +#include #include #include "mainwindow.h" diff --git a/cmd/gvedit/mainwindow.cpp b/cmd/gvedit/mainwindow.cpp index 4bea9e327..c058801fc 100644 --- a/cmd/gvedit/mainwindow.cpp +++ b/cmd/gvedit/mainwindow.cpp @@ -12,7 +12,7 @@ *************************************************************************/ #include -#include +#include #include "mainwindow.h" #include "mdichild.h" #include "csettings.h" diff --git a/cmd/gvedit/ui/Makefile.am b/cmd/gvedit/ui/Makefile.am index 837573c43..1cac5d5fd 100644 --- a/cmd/gvedit/ui/Makefile.am +++ b/cmd/gvedit/ui/Makefile.am @@ -1,5 +1,6 @@ # $Id$ $Revision$ ## Process this file with automake to produce Makefile.in +all: EXTRA_DIST = main.ui settings.ui diff --git a/cmd/gvmap/.cvsignore b/cmd/gvmap/.cvsignore index f3e326bb9..08c208f9d 100644 --- a/cmd/gvmap/.cvsignore +++ b/cmd/gvmap/.cvsignore @@ -1,4 +1,7 @@ Makefile.in Makefile -.deps *.1.pdf +gvmap +cluster +.deps +.libs diff --git a/configure.ac b/configure.ac index 7a32aef4d..3304f0031 100644 --- a/configure.ac +++ b/configure.ac @@ -3238,6 +3238,7 @@ AC_CONFIG_FILES(Makefile cmd/smyrna/Makefile cmd/gvmap/Makefile cmd/gvedit/Makefile + cmd/gvedit/gvedit.pro cmd/gvedit/ui/Makefile cmd/gvedit/images/Makefile tclpkg/Makefile diff --git a/graphviz.spec.in b/graphviz.spec.in index 4ed31697f..62005d48d 100644 --- a/graphviz.spec.in +++ b/graphviz.spec.in @@ -114,6 +114,8 @@ BuildRequires: python python-devel BuildRequires: java-devel %define PHP 1 BuildRequires: php-devel +%define QT 0 +BuildRequires: qt-devel %ifnarch ppc64 %define SHARP 1 BuildRequires: mono-core @@ -266,6 +268,21 @@ LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c %{_libdir}/graphviz/*fdb %endif +#-- graphviz-qt rpm -------------------------------------------------- +%if 0%{?QT} +%package qt +Group: Applications/Multimedia +Summary: Graphviz applications using QT +Requires: graphviz = %{version}-%{release} + +%description qt +Graphviz applications using QT - currently just gvedit + +%files qt +%{_bindir}/gvedit +%{_datadir}/graphviz/gvedit/* +%endif + #-- graphviz-sharp rpm -------------------------------------------- %if 0%{?SHARP} %package sharp -- 2.40.0