From 99c46ebc39354773af9e6d048ac65cf1599c7209 Mon Sep 17 00:00:00 2001 From: Ali Cengiz Kurt Date: Tue, 12 Nov 2024 13:02:57 +0300 Subject: [PATCH] New Package gpaint --- desktop/gnome/apps/gpaint/actions.py | 26 ++++++++ .../21_fix_crash_on_fill_button_click.dpatch | 24 +++++++ .../gnome/apps/gpaint/files/gpaint.desktop | 11 ++++ desktop/gnome/apps/gpaint/pspec.xml | 64 +++++++++++++++++++ 4 files changed, 125 insertions(+) create mode 100644 desktop/gnome/apps/gpaint/actions.py create mode 100644 desktop/gnome/apps/gpaint/files/21_fix_crash_on_fill_button_click.dpatch create mode 100644 desktop/gnome/apps/gpaint/files/gpaint.desktop create mode 100644 desktop/gnome/apps/gpaint/pspec.xml diff --git a/desktop/gnome/apps/gpaint/actions.py b/desktop/gnome/apps/gpaint/actions.py new file mode 100644 index 0000000000..7d5962ecaf --- /dev/null +++ b/desktop/gnome/apps/gpaint/actions.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools +from pisi.actionsapi import get + +def setup(): + shelltools.system("""sed -i 's#GTK_RESPONSE_DISCARD#GTK_RESPONSE_NO#' src/drawing.c""") + +def build(): + autotools.configure(" --prefix=/usr") + autotools.make("LDFLAGS+=-lm") + +def install(): + autotools.rawInstall("DESTDIR=%s" % get.installDIR()) + pisitools.insinto("/usr/bin/","src/gpaint-2", "gpaint") + pisitools.dodoc("ABOUT-NLS", "AUTHORS", "COPYING", "NEWS", "README", "THANKS", "TODO") + shelltools.cd("%s/usr/" % get.installDIR()) + shelltools.system("rm -rf bin/gpaint-2") + shelltools.system("rm -rf share/applications/gpaint.desktop") + diff --git a/desktop/gnome/apps/gpaint/files/21_fix_crash_on_fill_button_click.dpatch b/desktop/gnome/apps/gpaint/files/21_fix_crash_on_fill_button_click.dpatch new file mode 100644 index 0000000000..af17a2beb0 --- /dev/null +++ b/desktop/gnome/apps/gpaint/files/21_fix_crash_on_fill_button_click.dpatch @@ -0,0 +1,24 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 21_fix_crash_on_fill_button_click.dpatch by Goedson Teixeira Paixao +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Check that tool->canvas->drawing_area is not null when casting it to a +## DP: GtkWidget. + +@DPATCH@ +Index: pkg-gpaint/src/text.c +=================================================================== +--- pkg-gpaint.orig/src/text.c 2009-12-22 21:03:29.000000000 -0200 ++++ pkg-gpaint/src/text.c 2009-12-23 13:01:33.000000000 -0200 +@@ -156,7 +156,10 @@ + { + debug_fn(); + GtkStyle *style; +- GtkWidget *widget = GTK_WIDGET(tool->canvas->drawing_area); ++ GtkWidget *widget = NULL; ++ ++ if ((tool->canvas == NULL) || (tool->canvas->drawing_area == NULL)) return FALSE; ++ widget = GTK_WIDGET(tool->canvas->drawing_area); + style = gtk_widget_get_style(widget); + g_assert(style); + diff --git a/desktop/gnome/apps/gpaint/files/gpaint.desktop b/desktop/gnome/apps/gpaint/files/gpaint.desktop new file mode 100644 index 0000000000..da886644ce --- /dev/null +++ b/desktop/gnome/apps/gpaint/files/gpaint.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=GNU Paint +Comment=A small-scale painting program for GNOME and the GNU Desktop +Comment[fr]=Un petit outil de dessin pour GNOME, le desktop GNU +Comment[pt_BR]=Um pequeno programa de desenho para o GNOME, o Desktop GNU +TryExec=gpaint +Exec=gpaint +Icon=gnome-logo-icon-transparent.png +Terminal=0 +Type=Application +Categories=Graphics;2DGraphics;RasterGraphics; diff --git a/desktop/gnome/apps/gpaint/pspec.xml b/desktop/gnome/apps/gpaint/pspec.xml new file mode 100644 index 0000000000..1d968931e8 --- /dev/null +++ b/desktop/gnome/apps/gpaint/pspec.xml @@ -0,0 +1,64 @@ + + + + + gpaint + https://savannah.gnu.org/projects/gpain/ + + Pisi Linux Admins + admin@pisilinux.org + + LGPL + app:gui + gnome-logo-icon-transparent + A small easy-to-use paint program for the GNOME Desktop + Gnome desktop için kullanımı kolay bir boyama arayüzüdür + ftp://alpha.gnu.org/gnu/gpaint/gpaint-2-0.3.4.tar.gz + + libglade-devel + gdk-pixbuf-devel + atk-devel + gtk2-devel + cairo-devel + glib2-devel + pango-devel + + + + 21_fix_crash_on_fill_button_click.dpatch + + + + + gpaint + + libglade + gdk-pixbuf + atk + gtk2 + cairo + glib2 + pango + + + /usr/bin + /usr/share/locale + /usr/share/applications + /usr/share/gpaint + /usr/share/doc + + + gpaint.desktop + + + + + + 2024-11-11 + 0.3.4 + First Release. + Ali Cengiz Kurt + alicengizkurt@gmail.com + + +