diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/xchat-systray-integration |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/xchat-systray-integration')
-rw-r--r-- | community/xchat-systray-integration/PKGBUILD | 37 | ||||
-rw-r--r-- | community/xchat-systray-integration/default-icons.patch | 37 | ||||
-rw-r--r-- | community/xchat-systray-integration/segfault-fix.patch | 27 |
3 files changed, 101 insertions, 0 deletions
diff --git a/community/xchat-systray-integration/PKGBUILD b/community/xchat-systray-integration/PKGBUILD new file mode 100644 index 000000000..78317d324 --- /dev/null +++ b/community/xchat-systray-integration/PKGBUILD @@ -0,0 +1,37 @@ +# $Id: PKGBUILD 3695 2009-10-07 08:53:45Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Tuxbubling <tuxbubling)jabber.fr> + +pkgname=xchat-systray-integration +pkgver=2.4.5 +pkgrel=2 +pkgdesc="Systray integration for xchat" +arch=(i686 x86_64) +url="http://www.blight.tk/" +license=("GPL") +depends=('xchat' 'gtk2') +makedepends=('gcc' 'gtk2' 'gdk-pixbuf') +source=(http://downloads.sourceforge.net/sourceforge/xchat2-plugins/$pkgname-$pkgver-src.tar.gz \ + default-icons.patch \ + segfault-fix.patch) +md5sums=('f7068053ff7cc63d5bf2fd8cfabe0c82' + '9f7924b9423d5dd78ca8832026c9bb8e' + 'f9fec2befb2bf0b3888f017d37a36a17') + +build() { + cd $startdir/src/$pkgname-$pkgver + patch -Np1 <$startdir/src/default-icons.patch + patch -Np1 <$startdir/src/segfault-fix.patch + if [ "$CARCH" == "x86_64" ] ; then + sed -re 's/-Wall/-fPIC -Wall/' -i Makefile + fi + make || return 1 + + mkdir -p $startdir/pkg/usr/lib/xchat/plugins/ + cp $startdir/src/$pkgname-$pkgver/systray.so $startdir/pkg/usr/lib/xchat/plugins || return 1 + mkdir -p $startdir/pkg/usr/share/xchat-systray-integration + cp -r src/images/{GTKTray,Menu} $startdir/pkg/usr/share/xchat-systray-integration || return 1 + + chmod 0644 $startdir/pkg/usr/share/xchat-systray-integration/{GTKTray,Menu}/* && \ + find $pkgdir -type d -exec chmod 0755 {} \; +} diff --git a/community/xchat-systray-integration/default-icons.patch b/community/xchat-systray-integration/default-icons.patch new file mode 100644 index 000000000..db1f6bea5 --- /dev/null +++ b/community/xchat-systray-integration/default-icons.patch @@ -0,0 +1,37 @@ +diff -Nur xchat-systray-integration-2.4.5.orig/src/menu.c xchat-systray-integration-2.4.5/src/menu.c +--- xchat-systray-integration-2.4.5.orig/src/menu.c 2004-04-30 12:38:10.000000000 +0000 ++++ xchat-systray-integration-2.4.5/src/menu.c 2005-06-09 16:30:54.609907253 +0000 +@@ -91,8 +91,8 @@ + char temp[200];
+ if (filename)
+ {
+- if (imagepath) sprintf(temp,"%s/Menu/%s", imagepath ,filename);
+- else sprintf(temp,"%s/Menu/%s", xchat_get_info(ph, "xchatdir"),filename);
++ if (imagepath && 0 == access(imagepath, X_OK)) sprintf(temp,"%s/Menu/%s", imagepath ,filename);
++ else sprintf(temp,"/usr/share/xchat-systray-integration/Menu/%s", filename);
+ tempbuffer= gdk_pixbuf_new_from_file(temp,NULL);
+ return tempbuffer;
+ }
+diff -Nur xchat-systray-integration-2.4.5.orig/src/systray.c xchat-systray-integration-2.4.5/src/systray.c +--- xchat-systray-integration-2.4.5.orig/src/systray.c 2004-04-30 12:38:10.000000000 +0000 ++++ xchat-systray-integration-2.4.5/src/systray.c 2005-06-09 16:30:47.170967680 +0000 +@@ -117,7 +117,7 @@ + edit=TRUE; + go_change=TRUE; + go_identify=TRUE; +- strcpy(imagepath,xchat_get_info(ph, "xchatdir")); ++ strcpy(imagepath, "/usr/share/xchat-systray-integration"); + + } + // events handling +@@ -190,8 +190,8 @@ + char temp[200]; + if (filename && type) + { +- if (imagepath) sprintf(temp,"%s/%s/%s", imagepath ,type,filename); +- else sprintf(temp,"%s/%s/%s", xchat_get_info(ph, "xchatdir"),type,filename); ++ if (imagepath && 0 == access(imagepath, X_OK)) sprintf(temp,"%s/%s/%s", imagepath ,type,filename); ++ else sprintf(temp,"/usr/share/xchat-systray-integration/%s/%s", type,filename); + #ifdef _WIN32_ + tempbuffer= ((HICON)LoadImage( tray_inst, temp, IMAGE_ICON, 16, 16, LR_LOADFROMFILE )); + #else diff --git a/community/xchat-systray-integration/segfault-fix.patch b/community/xchat-systray-integration/segfault-fix.patch new file mode 100644 index 000000000..c824f4a1e --- /dev/null +++ b/community/xchat-systray-integration/segfault-fix.patch @@ -0,0 +1,27 @@ +diff -Nur xchat-systray-integration-2.4.5/src/menu.c xchat-systray-integration-2.4.5-segfault-fix/src/menu.c +--- xchat-systray-integration-2.4.5/src/menu.c 2004-04-30 14:38:10.000000000 +0200 ++++ xchat-systray-integration-2.4.5-segfault-fix/src/menu.c 2004-08-25 00:34:04.321825360 +0200 +@@ -10,7 +10,6 @@ + char command[156]="exec ";
+ strcat(command, bpath);
+ xchat_command( ph, command );
+- g_free(command);
+
+ }
+
+@@ -20,7 +19,6 @@ + char command[156]="exec ";
+ strcat(command, epath);
+ xchat_command( ph, command );
+- g_free(command);
+
+ }
+
+@@ -30,7 +28,6 @@ + char command[156]="exec ";
+ strcat(command, ppath);
+ xchat_command( ph, command );
+- g_free(command);
+
+ }
+
|