diff --git a/python-webrtcvad/add-riscv64-build.patch b/python-webrtcvad/add-riscv64-build.patch new file mode 100644 index 000000000..d04abcfb7 --- /dev/null +++ b/python-webrtcvad/add-riscv64-build.patch @@ -0,0 +1,18 @@ +diff --git a/cbits/webrtc/typedefs.h b/cbits/webrtc/typedefs.h +index 51d8992..c6c3347 100644 +--- a/cbits/webrtc/typedefs.h ++++ b/cbits/webrtc/typedefs.h +@@ -47,6 +47,13 @@ + #elif defined(__pnacl__) + #define WEBRTC_ARCH_32_BITS + #define WEBRTC_ARCH_LITTLE_ENDIAN ++#elif defined(__riscv) ++#if (__riscv_xlen == 64) ++#define WEBRTC_ARCH_64_BITS ++#else ++#define WEBRTC_ARCH_32_BITS ++#endif ++#define WEBRTC_ARCH_LITTLE_ENDIAN + #else + #error Please add support for your architecture in typedefs.h + #endif diff --git a/python-webrtcvad/riscv64.patch b/python-webrtcvad/riscv64.patch new file mode 100644 index 000000000..9366a71a9 --- /dev/null +++ b/python-webrtcvad/riscv64.patch @@ -0,0 +1,20 @@ +--- PKGBUILD ++++ PKGBUILD +@@ -15,8 +15,15 @@ depends=( + ) + makedepends=(git) + _tag=bb429dac1a686807c69b916f03dd843fa10b0927 +-source=(git+https://github.com/wiseman/py-webrtcvad.git#tag=${_tag}) +-b2sums=(SKIP) ++source=(git+https://github.com/wiseman/py-webrtcvad.git#tag=${_tag} ++ add-riscv64-build.patch) ++b2sums=('SKIP' ++ '7b1d6a6173cb50ca84b9339eb36f217fc4ab1cc134760821b7b62741055bae12bc96552a404526a7af03c72bf73835a1d3a20a5f3882a7f35480ba40097fa95a') ++ ++prepare() { ++ cd py-webrtcvad ++ patch -Np1 -i ../add-riscv64-build.patch ++} + + build() { + cd py-webrtcvad