git: 9b4522cb7997 - main - sysutils/puppet7: Fix build with rubygem-concurrent-ruby 1.2.0+

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 05 Feb 2023 16:05:13 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9b4522cb7997070282339d841af44ee8e57ae798

commit 9b4522cb7997070282339d841af44ee8e57ae798
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-02-05 15:29:48 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-02-05 15:50:15 +0000

    sysutils/puppet7: Fix build with rubygem-concurrent-ruby 1.2.0+
    
    - Bump PORTREVISION for package change
    
    Use ThreadLocalVar instead of RubyThreadLocalVar which was removed in 1.2.0.
    RubyThreadLocalVar is a private class and an implementation detail.
    
    Reference:      https://github.com/ruby-concurrency/concurrent-ruby/pull/988
                    https://github.com/ruby-concurrency/concurrent-ruby/issues/986
                    https://github.com/puppetlabs/puppet/commit/9182bc3dd2576f409a6d01fb5c08d392670e90a2
---
 sysutils/puppet7/Makefile                                |  1 +
 sysutils/puppet7/files/patch-lib_puppet_thread__local.rb | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/sysutils/puppet7/Makefile b/sysutils/puppet7/Makefile
index 4955ed07e372..8e5ec09c17e7 100644
--- a/sysutils/puppet7/Makefile
+++ b/sysutils/puppet7/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	puppet
 PORTVERSION=	7.21.0
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=   https://forge.puppet.com/v3/files/:forge
 PKGNAMESUFFIX=	7
diff --git a/sysutils/puppet7/files/patch-lib_puppet_thread__local.rb b/sysutils/puppet7/files/patch-lib_puppet_thread__local.rb
new file mode 100644
index 000000000000..25f7f1614577
--- /dev/null
+++ b/sysutils/puppet7/files/patch-lib_puppet_thread__local.rb
@@ -0,0 +1,13 @@
+Reference:	https://github.com/ruby-concurrency/concurrent-ruby/pull/988
+		https://github.com/ruby-concurrency/concurrent-ruby/issues/986
+		https://github.com/puppetlabs/puppet/commit/9182bc3dd2576f409a6d01fb5c08d392670e90a2
+
+--- lib/puppet/thread_local.rb.orig	2022-12-02 03:58:03 UTC
++++ lib/puppet/thread_local.rb
+@@ -3,5 +3,5 @@ require 'concurrent'
+ # We want to use the pure Ruby implementation even on JRuby. If we use the Java
+ # implementation of ThreadLocal, we end up leaking references to JRuby instances
+ # and preventing them from being garbage collected.
+-class Puppet::ThreadLocal < Concurrent::RubyThreadLocalVar
++class Puppet::ThreadLocal < Concurrent::ThreadLocalVar
+ end