commit:     3e08fd22940d04460ac8200318d3ed89eddcbc6d
Author:     matoro <matoro <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Wed Jul 13 23:21:08 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Oct 22 21:33:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e08fd22

dev-ruby/ffi-compiler: revbump 1.0.1-r2, respect *FLAGS

Signed-off-by: matoro <matoro <AT> users.noreply.github.com>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 dev-ruby/ffi-compiler/ffi-compiler-1.0.1-r2.ebuild | 22 ++++++++++++++++++++++
 dev-ruby/ffi-compiler/files/respect-cflags.patch   | 17 +++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/dev-ruby/ffi-compiler/ffi-compiler-1.0.1-r2.ebuild 
b/dev-ruby/ffi-compiler/ffi-compiler-1.0.1-r2.ebuild
new file mode 100644
index 000000000000..6a6262edb1ff
--- /dev/null
+++ b/dev-ruby/ffi-compiler/ffi-compiler-1.0.1-r2.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+USE_RUBY="ruby26 ruby27 ruby30 ruby31"
+
+RUBY_FAKEGEM_EXTRADOC="README.md"
+
+RUBY_FAKEGEM_RECIPE_TEST="none"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Ruby FFI Rakefile generator"
+HOMEPAGE="https://github.com/ffi/ffi/wiki";
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~sparc ~x86"
+IUSE=""
+# PATCHES=( "${FILESDIR}/respect-cflags.patch" )
+
+ruby_add_rdepend "dev-ruby/rake >=dev-ruby/ffi-1.0.0"

diff --git a/dev-ruby/ffi-compiler/files/respect-cflags.patch 
b/dev-ruby/ffi-compiler/files/respect-cflags.patch
new file mode 100644
index 000000000000..3fe68f8211cb
--- /dev/null
+++ b/dev-ruby/ffi-compiler/files/respect-cflags.patch
@@ -0,0 +1,17 @@
+diff --git a/lib/ffi-compiler/compile_task.rb 
b/lib/ffi-compiler/compile_task.rb
+index 363c247..637fd3d 100644
+--- a/lib/ffi-compiler/compile_task.rb
++++ b/lib/ffi-compiler/compile_task.rb
+@@ -26,9 +26,9 @@ module FFI
+         @libraries = []
+         @headers = []
+         @functions = []
+-        @cflags = DEFAULT_CFLAGS.dup
+-        @cxxflags = DEFAULT_CFLAGS.dup
+-        @ldflags = DEFAULT_LDFLAGS.dup
++        @cflags = ENV['CFLAGS']&.split || DEFAULT_CFLAGS.dup
++        @cxxflags = ENV['CXXFLAGS']&.split || DEFAULT_CFLAGS.dup
++        @ldflags = ENV['LDFLAGS']&.split || DEFAULT_LDFLAGS.dup
+         @libs = []
+         @platform = Platform.system
+         @exports = []

Reply via email to