summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2018-10-20 18:45:59 +0200
committerPacho Ramos <pacho@gentoo.org>2018-10-20 18:53:18 +0200
commit2a58c0bbe20e4e31e68f826fa0197deb7ea91f9a (patch)
treeed9c74c15344d40daa99c0bdb1883941b863d75e /app-editors/leafpad
parentmedia-fonts/kanjistrokeorders: amd64 x86 ALLARCHES stable (diff)
downloadgentoo-2a58c0bbe20e4e31e68f826fa0197deb7ea91f9a.tar.gz
gentoo-2a58c0bbe20e4e31e68f826fa0197deb7ea91f9a.tar.bz2
gentoo-2a58c0bbe20e4e31e68f826fa0197deb7ea91f9a.zip
app-editors/leafpad: Fix truncation bug (#657462 by Alexander Kurakin)
Closes: https://bugs.gentoo.org/657462 Signed-off-by: Pacho Ramos <pacho@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'app-editors/leafpad')
-rw-r--r--app-editors/leafpad/files/leafpad-0.8.18.1-truncate.patch20
-rw-r--r--app-editors/leafpad/leafpad-0.8.18.1-r1.ebuild49
2 files changed, 69 insertions, 0 deletions
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
new file mode 100644
index 000000000000..872792199c80
--- /dev/null
+++ b/app-editors/leafpad/files/leafpad-0.8.18.1-truncate.patch
@@ -0,0 +1,20 @@
+diff --git a/src/file.c b/src/file.c
+index 5e44a43..4c90a37 100644
+--- a/src/file.c
++++ b/src/file.c
+@@ -190,6 +190,7 @@ gint file_save_real(GtkWidget *view, FileInfo *fi)
+ gtk_text_buffer_get_start_iter(buffer, &start);
+ gtk_text_buffer_get_end_iter(buffer, &end);
+ str = gtk_text_buffer_get_text(buffer, &start, &end, FALSE);
++ gtk_text_buffer_set_modified(buffer, FALSE);
+
+ switch (fi->lineend) {
+ case CR:
+@@ -229,7 +230,6 @@ gint file_save_real(GtkWidget *view, FileInfo *fi)
+ return -1;
+ }
+
+- gtk_text_buffer_set_modified(buffer, FALSE);
+ fclose(fp);
+ g_free(cstr);
+
diff --git a/app-editors/leafpad/leafpad-0.8.18.1-r1.ebuild b/app-editors/leafpad/leafpad-0.8.18.1-r1.ebuild
new file mode 100644
index 000000000000..e1af082f7930
--- /dev/null
+++ b/app-editors/leafpad/leafpad-0.8.18.1-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit gnome2-utils xdg-utils
+
+DESCRIPTION="A simple GTK2 text editor"
+HOMEPAGE="http://tarot.freeshell.org/leafpad/"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="emacs"
+
+RDEPEND="
+ virtual/libintl
+ x11-libs/gtk+:2
+"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fdo.patch
+ "${FILESDIR}"/${P}-format-security.patch
+
+ # https://bugs.gentoo.org/657462
+ "${FILESDIR}"/${P}-truncate.patch
+)
+
+src_configure() {
+ econf \
+ --enable-chooser \
+ --enable-print \
+ $(use_enable emacs)
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}