summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vaněk <arkamar@atlas.cz>2020-05-07 16:40:56 +0200
committerJoonas Niilola <juippis@gentoo.org>2020-06-10 17:24:41 +0300
commit9a92f89023d4d4a6b6687f9196062bab87c52e07 (patch)
tree0da836e985a7369bef7ab46f62daf71cf6ed7147 /dev-libs/hyperscan
parentdev-python/boto3: Add python@ as co-maint (diff)
downloadgentoo-9a92f89023d4d4a6b6687f9196062bab87c52e07.tar.gz
gentoo-9a92f89023d4d4a6b6687f9196062bab87c52e07.tar.bz2
gentoo-9a92f89023d4d4a6b6687f9196062bab87c52e07.zip
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@atlas.cz> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-libs/hyperscan')
-rw-r--r--dev-libs/hyperscan/files/hyperscan-5.2.1-locales.patch20
-rw-r--r--dev-libs/hyperscan/hyperscan-5.2.1-r1.ebuild15
2 files changed, 34 insertions, 1 deletions
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 000000000000..985a6f130344
--- /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 aa7ab14e7067..1f23a817dcbc 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
}