Index | Thread | Search

From:
Jeremy Evans <jeremy@openbsd.org>
Subject:
Re: PLIST additions in ruby-* ports
To:
Klemens Nanni <kn@openbsd.org>
Cc:
ports <ports@openbsd.org>
Date:
Sat, 6 Sep 2025 08:18:53 -0700

Download raw body.

Thread
On 09/06 01:21, Klemens Nanni wrote:
> I built a few deps and noticed update-plist adding a bunch of files,
> here is -current devel/ruby-ffi as example adding +500 source files:
> 
> Did something in the lang/ruby change or does one just manually
> fix PLIST for such ports?
> 
> www/ruby-sassc also suddenly wants to ship a bunch of sources.
> 
> Seems like a systematic issue.

It's expected that the port maintainer fixes the issue manually. 
Most gems ship the extension files in the ext directory, and in
most cases, you don't need to keep the ext directory, but there
can be exceptions, such as when the gem builds an executable file
there and expects it to exist at runtime.

It may be possible to automatically clear the GEM_EXTENSIONS_DIR,
since I'm not aware of anything currently using it. However, future
changes to rubygems may stop copying .so files to the gem lib folder,
in which case we'll have to add the GEM_EXTENSIONS_DIR to the package.
That and considering you need to tweak the PLIST manually anyway for
the extension source files is the reason I haven't had the ruby
module do it.

This is documented in ruby-module.5.

Thanks,
Jeremy

> 
> 
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/devel/ruby-ffi/pkg/PLIST,v
> diff -u -p -r1.13 PLIST
> --- pkg/PLIST	11 Mar 2022 18:53:14 -0000	1.13
> +++ pkg/PLIST	6 Sep 2025 13:15:35 -0000
> @@ -1,4 +1,7 @@
>  ${GEM_LIB}/cache/${DISTNAME}.gem
> +@so ${GEM_EXTENSIONS_DIR}/ffi_c.so
> +${GEM_EXTENSIONS_DIR}/gem_make.out
> +${GEM_EXTENSIONS_DIR}/mkmf.log
>  ${GEM_LIB}/gems/${DISTNAME}/
>  ${GEM_LIB}/gems/${DISTNAME}/CHANGELOG.md
>  ${GEM_LIB}/gems/${DISTNAME}/COPYING
> @@ -7,6 +10,558 @@ ${GEM_LIB}/gems/${DISTNAME}/LICENSE
>  ${GEM_LIB}/gems/${DISTNAME}/LICENSE.SPECS
>  ${GEM_LIB}/gems/${DISTNAME}/README.md
>  ${GEM_LIB}/gems/${DISTNAME}/Rakefile
> +${GEM_LIB}/gems/${DISTNAME}/ext/
> +${GEM_LIB}/gems/${DISTNAME}/ext/ffi_c/
> +${GEM_LIB}/gems/${DISTNAME}/ext/ffi_c/.sitearchdir.time
> +${GEM_LIB}/gems/${DISTNAME}/ext/ffi_c/AbstractMemory.c
> ...