add leafpad-noheader
This commit is contained in:
parent
117c7e7345
commit
99c7664d37
|
@ -0,0 +1,53 @@
|
||||||
|
From a489f3678d5e037f44d4aa1e02b7eb30c9097666 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hesse <mail@eworm.de>
|
||||||
|
Date: Tue, 13 Dec 2022 00:22:04 +0100
|
||||||
|
Subject: [PATCH 1/1] fix format-security error from gcc
|
||||||
|
|
||||||
|
Building with `-Werror=format-security` causes several of these errors:
|
||||||
|
|
||||||
|
error: format not a string literal and no format arguments [-Werror=format-security]
|
||||||
|
|
||||||
|
Let's fix by giving a proper format string.
|
||||||
|
---
|
||||||
|
src/dialog.c | 4 ++--
|
||||||
|
src/gtkprint.c | 2 +-
|
||||||
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/dialog.c b/src/dialog.c
|
||||||
|
index 14b69d7..5c4fe82 100644
|
||||||
|
--- a/src/dialog.c
|
||||||
|
+++ b/src/dialog.c
|
||||||
|
@@ -36,7 +36,7 @@ void run_dialog_message(GtkWidget *window,
|
||||||
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
|
type,
|
||||||
|
GTK_BUTTONS_NONE,
|
||||||
|
- str);
|
||||||
|
+ "%s", str);
|
||||||
|
gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
|
||||||
|
gtk_dialog_add_buttons(GTK_DIALOG(dialog),
|
||||||
|
GTK_STOCK_OK, GTK_RESPONSE_CANCEL, NULL);
|
||||||
|
@@ -61,7 +61,7 @@ GtkWidget *create_dialog_message_question(GtkWidget *window, gchar *message, ...
|
||||||
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
|
GTK_MESSAGE_QUESTION,
|
||||||
|
GTK_BUTTONS_NONE,
|
||||||
|
- str);
|
||||||
|
+ "%s", str);
|
||||||
|
gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
|
||||||
|
gtk_dialog_add_buttons(GTK_DIALOG(dialog),
|
||||||
|
GTK_STOCK_NO, GTK_RESPONSE_NO,
|
||||||
|
diff --git a/src/gtkprint.c b/src/gtkprint.c
|
||||||
|
index 3f39384..75e2f68 100644
|
||||||
|
--- a/src/gtkprint.c
|
||||||
|
+++ b/src/gtkprint.c
|
||||||
|
@@ -165,7 +165,7 @@ static void create_error_dialog(GtkTextView *text_view, gchar *message)
|
||||||
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
|
GTK_MESSAGE_ERROR,
|
||||||
|
GTK_BUTTONS_NONE,
|
||||||
|
- message);
|
||||||
|
+ "%s", message);
|
||||||
|
gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
|
||||||
|
gtk_dialog_add_buttons(GTK_DIALOG(dialog),
|
||||||
|
GTK_STOCK_OK, GTK_RESPONSE_CANCEL, NULL);
|
||||||
|
--
|
||||||
|
2.39.0
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
||||||
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
||||||
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
|
||||||
|
# Website : https://pozol.eu
|
||||||
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
||||||
|
|
||||||
|
pkgname=leafpad-noheader
|
||||||
|
_pkgname=leafpad
|
||||||
|
pkgver=0.8.19
|
||||||
|
pkgrel=01
|
||||||
|
pkgdesc="A notepad clone for GTK+ 2.0 with print header disabled"
|
||||||
|
arch=(x86_64)
|
||||||
|
url="http://tarot.freeshell.org/leafpad/"
|
||||||
|
depends=('gtk2' 'desktop-file-utils' 'gtk-update-icon-cache')
|
||||||
|
makedepends=('intltool')
|
||||||
|
conflicts=('leafpad')
|
||||||
|
provides=('leafpad')
|
||||||
|
# key not on server at this time
|
||||||
|
#source=("https://download.savannah.gnu.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz"{,.sig}
|
||||||
|
source=(https://download.savannah.gnu.org/releases/${_pkgname}/${_pkgname}-${pkgver}.tar.gz
|
||||||
|
gtkprint.c.diff
|
||||||
|
0001-fix-format-security-error-from-gcc.patch)
|
||||||
|
prepare() {
|
||||||
|
cd "${srcdir}/${_pkgname}-${pkgver}"
|
||||||
|
|
||||||
|
patch -Np1 < ../0001-fix-format-security-error-from-gcc.patch
|
||||||
|
patch -p0 <../gtkprint.c.diff
|
||||||
|
}
|
||||||
|
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
|
||||||
|
#---- license gpg-key sha256sums ----
|
||||||
|
|
||||||
|
license=('GPL')
|
||||||
|
|
||||||
|
validpgpkeys=('05B80A3FFAF8FED36ADC7A31EE109F4A0F184934') # Tarot Osuji <tarot@sdf.org>
|
||||||
|
|
||||||
|
md5sums=(2fa09a4d80884d32a9b5e4e80c7bbdd7 # leafpad-0.8.19.tar.gz
|
||||||
|
# SKIP
|
||||||
|
a01afce5b77fd78845e1d4985fd3c0f7 # gtkprint.c.diff
|
||||||
|
1b45cff49cfc9a1961256b5cbcba5ed3) # 0001-fix-format-security-error-from-gcc.patch
|
||||||
|
|
||||||
|
sha256sums=(07d3f712f4dbd0a33251fd1dee14e21afdc9f92090fc768c11ab0ac556adbe97 # leafpad-0.8.19.tar.gz
|
||||||
|
# SKIP
|
||||||
|
51f2008f22b4e0ba8c6dc45d1b5ff9c614a7d1eb641917848397241ef212b73f # gtkprint.c.diff
|
||||||
|
2b99426837e0a78077931e33bbfac280b238e0d170366c09e62bf98770e837dc) # 0001-fix-format-security-error-from-gcc.patch
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
# Maintainer: Lex Black <autumn-wind at web dot de>
|
||||||
|
# Contributor: SiD
|
||||||
|
|
||||||
|
pkgname=leafpad-noheader
|
||||||
|
_pkgname=leafpad
|
||||||
|
pkgver=0.8.18.1
|
||||||
|
pkgrel=3
|
||||||
|
pkgdesc="A notepad clone for GTK+ 2.0 with print header disabled"
|
||||||
|
arch=('i686' 'x86_64')
|
||||||
|
url="http://tarot.freeshell.org/leafpad/"
|
||||||
|
license=('GPL')
|
||||||
|
depends=('gtk2' 'desktop-file-utils' 'gtk-update-icon-cache')
|
||||||
|
makedepends=('intltool')
|
||||||
|
conflicts=('leafpad')
|
||||||
|
provides=('leafpad')
|
||||||
|
source=(http://download.savannah.gnu.org/releases/${_pkgname}/${_pkgname}-${pkgver}.tar.gz
|
||||||
|
gtkprint.c.diff)
|
||||||
|
md5sums=('254a72fc67505e3aa52884c729cd7b97'
|
||||||
|
'a01afce5b77fd78845e1d4985fd3c0f7')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "${srcdir}/${_pkgname}-${pkgver}"
|
||||||
|
patch -p0 <../gtkprint.c.diff
|
||||||
|
./configure --prefix=/usr --enable-chooser
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "${srcdir}/${_pkgname}-${pkgver}"
|
||||||
|
make DESTDIR="${pkgdir}" install
|
||||||
|
echo 'StartupNotify=true' >> "${pkgdir}/usr/share/applications/leafpad.desktop"
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
rm -rf {src,pkg,*tar.gz*}
|
|
@ -0,0 +1,8 @@
|
||||||
|
gtk2
|
||||||
|
intltool
|
||||||
|
at-spi2-core
|
||||||
|
|
||||||
|
|
||||||
|
gettext
|
||||||
|
desktop-file-utils
|
||||||
|
gtk-update-icon-cache
|
|
@ -0,0 +1,19 @@
|
||||||
|
--- src/gtkprint.c.orig 2012-01-16 11:13:30.107709300 +0100
|
||||||
|
+++ src/gtkprint.c 2012-01-16 11:14:19.627707187 +0100
|
||||||
|
@@ -94,14 +94,14 @@
|
||||||
|
|
||||||
|
layout_lh = gtk_print_context_create_pango_layout(ctx);
|
||||||
|
pango_layout_set_font_description(layout_lh, font_desc);
|
||||||
|
- pango_layout_set_text(layout_lh, page_title, -1);
|
||||||
|
+// pango_layout_set_text(layout_lh, page_title, -1);
|
||||||
|
cairo_move_to(cr, 0, - 72 / 25.4 * 10);
|
||||||
|
pango_cairo_show_layout(cr, layout_lh);
|
||||||
|
|
||||||
|
page_text = g_strdup_printf("%d / %d", page_nr + 1, n_pages);
|
||||||
|
layout_rh = gtk_print_context_create_pango_layout(ctx);
|
||||||
|
pango_layout_set_font_description(layout_rh, font_desc);
|
||||||
|
- pango_layout_set_text(layout_rh, page_text, -1);
|
||||||
|
+// pango_layout_set_text(layout_rh, page_text, -1);
|
||||||
|
// pango_layout_set_alignment(layout_rh, PANGO_ALIGN_RIGHT);
|
||||||
|
pango_layout_get_size(layout_rh, &layout_width, NULL);
|
||||||
|
cairo_move_to(cr,
|
|
@ -0,0 +1 @@
|
||||||
|
gpg -v --recv-key EE109F4A0F184934
|
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
real 0m11.475s
|
||||||
|
user 0m10.192s
|
||||||
|
sys 0m1.370s
|
||||||
|
|
Loading…
Reference in New Issue