From a7a5f4160bb345e35c58a565494d4416f601fc17 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 16 May 2012 00:02:54 +0000 Subject: Wed May 16 00:02:54 UTC 2012 --- extra/xfce4-smartbookmark-plugin/PKGBUILD | 47 +++++++++++++--------- .../use-exo-open-instead-of-xfbrowser4.patch | 37 +++++++++++++++++ 2 files changed, 65 insertions(+), 19 deletions(-) create mode 100644 extra/xfce4-smartbookmark-plugin/use-exo-open-instead-of-xfbrowser4.patch (limited to 'extra/xfce4-smartbookmark-plugin') diff --git a/extra/xfce4-smartbookmark-plugin/PKGBUILD b/extra/xfce4-smartbookmark-plugin/PKGBUILD index 3ae00d8bd..48007334c 100644 --- a/extra/xfce4-smartbookmark-plugin/PKGBUILD +++ b/extra/xfce4-smartbookmark-plugin/PKGBUILD @@ -1,36 +1,45 @@ -# $Id: PKGBUILD 157889 2012-04-30 04:21:24Z foutrelis $ -# Maintainer: AndyRTR +# $Id: PKGBUILD 159006 2012-05-14 20:21:29Z foutrelis $ +# Maintainer: +# Contributor: AndyRTR # Contributor: Tobias Kieslich pkgname=xfce4-smartbookmark-plugin pkgver=0.4.4 -pkgrel=2 -pkgdesc="Plugin for the Xfce4 panel that let you quicksearch from selected websites" +pkgrel=3 +pkgdesc="Plugin for the Xfce4 panel that lets you quicksearch from selected websites" arch=('i686' 'x86_64') -license=('GPL2') url="http://goodies.xfce.org/projects/panel-plugins/xfce4-smartbookmark-plugin" +license=('GPL2') groups=('xfce4-goodies') depends=('xfce4-panel' 'libxfcegui4') makedepends=('intltool' 'libxt') options=('!libtool') -source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/0.4/${pkgname}-${pkgver}.tar.bz2 - xfce4-smartbookmark-plugin-archlinux.patch) -md5sums=('273e38306a82f14e1b8c2c5db912f6c3' - '323ac898cfcfdb078f67f9ecd1905aec') +source=(http://archive.xfce.org/src/panel-plugins/$pkgname/0.4/$pkgname-$pkgver.tar.bz2 + xfce4-smartbookmark-plugin-archlinux.patch + use-exo-open-instead-of-xfbrowser4.patch) +sha256sums=('6c77e8fee0ec4dcee7aa34d94377e068a522b1ea650823422f2f5cca8126f2ed' + 'a126b086811b60a8f3cd1a2b818cb6b9a9c6e959e00db1499b114fa8803325e6' + '436f7cda2b2bdfee61ac3d887d17dc91094526fec8713ab84fda249850525aac') build() { - cd "${srcdir}/${pkgname}-${pkgver}" - patch -p0 -i "${srcdir}/xfce4-smartbookmark-plugin-archlinux.patch" - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --disable-static \ - --disable-debug + cd "$srcdir/$pkgname-$pkgver" + + patch -Np0 -i "$srcdir/xfce4-smartbookmark-plugin-archlinux.patch" + patch -Np1 -i "$srcdir/use-exo-open-instead-of-xfbrowser4.patch" + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --disable-static \ + --disable-debug make } package() { - cd "${srcdir}/${pkgname}-${pkgver}" - make DESTDIR="${pkgdir}" install + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install } + +# vim:set ts=2 sw=2 et: diff --git a/extra/xfce4-smartbookmark-plugin/use-exo-open-instead-of-xfbrowser4.patch b/extra/xfce4-smartbookmark-plugin/use-exo-open-instead-of-xfbrowser4.patch new file mode 100644 index 000000000..254382182 --- /dev/null +++ b/extra/xfce4-smartbookmark-plugin/use-exo-open-instead-of-xfbrowser4.patch @@ -0,0 +1,37 @@ +--- xfce4-smartbookmark-plugin-0.4.4/src/smartbookmark.c ++++ xfce4-smartbookmark-plugin-0.4.4/src/smartbookmark.c +@@ -75,18 +75,27 @@ XFCE_PANEL_PLUGIN_REGISTER_INTERNAL(smar + + static gboolean do_search(const char *url, const char *keyword) + { ++ gchar *argv[] = { "exo-open", "--launch", "WebBrowser", NULL, NULL }; ++ gchar *complete_url; ++ gboolean retval; ++ GError *error = NULL; ++ + DBG ("Do search"); +- gchar *execute; +- gboolean success; +- execute = g_strconcat("xfbrowser4 \"", url, NULL);//works better for me +- //execute = g_strconcat("x-www-browser \"", url, NULL); +- execute = g_strconcat(execute, keyword, NULL); +- execute = g_strconcat(execute, "\"", NULL); + +- success = exec_command(execute); +- g_free(execute); ++ complete_url = g_strconcat(url, keyword, NULL); ++ argv[3] = complete_url; ++ ++ retval = g_spawn_async(NULL, (gchar **)argv, NULL, ++ G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, NULL, &error); ++ ++ g_free(complete_url); ++ ++ if (!retval) { ++ xfce_err("%s", error->message); ++ g_error_free(error); ++ } + +- return success; ++ return retval; + } -- cgit v1.2.3-54-g00ecf