[arch-commits] Commit in xdialog/repos (3 files)
Felix Yan
felixonmars at archlinux.org
Tue Jul 7 17:03:33 UTC 2020
Date: Tuesday, July 7, 2020 @ 17:03:32
Author: felixonmars
Revision: 659526
archrelease: copy trunk to community-staging-x86_64
Added:
xdialog/repos/community-staging-x86_64/
xdialog/repos/community-staging-x86_64/PKGBUILD
(from rev 659524, xdialog/trunk/PKGBUILD)
xdialog/repos/community-staging-x86_64/xdialog-2.3.1-gtk2.patch
(from rev 659524, xdialog/trunk/xdialog-2.3.1-gtk2.patch)
--------------------------+
PKGBUILD | 32 ++++++++++++++++++++++++
xdialog-2.3.1-gtk2.patch | 58 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 90 insertions(+)
Copied: xdialog/repos/community-staging-x86_64/PKGBUILD (from rev 659524, xdialog/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2020-07-07 17:03:32 UTC (rev 659526)
@@ -0,0 +1,32 @@
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: Juergen Hoetzel <juergen at archlinux.org>
+# Contributor: Tom Newsom <Jeepster at gmx.co.uk>
+
+pkgname=xdialog
+pkgver=2.3.1
+pkgrel=9
+pkgdesc="A drop-in replacement for the 'dialog' or 'cdialog' programs"
+url="http://xdialog.dyns.net/"
+arch=('x86_64')
+depends=('gtk2')
+license=('GPL')
+source=("http://xdialog.free.fr/Xdialog-${pkgver}.tar.bz2"
+ "xdialog-2.3.1-gtk2.patch")
+sha512sums=('2a0f6e15297ae3ef54a41da1b1fe2ef376d28757d47433df2b8e9918cd4f95871a630b94ec544bd848e518df7f86934030a71bf0371a1466286bf7d912335525'
+ 'e1a1d4e93946f89a9f4d2a619fcb0069cd5e6ec1b0c3a3ebcd87b1b601c07a7941ad1edeb1cbe89f22f993667c4431c496a6c9b35a13fd9e7d1b8dbd89546694')
+
+build() {
+ cd "$srcdir"/Xdialog-$pkgver
+ patch -p1 <../xdialog-$pkgver-gtk2.patch
+ ./configure --prefix=/usr \
+ --mandir="$pkgdir"/usr/share/man --with-gtk2
+ # Fix bugs in automake - see Xdialog.spec
+ sed -i -e "s:RANLIB = @RANLIB@:RANLIB = /usr/bin/ranlib:" lib/Makefile
+ sed -i -e "s;XGETTEXT = :;XGETTEXT = /usr/bin/xgettext;" po/Makefile
+ make
+}
+
+package() {
+ cd "$srcdir"/Xdialog-${pkgver}
+ make prefix="$pkgdir"/usr install
+}
Copied: xdialog/repos/community-staging-x86_64/xdialog-2.3.1-gtk2.patch (from rev 659524, xdialog/trunk/xdialog-2.3.1-gtk2.patch)
===================================================================
--- community-staging-x86_64/xdialog-2.3.1-gtk2.patch (rev 0)
+++ community-staging-x86_64/xdialog-2.3.1-gtk2.patch 2020-07-07 17:03:32 UTC (rev 659526)
@@ -0,0 +1,58 @@
+diff -Naur Xdialog-2.3.1-orig/src/interface.c Xdialog-2.3.1/src/interface.c
+--- Xdialog-2.3.1-orig/src/interface.c 2006-08-18 18:13:12.000000000 +0200
++++ Xdialog-2.3.1/src/interface.c 2006-10-17 21:33:45.000000000 +0200
+@@ -183,6 +183,11 @@
+ /* Open a new GTK top-level window */
+ window = Xdialog.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+
++ /* Set window icon (in GTK2 mode only) */
++ #ifdef USE_GTK2
++ gtk_window_set_icon_name(window, Xdialog.icon_file);
++ #endif
++
+ /* Apply the custom GTK+ theme, if any. */
+ parse_rc_file();
+
+@@ -276,9 +281,6 @@
+ {
+ GtkWidget *label;
+ GtkWidget *hbox;
+- GdkBitmap *mask;
+- GdkColor transparent;
+- GdkPixmap *pixmap;
+ GtkWidget *icon;
+ gchar text[MAX_LABEL_LENGTH];
+ int icon_width = 0;
+@@ -287,6 +289,22 @@
+ gtk_box_pack_start(Xdialog.vbox, hbox, expand, TRUE, ymult/3);
+
+ if (Xdialog.icon) {
++
++#ifdef USE_GTK2
++ if (Xdialog.icon_file != NULL) {
++ icon = gtk_image_new_from_icon_name (Xdialog.icon_file, GTK_ICON_SIZE_DIALOG);
++ /*icon = gtk_image_new_from_file (Xdialog.icon_file);*/
++
++ gtk_box_pack_start(GTK_BOX(hbox), icon, FALSE, FALSE, 2);
++ gtk_widget_show(icon);
++ icon_width = 60;
++ }
++
++#else
++
++ GdkBitmap *mask;
++ GdkColor transparent;
++ GdkPixmap *pixmap;
+ pixmap = gdk_pixmap_create_from_xpm(Xdialog.window->window,
+ &mask, &transparent,
+ Xdialog.icon_file);
+@@ -298,6 +316,9 @@
+ gtk_widget_show(icon);
+ icon_width = icon->requisition.width + 4;
+ }
++
++#endif
++
+ }
+
+ trim_string(label_text, text, MAX_LABEL_LENGTH);
More information about the arch-commits
mailing list