public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/hyperscan/files/, dev-libs/hyperscan/
@ 2020-06-10 14:25 Joonas Niilola
  0 siblings, 0 replies; only message in thread
From: Joonas Niilola @ 2020-06-10 14:25 UTC (permalink / raw
  To: gentoo-commits

commit:     9a92f89023d4d4a6b6687f9196062bab87c52e07
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Thu May  7 14:40:56 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Jun 10 14:24:41 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a92f890

dev-libs/hyperscan: bug fixes: #674218, #707486, #722802

* support non-English locales; The patch is taken from
  https://github.com/intel/hyperscan/issues/217#issuecomment-583932263
* respect cpu_flags_x86 USE flags
* respect -O flags
* set release build type; CMAKE_BUILD_TYPE=Release disables -Werror flag
  which used to trigger false positive error in GCC-10.
  https://github.com/intel/hyperscan/issues/239

Closes: https://bugs.gentoo.org/674218
Closes: https://bugs.gentoo.org/707486
Closes: https://bugs.gentoo.org/722802
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../hyperscan/files/hyperscan-5.2.1-locales.patch    | 20 ++++++++++++++++++++
 dev-libs/hyperscan/hyperscan-5.2.1-r1.ebuild         | 15 ++++++++++++++-
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/dev-libs/hyperscan/files/hyperscan-5.2.1-locales.patch b/dev-libs/hyperscan/files/hyperscan-5.2.1-locales.patch
new file mode 100644
index 00000000000..985a6f13034
--- /dev/null
+++ b/dev-libs/hyperscan/files/hyperscan-5.2.1-locales.patch
@@ -0,0 +1,20 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 83197af..297a3b3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -187,9 +187,9 @@ else()
+         set (EXEC_ARGS ${CC_ARG1} -c -Q --help=target -march=native -mtune=native)
+         execute_process(COMMAND ${CMAKE_C_COMPILER} ${EXEC_ARGS}
+             OUTPUT_VARIABLE _GCC_OUTPUT)
+-        string(FIND "${_GCC_OUTPUT}" "Known" POS)
+-        string(SUBSTRING "${_GCC_OUTPUT}" 0 ${POS} _GCC_OUTPUT)
+-        string(REGEX REPLACE ".*march=[ \t]*([^ \n]*)[ \n].*" "\\1"
++        string(FIND "${_GCC_OUTPUT}" "march" POS)
++        string(SUBSTRING "${_GCC_OUTPUT}" ${POS} -1 _GCC_OUTPUT)
++        string(REGEX REPLACE "march=[ \t]*([^ \n]*)[ \n].*" "\\1"
+             GNUCC_ARCH "${_GCC_OUTPUT}")
+ 
+         # test the parsed flag
+-- 
+2.26.2
+

diff --git a/dev-libs/hyperscan/hyperscan-5.2.1-r1.ebuild b/dev-libs/hyperscan/hyperscan-5.2.1-r1.ebuild
index aa7ab14e706..1f23a817dcb 100644
--- a/dev-libs/hyperscan/hyperscan-5.2.1-r1.ebuild
+++ b/dev-libs/hyperscan/hyperscan-5.2.1-r1.ebuild
@@ -14,7 +14,7 @@ HOMEPAGE="https://www.hyperscan.io/ https://github.com/intel/hyperscan"
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="+cpu_flags_x86_ssse3 static-libs"
+IUSE="cpu_flags_x86_avx2 +cpu_flags_x86_ssse3 static-libs"
 
 RDEPEND="dev-libs/boost"
 DEPEND="${RDEPEND}"
@@ -25,16 +25,29 @@ BDEPEND="
 
 REQUIRED_USE="cpu_flags_x86_ssse3"
 
+PATCHES=(
+	"${FILESDIR}/${P}-locales.patch"
+)
+
 src_prepare() {
+	# Respect user -O flags
+	sed -i '/set(OPT_CX*_FLAG/d' CMakeLists.txt || die
+
 	# upstream workaround
 	append-cxxflags -Wno-redundant-move
 	cmake_src_prepare
 }
 
 src_configure() {
+	CMAKE_BUILD_TYPE=Release
+
+	use cpu_flags_x86_ssse3 && append-flags -mssse3
+	use cpu_flags_x86_avx2  && append-flags -mavx2
+
 	local mycmakeargs=(
 		-DBUILD_SHARED_LIBS=$(usex static-libs OFF ON)
 		-DBUILD_STATIC_AND_SHARED=$(usex static-libs ON OFF)
+		-DFAT_RUNTIME=false
 	)
 	cmake_src_configure
 }


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-10 14:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-10 14:25 [gentoo-commits] repo/gentoo:master commit in: dev-libs/hyperscan/files/, dev-libs/hyperscan/ Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox