From 3e08fd22940d04460ac8200318d3ed89eddcbc6d Mon Sep 17 00:00:00 2001 From: matoro Date: Wed, 13 Jul 2022 19:21:08 -0400 Subject: [PATCH] dev-ruby/ffi-compiler: revbump 1.0.1-r2, respect *FLAGS Signed-off-by: matoro Signed-off-by: Matt Turner --- .../ffi-compiler/ffi-compiler-1.0.1-r2.ebuild | 22 +++++++++++++++++++ .../ffi-compiler/files/respect-cflags.patch | 17 ++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 dev-ruby/ffi-compiler/ffi-compiler-1.0.1-r2.ebuild create mode 100644 dev-ruby/ffi-compiler/files/respect-cflags.patch 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 0000000000000..6a6262edb1ff0 --- /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 0000000000000..3fe68f8211cb4 --- /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 = []