Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updpatch: marisa #1851

Merged
merged 1 commit into from
Oct 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions marisa/riscv64-marisa_word_size.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/include/marisa/base.h b/include/marisa/base.h
index ffcdc5b..f04df91 100644
--- a/include/marisa/base.h
+++ b/include/marisa/base.h
@@ -31,7 +31,7 @@ typedef uint64_t marisa_uint64;
#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
25 changes: 23 additions & 2 deletions marisa/riscv64.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
diff --git PKGBUILD PKGBUILD
index 4c6617d..7a6ff36 100644
index 4c6617d..1eeb278 100644
--- PKGBUILD
+++ PKGBUILD
@@ -25,7 +25,8 @@ prepare() {
@@ -10,9 +10,11 @@
license=('BSD' 'LGPL')
makedepends=('python' 'ruby' 'perl' 'swig')
source=("marisa-trie-$pkgver.tar.gz::https://github.com/s-yata/marisa-trie/archive/v$pkgver.tar.gz"
- fix-format-security.patch)
+ fix-format-security.patch
+ riscv64-marisa_word_size.patch)
sha512sums=('c094e4b22e1457efdd20f2b978ee421b53e36ed94e4fdbd8944136c0ba23da4f6ba9fe3a2c64729c1426aee4dbe8098bfa5eebb943ae7fdaa4eec760485c564d'
- '3583f23c55ccd46cefbd757ef3f82dc7a90f14c64ecf69a99ab3467ca1e6aeddf9822be4c4dffcdbb8841d79fe116cfb8eff0e9b44abaadbcbf8d50a10ab1ec9')
+ '3583f23c55ccd46cefbd757ef3f82dc7a90f14c64ecf69a99ab3467ca1e6aeddf9822be4c4dffcdbb8841d79fe116cfb8eff0e9b44abaadbcbf8d50a10ab1ec9'
+ 'f22e2feb3db75d64a6ac9a60574450bf69cf970027edd4827aab132bf1ed827bcc1c7bf37137f055ea25eb06945cbd04811b19818a459985375b9b8d4bef3a51')

prepare() {
cd marisa-trie-$pkgver
@@ -20,12 +22,15 @@

# https://github.com/s-yata/marisa-trie/pull/45
patch -Np1 -i ../fix-format-security.patch
+ # https://github.com/s-yata/marisa-trie/issues/40
+ patch -Np1 -i ../riscv64-marisa_word_size.patch
}

build() {
cd marisa-trie-$pkgver
# sse2 is part of amd64
Expand Down