summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2023-09-26 06:11:50 +0200
committerHans de Graaff <graaff@gentoo.org>2023-09-26 06:11:50 +0200
commit1ea2e81d1aa1cf53b2480e51cbb2786409e04cd6 (patch)
tree391d64d773fe859012cf1f3d2987cf573769a168 /dev-ruby/ffi
parentdev-ruby/elastic-transport: add 8.2.4 (diff)
downloadgentoo-1ea2e81d1aa1cf53b2480e51cbb2786409e04cd6.tar.gz
gentoo-1ea2e81d1aa1cf53b2480e51cbb2786409e04cd6.tar.bz2
gentoo-1ea2e81d1aa1cf53b2480e51cbb2786409e04cd6.zip
dev-ruby/ffi: add 1.16.2
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/ffi')
-rw-r--r--dev-ruby/ffi/Manifest1
-rw-r--r--dev-ruby/ffi/ffi-1.16.2.ebuild66
2 files changed, 67 insertions, 0 deletions
diff --git a/dev-ruby/ffi/Manifest b/dev-ruby/ffi/Manifest
index 98aaefac3fb3..4287bbeff81c 100644
--- a/dev-ruby/ffi/Manifest
+++ b/dev-ruby/ffi/Manifest
@@ -1,3 +1,4 @@
DIST ffi-git-1.15.5.tgz 168139 BLAKE2B 2ddd5bd7bfb7bcd39b6d740cbb1e0f4cd419ce6cb4ec12926f91f254b3f3142bc6166728a81a6f23dccfbf7aec911c63237c20fb0e2c70d30d48f4648e352585 SHA512 3668bafae936bf5010f014fbcf63258b023bcc318882775e7d2fcfc11334722ec2b6e8a8b9c910d406889fb173dd503c5c13f5af8e4f6927921f12f688461707
DIST ffi-git-1.16.0.tgz 183318 BLAKE2B 41e9fc25e0e1ed7b295af2d19e02c8fabfa8f4382392549233ac386b9ace9ee87625b5b9b54ef99508d8ff2df6f286a6a4de0cc387d22173e625f68f4617736e SHA512 4677a65b9cfc09a1ad239327b29c89ecc7a668d981be9ad231c59fe3e0b82f18a2cea26fbf4253e0e3d1bd69b4fae4a027aad374af3b03c19a4395925355352f
DIST ffi-git-1.16.1.tgz 183333 BLAKE2B 4c7c79d3dd26713eb2efbdb62ff8057a1e0cd9df95082ea60ef3fc896251a6c62a62665704f04cf1041382fd1604897e1d16cef620776e74f2a840206b7438a4 SHA512 144d9985bacd1a68e35bd1a8c600096c1488c00fce9731abd58241fc12319c7bd1f23805d7a66f3f20335b8b28db1c3769fb41b9b15bf6744ffe573e6e979dc8
+DIST ffi-git-1.16.2.tgz 183435 BLAKE2B e2c9dad9c18f1a675905a000c8cec4ecfd0213df52476df21a035ca96faf257260896721364fcadc2e3bfec364dc7d036fc7402ebcc1c1a10af15f8ce9e2df7c SHA512 8329b67fbb6b1c9a8df1eacc2f8b1c2e2b2d80902914af76060fb9f3dad493ca4cfa0624596c080d641f38324bef165f2a6f7fafefe3e0e0653951f8189ed579
diff --git a/dev-ruby/ffi/ffi-1.16.2.ebuild b/dev-ruby/ffi/ffi-1.16.2.ebuild
new file mode 100644
index 000000000000..dd92a3fe02db
--- /dev/null
+++ b/dev-ruby/ffi/ffi-1.16.2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+USE_RUBY="ruby31 ruby32"
+
+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="~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/*
+}