[kvirc] fix epel build

nucleo nucleo at fedoraproject.org
Tue Jul 3 13:05:32 UTC 2012


commit e5cf7e4cdcffad9e271d7d8cb8e79743a0997a26
Author: nucleo <nucleo at fedoraproject.org>
Date:   Tue Jul 3 16:04:56 2012 +0300

    fix epel build

 kvirc-4.2.0-epel.patch |   82 ++++++++++++++++++++++++++++++++++++++++++++++++
 kvirc.spec             |    8 ++++-
 2 files changed, 89 insertions(+), 1 deletions(-)
---
diff --git a/kvirc-4.2.0-epel.patch b/kvirc-4.2.0-epel.patch
new file mode 100644
index 0000000..4a5780b
--- /dev/null
+++ b/kvirc-4.2.0-epel.patch
@@ -0,0 +1,82 @@
+--- kvirc/src/modules/file/libkvifile.cpp	(revision 6046)
++++ kvirc/src/modules/file/libkvifile.cpp	(revision 6199)
+@@ -1573,6 +1573,9 @@
+ 		time = f.lastModified();
+ 	}
+-
++#if QT_VERSION >= 0x040700
+ 	c->returnValue()->setInteger(time.toMSecsSinceEpoch() / 1000);
++#else
++	c->returnValue()->setInteger(time.toTime_t());
++#endif
+ 
+ 	return true;
+--- kvirc/CMakeLists.txt	(revision 6193)
++++ kvirc/CMakeLists.txt	(revision 6201)
+@@ -710,6 +710,6 @@
+ IF(WANT_PYTHON)
+ 	# this should ensure that cmake prefers python 2.7 over python 3
+-	# it's not neede from cmake 2.8.8 onwards
+-	SET(Python_ADDITIONAL_VERSIONS 2.7)
++	# it's not needed from cmake 2.8.8 onwards
++	SET(Python_ADDITIONAL_VERSIONS 2.7 2.6)
+ 	FIND_PACKAGE(PythonLibs)
+ 	IF(PYTHONLIBS_FOUND)
+--- kvirc/src/kvirc/ui/KviIrcView.cpp	(revision 6175)
++++ kvirc/src/kvirc/ui/KviIrcView.cpp	(revision 6202)
+@@ -422,5 +422,7 @@
+ 	QFont newFont(f);
+ 	newFont.setKerning(false);
++#if QT_VERSION >= 0x040700
+ 	newFont.setStyleStrategy(QFont::StyleStrategy(newFont.styleStrategy() | QFont::ForceIntegerMetrics));
++#endif
+ 	QWidget::setFont(newFont);
+ 	update();
+@@ -2064,5 +2066,5 @@
+ 	if(!m_pToolsPopup)
+ 	{
+-        m_pToolsPopup = new QMenu(this);
++		m_pToolsPopup = new QMenu(this);
+ 
+ 		m_pToolsPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Search)),__tr2qs("Toggle Search"),this,SLOT(toggleToolWidget()));
+@@ -2073,6 +2075,6 @@
+ 		m_pToolsPopup->addAction(__tr2qs("Choose Temporary Font..."),this,SLOT(chooseFont()));
+ 		m_pToolsPopup->addAction(__tr2qs("Choose Temporary Background..."),this,SLOT(chooseBackground()));
+-		QAction * pAction = m_pToolsPopup->addAction(__tr2qs("Reset Temporary Background"),this,SLOT(resetBackground()));
+-//		pAction->setEnabled(m_pPrivateBackgroundPixmap != 0);
++		m_pToolsPopup->addAction(__tr2qs("Reset Temporary Background"),this,SLOT(resetBackground()));
++		//		pAction->setEnabled(m_pPrivateBackgroundPixmap != 0);
+ 		m_pToolsPopup->addSeparator();
+ 		m_pToolsPopup->addAction(__tr2qs("Clear Buffer"),this,SLOT(clearBuffer()));
+--- kvirc/src/kvirc/ui/KviTopicWidget.cpp	(revision 6073)
++++ kvirc/src/kvirc/ui/KviTopicWidget.cpp	(revision 6203)
+@@ -168,5 +168,7 @@
+ 	QFont newFont(KVI_OPTION_FONT(KviOption_fontLabel));
+ 	newFont.setKerning(false);
++#if QT_VERSION >= 0x040700
+ 	newFont.setStyleStrategy(QFont::StyleStrategy(newFont.styleStrategy() | QFont::ForceIntegerMetrics));
++#endif
+ 	setFont(newFont);
+ 	if(m_pCompletionBox)
+--- kvirc/CMakeLists.txt	(revision 6194)
++++ kvirc/CMakeLists.txt	(revision 6204)
+@@ -731,5 +731,9 @@
+ 		ENDIF()
+ 
+-		INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
++		IF(DEFINED PYTHON_INCLUDE_DIRS)
++			INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
++		ELSE()
++			INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
++		ENDIF()
+ 	ELSE()
+ 		SET(CMAKE_STATUS_PYTHON_SUPPORT "No, not found.")
+--- kvirc/src/kvirc/kernel/KviApplication.cpp	(revision 6105)
++++ kvirc/src/kvirc/kernel/KviApplication.cpp	(revision 6205)
+@@ -848,5 +848,5 @@
+ 		pNotify = new KNotification("incomingMessage",KNotification::CloseWhenWidgetActivated,this);
+ #else
+-		pNotify = new KNotification("incomingMessage",this,KNotification::CloseWhenWidgetActivated);
++		pNotify = new KNotification("incomingMessage",g_pMainWindow,KNotification::CloseWhenWidgetActivated);
+ #endif
+ 		pNotify->setFlags(KNotification::Persistent);
diff --git a/kvirc.spec b/kvirc.spec
index 5900569..3996770 100644
--- a/kvirc.spec
+++ b/kvirc.spec
@@ -1,11 +1,13 @@
 Name:             kvirc
 Version:          4.2.0
-Release:          2%{?dist}
+Release:          3%{?dist}
 Summary:          Free portable IRC client
 Group:            Applications/Internet
 License:          GPLv2+ with exceptions
 URL:              http://kvirc.net/
 Source0:          ftp://ftp.kvirc.de/pub/kvirc/%{version}/source/%{name}-%{version}.tar.bz2
+# backport epel fixes from revisions 6199,6201-6205 (thanks to Pragma)
+Patch0:           kvirc-4.2.0-epel.patch
 BuildRequires:    kdelibs4-devel audiofile-devel glib2-devel
 BuildRequires:    python-devel perl-ExtUtils-Embed dbus-devel
 BuildRequires:    cmake desktop-file-utils gettext doxygen graphviz
@@ -24,6 +26,7 @@ many IRC addicted developers around the world.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{cmake}  \
@@ -127,6 +130,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %exclude %{_datadir}/%{name}/4.2/doc/README
 
 %changelog
+* Mon Jul  2 2012 Alexey Kurov <nucleo at fedoraproject.org> - 4.2.0-3
+- fix epel build
+
 * Mon Jul  2 2012 Alexey Kurov <nucleo at fedoraproject.org> - 4.2.0-2
 - new tarball
 


More information about the scm-commits mailing list