aboutsummaryrefslogtreecommitdiff
path: root/net-im/gajim
diff options
context:
space:
mode:
authorRuslan Makhmatkhanov <rm@FreeBSD.org>2014-02-19 20:41:53 +0000
committerRuslan Makhmatkhanov <rm@FreeBSD.org>2014-02-19 20:41:53 +0000
commitf87c8b3c38296a8e8f55e8ec26bb485ebc84e9f8 (patch)
treed732f1f10ba5ca8f619631b5a27b55e273c72ed2 /net-im/gajim
parentd54642e6c0f4290e6f2375721df710fd82b10809 (diff)
downloadports-f87c8b3c38296a8e8f55e8ec26bb485ebc84e9f8.tar.gz
ports-f87c8b3c38296a8e8f55e8ec26bb485ebc84e9f8.zip
Fix runtime on FreeBSD >=10.0
Gajim relies on nslookup when looking up for an SRV record of jabber server. Since, nslookup was removed from FreeBSD 10, gajim is now fails to connect unless jabber-server hostname and port were defined by user explicitly. This patch make it use host(1) for this task. Submitted by: walker_643 <walker_643@yahoo.com> (by email) MFH: 2014Q1
Notes
Notes: svn path=/head/; revision=345147
Diffstat (limited to 'net-im/gajim')
-rw-r--r--net-im/gajim/Makefile5
-rw-r--r--net-im/gajim/files/extra-patch-src-common_resolver.py37
2 files changed, 42 insertions, 0 deletions
diff --git a/net-im/gajim/Makefile b/net-im/gajim/Makefile
index c68c39ca095d..1f0c9967cd9b 100644
--- a/net-im/gajim/Makefile
+++ b/net-im/gajim/Makefile
@@ -3,6 +3,7 @@
PORTNAME= gajim
PORTVERSION= 0.15.4
+PORTREVISION= 1
CATEGORIES= net-im
MASTER_SITES= http://gajim.org/downloads/0.15/
@@ -42,6 +43,10 @@ NLS_USES= gettext
NO_STAGE= yes
.include <bsd.port.options.mk>
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000000
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src-common_resolver.py
+.endif
+
.if ! ${PORT_OPTIONS:MNLS}
CONFIGURE_ARGS+= --disable-nls
.endif
diff --git a/net-im/gajim/files/extra-patch-src-common_resolver.py b/net-im/gajim/files/extra-patch-src-common_resolver.py
new file mode 100644
index 000000000000..79dade9eb2be
--- /dev/null
+++ b/net-im/gajim/files/extra-patch-src-common_resolver.py
@@ -0,0 +1,37 @@
+--- src/common/resolver.py.orig 2014-02-03 11:03:20.000000000 -0500
++++ src/common/resolver.py 2014-02-04 09:37:37.000000000 -0500
+@@ -238,8 +238,8 @@
+ return hosts
+
+ def _parse_srv_result_posix(self, fqdn, result):
+- # typical output of bind-tools nslookup command:
+- # _xmpp-client._tcp.jabber.org service = 30 30 5222 jabber.org.
++ # typical output of host lookup command
++ # _xmpp-client._tcp.jabber.org has SRV record 30 30 5222 jabber.org.
+ if not result:
+ return []
+ ufqdn = helpers.ascii_to_idn(fqdn) # Unicode domain name
+@@ -255,11 +255,12 @@
+ line = helpers.decode_string(line)
+ domain = ufqdn # For nslookup 9.6
+ if domain:
+- rest = line[len(domain):].split('=')
++ # add 4 for ' has' after domain name
++ rest = line[len(domain)+4:].split('record')
+ if len(rest) != 2:
+ continue
+ answer_type, props_str = rest
+- if answer_type.strip() != 'service':
++ if answer_type.strip() != 'SRV':
+ continue
+ props = props_str.strip().split(' ')
+ if len(props) < 4:
+@@ -309,7 +310,7 @@
+ return
+
+ def _compose_command_args(self):
+- return ['nslookup', '-type=' + self.type, self.host]
++ return ['host', '-t', self.type, self.host]
+
+ def _return_result(self):
+ if self.result_handler: