Commit 81aa49a3 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/xchat: fallback to midori if browser is not found

parent 41c5ec7a
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xchat
pkgver=2.8.8
pkgrel=1
pkgrel=2
pkgdesc="A GTK+ based IRC client"
url="http://www.xchat.org/"
arch="x86 x86_64"
......@@ -9,19 +9,19 @@ license="GPL"
makedepends="pkgconfig gtk+-dev openssl-dev dbus-glib-dev perl-dev
libxext-dev"
source="http://www.$pkgname.org/files/source/2.8/$pkgname-$pkgver.tar.bz2
midori.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_builddir"
for i in "$srcdir"/*.patch; do
[ -r "$i" ] || continue
msg "Applying $i"
patch -p1 -i "$i" || return 1
for i in $source; do
case $i in
*.patch) msg "$i"; patch -p1 -i "$srcdir"/$i || return 1 ;;
esac
done
}
build() {
cd "$_builddir"
./configure --prefix=/usr \
......@@ -43,4 +43,5 @@ package() {
make DESTDIR="$pkgdir" install || return 1
}
md5sums="6775c44f38e84d06c06c336b32c4a452 xchat-2.8.8.tar.bz2"
md5sums="6775c44f38e84d06c06c336b32c4a452 xchat-2.8.8.tar.bz2
759fd786be3a2546be33f7533632b5a2 midori.patch"
diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c
index 251a7d7..f427ad4 100644
--- a/src/fe-gtk/fe-gtk.c
+++ b/src/fe-gtk/fe-gtk.c
@@ -958,6 +958,10 @@ fe_open_url_inner (const char *url)
/* everything failed, what now? just try firefox */
if (try_browser ("firefox", NULL, url))
return;
+
+ /* try midori before giving up */
+ if (try_browser ("midori", NULL, url))
+ return;
/* fresh out of ideas... */
try_browser ("mozilla", NULL, url);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment