summaryrefslogtreecommitdiff
path: root/community/lxlauncher
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/lxlauncher
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/lxlauncher')
-rw-r--r--community/lxlauncher/PKGBUILD37
-rw-r--r--community/lxlauncher/intltool.patch16
-rw-r--r--community/lxlauncher/lxlauncher-0.2.1-dsofix.patch12
-rw-r--r--community/lxlauncher/lxlauncher-0.2.1-fix-SUSE-lint-warnings.patch32
-rw-r--r--community/lxlauncher/lxlauncher-0.2.1-fix-for-the-new-behavior-of-libmenu-cache-0.3-series.patch125
5 files changed, 222 insertions, 0 deletions
diff --git a/community/lxlauncher/PKGBUILD b/community/lxlauncher/PKGBUILD
new file mode 100644
index 000000000..9db05a071
--- /dev/null
+++ b/community/lxlauncher/PKGBUILD
@@ -0,0 +1,37 @@
+#$Id: PKGBUILD 12709 2010-03-12 12:03:21Z angvp $
+# Maintainer: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
+# Maintainer: Geoffroy Carrier <geoffroy.carrier@koon.fr>
+pkgname=lxlauncher
+pkgver=0.2.1
+pkgrel=3
+pkgdesc="Launcher for Asus EeePC (part of LXDE)"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://lxde.org/"
+groups=('lxde')
+depends=('gtk2' 'startup-notification' 'gnome-menus' 'menu-cache' 'intltool')
+makedepends=('pkgconfig')
+source=(http://downloads.sourceforge.net/sourceforge/lxde/${pkgname}-${pkgver}.tar.gz
+ lxlauncher-0.2.1-fix-SUSE-lint-warnings.patch
+ lxlauncher-0.2.1-fix-for-the-new-behavior-of-libmenu-cache-0.3-series.patch
+ lxlauncher-0.2.1-dsofix.patch
+ intltool.patch)
+md5sums=('5dbe6076eb1a411278e1fc2bccf2d75d'
+ '3a4355047d4cfb149ef6a0fa6001b990'
+ 'ab568453c9bac6848ca6c8cdcf61b371'
+ 'fa7fd2a1691c6bad86a5278770b38db1'
+ 'bd04ebee868915da9d64ec9becc1212d')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ # Adding patches thanks to CWickert and AndyRTR
+ patch -Np1 -i $srcdir/lxlauncher-0.2.1-fix-SUSE-lint-warnings.patch || return 1
+ patch -Np1 -i $srcdir/lxlauncher-0.2.1-fix-for-the-new-behavior-of-libmenu-cache-0.3-series.patch || return 1
+ patch -Np1 -i $srcdir/lxlauncher-0.2.1-dsofix.patch || return 1
+ #patch -Np1 -i $srcdir/01_fix_infinite_loop.dpatch || return 1
+ patch -Np1 -i $srcdir/intltool.patch || return 1
+ autoreconf || return 1
+ ./configure --sysconfdir=/etc --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR="$pkgdir" install || return 1
+}
diff --git a/community/lxlauncher/intltool.patch b/community/lxlauncher/intltool.patch
new file mode 100644
index 000000000..3829806c8
--- /dev/null
+++ b/community/lxlauncher/intltool.patch
@@ -0,0 +1,16 @@
+diff -NrU5 lxlauncher-0.2.1.original/configure.in lxlauncher-0.2.1/configure.in
+--- lxlauncher-0.2.1.original/configure.in 2009-07-18 21:49:07.000000000 -0600
++++ lxlauncher-0.2.1/configure.in 2009-07-18 21:49:50.000000000 -0600
+@@ -2,10 +2,11 @@
+
+ AC_INIT(configure.in)
+ AM_INIT_AUTOMAKE(lxlauncher, 0.2.1)
+ AM_CONFIG_HEADER(config.h)
+ AM_MAINTAINER_MODE
++IT_PROG_INTLTOOL
+
+ AC_ISC_POSIX
+ AC_PROG_CC
+ AM_PROG_CC_STDC
+ AC_HEADER_STDC
+
diff --git a/community/lxlauncher/lxlauncher-0.2.1-dsofix.patch b/community/lxlauncher/lxlauncher-0.2.1-dsofix.patch
new file mode 100644
index 000000000..7ee0c1c68
--- /dev/null
+++ b/community/lxlauncher/lxlauncher-0.2.1-dsofix.patch
@@ -0,0 +1,12 @@
+diff -dur lxlauncher-0.2.1.orig/src/Makefile.in lxlauncher-0.2.1/src/Makefile.in
+--- lxlauncher-0.2.1.orig/src/Makefile.in 2009-07-07 14:46:41.000000000 +0200
++++ lxlauncher-0.2.1/src/Makefile.in 2010-02-17 13:34:43.000000000 +0100
+@@ -101,7 +101,7 @@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INSTOBJEXT = @INSTOBJEXT@
+ INTLLIBS = @INTLLIBS@
+-LDFLAGS = @LDFLAGS@
++LDFLAGS = @LDFLAGS@ -lX11
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
+ LTLIBOBJS = @LTLIBOBJS@
diff --git a/community/lxlauncher/lxlauncher-0.2.1-fix-SUSE-lint-warnings.patch b/community/lxlauncher/lxlauncher-0.2.1-fix-SUSE-lint-warnings.patch
new file mode 100644
index 000000000..49a4b3488
--- /dev/null
+++ b/community/lxlauncher/lxlauncher-0.2.1-fix-SUSE-lint-warnings.patch
@@ -0,0 +1,32 @@
+From cb99b126dd90a8460c5bd4a837fdb7505658ba52 Mon Sep 17 00:00:00 2001
+From: martyj19 <martyj19@comcast.net>
+Date: Mon, 13 Jul 2009 16:46:09 +0000
+Subject: [PATCH 02/50] Fix SUSE lint warnings
+
+---
+ src/lxlauncher.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/src/lxlauncher.c b/src/lxlauncher.c
+index 7dab830..034d308 100644
+--- a/src/lxlauncher.c
++++ b/src/lxlauncher.c
+@@ -311,6 +311,7 @@ static gboolean on_scroll( GtkAdjustment* adj, PageData* data )
+ {
+ // Dirty hacks used to force pseudo-transparent background
+ gtk_widget_queue_draw( data->table );
++ return TRUE;
+ }
+
+ // Dirty hacks used to reduce unnecessary redrew during scroll
+@@ -674,6 +675,7 @@ gchar* get_xdg_config_file(const char *name) {
+ }
+ free(file);
+ }
++ return NULL;
+ }
+
+ int main(int argc, char** argv)
+--
+1.6.6
+
diff --git a/community/lxlauncher/lxlauncher-0.2.1-fix-for-the-new-behavior-of-libmenu-cache-0.3-series.patch b/community/lxlauncher/lxlauncher-0.2.1-fix-for-the-new-behavior-of-libmenu-cache-0.3-series.patch
new file mode 100644
index 000000000..1720d3e62
--- /dev/null
+++ b/community/lxlauncher/lxlauncher-0.2.1-fix-for-the-new-behavior-of-libmenu-cache-0.3-series.patch
@@ -0,0 +1,125 @@
+From a7dad81b883a783bc1ac4f8092a1571b7f843914 Mon Sep 17 00:00:00 2001
+From: Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
+Date: Wed, 17 Feb 2010 22:42:01 +0800
+Subject: [PATCH 50/50] Fix for the new behavior of libmenu-cache 0.3 series.
+
+---
+ src/lxlauncher.c | 67 +++++++++++++++++++++++++++++++++++++----------------
+ 1 files changed, 47 insertions(+), 20 deletions(-)
+
+diff --git a/src/lxlauncher.c b/src/lxlauncher.c
+index 6dfbbc9..3a39bc6 100644
+--- a/src/lxlauncher.c
++++ b/src/lxlauncher.c
+@@ -663,21 +663,40 @@ gchar* get_xdg_config_file(const char *name) {
+ gchar *file;
+
+ file = g_build_filename(user_dir, name, NULL);
+- if (g_file_test(file, G_FILE_TEST_EXISTS) == TRUE) {
+- return file;
+- }
++ if (g_file_test(file, G_FILE_TEST_EXISTS) == TRUE)
++ return file;
+ free(file);
+
+ for (dir = system_dirs; *dir; ++dir ) {
+- file = g_build_filename(*dir, name, NULL);
+- if (g_file_test(file, G_FILE_TEST_EXISTS) == TRUE) {
+- return file;
+- }
+- free(file);
++ file = g_build_filename(*dir, name, NULL);
++ if (g_file_test(file, G_FILE_TEST_EXISTS) == TRUE)
++ return file;
++ free(file);
+ }
+ return NULL;
+ }
+
++static void on_menu_cache_reload(MenuCache* mc, gpointer user_data)
++{
++ GMainLoop* mainloop = (GMainLoop*)user_data;
++ g_main_loop_quit(mainloop);
++}
++
++MenuCache* _menu_cache_lookup_sync( const char* menu_name )
++{
++ MenuCache* mc = menu_cache_lookup(menu_name);
++ /* ensure that the menu cache is loaded */
++ if(! menu_cache_get_root_dir(mc)) /* if it's not yet loaded */
++ {
++ GMainLoop* mainloop = g_main_loop_new(NULL, FALSE);
++ gpointer notify_id = menu_cache_add_reload_notify(mc, on_menu_cache_reload, mainloop);
++ g_main_loop_run(mainloop);
++ g_main_loop_unref(mainloop);
++ menu_cache_remove_reload_notify(mc, notify_id);
++ }
++ return mc;
++}
++
+ int main(int argc, char** argv)
+ {
+ int i;
+@@ -697,13 +716,14 @@ int main(int argc, char** argv)
+ GError *error = NULL;
+ gchar *config_file = get_xdg_config_file(CONFIG_FILE);
+ if (config_file &&
+- g_key_file_load_from_file(key_file,
+- config_file,
+- G_KEY_FILE_NONE,
+- &error)) {
+- printf("Loaded %s\n", config_file);
+- } else {
+- perror("Error loading " CONFIG_FILE);
++ g_key_file_load_from_file(key_file,
++ config_file,
++ G_KEY_FILE_NONE,
++ &error)) {
++ printf("Loaded %s\n", config_file);
++ }
++ else {
++ perror("Error loading " CONFIG_FILE);
+ }
+ if (config_file)
+ free(config_file);
+@@ -719,15 +739,17 @@ int main(int argc, char** argv)
+ gchar* gtkrc_file = get_xdg_config_file("lxlauncher/gtkrc");
+ gtk_rc_parse(gtkrc_file);
+ if (gtkrc_file) {
+- free(gtkrc_file);
++ free(gtkrc_file);
+ }
+
+ button_size = g_key_file_get_integer(key_file, "Main", "BUTTON_SIZE", NULL);
+ img_size = g_key_file_get_integer(key_file, "Main", "IMG_SIZE", NULL);
+
+ // to prevent from going without configure file
+- if(!button_size) button_size = BUTTON_SIZE_FALLBACK;
+- if(!img_size) img_size = IMG_SIZE_FALLBACK;
++ if(!button_size)
++ button_size = BUTTON_SIZE_FALLBACK;
++ if(!img_size)
++ img_size = IMG_SIZE_FALLBACK;
+
+ icon_size = gtk_icon_size_register( "ALIcon", img_size, img_size );
+
+@@ -758,9 +780,14 @@ int main(int argc, char** argv)
+ gtk_container_add( (GtkContainer*)main_window, notebook );
+
+ g_setenv("XDG_MENU_PREFIX", "lxlauncher-", TRUE);
+- menu_tree = menu_cache_lookup( "applications.menu" );
++ menu_tree = _menu_cache_lookup_sync( "applications.menu" );
++ if(!menu_tree)
++ {
++ g_print("Unable to load application menu\n");
++ return 1;
++ }
++ root_dir = menu_cache_item_ref(menu_cache_get_root_dir( menu_tree ));
+ reload_notify_id = menu_cache_add_reload_notify( menu_tree, on_menu_tree_changed, NULL );
+- root_dir = menu_cache_ref(menu_cache_get_root_dir( menu_tree ));
+
+ create_notebook_pages();
+
+--
+1.6.6
+