commit:     54fb35c25f20b7dd790c415b604a9163fe80db04
Author:     Johannes Huber <johu <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 27 11:50:10 2016 +0000
Commit:     Johannes Huber <johu <AT> gentoo <DOT> org>
CommitDate: Wed Apr 27 11:51:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54fb35c2

kde-frameworks/kcoreaddons: Fix weak random number generator

Revision bump adds upstream patch to fix a regression introduced in 5.21.0.
See https://mail.kde.org/pipermail/kde-distro-packagers/2016-April/000157.html.

Gentoo-bug: 581352

Package-Manager: portage-2.2.28

 .../files/kcoreaddons-5.21.0-random.patch          | 25 ++++++++++++++++
 .../kcoreaddons/kcoreaddons-5.21.0-r1.ebuild       | 33 ++++++++++++++++++++++
 2 files changed, 58 insertions(+)

diff --git a/kde-frameworks/kcoreaddons/files/kcoreaddons-5.21.0-random.patch 
b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.21.0-random.patch
new file mode 100644
index 0000000..6aa913a
--- /dev/null
+++ b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.21.0-random.patch
@@ -0,0 +1,25 @@
+commit 78212436643af95779facd9593c82fb149c2213d
+Author: Albert Astals Cid <[email protected]>
+Date:   Tue Apr 26 23:41:27 2016 +0200
+
+    Missing rand() -> qrand
+    
+    Fixes regression introduced in 9ae6d765b37135bbfe3a8b936e5a88b8a435e424
+    
+    Reviewed by Aleix
+    
+    BUGS: 362161
+
+diff --git a/src/lib/randomness/krandom.cpp b/src/lib/randomness/krandom.cpp
+index eef6bf6..eaff71f 100644
+--- a/src/lib/randomness/krandom.cpp
++++ b/src/lib/randomness/krandom.cpp
+@@ -51,7 +51,7 @@ int KRandom::random()
+         }
+         qsrand(seed);
+     }
+-    return rand();
++    return qrand();
+ }
+ 
+ QString KRandom::randomString(int length)

diff --git a/kde-frameworks/kcoreaddons/kcoreaddons-5.21.0-r1.ebuild 
b/kde-frameworks/kcoreaddons/kcoreaddons-5.21.0-r1.ebuild
new file mode 100644
index 0000000..fb0cc78
--- /dev/null
+++ b/kde-frameworks/kcoreaddons/kcoreaddons-5.21.0-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit kde5
+
+DESCRIPTION="Framework for solving common problems such as caching, 
randomisation, and more"
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="fam nls"
+
+RDEPEND="
+       $(add_qt_dep qtcore 'icu')
+       fam? ( virtual/fam )
+       !<kde-frameworks/kservice-5.2.0:5
+"
+DEPEND="${RDEPEND}
+       x11-misc/shared-mime-info
+       nls? ( $(add_qt_dep linguist-tools) )
+"
+
+PATCHES=( "${FILESDIR}/${P}-random.patch" )
+
+src_configure() {
+       local mycmakeargs=(
+               -D_KDE4_DEFAULT_HOME_POSTFIX=4
+               $(cmake-utils_use_find_package fam FAM)
+       )
+
+       kde5_src_configure
+}

Reply via email to