commit: 207f6c29cf1d4b6c222509317165f65011624ac7 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> AuthorDate: Thu Jan 2 09:49:03 2025 +0000 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> CommitDate: Thu Jan 2 09:49:03 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=207f6c29
dev-ruby/ffi: add 1.17.1 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org> dev-ruby/ffi/Manifest | 1 + dev-ruby/ffi/ffi-1.17.1.ebuild | 66 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/dev-ruby/ffi/Manifest b/dev-ruby/ffi/Manifest index c22e2fb9e25e..6c87ceda630e 100644 --- a/dev-ruby/ffi/Manifest +++ b/dev-ruby/ffi/Manifest @@ -1 +1,2 @@ DIST ffi-git-1.17.0.tgz 192947 BLAKE2B 86340ad6f2768c68f50de28cd5ee10adccee28a93b71136185993025d13fba2b035c6ff212583a941934bb65822ec60ca3d9968f100eec372956a1d030692650 SHA512 70ba69172bdaebc731a3aa1ae8a2959a31ca82d27d1fb9784bb07b51ba8d4912fc1c880fd709e1aad048fc1f70a161d6c4814617ff403d2d94c44758b143db4b +DIST ffi-git-1.17.1.tgz 194632 BLAKE2B 5bcb2a38ef920a5b1b8e57145c98e604897a34a155cff7aca353d7fb647bb6a0e21342910fd66ca95101bfdcf59a4fe190a374ff0f10804d3f7e7266751aae9b SHA512 0da4bfbe4db154df37b6aa8592b73235d1ebc14ee9d5c3daea975dfa24a1e9e2e1f5ef569b4a613277e0042a5d4d86d031bd636f71002939cb9d5c265a761e6f diff --git a/dev-ruby/ffi/ffi-1.17.1.ebuild b/dev-ruby/ffi/ffi-1.17.1.ebuild new file mode 100644 index 000000000000..ddd0bf6a01bb --- /dev/null +++ b/dev-ruby/ffi/ffi-1.17.1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_RUBY="ruby31 ruby32 ruby33" + +RUBY_FAKEGEM_RECIPE_TEST="rspec3" + +RUBY_FAKEGEM_DOCDIR="doc" +RUBY_FAKEGEM_EXTRADOC="README.md" + +RUBY_FAKEGEM_GEMSPEC="ffi.gemspec" + +RUBY_FAKEGEM_EXTENSIONS=(ext/ffi_c/extconf.rb) + +inherit ruby-fakegem toolchain-funcs + +DESCRIPTION="Ruby extension for programmatically loading dynamic libraries" +HOMEPAGE="https://github.com/ffi/ffi/wiki" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${PN}-git-${PV}.tgz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" + +# Needs recent libffi for HPPA fixes (and probably Apple arm64 too) +RDEPEND=">=dev-libs/libffi-3.4.4-r1:=" +DEPEND=">=dev-libs/libffi-3.4.4-r1:=" + +ruby_add_bdepend "dev-ruby/rake" + +all_ruby_prepare() { + sed -i -e '/tasks/ s:^:#:' \ + -e '/Gem::Tasks/,/end/ s:^:#:' Rakefile || die + + sed -e '/require/c\require "./lib/ffi/version"' \ + -e 's/git ls-files -z/find * -print0/' \ + -e '/^ lfs/,/^ end/ s:^:#:' \ + -i ${RUBY_FAKEGEM_GEMSPEC} || die + + # Fix Makefile for tests + sed -i -e '/CCACHE :=/ s:^:#:' \ + -e 's/-O2//' \ + -e 's/^CFLAGS =/CFLAGS +=/' spec/ffi/fixtures/GNUmakefile || die + + # Remove bundled version of libffi. + rm -rf ext/ffi_c/libffi || die +} + +each_ruby_compile() { + each_fakegem_compile + + ${RUBY} -S rake -f gen/Rakefile || die "types.conf generation failed" +} + +each_ruby_test() { + CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" ${RUBY} -S rspec spec || die +} + +all_ruby_install() { + all_fakegem_install + + docinto examples + dodoc samples/* +}
