[arch-commits] Commit in lxrandr/trunk (PKGBUILD gtk3.patch)

Balló György bgyorgy at archlinux.org
Sat Feb 20 13:54:11 UTC 2016


    Date: Saturday, February 20, 2016 @ 14:54:11
  Author: bgyorgy
Revision: 162728

upgpkg: lxrandr 0.3.0-2

Add GTK+ 3 version

Added:
  lxrandr/trunk/gtk3.patch
Modified:
  lxrandr/trunk/PKGBUILD

------------+
 PKGBUILD   |   57 +++++++++++++++++++++++++++++++----------
 gtk3.patch |   81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 124 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-02-20 13:51:00 UTC (rev 162727)
+++ PKGBUILD	2016-02-20 13:54:11 UTC (rev 162728)
@@ -1,27 +1,56 @@
 # $Id$
 # Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Maintainer: Geoffroy Carrier <geoffroy.carrier at koon.fr>
+# Contributor: Geoffroy Carrier <geoffroy.carrier at koon.fr>
 
-pkgname=lxrandr
+pkgbase=lxrandr
+pkgname=(lxrandr lxrandr-gtk3)
 pkgver=0.3.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Monitor configuration tool (part of LXDE)"
 arch=('i686' 'x86_64')
 license=('GPL2')
 url="http://lxde.org/"
-groups=('lxde')
-depends=('gtk2' 'xorg-xrandr')
-makedepends=('pkgconfig' 'intltool')
-source=("http://downloads.sourceforge.net/project/lxde/LXRandR%20%28monitor%20config%20tool%29/LXRandR%200.3.x/lxrandr-$pkgver.tar.xz")
-md5sums=('250f0ebb09c1e02f430f951911ba1259')
+depends=('gtk2' 'gtk3' 'xorg-xrandr')
+makedepends=('intltool')
+source=("http://downloads.sourceforge.net/lxde/$pkgbase-$pkgver.tar.xz"
+        'gtk3.patch')
+md5sums=('250f0ebb09c1e02f430f951911ba1259'
+         '9bd90d6eb7db03ae139d6769ca911b02')
 
+prepare() {
+  cd $pkgbase-$pkgver
+  patch -Np1 -i ../gtk3.patch
+}
+
 build() {
-	cd "$srcdir/$pkgname-$pkgver"
-	[ -f Makefile ] || ./configure --sysconfdir=/etc --prefix=/usr
-	make
+  # GTK+ 2 version
+  [ -d gtk2 ] || cp -r $pkgbase-$pkgver gtk2
+  cd gtk2
+  ./configure --sysconfdir=/etc --prefix=/usr
+  make
+
+  cd "$srcdir"
+  # GTK+ 3 version
+  [ -d gtk3 ] || cp -r $pkgbase-$pkgver gtk3
+  cd gtk3
+  ./configure --sysconfdir=/etc --prefix=/usr --enable-gtk3
+  make
 }
 
-package() {
-    cd "$srcdir/$pkgname-$pkgver" 
-	make DESTDIR="$pkgdir" install
+package_lxrandr() {
+  groups=('lxde')
+  depends=('gtk2' 'xorg-xrandr')
+
+  cd gtk2
+  make DESTDIR="$pkgdir" install
 }
+
+package_lxrandr-gtk3() {
+  groups=('lxde-gtk3')
+  pkgdesc+=' (GTK+ 3 version)'
+  depends=('gtk3' 'xorg-xrandr')
+  conflicts=('lxrandr')
+
+  cd gtk3
+  make DESTDIR="$pkgdir" install
+}

Added: gtk3.patch
===================================================================
--- gtk3.patch	                        (rev 0)
+++ gtk3.patch	2016-02-20 13:54:11 UTC (rev 162728)
@@ -0,0 +1,81 @@
+From fc3136f1a246cd0aba23c0f3b3ba43bceeb151d5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor at gmail.com>
+Date: Mon, 15 Dec 2014 16:19:57 +0100
+Subject: [PATCH] Add icon to the about dialog
+
+---
+ src/lxrandr.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/lxrandr.c b/src/lxrandr.c
+index 9c85218..8df9e5f 100644
+--- a/src/lxrandr.c
++++ b/src/lxrandr.c
+@@ -293,6 +293,7 @@ static void on_about( GtkButton* btn, gpointer parent )
+     gtk_about_dialog_set_version ( (GtkAboutDialog*)about_dlg, VERSION );
+     gtk_about_dialog_set_program_name ( (GtkAboutDialog*)about_dlg, _( "LXRandR" ) );
+     //gtk_about_dialog_set_logo( (GtkAboutDialog*)about_dlg, gdk_pixbuf_new_from_file(  PACKAGE_DATA_DIR"/pixmaps/lxrandr.png", NULL ) );
++    gtk_about_dialog_set_logo_icon_name( (GtkAboutDialog*)about_dlg, "display" );
+     gtk_about_dialog_set_copyright ( (GtkAboutDialog*)about_dlg, _( "Copyright (C) 2008-2014" ) );
+     gtk_about_dialog_set_comments ( (GtkAboutDialog*)about_dlg, _( "Monitor configuration tool for LXDE" ) );
+     gtk_about_dialog_set_license ( (GtkAboutDialog*)about_dlg, "This program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nmw program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with mw program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA." );
+-- 
+2.1.4
+
+From 63981447cc1f52becb03f9e4fe2e4093c0ecd2de Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor at gmail.com>
+Date: Sun, 2 Aug 2015 00:45:57 +0200
+Subject: [PATCH] Add MATE to NotShowIn in desktop entries
+
+---
+ data/lxrandr.desktop.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/data/lxrandr.desktop.in b/data/lxrandr.desktop.in
+index 0076502..7a84d8f 100644
+--- a/data/lxrandr.desktop.in
++++ b/data/lxrandr.desktop.in
+@@ -6,4 +6,4 @@ Icon=video-display
+ Terminal=false
+ Type=Application
+ Categories=GTK;Settings;HardwareSettings;X-LXDE-Settings;
+-NotShowIn=GNOME;KDE;XFCE;
++NotShowIn=GNOME;KDE;XFCE;MATE;
+-- 
+2.1.4
+
+From dcf63f170d22c49a71941461191b07d5ec27fefa Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor at gmail.com>
+Date: Tue, 21 Jul 2015 19:43:46 +0200
+Subject: [PATCH] Use video-display as icon
+
+It's already used in .desktop file.
+---
+ src/lxrandr.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/lxrandr.c b/src/lxrandr.c
+index 8df9e5f..33e02b2 100644
+--- a/src/lxrandr.c
++++ b/src/lxrandr.c
+@@ -293,7 +293,7 @@ static void on_about( GtkButton* btn, gpointer parent )
+     gtk_about_dialog_set_version ( (GtkAboutDialog*)about_dlg, VERSION );
+     gtk_about_dialog_set_program_name ( (GtkAboutDialog*)about_dlg, _( "LXRandR" ) );
+     //gtk_about_dialog_set_logo( (GtkAboutDialog*)about_dlg, gdk_pixbuf_new_from_file(  PACKAGE_DATA_DIR"/pixmaps/lxrandr.png", NULL ) );
+-    gtk_about_dialog_set_logo_icon_name( (GtkAboutDialog*)about_dlg, "display" );
++    gtk_about_dialog_set_logo_icon_name( (GtkAboutDialog*)about_dlg, "video-display" );
+     gtk_about_dialog_set_copyright ( (GtkAboutDialog*)about_dlg, _( "Copyright (C) 2008-2014" ) );
+     gtk_about_dialog_set_comments ( (GtkAboutDialog*)about_dlg, _( "Monitor configuration tool for LXDE" ) );
+     gtk_about_dialog_set_license ( (GtkAboutDialog*)about_dlg, "This program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nmw program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with mw program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA." );
+@@ -707,7 +707,7 @@ int main(int argc, char** argv)
+     gtk_dialog_set_alternative_button_order( GTK_DIALOG(dlg), GTK_RESPONSE_OK, GTK_RESPONSE_CANCEL, -1 );
+ 
+     /* Set icon name for main (dlg) window so it displays in the panel. */
+-    gtk_window_set_icon_name(GTK_WINDOW(dlg), "display");
++    gtk_window_set_icon_name(GTK_WINDOW(dlg), "video-display");
+ 
+     btn = gtk_button_new_from_stock( GTK_STOCK_ABOUT );
+ #if GTK_CHECK_VERSION(2,14,0)
+-- 
+2.1.4
+



More information about the arch-commits mailing list