Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/posix-spawn/, dev-ruby/posix-spawn/files/
Date: Mon, 11 Jun 2018 17:18:23
Message-Id: 1528737486.402a4305cf5eb7f6fdddb0aa63bbba94932b4524.graaff@gentoo
1 commit: 402a4305cf5eb7f6fdddb0aa63bbba94932b4524
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 11 17:18:06 2018 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 11 17:18:06 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=402a4305
7
8 dev-ruby/posix-spawn: fix compilation on x86
9
10 Closes: https://bugs.gentoo.org/657806
11 Package-Manager: Portage-2.3.40, Repoman-2.3.9
12
13 .../posix-spawn/files/posix-spawn-0.3.13-x86.patch | 23 ++++++++++++++
14 dev-ruby/posix-spawn/posix-spawn-0.3.13-r1.ebuild | 37 ++++++++++++++++++++++
15 2 files changed, 60 insertions(+)
16
17 diff --git a/dev-ruby/posix-spawn/files/posix-spawn-0.3.13-x86.patch b/dev-ruby/posix-spawn/files/posix-spawn-0.3.13-x86.patch
18 new file mode 100644
19 index 00000000000..b96579b1828
20 --- /dev/null
21 +++ b/dev-ruby/posix-spawn/files/posix-spawn-0.3.13-x86.patch
22 @@ -0,0 +1,23 @@
23 +From 5201e921a788fbb97f14ea0c617a2213dc3da1ca Mon Sep 17 00:00:00 2001
24 +From: Pascal Terjan <pterjan@××××××.com>
25 +Date: Sun, 20 Aug 2017 12:13:15 +0100
26 +Subject: [PATCH] Fix build when SIZEOF_INT == SIZEOF_LONG
27 +
28 +Signed-off-by: Aman Gupta <aman@××××.net>
29 +---
30 + ext/posix-spawn.c | 2 +-
31 + 1 file changed, 1 insertion(+), 1 deletion(-)
32 +
33 +diff --git a/ext/posix-spawn.c b/ext/posix-spawn.c
34 +index 1659bed..2e4c4de 100644
35 +--- a/ext/posix-spawn.c
36 ++++ b/ext/posix-spawn.c
37 +@@ -61,7 +61,7 @@ posixspawn_obj_to_fd(VALUE obj)
38 + * rb_fix2int takes care of raising if the provided object is a
39 + * Bignum and is out of range of an int
40 + */
41 +- fd = (int)rb_fix2int(obj);
42 ++ fd = FIX2INT(obj);
43 + break;
44 +
45 + case T_SYMBOL:
46
47 diff --git a/dev-ruby/posix-spawn/posix-spawn-0.3.13-r1.ebuild b/dev-ruby/posix-spawn/posix-spawn-0.3.13-r1.ebuild
48 new file mode 100644
49 index 00000000000..e9cd83e0d10
50 --- /dev/null
51 +++ b/dev-ruby/posix-spawn/posix-spawn-0.3.13-r1.ebuild
52 @@ -0,0 +1,37 @@
53 +# Copyright 1999-2018 Gentoo Foundation
54 +# Distributed under the terms of the GNU General Public License v2
55 +
56 +EAPI=6
57 +
58 +USE_RUBY="ruby23 ruby24 ruby25"
59 +
60 +RUBY_FAKEGEM_TASK_DOC=""
61 +RUBY_FAKEGEM_EXTRADOC="README.md TODO HACKING"
62 +
63 +inherit ruby-fakegem
64 +
65 +DESCRIPTION="Library that implements a subset of the Ruby 1.9 Process::spawn"
66 +HOMEPAGE="https://github.com/rtomayko/posix-spawn/"
67 +
68 +KEYWORDS="~amd64"
69 +
70 +LICENSE="MIT LGPL-2.1"
71 +SLOT="0"
72 +IUSE="test"
73 +
74 +all_ruby_prepare() {
75 + eapply "${FILESDIR}/${P}-x86.patch"
76 +}
77 +
78 +each_ruby_configure() {
79 + ${RUBY} -Cext extconf.rb || die
80 +}
81 +
82 +each_ruby_compile() {
83 + emake V=1 -Cext
84 + cp ext/*$(get_modname) lib/ || die
85 +}
86 +
87 +each_ruby_test() {
88 + ${RUBY} -Ilib:.:test -e 'Dir["test/test_*.rb"].each {|f| require f}' || die
89 +}