1 |
commit: d60c008b361706c71d07aec349a0a94158f7a199 |
2 |
Author: Johannes Huber <johu <AT> gmx <DOT> de> |
3 |
AuthorDate: Sat Nov 19 21:47:25 2011 +0000 |
4 |
Commit: Johannes Huber <johu <AT> gmx <DOT> de> |
5 |
CommitDate: Sat Nov 19 21:47:25 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=d60c008b |
7 |
|
8 |
[kde-misc/plasma-emergelog] Revbump 0.0.2, patch added. Fix bug 391037. Thanks |
9 |
David E. Narváez <david.narvaez <AT> computer.org>. |
10 |
|
11 |
(Portage version: 2.2.0_alpha76/git/Linux i686, unsigned Manifest commit) |
12 |
|
13 |
--- |
14 |
.../files/plasma-emergelog-0.0.2-list.patch | 21 +++++++++++++ |
15 |
.../plasma-emergelog-0.0.2-r1.ebuild | 32 ++++++++++++++++++++ |
16 |
2 files changed, 53 insertions(+), 0 deletions(-) |
17 |
|
18 |
diff --git a/kde-misc/plasma-emergelog/files/plasma-emergelog-0.0.2-list.patch b/kde-misc/plasma-emergelog/files/plasma-emergelog-0.0.2-list.patch |
19 |
new file mode 100644 |
20 |
index 0000000..732cde2 |
21 |
--- /dev/null |
22 |
+++ b/kde-misc/plasma-emergelog/files/plasma-emergelog-0.0.2-list.patch |
23 |
@@ -0,0 +1,21 @@ |
24 |
+diff --git plasma-emergelog.cpp plasma-emergelog.cpp |
25 |
+index 362eaa3..f3e8ea8 100644 |
26 |
+--- old/plasma-emergelog-0.0.2/plasma-emergelog.cpp |
27 |
++++ new/plasma-emergelog-0.0.2/plasma-emergelog.cpp |
28 |
+@@ -35,6 +35,7 @@ |
29 |
+ #include "plasma-emergelog-painter.h" |
30 |
+ #include <exception> |
31 |
+ #include <iostream> |
32 |
++#include <cmath> |
33 |
+ |
34 |
+ |
35 |
+ class myexception: public std::exception |
36 |
+@@ -167,7 +168,7 @@ void emergelog::process_data(){ |
37 |
+ /* Create a list . Each element is a line from that file */ |
38 |
+ list = data.split('\n', QString::SkipEmptyParts); |
39 |
+ /* read the block BACKWARDS */ |
40 |
+- for (int i=list.size()-1;i>(list.size()-(document->maximumBlockCount()));i--){ |
41 |
++ for (int i=list.size()-1;i>std::max<int>(0, list.size()-(document->maximumBlockCount()));i--){ |
42 |
+ if(cursor.position() != 0){ |
43 |
+ cursor.insertBlock(); |
44 |
+ } |
45 |
|
46 |
diff --git a/kde-misc/plasma-emergelog/plasma-emergelog-0.0.2-r1.ebuild b/kde-misc/plasma-emergelog/plasma-emergelog-0.0.2-r1.ebuild |
47 |
new file mode 100644 |
48 |
index 0000000..5b888de |
49 |
--- /dev/null |
50 |
+++ b/kde-misc/plasma-emergelog/plasma-emergelog-0.0.2-r1.ebuild |
51 |
@@ -0,0 +1,32 @@ |
52 |
+# Copyright 1999-2011 Gentoo Foundation |
53 |
+# Distributed under the terms of the GNU General Public License v2 |
54 |
+# $Header: $ |
55 |
+ |
56 |
+EAPI=4 |
57 |
+ |
58 |
+inherit kde4-base |
59 |
+ |
60 |
+DESCRIPTION="Kde4 plasmoid for monitoring emerge progress on Gentoo Linux" |
61 |
+HOMEPAGE="http://www.kde-look.org/content/show.php?content=103928" |
62 |
+SRC_URI="http://dev.gentooexperimental.org/~hwoarang/projects/plasma-emergelog/${P}.tar.gz" |
63 |
+ |
64 |
+LICENSE="GPL-2" |
65 |
+KEYWORDS="~amd64 ~x86" |
66 |
+SLOT="0" |
67 |
+IUSE="debug" |
68 |
+ |
69 |
+RDEPEND=" |
70 |
+ $(add_kdebase_dep plasma-workspace) |
71 |
+" |
72 |
+ |
73 |
+PATCHES=( |
74 |
+ "${FILESDIR}"/${PN}-0.0.2-list.patch |
75 |
+) |
76 |
+ |
77 |
+pkg_postinst() { |
78 |
+ kde4-base_pkg_postinst |
79 |
+ einfo "You need to add your user to 'portage' group" |
80 |
+ einfo "in order to use this plasmoid. To do that, use" |
81 |
+ einfo "the following command:" |
82 |
+ einfo "usermod -a -G portage <your_user_here>" |
83 |
+} |