summaryrefslogtreecommitdiff
path: root/dev-ruby/ruby-ldap/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-15 16:50:39 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-15 16:50:39 +0100
commit3be8faef74cb863e207124a6fccbf01ce90c0799 (patch)
tree222958402b707645e8b7bcb072c607c538f2f5c0 /dev-ruby/ruby-ldap/files
parentea3e1bbf643d1d8892f4df05e4f05c1b2a2125d8 (diff)
gentoo auto-resync : 15:09:2023 - 16:50:39
Diffstat (limited to 'dev-ruby/ruby-ldap/files')
-rw-r--r--dev-ruby/ruby-ldap/files/ruby-ldap-0.9.20-ruby32.patch24
-rw-r--r--dev-ruby/ruby-ldap/files/ruby-ldap-0.9.20-tainted.patch28
2 files changed, 52 insertions, 0 deletions
diff --git a/dev-ruby/ruby-ldap/files/ruby-ldap-0.9.20-ruby32.patch b/dev-ruby/ruby-ldap/files/ruby-ldap-0.9.20-ruby32.patch
new file mode 100644
index 000000000000..b7b101db2f30
--- /dev/null
+++ b/dev-ruby/ruby-ldap/files/ruby-ldap-0.9.20-ruby32.patch
@@ -0,0 +1,24 @@
+From aa43040eb6b6d591e42a19ee385fc1ba17c7202b Mon Sep 17 00:00:00 2001
+From: Jeremy Evans <code@jeremyevans.net>
+Date: Tue, 27 Dec 2022 17:19:45 -0800
+Subject: [PATCH] Don't use rb_cData
+
+This fixes ruby-ldap on Ruby 3.2+
+---
+ conn.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/conn.c b/conn.c
+index e628695..39eeb5f 100644
+--- a/conn.c
++++ b/conn.c
+@@ -1855,7 +1855,8 @@ Init_ldap_conn ()
+ {
+ rb_ldap_sort_obj = Qnil;
+
+- rb_cLDAP_Conn = rb_define_class_under (rb_mLDAP, "Conn", rb_cData);
++ rb_cLDAP_Conn = rb_define_class_under (rb_mLDAP, "Conn", rb_cObject);
++ rb_undef_alloc_func(rb_cLDAP_Conn);
+ rb_define_attr (rb_cLDAP_Conn, "referrals", 1, 0);
+ rb_define_attr (rb_cLDAP_Conn, "controls", 1, 0);
+ rb_define_attr (rb_cLDAP_Conn, "sasl_quiet", 1, 1);
diff --git a/dev-ruby/ruby-ldap/files/ruby-ldap-0.9.20-tainted.patch b/dev-ruby/ruby-ldap/files/ruby-ldap-0.9.20-tainted.patch
new file mode 100644
index 000000000000..84c9ee29610d
--- /dev/null
+++ b/dev-ruby/ruby-ldap/files/ruby-ldap-0.9.20-tainted.patch
@@ -0,0 +1,28 @@
+From 849ca6bb46bf4826d51648feddd453142281e541 Mon Sep 17 00:00:00 2001
+From: Hisashi MINAMINO <minamino@iij.ad.jp>
+Date: Thu, 28 May 2020 14:04:05 +0900
+Subject: [PATCH] for ruby-2.7
+
+---
+ rbldap.h | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/rbldap.h b/rbldap.h
+index 1fa04e1..b7b1765 100644
+--- a/rbldap.h
++++ b/rbldap.h
+@@ -205,3 +205,14 @@ VALUE rb_ldap_mod_vals (VALUE);
+ rb_define_method(rb_cLDAP_Mod,method,cfunc,argc)
+
+ #endif
++
++#if RUBY_VERSION_CODE >= 270
++# if defined rb_tainted_str_new
++# undef rb_tainted_str_new
++# endif
++# if defined rb_tainted_str_new2
++# undef rb_tainted_str_new2
++# endif
++# define rb_tainted_str_new(p,l) rb_str_new((p),(l))
++# define rb_tainted_str_new2(p) rb_str_new_cstr((p))
++#endif