rdieter pushed to subsurface (f22). "use %{qmake_qt?} style macro, verbose build (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Apr 23 23:13:01 UTC 2015
>From 4254e51e09e446962b3efb5f2ffccbae24b6af72 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter at gmail.com>
Date: Mon, 23 Feb 2015 16:38:57 -0600
Subject: use %{qmake_qt?} style macro, verbose build
- support building against qt5 and marble-widget-qt5 (not used yet)
diff --git a/Subsurface-4.4.1-marblewidget-qt5.patch b/Subsurface-4.4.1-marblewidget-qt5.patch
new file mode 100644
index 0000000..2bb2d08
--- /dev/null
+++ b/Subsurface-4.4.1-marblewidget-qt5.patch
@@ -0,0 +1,26 @@
+diff -up Subsurface-4.4.1/subsurface-configure.pri.qt5 Subsurface-4.4.1/subsurface-configure.pri
+--- Subsurface-4.4.1/subsurface-configure.pri.qt5 2015-02-18 13:11:03.000000000 -0600
++++ Subsurface-4.4.1/subsurface-configure.pri 2015-02-23 14:24:51.850316391 -0600
+@@ -154,6 +154,13 @@ contains(QMAKE_PLATFORM, android): DEFIN
+ #
+ # Find libmarble
+ #
++
++greaterThan(QT_MAJOR_VERSION, 4) {
++ MARBLEWIDGET = marblewidget-qt$${QT_MAJOR_VERSION}
++ } else {
++ MARBLEWIDGET = marblewidget
++}
++
+ !isEmpty(LIBMARBLEDEVEL) {
+ # find it next to our sources
+ INCLUDEPATH += $$LIBMARBLEDEVEL/include
+@@ -165,7 +172,7 @@ contains(QMAKE_PLATFORM, android): DEFIN
+ else: !isEmpty(SPECIAL_MARBLE_PREFIX) {
+ LIBS += -lssrfmarblewidget
+ } else {
+- LIBS += -lmarblewidget
++ LIBS += -l$${MARBLEWIDGET}
+ }
+ }
+
diff --git a/subsurface.spec b/subsurface.spec
index 0897b24..1a43a80 100644
--- a/subsurface.spec
+++ b/subsurface.spec
@@ -2,12 +2,15 @@
#%global snaphash 5d07303
#global snapver {snapdate}.git{snaphash}
+## set to enable Qt5 build -- rex
+#global qt5 1
+
%global libdc_version 0.4.2
Name: subsurface
Version: 4.4.1
#Release: 1.{snapver}%{?dist}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A feature-full divelog in Qt
License: GPLv2
@@ -19,12 +22,13 @@ URL: http://subsurface-divelog.org/
#Source0: subsurface-1.2-20120717git7fe652a.tar.xz
Source0: http://subsurface-divelog.org/downloads/Subsurface-%{version}.tgz
+## usptreamable patches
+# support parallel-installable libmarblewidget-qt5
+Patch1: Subsurface-4.4.1-marblewidget-qt5.patch
+
BuildRequires: libdivecomputer-devel == %{libdc_version}
BuildRequires: libdivecomputer-static == %{libdc_version}
-BuildRequires: qt4-devel
-BuildRequires: qtwebkit-devel
BuildRequires: libudev-devel
-BuildRequires: marble-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: libsqlite3x-devel
@@ -34,11 +38,27 @@ BuildRequires: asciidoc
BuildRequires: libgit2-devel
BuildRequires: libappstream-glib
+%if 0%{?qt5}
+BuildRequires: marble-widget-qt5-devel
+BuildRequires: pkgconfig(Qt5Core)
+BuildRequires: pkgconfig(Qt5Concurrent)
+BuildRequires: pkgconfig(Qt5Widgets)
+BuildRequires: pkgconfig(Qt5Network)
+BuildRequires: pkgconfig(Qt5WebKitWidgets)
+BuildRequires: pkgconfig(Qt5PrintSupport)
+BuildRequires: pkgconfig(Qt5Svg)
+BuildRequires: pkgconfig(Qt5Test)
+%else
+BuildRequires: qt4-devel
+BuildRequires: qtwebkit-devel
+BuildRequires: marble-devel
+Requires: marble
+%endif
+
# Since we build against the static libdivecomputer
# I want to have a hard constraint on the version compiled against
# I'll update both when needed.
Requires: libdivecomputer == %{libdc_version}
-Requires: marble
Requires: libgit2
%description
@@ -58,8 +78,14 @@ additional dive notes.
# try using this patch until we have something better -- rex
patch -p1 --backup < packaging/ubuntu/0001-Make-build-with-Qt4.patch
+%patch1 -p1 -b .marblewidget-qt5
+
%build
-qmake-qt4
+%if 0%{?qt5}
+%{qmake_qt5} V=1
+%else
+%{qmake_qt4} V=1
+%endif
make %{?_smp_mflags}
%install
@@ -96,6 +122,10 @@ fi
%changelog
+* Mon Feb 23 2015 Rex Dieter <rdieter at fedoraproject.org> - 4.4.1-2
+- use %%{qmake_qt?} style macro, verbose build
+- support building against qt5 and marble-widget-qt5 (not used yet)
+
* Sat Feb 21 2015 Rex Dieter <rdieter at fedoraproject.org> 4.4.1-1
- 4.4.1 (#1194279), using unofficial ubuntu Qt4 patch for now
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/subsurface.git/commit/?h=f22&id=4254e51e09e446962b3efb5f2ffccbae24b6af72
More information about the scm-commits
mailing list