devel/rubygem-oj-introspect: added new port

Required for gitlab-ce 15.6.
This commit is contained in:
Matthias Fechner 2022-12-20 19:03:13 +01:00
parent 1fab538b26
commit 78a749f624
2 changed files with 30 additions and 1 deletions

View File

@ -10,9 +10,13 @@ WWW= https://github.com/meinac/oj-introspect
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
RUN_DEPENDS= rubygem-oj>=3.13.23<3.14:devel/rubygem-oj
MY_DEPENDS= rubygem-oj>=3.13.23<3.14:devel/rubygem-oj
BUILD_DEPENDS= ${MY_DEPENDS}
RUN_DEPENDS= ${MY_DEPENDS}
USES= gem
USE_RUBY= yes
#USE_RUBY_EXTCONF= yes
#RUBY_EXTCONF_SUBDIRS= ext/oj-introspect
.include <bsd.port.mk>

View File

@ -0,0 +1,25 @@
--- ext/oj-introspect/extconf.rb.orig 2023-01-10 13:31:58 UTC
+++ ext/oj-introspect/extconf.rb
@@ -7,22 +7,6 @@ oj_version_file_path = Pathname.new(oj_version_file)
OJ_HEADERS = oj_version_file_path.join('..', '..', '..', 'ext', 'oj').to_s
-cc_version = `#{RbConfig.expand("$(CC) --version".dup)}`
-if cc_version.match?(/clang/i)
- # Ignore symbols loaded from Oj in case Ruby is compiled without
- # "-Wl,-undefined,dynamic_lookup" (related to https://bugs.ruby-lang.org/issues/19005)
- symfile = File.join(__dir__, 'oj.sym')
- dynamic_symbols = File.readlines(symfile)
- dynamic_symbols.each do |sym|
- $DLDFLAGS << " -Wl,-U,#{sym.strip}"
- end
-
- # Needed for Ruby 3.2 ABI check: https://github.com/ruby/ruby/pull/5474
- if RUBY_VERSION >= "3.2"
- $LDFLAGS << " -Wl,-exported_symbol,_ruby_abi_version"
- end
-end
-
dir_config('oj', [OJ_HEADERS], [])
create_makefile("oj/introspect/introspect_ext")