Source: jsonnet
Version: 0.20.0+ds-1
Severity: wishlist
Tags: ftbfs
User: debian-loonga...@lists.debian.org
Usertags: loong64
Dear maintainers,
Compiling the jsonnet failed on my local loong64 rootfs environment.
We need to add build support for loong64 in debian/control.
At the same time, we also need to add the loongarch64 support in jsonnet
source code.
Please consider the patch I have attached.
The jsonnet source package was compiled successfully on my local env and
the tests passed.
```
8: /home/jsonnet-0.20.0+ds/test_suite/run_tests.sh: All 157 test scripts
pass.
8/8 Test #8: regression_test .................. Passed 34.02 sec
100% tests passed, 0 tests failed out of 8
Total Test time (real) = 34.04 sec
```
If you have any questions, you can contact me at any time.
thanks,
Dandan Zhang
diff -Nru jsonnet-0.20.0+ds/debian/control jsonnet-0.20.0+ds/debian/control
--- jsonnet-0.20.0+ds/debian/control 2023-07-30 13:33:59.000000000 +0000
+++ jsonnet-0.20.0+ds/debian/control 2023-07-30 13:37:07.000000000 +0000
@@ -11,7 +11,7 @@
Rules-Requires-Root: no
Package: jsonnet
-Architecture: amd64 arm64 armhf i386 armel ppc64el riscv64
+Architecture: amd64 arm64 armhf i386 armel loong64 ppc64el riscv64
Depends: ${misc:Depends}, ${shlibs:Depends},
Description: data templating language
A data templating language for app and tool developers
@@ -37,7 +37,7 @@
Package: libjsonnet0
Section: libs
-Architecture: amd64 arm64 armhf i386 armel ppc64el riscv64
+Architecture: amd64 arm64 armhf i386 armel loong64 ppc64el riscv64
Depends: ${misc:Depends}, ${shlibs:Depends},
Description: data templating language (lib)
A data templating language for app and tool developers
@@ -63,7 +63,7 @@
Package: libjsonnet-dev
Section: libdevel
-Architecture: amd64 arm64 armhf i386 armel ppc64el riscv64
+Architecture: amd64 arm64 armhf i386 armel loong64 ppc64el riscv64
Depends: ${misc:Depends}, libjsonnet0 (= ${binary:Version})
Description: data templating language (devel)
A data templating language for app and tool developers
@@ -89,7 +89,7 @@
Package: python3-jsonnet
Section: python
-Architecture: amd64 arm64 armhf i386 armel ppc64el riscv64
+Architecture: amd64 arm64 armhf i386 armel loong64 ppc64el riscv64
Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends},
Description: data templating language (Python)
A data templating language for app and tool developers
diff -Nru jsonnet-0.20.0+ds/debian/patches/add-loongarch64-support.patch
jsonnet-0.20.0+ds/debian/patches/add-loongarch64-support.patch
--- jsonnet-0.20.0+ds/debian/patches/add-loongarch64-support.patch
1970-01-01 00:00:00.000000000 +0000
+++ jsonnet-0.20.0+ds/debian/patches/add-loongarch64-support.patch
2023-07-30 13:37:07.000000000 +0000
@@ -0,0 +1,28 @@
+Description: add loongarch64 support
+Last-Update: 2023-12-25
+
+---
jsonnet-0.20.0+ds.orig/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/cpu.hpp
++++ jsonnet-0.20.0+ds/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/cpu.hpp
+@@ -91,6 +91,11 @@
+ # define C4_WORDSIZE 8
+ # define C4_BYTE_ORDER _C4EL
+
++#elif defined(__loongarch64)
++# define C4_CPU_LOONGARCH64
++# define C4_WORDSIZE 8
++# define C4_BYTE_ORDER _C4EL
++
+ #elif defined(SWIG)
+ #else
+ # error "unknown CPU architecture"
+---
jsonnet-0.20.0+ds.orig/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/fast_float/include/fast_float/float_common.h
++++
jsonnet-0.20.0+ds/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/fast_float/include/fast_float/float_common.h
+@@ -8,7 +8,7 @@
+ #if (defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) \
+ || defined(__amd64) || defined(__aarch64__) || defined(_M_ARM64) \
+ || defined(__MINGW64__) \
+- || defined(__s390x__) \
++ || defined(__s390x__) || defined(__loongarch64) \
+ || (defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) \
+ || defined(__PPC64LE__) || defined(__riscv) && __riscv_xlen == 64))
+ #define FASTFLOAT_64BIT
diff -Nru jsonnet-0.20.0+ds/debian/patches/series
jsonnet-0.20.0+ds/debian/patches/series
--- jsonnet-0.20.0+ds/debian/patches/series 2022-07-31 13:53:10.000000000
+0000
+++ jsonnet-0.20.0+ds/debian/patches/series 2023-07-30 13:37:07.000000000
+0000
@@ -1,3 +1,4 @@
0001-fix-FTBFS-on-several-release-architectures.patch
0002-fix-compile-error-in-armel.patch
0003-add-support-riscv64.patch
+add-loongarch64-support.patch