public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/marisa/files/, dev-libs/marisa/
@ 2019-09-29  2:56 Mike Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Gilbert @ 2019-09-29  2:56 UTC (permalink / raw
  To: gentoo-commits

commit:     54111dad825a87510e3896218cb0e111554f82b1
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Sat Sep 28 02:08:18 2019 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Sep 29 02:56:12 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54111dad

dev-libs/marisa: Automatic detection of CPU features enabled by CXXFLAGS.

cpu_flags_x86_* USE flags are no longer needed.

https://github.com/s-yata/marisa-trie/commit/d93f1b67f3aaa2d56bf20089c0ce9ef216da6cb7

Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../files/marisa-0.2.5-cpu_features_check.patch    | 157 +++++++++++++++++++++
 dev-libs/marisa/marisa-0.2.5.ebuild                |  32 +++--
 2 files changed, 174 insertions(+), 15 deletions(-)

diff --git a/dev-libs/marisa/files/marisa-0.2.5-cpu_features_check.patch b/dev-libs/marisa/files/marisa-0.2.5-cpu_features_check.patch
new file mode 100644
index 00000000000..dba677221a1
--- /dev/null
+++ b/dev-libs/marisa/files/marisa-0.2.5-cpu_features_check.patch
@@ -0,0 +1,157 @@
+https://github.com/s-yata/marisa-trie/commit/d93f1b67f3aaa2d56bf20089c0ce9ef216da6cb7
+
+--- /configure.ac
++++ /configure.ac
+@@ -13,6 +13,56 @@
+ 
+ AC_CONFIG_MACRO_DIR([m4])
+ 
++# Macros for SSE availability check.
++AC_DEFUN([MARISA_ENABLE_SSE2],
++          [AC_EGREP_CPP([yes], [
++#ifdef __SSE2__
++yes
++#endif
++          ], [enable_sse2="yes"], [enable_sse2="no"])])
++AC_DEFUN([MARISA_ENABLE_SSE3],
++          [AC_EGREP_CPP([yes], [
++#ifdef __SSE3__
++yes
++#endif
++          ], [enable_sse3="yes"], [enable_sse3="no"])])
++AC_DEFUN([MARISA_ENABLE_SSSE3],
++         [AC_EGREP_CPP([yes], [
++#ifdef __SSSE3__
++yes
++#endif
++         ], [enable_ssse3="yes"], [enable_ssse3="no"])])
++AC_DEFUN([MARISA_ENABLE_SSE4_1],
++         [AC_EGREP_CPP([yes], [
++#ifdef __SSE4_1__
++yes
++#endif
++         ], [enable_sse4_1="yes"], [enable_sse4_1="no"])])
++AC_DEFUN([MARISA_ENABLE_SSE4_2],
++         [AC_EGREP_CPP([yes], [
++#ifdef __SSE4_2__
++yes
++#endif
++         ], [enable_sse4_2="yes"], [enable_sse4_2="no"])])
++AC_DEFUN([MARISA_ENABLE_SSE4],
++         [AC_EGREP_CPP([yes], [
++#if defined(__POPCNT__) && defined(__SSE4_2__)
++yes
++#endif
++         ], [enable_sse4="yes"], [enable_sse4="no"])])
++AC_DEFUN([MARISA_ENABLE_SSE4A],
++         [AC_EGREP_CPP([yes], [
++#ifdef __SSE4A__
++yes
++#endif
++         ], [enable_sse4a="yes"], [enable_sse4a="no"])])
++AC_DEFUN([MARISA_ENABLE_POPCNT],
++         [AC_EGREP_CPP([yes], [
++#ifdef __POPCNT__
++yes
++#endif
++         ], [enable_popcnt="yes"], [enable_popcnt="no"])])
++
+ # Checks for SSE availability.
+ AC_MSG_CHECKING([whether to use SSE2])
+ AC_ARG_ENABLE([sse2],
+@@ -20,9 +70,7 @@
+                               [use SSE2 [default=no]])],
+               [],
+               [enable_sse2="no"])
+-AS_IF([test "x${enable_sse2}" != "xno"], [
+-  enable_sse2="yes"
+-])
++AS_IF([test "x${enable_sse2}" != "xno"], [MARISA_ENABLE_SSE2])
+ AC_MSG_RESULT([${enable_sse2}])
+ 
+ AC_MSG_CHECKING([whether to use SSE3])
+@@ -31,9 +79,7 @@
+                               [use SSE3 [default=no]])],
+               [],
+               [enable_sse3="no"])
+-AS_IF([test "x${enable_sse3}" != "xno"], [
+-  enable_sse3="yes"
+-])
++AS_IF([test "x${enable_sse3}" != "xno"], [MARISA_ENABLE_SSE3])
+ AC_MSG_RESULT([${enable_sse3}])
+ 
+ AC_MSG_CHECKING([whether to use SSSE3])
+@@ -42,9 +88,7 @@
+                               [use SSSE3 [default=no]])],
+               [],
+               [enable_ssse3="no"])
+-AS_IF([test "x${enable_ssse3}" != "xno"], [
+-  enable_ssse3="yes"
+-])
++AS_IF([test "x${enable_ssse3}" != "xno"], [MARISA_ENABLE_SSSE3])
+ AC_MSG_RESULT([${enable_ssse3}])
+ 
+ AC_MSG_CHECKING([whether to use SSE4.1])
+@@ -53,9 +97,7 @@
+                               [use SSE4.1 [default=no]])],
+               [],
+               [enable_sse4_1="no"])
+-AS_IF([test "x${enable_sse4_1}" != "xno"], [
+-  enable_sse4_1="yes"
+-])
++AS_IF([test "x${enable_sse4_1}" != "xno"], [MARISA_ENABLE_SSE4_1])
+ AC_MSG_RESULT([${enable_sse4_1}])
+ 
+ AC_MSG_CHECKING([whether to use SSE4.2])
+@@ -64,9 +106,7 @@
+                               [use SSE4.2 [default=no]])],
+               [],
+               [enable_sse4_2="no"])
+-AS_IF([test "x${enable_sse4_2}" != "xno"], [
+-  enable_sse4_2="yes"
+-])
++AS_IF([test "x${enable_sse4_2}" != "xno"], [MARISA_ENABLE_SSE4_2])
+ AC_MSG_RESULT([${enable_sse4_2}])
+ 
+ AC_MSG_CHECKING([whether to use SSE4])
+@@ -75,9 +115,7 @@
+                               [use SSE4 [default=no]])],
+               [],
+               [enable_sse4="no"])
+-AS_IF([test "x${enable_sse4}" != "xno"], [
+-  enable_sse4="yes"
+-])
++AS_IF([test "x${enable_sse4}" != "xno"], [MARISA_ENABLE_SSE4])
+ AC_MSG_RESULT([${enable_sse4}])
+ 
+ AC_MSG_CHECKING([whether to use SSE4a])
+@@ -86,9 +124,7 @@
+                               [use SSE4a [default=no]])],
+               [],
+               [enable_sse4a="no"])
+-AS_IF([test "x${enable_sse4a}" != "xno"], [
+-  enable_sse4a="yes"
+-])
++AS_IF([test "x${enable_sse4a}" != "xno"], [MARISA_ENABLE_SSE4A])
+ AC_MSG_RESULT([${enable_sse4a}])
+ 
+ AC_MSG_CHECKING([whether to use popcnt])
+@@ -97,9 +133,7 @@
+                               [use POPCNT [default=no]])],
+               [],
+               [enable_popcnt="no"])
+-AS_IF([test "x${enable_popcnt}" != "xno"], [
+-  enable_popcnt="yes"
+-])
++AS_IF([test "x${enable_popcnt}" != "xno"], [MARISA_ENABLE_POPCNT])
+ AC_MSG_RESULT([${enable_popcnt}])
+ 
+ AS_IF([test "x${enable_popcnt}" != "xno"], [
+@@ -170,6 +204,7 @@
+ AS_ECHO(["  LDFLAGS:   ${LDFLAGS}"])
+ AS_ECHO(["  PREFIX:    ${prefix}"])
+ AS_ECHO([])
++AS_ECHO(["  NATIVE:    ${enable_native_code}"])
+ AS_ECHO(["  SSE2:      ${enable_sse2}"])
+ AS_ECHO(["  SSE3:      ${enable_sse3}"])
+ AS_ECHO(["  SSSE3:     ${enable_ssse3}"])

diff --git a/dev-libs/marisa/marisa-0.2.5.ebuild b/dev-libs/marisa/marisa-0.2.5.ebuild
index e7ec8bf4f0d..90b71175c86 100644
--- a/dev-libs/marisa/marisa-0.2.5.ebuild
+++ b/dev-libs/marisa/marisa-0.2.5.ebuild
@@ -24,14 +24,8 @@ fi
 LICENSE="|| ( BSD-2 LGPL-2.1+ )"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE="cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 cpu_flags_x86_sse4_2 cpu_flags_x86_sse4a cpu_flags_x86_popcnt python static-libs"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
-	cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
-	cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 )
-	cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 )
-	cpu_flags_x86_sse4_2? ( cpu_flags_x86_popcnt cpu_flags_x86_sse4_1 )
-	cpu_flags_x86_sse4a? ( cpu_flags_x86_popcnt cpu_flags_x86_sse3 )
-	cpu_flags_x86_popcnt? ( cpu_flags_x86_sse3 )"
+IUSE="python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
 BDEPEND="python? (
 		${PYTHON_DEPS}
@@ -44,6 +38,10 @@ if [[ "${PV}" != "9999" ]]; then
 	S="${WORKDIR}/marisa-trie-${PV}"
 fi
 
+PATCHES=(
+	"${FILESDIR}/${P}-cpu_features_check.patch"
+)
+
 src_prepare() {
 	default
 	eautoreconf
@@ -58,14 +56,18 @@ src_prepare() {
 }
 
 src_configure() {
+	local -x CPPFLAGS="${CPPFLAGS} ${CXXFLAGS}"
+
 	local options=(
-		$(use_enable cpu_flags_x86_sse2 sse2)
-		$(use_enable cpu_flags_x86_sse3 sse3)
-		$(use_enable cpu_flags_x86_ssse3 ssse3)
-		$(use_enable cpu_flags_x86_sse4_1 sse4.1)
-		$(use_enable cpu_flags_x86_sse4_2 sse4.2)
-		$(use_enable cpu_flags_x86_sse4a sse4a)
-		$(use_enable cpu_flags_x86_popcnt popcnt)
+		# Preprocessor macros dependent on CPPFLAGS are checked.
+		--enable-sse2
+		--enable-sse3
+		--enable-ssse3
+		--enable-sse4.1
+		--enable-sse4.2
+		--enable-sse4
+		--enable-sse4a
+		--enable-popcnt
 		$(use_enable static-libs static)
 	)
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/marisa/files/, dev-libs/marisa/
@ 2021-07-27 21:54 Marek Szuba
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Szuba @ 2021-07-27 21:54 UTC (permalink / raw
  To: gentoo-commits

commit:     ddedb2650b0beb769a2e165681be5a99a46cfac8
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 27 21:34:23 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Jul 27 21:54:09 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddedb265

dev-libs/marisa: keyword 0.2.6 for ~riscv

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 dev-libs/marisa/files/marisa-0.2.6-riscv_word_size.patch | 11 +++++++++++
 dev-libs/marisa/marisa-0.2.6.ebuild                      |  8 ++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/dev-libs/marisa/files/marisa-0.2.6-riscv_word_size.patch b/dev-libs/marisa/files/marisa-0.2.6-riscv_word_size.patch
new file mode 100644
index 00000000000..49750d80761
--- /dev/null
+++ b/dev-libs/marisa/files/marisa-0.2.6-riscv_word_size.patch
@@ -0,0 +1,11 @@
+--- a/include/marisa/base.h
++++ b/include/marisa/base.h
+@@ -31,7 +31,7 @@
+ #if defined(_WIN64) || defined(__amd64__) || defined(__x86_64__) || \
+     defined(__ia64__) || defined(__ppc64__) || defined(__powerpc64__) || \
+     defined(__sparc64__) || defined(__mips64__) || defined(__aarch64__) || \
+-    defined(__s390x__)
++    defined(__s390x__) || (defined(__riscv) && (__riscv_xlen == 64))
+  #define MARISA_WORD_SIZE 64
+ #else  // defined(_WIN64), etc.
+  #define MARISA_WORD_SIZE 32

diff --git a/dev-libs/marisa/marisa-0.2.6.ebuild b/dev-libs/marisa/marisa-0.2.6.ebuild
index 1ed697e7aea..c958dfd64c3 100644
--- a/dev-libs/marisa/marisa-0.2.6.ebuild
+++ b/dev-libs/marisa/marisa-0.2.6.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
-PYTHON_COMPAT=(python{3_7,3_8,3_9})
+PYTHON_COMPAT=( python3_{8,9} )
 DISTUTILS_OPTIONAL="1"
 DISTUTILS_USE_SETUPTOOLS="no"
 
@@ -24,7 +24,7 @@ fi
 
 LICENSE="|| ( BSD-2 LGPL-2.1+ )"
 SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
 IUSE="python static-libs"
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
@@ -39,6 +39,10 @@ if [[ "${PV}" != "9999" ]]; then
 	S="${WORKDIR}/marisa-trie-${PV}"
 fi
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.2.6-riscv_word_size.patch
+)
+
 src_prepare() {
 	default
 	eautoreconf


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-27 21:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-27 21:54 [gentoo-commits] repo/gentoo:master commit in: dev-libs/marisa/files/, dev-libs/marisa/ Marek Szuba
  -- strict thread matches above, loose matches on Subject: below --
2019-09-29  2:56 Mike Gilbert

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