summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/rubygem-net-ldap/Makefile7
-rw-r--r--net/rubygem-net-ldap/files/patch-ruby1915
2 files changed, 17 insertions, 5 deletions
diff --git a/net/rubygem-net-ldap/Makefile b/net/rubygem-net-ldap/Makefile
index 7d2d4cee8b77..69d84de47fb7 100644
--- a/net/rubygem-net-ldap/Makefile
+++ b/net/rubygem-net-ldap/Makefile
@@ -1,12 +1,9 @@
-# New ports collection makefile for: rubygem-net-ldap
-# Date created: 2010-05-13
-# Whom: Jyun-Yan You <jyyou@cs.nctu.edu.tw>
-#
+# Whom: Jyun-Yan You <jyyou@cs.nctu.edu.tw>
# $FreeBSD$
-#
PORTNAME= net-ldap
PORTVERSION= 0.3.1
+PORTREVISION= 1
CATEGORIES= net rubygems
MASTER_SITES= RG
diff --git a/net/rubygem-net-ldap/files/patch-ruby19 b/net/rubygem-net-ldap/files/patch-ruby19
new file mode 100644
index 000000000000..6f7a6e25fb59
--- /dev/null
+++ b/net/rubygem-net-ldap/files/patch-ruby19
@@ -0,0 +1,15 @@
+--- lib/net/ber/core_ext/string.rb
++++ lib/net/ber/core_ext/string.rb
+@@ -20,7 +20,11 @@ def raw_utf8_encoded
+ if self.respond_to?(:encode)
+ # Strings should be UTF-8 encoded according to LDAP.
+ # However, the BER code is not necessarily valid UTF-8
+- self.encode('UTF-8').force_encoding('ASCII-8BIT')
++ begin
++ self.encode('UTF-8').force_encoding('ASCII-8BIT')
++ rescue Encoding::UndefinedConversionError
++ self
++ end
+ else
+ self
+ end