svn commit: r345147 - in head/net-im/gajim: . files
Ruslan Makhmatkhanov
rm at FreeBSD.org
Wed Feb 19 20:41:54 UTC 2014
Author: rm
Date: Wed Feb 19 20:41:53 2014
New Revision: 345147
URL: http://svnweb.freebsd.org/changeset/ports/345147
QAT: https://qat.redports.org/buildarchive/r345147/
Log:
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 at yahoo.com> (by email)
MFH: 2014Q1
Added:
head/net-im/gajim/files/extra-patch-src-common_resolver.py (contents, props changed)
Modified:
head/net-im/gajim/Makefile
Modified: head/net-im/gajim/Makefile
==============================================================================
--- head/net-im/gajim/Makefile Wed Feb 19 20:41:25 2014 (r345146)
+++ head/net-im/gajim/Makefile Wed Feb 19 20:41:53 2014 (r345147)
@@ -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
Added: head/net-im/gajim/files/extra-patch-src-common_resolver.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-im/gajim/files/extra-patch-src-common_resolver.py Wed Feb 19 20:41:53 2014 (r345147)
@@ -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:
More information about the svn-ports-all
mailing list