community/lnav: fix build failure on loongarch64

prqlc-c.patch: update rust libc to 0.2.155 to support loongarch64
rapidyaml.patch: add loongarch64 detection code
This commit is contained in:
znley 2024-05-21 06:38:39 +00:00 committed by Andy Postnikov
parent 75195270e0
commit 384e150990
3 changed files with 37 additions and 1 deletions

View File

@ -25,7 +25,10 @@ checkdepends="
xz
"
subpackages="$pkgname-doc"
source="https://github.com/tstack/lnav/releases/download/v$pkgver/lnav-$pkgver.tar.gz"
source="https://github.com/tstack/lnav/releases/download/v$pkgver/lnav-$pkgver.tar.gz
rapidyaml.patch
prqlc-c.patch
"
options="!check" # failed on some tests
build() {
@ -46,4 +49,6 @@ package() {
sha512sums="
20cc31ed8c69e4ba0971d581b9e8629d415b1025713200eec0b70070991dbd288af449775a6cb5cb239d3a20aee3f4adbcc7420c5d017ae3bf62587925af49f7 lnav-0.12.2.tar.gz
f31767c6425c48cedd9dded6112d37e61ecf316b37678286a09dc64808b0d369978823613076d216a34922d06267695d19fe7797e87eee2315bbb44b3b51ec2c rapidyaml.patch
6a60e142cbfd1c06d6ca14f16c38d144c134c928d946ac35ee858d8631a7bbf286158a60b62ef2e6967d937484bf8095642c67e1e050ad1d07c43952de9c367b prqlc-c.patch
"

View File

@ -0,0 +1,16 @@
diff --git a/src/third-party/prqlc-c/Cargo.lock b/src/third-party/prqlc-c/Cargo.lock
index 486bd5c..b21d909 100644
--- a/src/third-party/prqlc-c/Cargo.lock
+++ b/src/third-party/prqlc-c/Cargo.lock
@@ -703,9 +703,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
-version = "0.2.153"
+version = "0.2.155"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
+checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
[[package]]
name = "link-cplusplus"

View File

@ -0,0 +1,15 @@
diff --git a/src/third-party/rapidyaml/ryml_all.hpp b/src/third-party/rapidyaml/ryml_all.hpp
index 03734a1..6084389 100644
--- a/src/third-party/rapidyaml/ryml_all.hpp
+++ b/src/third-party/rapidyaml/ryml_all.hpp
@@ -498,6 +498,10 @@ C4_FOR_EACH(PRN_STRUCT_OFFSETS, a, b, c);
#endif
#define C4_BYTE_ORDER _C4EL
+#elif defined(__loongarch64)
+ #define C4_CPU_LOONGARCH64
+ #define C4_WORDSIZE 8
+
#elif defined(__EMSCRIPTEN__)
# define C4_BYTE_ORDER _C4EL
# define C4_WORDSIZE 4