Skip to content

Commit

Permalink
dev-ruby/ffi: add 1.12.1
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.79, Repoman-2.3.16
Signed-off-by: Hans de Graaff <[email protected]>
  • Loading branch information
graaff committed Jan 15, 2020
1 parent e836f98 commit 21f4648
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-ruby/ffi/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST ffi-git-1.11.3.tgz 157081 BLAKE2B 57459d3aba7f54daf9c4d94993a083166efe5c37f3aa699279a07cac0ecdee533f54ee1ab36f7ee2a5cc43d0ebb386b8b3285102d98ffd18fa297e2e1b882283 SHA512 86a6a95aa5d4f005eb457fbe26b38e7b8618899db3de3459f3a01128aa7c488a47e50d13aef05ae83519178c80f2f7ed0a0280147d7e30aace13bbab82871f30
DIST ffi-git-1.12.1.tgz 158108 BLAKE2B e5685e94ef0c1a1f5a5443fac4d9934fc3613219f27d08c635bf346d1312f765d9bc9bb987e736fb373f715d84489e410e2e13280acc501607b1274a6a4a63be SHA512 172540f5827ed87afd56d0da08705d714ab7e4ad1297f9de774cb8792fb8fbb90f9e697e280f13c25c5c14dc73b8ba8150fe3dfd5f31e3c70c195357709ce13a
DIST ffi-git-1.9.25.tgz 164209 BLAKE2B aab3addb5d9138f81d0688ad628082e7aef5f96a1b046dfa57a7195dcf7432533052bb397ac8335f7b17ffece9424fad7d986065a82ac91437e0d8d27d76ac77 SHA512 94a45f4152458d6aedf50645c8074626dcde4326093a606e509c3fbcaac79a1e6a9f7df624f14946db4f3767ef6fb3e311e60531c209676e66ebbf21b07a6786
63 changes: 63 additions & 0 deletions dev-ruby/ffi/ffi-1.12.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

USE_RUBY="ruby24 ruby25 ruby26 ruby27"

RUBY_FAKEGEM_RECIPE_TEST="rspec3"

RUBY_FAKEGEM_DOCDIR="doc"
RUBY_FAKEGEM_EXTRADOC="README.md"

inherit multilib ruby-fakegem

DESCRIPTION="Ruby extension for programmatically loading dynamic libraries"
HOMEPAGE="https://wiki.github.com/ffi/ffi"

SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${PN}-git-${PV}.tgz"

IUSE=""
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"

RDEPEND+=" virtual/libffi:0="
DEPEND+=" virtual/libffi"

ruby_add_bdepend "dev-ruby/rake"

all_ruby_prepare() {
sed -i -e '/tasks/ s:^:#:' \
-e '/Gem::Tasks/,/end/ s:^:#:' Rakefile || 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_configure() {
${RUBY} -Cext/ffi_c extconf.rb || die
}

each_ruby_compile() {
emake -Cext/ffi_c V=1
cp ext/ffi_c/ffi_c$(get_modname) lib/ || die

${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/*
}

0 comments on commit 21f4648

Please sign in to comment.