Browse Source

[trunk] -> [extra] 'leafpad-0.8.18.1-9' add

master
Dudemanguy 1 year ago
parent
commit
d9ae20b61d
Signed by: Dudemanguy GPG Key ID: 4003D2EF625D6492
  1. 20
      leafpad/trunk/0001-truncate.patch
  2. 36
      leafpad/trunk/PKGBUILD
  3. 20
      leafpad/x86_64/extra/0001-truncate.patch
  4. 36
      leafpad/x86_64/extra/PKGBUILD

20
leafpad/trunk/0001-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);

36
leafpad/trunk/PKGBUILD

@ -0,0 +1,36 @@
# Maintainer: Aaron Griffin <aaron@archlinux.org>
# Contributor: Link Dupont <link@subpop.net>
pkgname=leafpad
pkgver=0.8.18.1
pkgrel=9
pkgdesc="A notepad clone for GTK+ 2.0"
arch=('x86_64')
url="http://tarot.freeshell.org/leafpad/"
license=('GPL')
depends=('gtk2')
makedepends=('intltool')
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
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
echo 'StartupNotify=true' >> "${pkgdir}/usr/share/applications/leafpad.desktop"
}

20
leafpad/x86_64/extra/0001-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);

36
leafpad/x86_64/extra/PKGBUILD

@ -0,0 +1,36 @@
# Maintainer: Aaron Griffin <aaron@archlinux.org>
# Contributor: Link Dupont <link@subpop.net>
pkgname=leafpad
pkgver=0.8.18.1
pkgrel=9
pkgdesc="A notepad clone for GTK+ 2.0"
arch=('x86_64')
url="http://tarot.freeshell.org/leafpad/"
license=('GPL')
depends=('gtk2')
makedepends=('intltool')
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
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
echo 'StartupNotify=true' >> "${pkgdir}/usr/share/applications/leafpad.desktop"
}
Loading…
Cancel
Save