summaryrefslogtreecommitdiff
path: root/community/xdialog
diff options
context:
space:
mode:
Diffstat (limited to 'community/xdialog')
-rw-r--r--community/xdialog/PKGBUILD33
-rw-r--r--community/xdialog/xdialog-2.3.1-gtk2.patch58
2 files changed, 91 insertions, 0 deletions
diff --git a/community/xdialog/PKGBUILD b/community/xdialog/PKGBUILD
new file mode 100644
index 000000000..ddc3a1601
--- /dev/null
+++ b/community/xdialog/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 65245 2012-02-20 12:31:35Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Juergen Hoetzel <juergen@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=xdialog
+pkgver=2.3.1
+pkgrel=6
+pkgdesc="A drop-in replacement for the 'dialog' or 'cdialog' programs"
+url="http://xdialog.dyns.net/"
+arch=('i686' 'x86_64')
+depends=('gtk2')
+license=('GPL')
+source=("http://xdialog.free.fr/Xdialog-${pkgver}.tar.bz2"
+ "xdialog-2.3.1-gtk2.patch")
+md5sums=('0671f8353717513bf1f0ebc80e9710f6'
+ '1785edbb50316ba07c3ab68f061bf766')
+
+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
+}
diff --git a/community/xdialog/xdialog-2.3.1-gtk2.patch b/community/xdialog/xdialog-2.3.1-gtk2.patch
new file mode 100644
index 000000000..ffee78dc2
--- /dev/null
+++ b/community/xdialog/xdialog-2.3.1-gtk2.patch
@@ -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);