[packages/doomsday] - Moved to Qt5, but added a bcond to compile with Qt4.

lmasko lmasko at pld-linux.org
Mon Nov 2 12:12:27 CET 2015


commit fce368326f59c8e5b3db55416dd8aa993698fcc2
Author: Lukasz Masko <lmasko at pld-linux.org>
Date:   Mon Nov 2 12:11:29 2015 +0100

    - Moved to Qt5, but added a bcond to compile with Qt4.

 doomsday.spec | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)
---
diff --git a/doomsday.spec b/doomsday.spec
index 1653e23..80ed475 100644
--- a/doomsday.spec
+++ b/doomsday.spec
@@ -1,6 +1,8 @@
 # TODO
 # - sync pl
-# - clean up spec. cleanup what?
+# Conditional build:
+%bcond_with	qt4	# use Qt4 instead of Qt5
+
 %define		subver	stable
 Summary:	jDoom, jHeretic and jHexen for Linux
 Summary(pl.UTF-8):	jDoom, jHeretic i jHexen dla Linuksa
@@ -20,13 +22,12 @@ Source3:	http://www.iconarchive.com/icons/3xhumed/mega-games-pack-28/Heretic-I-1
 Source4:	%{name}-doom.desktop
 Source5:	%{name}-heretic.desktop
 Source6:	%{name}-hexen.desktop
-#Patch0:		%{name}-libpng15.patch
-#Patch1:		%{name}-format.patch
 URL:		http://www.dengine.net/
 BuildRequires:	OpenGL-devel
-BuildRequires:	QtCore-devel
-BuildRequires:	QtNetwork-devel
-BuildRequires:	QtOpenGL-devel
+BuildRequires:	Qt%{!?with_qt4:5}Core-devel
+BuildRequires:	Qt%{!?with_qt4:5}Network-devel
+BuildRequires:	Qt%{!?with_qt4:5}OpenGL-devel
+BuildRequires:	Qt%{!?with_qt4:5}X11Extras-devel
 BuildRequires:	SDL2-devel
 BuildRequires:	SDL2_mixer-devel
 BuildRequires:	assimp-devel
@@ -36,8 +37,8 @@ BuildRequires:	ncurses-devel
 BuildRequires:	pkgconfig
 BuildRequires:	python
 BuildRequires:	python-modules
-BuildRequires:	qt4-build
-BuildRequires:	qt4-qmake
+BuildRequires:	qt%{?with_qt4:4}%{!?with_qt4:5}-build
+BuildRequires:	qt%{?with_qt4:4}%{!?with_qt4:5}-qmake
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.595
 BuildRequires:	xorg-lib-libXrandr-devel
@@ -55,14 +56,12 @@ jDoom, jHeretic i jHexen dla Linuksa.
 
 %prep
 %setup -q -n %{name}-%{subver}-%{version}
-#%patch0 -p1
-#%patch1 -p1
 
 %build
 install -d build
 cd build
 LDFLAGS="-lm"
-qmake-qt4 CONFIG+=deng_notools \
+qmake-qt%{?with_qt4:4}%{!?with_qt4:5} CONFIG+=deng_notools \
 	-r ../doomsday/doomsday.pro
 %{__make}
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/doomsday.git/commitdiff/fce368326f59c8e5b3db55416dd8aa993698fcc2



More information about the pld-cvs-commit mailing list