summaryrefslogtreecommitdiff
path: root/dev-ruby/ffi
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ruby/ffi')
-rw-r--r--dev-ruby/ffi/Manifest2
-rw-r--r--dev-ruby/ffi/ffi-1.17.1.ebuild66
2 files changed, 68 insertions, 0 deletions
diff --git a/dev-ruby/ffi/Manifest b/dev-ruby/ffi/Manifest
index 21cca1d2f419..1580cffddb2b 100644
--- a/dev-ruby/ffi/Manifest
+++ b/dev-ruby/ffi/Manifest
@@ -1,3 +1,5 @@
DIST ffi-git-1.17.0.tgz 192947 BLAKE2B 86340ad6f2768c68f50de28cd5ee10adccee28a93b71136185993025d13fba2b035c6ff212583a941934bb65822ec60ca3d9968f100eec372956a1d030692650 SHA512 70ba69172bdaebc731a3aa1ae8a2959a31ca82d27d1fb9784bb07b51ba8d4912fc1c880fd709e1aad048fc1f70a161d6c4814617ff403d2d94c44758b143db4b
+DIST ffi-git-1.17.1.tgz 194632 BLAKE2B 5bcb2a38ef920a5b1b8e57145c98e604897a34a155cff7aca353d7fb647bb6a0e21342910fd66ca95101bfdcf59a4fe190a374ff0f10804d3f7e7266751aae9b SHA512 0da4bfbe4db154df37b6aa8592b73235d1ebc14ee9d5c3daea975dfa24a1e9e2e1f5ef569b4a613277e0042a5d4d86d031bd636f71002939cb9d5c265a761e6f
EBUILD ffi-1.17.0.ebuild 1706 BLAKE2B f15e4755e9f2d8a70a7b436462a2ea00eecbdf3d5cf5a04e8adddb033169b88f2f580e1a8c0b90879777a4c19a8977a22cae88ea37deb92785e4f79aa853b82a SHA512 49c6a04f9259a80c54209abfe5eec0b0a46b664706d513d5a6c8bd1225e4f5a9676ee95ad7af642d07d0d3cbe70caa8936d6dd5829cd50278bbf1eca4cd54a97
+EBUILD ffi-1.17.1.ebuild 1709 BLAKE2B 86317f10c5028f3c0d912888f6e46d5d95e8ea0295861526d64887e4c8756e5983e69b66116d49695d9dfc8b96740150b4a7d4b9515a8a8b10cca05a2cc58539 SHA512 cea5b04610e6ce28c1ead50e8db8b6d9ca3664b0bf0d75c1336fc1a04407cb869963b340d2f9bc4909447a72129982dbfc08f405c6a15126d49e099954eb79b8
MISC metadata.xml 334 BLAKE2B 02ad2c909797d4aaf2a23497611777a790000683866cfbd9d12c4b19cca6de902e219584c4edc85c46b4b0dc51c63e770506a077a4c1052b46f8df19a9588c15 SHA512 e72dc6ce177ad3881f5465f10cd44ca6740b7603ab4e55cfa9e6088be3c6615abeefaee4b717e76fab2850c64d66eee626115544e10709f64c4187f1987bcfe3
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/*
+}