commit:     bf8936159b56276eb0444560fcd776f13b17db98
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  1 11:38:12 2018 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Dec  1 11:39:35 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf893615

dev-ruby/charlock_holmes: Always build in C++11 mode

Closes: https://bugs.gentoo.org/653398
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-ruby/charlock_holmes/charlock_holmes-0.7.6.ebuild    |  4 +++-
 .../files/charlock_holmes-0.7.6-gcc5.patch               | 16 ++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/dev-ruby/charlock_holmes/charlock_holmes-0.7.6.ebuild 
b/dev-ruby/charlock_holmes/charlock_holmes-0.7.6.ebuild
index b9bbacc1a91..47c7658b1bd 100644
--- a/dev-ruby/charlock_holmes/charlock_holmes-0.7.6.ebuild
+++ b/dev-ruby/charlock_holmes/charlock_holmes-0.7.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -26,6 +26,8 @@ CDEPEND="dev-libs/icu:=
 DEPEND+=" ${CDEPEND}"
 RDEPEND+=" ${CDEPEND}"
 
+PATCHES=( "${FILESDIR}"/${PN}-0.7.6-gcc5.patch )
+
 all_ruby_prepare() {
        sed -i -e '/bundler/d' test/helper.rb || die
 

diff --git a/dev-ruby/charlock_holmes/files/charlock_holmes-0.7.6-gcc5.patch 
b/dev-ruby/charlock_holmes/files/charlock_holmes-0.7.6-gcc5.patch
new file mode 100644
index 00000000000..944efac1925
--- /dev/null
+++ b/dev-ruby/charlock_holmes/files/charlock_holmes-0.7.6-gcc5.patch
@@ -0,0 +1,16 @@
+--- a/ext/charlock_holmes/extconf.rb
++++ b/ext/charlock_holmes/extconf.rb
+@@ -54,11 +54,8 @@
+ have_library 'icuuc' or abort 'libicuuc missing'
+ have_library 'icudata' or abort 'libicudata missing'
+ 
+-# icu4c might be built in C++11 mode, but it also might not have been
+-icuconfig = `which icu-config`.chomp if icuconfig.empty?
+-if File.exist?(icuconfig) && `#{icuconfig} --cxxflags`.include?("c++11")
+-  $CXXFLAGS << ' -std=c++11'
+-end
++# Always use C++11
++$CXXFLAGS << ' -std=c++11'
+ 
+ $CFLAGS << ' -Wall -funroll-loops'
+ $CFLAGS << ' -Wextra -O0 -ggdb3' if ENV['DEBUG']

Reply via email to