commit: ff5487f076793e99249e61cf4d0d65febbaa3a42 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri May 16 05:17:09 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri May 16 05:17:09 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff5487f0
dev-libs/libgcrypt: add missing riscv header to 1.11.1 It's in the repo but not in tarballs. Closes: https://bugs.gentoo.org/955813 Signed-off-by: Sam James <sam <AT> gentoo.org> .../libgcrypt/files/libgcrypt-1.11.1-riscv.patch | 53 ++++++++++++++++++++++ dev-libs/libgcrypt/libgcrypt-1.11.1.ebuild | 1 + 2 files changed, 54 insertions(+) diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.11.1-riscv.patch b/dev-libs/libgcrypt/files/libgcrypt-1.11.1-riscv.patch new file mode 100644 index 000000000000..9cab5f78b139 --- /dev/null +++ b/dev-libs/libgcrypt/files/libgcrypt-1.11.1-riscv.patch @@ -0,0 +1,53 @@ +https://bugs.gentoo.org/955813 +diff '--color=auto' --text --new-file --unified libgcrypt-1.11.1/cipher/simd-common-riscv.h libgcrypt/cipher/simd-common-riscv.h +--- a/cipher/simd-common-riscv.h 1970-01-01 08:00:00.000000000 +0800 ++++ b/cipher/simd-common-riscv.h 2025-05-13 08:06:01.221102266 +0800 +@@ -0,0 +1,48 @@ ++/* simd-common-riscv.h - Common macros for RISC-V vector code ++ * ++ * Copyright (C) 2025 Jussi Kivilinna <[email protected]> ++ * ++ * This file is part of Libgcrypt. ++ * ++ * Libgcrypt is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as ++ * published by the Free Software Foundation; either version 2.1 of ++ * the License, or (at your option) any later version. ++ * ++ * Libgcrypt is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this program; if not, see <http://www.gnu.org/licenses/>. ++ */ ++ ++#ifndef GCRY_SIMD_COMMON_RISCV_H ++#define GCRY_SIMD_COMMON_RISCV_H ++ ++#include <config.h> ++ ++#define memory_barrier_with_vec(a) __asm__("" : "+vr"(a) :: "memory") ++ ++#define clear_vec_regs() __asm__ volatile("vsetvli zero, %0, e8, m1, ta, ma;\n" \ ++ "vmv.v.i v0, 0;\n" \ ++ "vmv.v.i v1, 0;\n" \ ++ "vmv2r.v v2, v0;\n" \ ++ "vmv4r.v v4, v0;\n" \ ++ "vmv8r.v v8, v0;\n" \ ++ "vmv8r.v v16, v0;\n" \ ++ "vmv8r.v v24, v0;\n" \ ++ : \ ++ : "r" (~0) \ ++ : "memory", "vl", "vtype", \ ++ "v0", "v1", "v2", "v3", \ ++ "v4", "v5", "v6", "v7", \ ++ "v8", "v9", "v10", "v11", \ ++ "v12", "v13", "v14", "v15", \ ++ "v16", "v17", "v18", "v19", \ ++ "v20", "v21", "v22", "v23", \ ++ "v24", "v25", "v26", "v27", \ ++ "v28", "v29", "v30", "v31") ++ ++#endif /* GCRY_SIMD_COMMON_RISCV_H */ diff --git a/dev-libs/libgcrypt/libgcrypt-1.11.1.ebuild b/dev-libs/libgcrypt/libgcrypt-1.11.1.ebuild index feb27f3ae197..54beede43cf1 100644 --- a/dev-libs/libgcrypt/libgcrypt-1.11.1.ebuild +++ b/dev-libs/libgcrypt/libgcrypt-1.11.1.ebuild @@ -51,6 +51,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-multilib-syspath.patch "${FILESDIR}"/${PN}-powerpc-darwin.patch + "${FILESDIR}"/${PN}-1.11.1-riscv.patch ) MULTILIB_CHOST_TOOLS=(
