Date: Saturday, August 5, 2017 @ 17:55:31
  Author: eworm
Revision: 301686

upgpkg: leafpad 0.8.18.1-7

do not truncate files when saving to gvfs (FS#44681)

Added:
  leafpad/trunk/0001-truncate.patch
Modified:
  leafpad/trunk/PKGBUILD

---------------------+
 0001-truncate.patch |   20 ++++++++++++++++++++
 PKGBUILD            |   16 +++++++++++++---
 2 files changed, 33 insertions(+), 3 deletions(-)

Added: 0001-truncate.patch
===================================================================
--- 0001-truncate.patch                         (rev 0)
+++ 0001-truncate.patch 2017-08-05 17:55:31 UTC (rev 301686)
@@ -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);
+       

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2017-08-05 10:23:38 UTC (rev 301685)
+++ PKGBUILD    2017-08-05 17:55:31 UTC (rev 301686)
@@ -4,7 +4,7 @@
 
 pkgname=leafpad
 pkgver=0.8.18.1
-pkgrel=6
+pkgrel=7
 pkgdesc="A notepad clone for GTK+ 2.0"
 arch=('i686' 'x86_64')
 url="http://tarot.freeshell.org/leafpad/";
@@ -11,11 +11,20 @@
 license=('GPL')
 depends=('gtk2')
 makedepends=('intltool')
-source=("https://download.savannah.gnu.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz";)
-sha256sums=('959d22ae07f22803bc66ff40d373a854532a6e4732680bf8a96a3fbcb9f80a2c')
+source=("https://download.savannah.gnu.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz";
+        '0001-truncate.patch')
+sha256sums=('959d22ae07f22803bc66ff40d373a854532a6e4732680bf8a96a3fbcb9f80a2c'
+            '9d9073ec4684e77cd1a6dd0cec4351750f9f61f2a6bab0e97f06ae6d00b7d2c4')
 
+prepare() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  patch -Np1 < "${srcdir}/"0001-truncate.patch
+}
+
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
+
   ./configure --prefix=/usr --enable-chooser
   make
 }
@@ -22,6 +31,7 @@
 
 package() {
   cd "${srcdir}/${pkgname}-${pkgver}"
+
   make DESTDIR="${pkgdir}" install
   echo 'StartupNotify=true' >> 
"${pkgdir}/usr/share/applications/leafpad.desktop"
 }

Reply via email to