Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Aug 2013 16:45:56 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r324855 - in head/irc/rbot: . files
Message-ID:  <201308171645.r7HGjuGb018553@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Sat Aug 17 16:45:55 2013
New Revision: 324855
URL: http://svnweb.freebsd.org/changeset/ports/324855

Log:
  - Fix runtime crash due to gettext
  
  Obtained from:	upstream git

Added:
  head/irc/rbot/files/patch-lib__rbot__load-gettext.rb   (contents, props changed)
Modified:
  head/irc/rbot/Makefile
Directory Properties:
  head/irc/rbot/files/pkg-message.in   (props changed)

Modified: head/irc/rbot/Makefile
==============================================================================
--- head/irc/rbot/Makefile	Sat Aug 17 16:40:11 2013	(r324854)
+++ head/irc/rbot/Makefile	Sat Aug 17 16:45:55 2013	(r324855)
@@ -3,7 +3,7 @@
 
 PORTNAME=	rbot
 PORTVERSION=	0.9.15
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	irc ruby
 MASTER_SITES=	http://ruby-rbot.org/download/
 EXTRACT_SUFX=	.tgz
@@ -23,16 +23,16 @@ SUB_FILES=	pkg-message
 
 PORTDOCS=	REQUIREMENTS ChangeLog
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 pre-install:
 	${RM} ${WRKSRC}/bin/svnwatch-postcommit-hook
 
 post-install:
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	${INSTALL} -d ${DOCSDIR}
 	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}
 .endif
 	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Added: head/irc/rbot/files/patch-lib__rbot__load-gettext.rb
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/irc/rbot/files/patch-lib__rbot__load-gettext.rb	Sat Aug 17 16:45:55 2013	(r324855)
@@ -0,0 +1,26 @@
+commit 3342d4b9a510655d320590f7333f616355d0201d
+Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
+Date:   Sat Jul 14 13:24:33 2012 +0200
+
+    Update gettext support
+    
+    Somewhere along the line between 2.0.0 and 2.2.1 gettext switched from
+    locale to lang for the hash key name. Support both.
+
+diff --git lib/rbot/load-gettext.rb lib/rbot/load-gettext.rb
+index ba9b09b..252e1e3 100644
+--- lib/rbot/load-gettext.rb
++++ lib/rbot/load-gettext.rb
+@@ -29,7 +29,11 @@ class ::Array
+ 
+   include GetText
+ 
+-  rbot_locale_path = File.join(Irc::Bot::Config.datadir, "../locale/%{locale}/LC_MESSAGES/%{name}.mo")
++  rbot_locale_path = File.join(Irc::Bot::Config.datadir,
++    gettext_version < [2, 2, 0] ?
++      "../locale/%{locale}/LC_MESSAGES/%{name}.mo" :
++      "../locale/%{lang}/LC_MESSAGES/%{name}.mo")
++
+   if gettext_version < [2, 0, 0]
+     add_default_locale_path(rbot_locale_path)
+   else



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308171645.r7HGjuGb018553>