Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/leafpad/, app-editors/leafpad/files/
Date: Sat, 20 Oct 2018 16:53:41
Message-Id: 1540054398.2a58c0bbe20e4e31e68f826fa0197deb7ea91f9a.pacho@gentoo
1 commit: 2a58c0bbe20e4e31e68f826fa0197deb7ea91f9a
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 20 16:45:59 2018 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 20 16:53:18 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a58c0bb
7
8 app-editors/leafpad: Fix truncation bug (#657462 by Alexander Kurakin)
9
10 Closes: https://bugs.gentoo.org/657462
11 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
12 Package-Manager: Portage-2.3.51, Repoman-2.3.11
13
14 .../leafpad/files/leafpad-0.8.18.1-truncate.patch | 20 +++++++++
15 app-editors/leafpad/leafpad-0.8.18.1-r1.ebuild | 49 ++++++++++++++++++++++
16 2 files changed, 69 insertions(+)
17
18 diff --git a/app-editors/leafpad/files/leafpad-0.8.18.1-truncate.patch b/app-editors/leafpad/files/leafpad-0.8.18.1-truncate.patch
19 new file mode 100644
20 index 00000000000..872792199c8
21 --- /dev/null
22 +++ b/app-editors/leafpad/files/leafpad-0.8.18.1-truncate.patch
23 @@ -0,0 +1,20 @@
24 +diff --git a/src/file.c b/src/file.c
25 +index 5e44a43..4c90a37 100644
26 +--- a/src/file.c
27 ++++ b/src/file.c
28 +@@ -190,6 +190,7 @@ gint file_save_real(GtkWidget *view, FileInfo *fi)
29 + gtk_text_buffer_get_start_iter(buffer, &start);
30 + gtk_text_buffer_get_end_iter(buffer, &end);
31 + str = gtk_text_buffer_get_text(buffer, &start, &end, FALSE);
32 ++ gtk_text_buffer_set_modified(buffer, FALSE);
33 +
34 + switch (fi->lineend) {
35 + case CR:
36 +@@ -229,7 +230,6 @@ gint file_save_real(GtkWidget *view, FileInfo *fi)
37 + return -1;
38 + }
39 +
40 +- gtk_text_buffer_set_modified(buffer, FALSE);
41 + fclose(fp);
42 + g_free(cstr);
43 +
44
45 diff --git a/app-editors/leafpad/leafpad-0.8.18.1-r1.ebuild b/app-editors/leafpad/leafpad-0.8.18.1-r1.ebuild
46 new file mode 100644
47 index 00000000000..e1af082f793
48 --- /dev/null
49 +++ b/app-editors/leafpad/leafpad-0.8.18.1-r1.ebuild
50 @@ -0,0 +1,49 @@
51 +# Copyright 1999-2018 Gentoo Authors
52 +# Distributed under the terms of the GNU General Public License v2
53 +
54 +EAPI=6
55 +inherit gnome2-utils xdg-utils
56 +
57 +DESCRIPTION="A simple GTK2 text editor"
58 +HOMEPAGE="http://tarot.freeshell.org/leafpad/"
59 +SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz"
60 +
61 +LICENSE="GPL-2"
62 +SLOT="0"
63 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
64 +IUSE="emacs"
65 +
66 +RDEPEND="
67 + virtual/libintl
68 + x11-libs/gtk+:2
69 +"
70 +DEPEND="${RDEPEND}
71 + dev-util/intltool
72 + sys-devel/gettext
73 + virtual/pkgconfig
74 +"
75 +
76 +PATCHES=(
77 + "${FILESDIR}"/${P}-fdo.patch
78 + "${FILESDIR}"/${P}-format-security.patch
79 +
80 + # https://bugs.gentoo.org/657462
81 + "${FILESDIR}"/${P}-truncate.patch
82 +)
83 +
84 +src_configure() {
85 + econf \
86 + --enable-chooser \
87 + --enable-print \
88 + $(use_enable emacs)
89 +}
90 +
91 +pkg_postinst() {
92 + xdg_desktop_database_update
93 + gnome2_icon_cache_update
94 +}
95 +
96 +pkg_postrm() {
97 + xdg_desktop_database_update
98 + gnome2_icon_cache_update
99 +}