From: David Seifert Date: Sat, 1 Dec 2018 11:38:12 +0000 (+0100) Subject: dev-ruby/charlock_holmes: Always build in C++11 mode X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bf8936159b56276eb0444560fcd776f13b17db98;p=gentoo.git 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 --- 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 b9bbacc1a91b..47c7658b1bd6 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 000000000000..944efac19253 --- /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']