diff options
author | Hans de Graaff <graaff@gentoo.org> | 2023-09-25 07:25:54 +0200 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2023-09-25 07:25:54 +0200 |
commit | 76596cb0aec1da7a1eb95c057455cef5d1dc6967 (patch) | |
tree | f5a96ab1e9e74f4658edc3da8403fff38cacc0d6 /dev-ruby/ffi | |
parent | app-admin/syslog-ng: drop old (diff) | |
download | gentoo-76596cb0aec1da7a1eb95c057455cef5d1dc6967.tar.gz gentoo-76596cb0aec1da7a1eb95c057455cef5d1dc6967.tar.bz2 gentoo-76596cb0aec1da7a1eb95c057455cef5d1dc6967.zip |
dev-ruby/ffi: add 1.16.1
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/ffi')
-rw-r--r-- | dev-ruby/ffi/Manifest | 1 | ||||
-rw-r--r-- | dev-ruby/ffi/ffi-1.16.1.ebuild | 66 |
2 files changed, 67 insertions, 0 deletions
diff --git a/dev-ruby/ffi/Manifest b/dev-ruby/ffi/Manifest index 75f7311bb941..98aaefac3fb3 100644 --- a/dev-ruby/ffi/Manifest +++ b/dev-ruby/ffi/Manifest @@ -1,2 +1,3 @@ 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 diff --git a/dev-ruby/ffi/ffi-1.16.1.ebuild b/dev-ruby/ffi/ffi-1.16.1.ebuild new file mode 100644 index 000000000000..dd92a3fe02db --- /dev/null +++ b/dev-ruby/ffi/ffi-1.16.1.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/* +} |