pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mail/rspamd



Module Name:    pkgsrc
Committed By:   gavan
Date:           Sun May 29 19:21:46 UTC 2022

Modified Files:
        pkgsrc/mail/rspamd: distinfo
Added Files:
        pkgsrc/mail/rspamd/patches: patch-src_libcryptobox_CMakeLists.txt
            patch-src_libcryptobox_chacha20_chacha.c
            patch-src_libcryptobox_cryptobox.c

Log Message:
Fix compilation on 32-bit x86 systems

These patches are from:
https://github.com/rspamd/rspamd/commit/f6dc828c3d8c015779eea7fb662198c6d58def14
https://github.com/rspamd/rspamd/commit/eee7acb309bae98e17c19b53bbd72cc9b798c281https://github.com/rspamd/rspamd/commit/6f4cbc261b4ec7a7b75984dcc7a2eec1750efa6e


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 pkgsrc/mail/rspamd/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/mail/rspamd/patches/patch-src_libcryptobox_CMakeLists.txt \
    pkgsrc/mail/rspamd/patches/patch-src_libcryptobox_chacha20_chacha.c
cvs rdiff -u -r0 -r1.3 \
    pkgsrc/mail/rspamd/patches/patch-src_libcryptobox_cryptobox.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mail/rspamd/distinfo
diff -u pkgsrc/mail/rspamd/distinfo:1.41 pkgsrc/mail/rspamd/distinfo:1.42
--- pkgsrc/mail/rspamd/distinfo:1.41    Thu Mar  3 16:23:31 2022
+++ pkgsrc/mail/rspamd/distinfo Sun May 29 19:21:46 2022
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.41 2022/03/03 16:23:31 jperkin Exp $
+$NetBSD: distinfo,v 1.42 2022/05/29 19:21:46 gavan Exp $
 
 BLAKE2s (rspamd-3.1.tar.gz) = d23e3aba1974e31236295171e7d74df624497c9ab11c8d8ebfe95830b70d9d7a
 SHA512 (rspamd-3.1.tar.gz) = 3c3c06c10d3dfc90e4bc92c7ebaff4bd4854d3b0e56d6476f0223918c4a52f4cc7a8b381b1f867164199ee18ea00eda77ae0315925f3fd71596d610200667178
@@ -7,3 +7,6 @@ SHA1 (patch-CMakeLists.txt) = e50137fb3c
 SHA1 (patch-cmake_Toolset.cmake) = fbc4027fedb4261ce913701ebbb32d8395bc7783
 SHA1 (patch-contrib_doctest_doctest_doctest.h) = 5238cb9f837e1d8f402023ddc2f7d02dda3f67ab
 SHA1 (patch-contrib_fpconv_fpconv.c) = b1ec2b07570674458e69020ccbf25f0374d894f6
+SHA1 (patch-src_libcryptobox_CMakeLists.txt) = c003a1992221090f8d7f259a2387319b3fa999f0
+SHA1 (patch-src_libcryptobox_chacha20_chacha.c) = 22072c2ba35914ded17a8707e04cedf0de8cfc1d
+SHA1 (patch-src_libcryptobox_cryptobox.c) = c284aac8a65ae3a5fb9eccd8fb9dcee238518846

Added files:

Index: pkgsrc/mail/rspamd/patches/patch-src_libcryptobox_CMakeLists.txt
diff -u /dev/null pkgsrc/mail/rspamd/patches/patch-src_libcryptobox_CMakeLists.txt:1.1
--- /dev/null   Sun May 29 19:21:47 2022
+++ pkgsrc/mail/rspamd/patches/patch-src_libcryptobox_CMakeLists.txt    Sun May 29 19:21:46 2022
@@ -0,0 +1,35 @@
+$NetBSD: patch-src_libcryptobox_CMakeLists.txt,v 1.1 2022/05/29 19:21:46 gavan Exp $
+
+--- src/libcryptobox/CMakeLists.txt.orig       2021-11-01 14:33:30.000000000 +0000
++++ src/libcryptobox/CMakeLists.txt
+@@ -5,17 +5,24 @@ SET(BASE64SRC ${CMAKE_CURRENT_SOURCE_DIR
+               ${CMAKE_CURRENT_SOURCE_DIR}/base64/base64.c)
+ 
+ IF(HAVE_AVX2)
+-      SET(CHACHASRC ${CHACHASRC} ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/avx2.S)
++      IF ("${ARCH}" STREQUAL "x86_64")
++              SET(CHACHASRC ${CHACHASRC} ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/avx2.S)
++              MESSAGE(STATUS "Cryptobox: AVX2 support is added (chacha20, avx2)")
++      ENDIF()
+       SET(BASE64SRC ${BASE64SRC} ${CMAKE_CURRENT_SOURCE_DIR}/base64/avx2.c)
+-      MESSAGE(STATUS "Cryptobox: AVX2 support is added (chacha20, avx2)")
++      MESSAGE(STATUS "Cryptobox: AVX2 support is added (base64, avx2)")
+ ENDIF(HAVE_AVX2)
+ IF(HAVE_AVX)
+-      SET(CHACHASRC ${CHACHASRC} ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/avx.S)
+-      MESSAGE(STATUS "Cryptobox: AVX support is added (chacha20)")
++      IF ("${ARCH}" STREQUAL "x86_64")
++              SET(CHACHASRC ${CHACHASRC} ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/avx.S)
++              MESSAGE(STATUS "Cryptobox: AVX support is added (chacha20)")
++      ENDIF()
+ ENDIF(HAVE_AVX)
+ IF(HAVE_SSE2)
+-      SET(CHACHASRC ${CHACHASRC} ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/sse2.S)
+-      MESSAGE(STATUS "Cryptobox: SSE2 support is added (chacha20)")
++      IF ("${ARCH}" STREQUAL "x86_64")
++              SET(CHACHASRC ${CHACHASRC} ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/sse2.S)
++              MESSAGE(STATUS "Cryptobox: SSE2 support is added (chacha20)")
++      ENDIF()
+ ENDIF(HAVE_SSE2)
+ IF(HAVE_SSE42)
+       SET(BASE64SRC ${BASE64SRC} ${CMAKE_CURRENT_SOURCE_DIR}/base64/sse42.c)
Index: pkgsrc/mail/rspamd/patches/patch-src_libcryptobox_chacha20_chacha.c
diff -u /dev/null pkgsrc/mail/rspamd/patches/patch-src_libcryptobox_chacha20_chacha.c:1.1
--- /dev/null   Sun May 29 19:21:47 2022
+++ pkgsrc/mail/rspamd/patches/patch-src_libcryptobox_chacha20_chacha.c Sun May 29 19:21:46 2022
@@ -0,0 +1,40 @@
+$NetBSD: patch-src_libcryptobox_chacha20_chacha.c,v 1.1 2022/05/29 19:21:46 gavan Exp $
+
+--- src/libcryptobox/chacha20/chacha.c.orig    2021-11-01 14:33:30.000000000 +0000
++++ src/libcryptobox/chacha20/chacha.c
+@@ -52,15 +52,15 @@ typedef struct chacha_impl_t {
+ #define CHACHA_IMPL(cpuflags, desc, ext) \
+               {(cpuflags), desc, chacha_##ext, xchacha_##ext, chacha_blocks_##ext, hchacha_##ext}
+ 
+-#if defined(HAVE_AVX2)
++#if defined(HAVE_AVX2) && defined(__x86_64__)
+       CHACHA_DECLARE(avx2)
+       #define CHACHA_AVX2 CHACHA_IMPL(CPUID_AVX2, "avx2", avx2)
+ #endif
+-#if defined(HAVE_AVX)
++#if defined(HAVE_AVX) && defined(__x86_64__)
+       CHACHA_DECLARE(avx)
+       #define CHACHA_AVX CHACHA_IMPL(CPUID_AVX, "avx", avx)
+ #endif
+-#if defined(HAVE_SSE2)
++#if defined(HAVE_SSE2) && defined(__x86_64__)
+       CHACHA_DECLARE(sse2)
+       #define CHACHA_SSE2 CHACHA_IMPL(CPUID_SSE2, "sse2", sse2)
+ #endif
+@@ -70,13 +70,13 @@ CHACHA_DECLARE(ref)
+ 
+ static const chacha_impl_t chacha_list[] = {
+       CHACHA_GENERIC,
+-#if defined(CHACHA_AVX2)
++#if defined(CHACHA_AVX2) && defined(__x86_64__)
+       CHACHA_AVX2,
+ #endif
+-#if defined(CHACHA_AVX)
++#if defined(CHACHA_AVX) && defined(__x86_64__)
+       CHACHA_AVX,
+ #endif
+-#if defined(CHACHA_SSE2)
++#if defined(CHACHA_SSE2) && defined(__x86_64__)
+       CHACHA_SSE2
+ #endif
+ };

Index: pkgsrc/mail/rspamd/patches/patch-src_libcryptobox_cryptobox.c
diff -u /dev/null pkgsrc/mail/rspamd/patches/patch-src_libcryptobox_cryptobox.c:1.3
--- /dev/null   Sun May 29 19:21:47 2022
+++ pkgsrc/mail/rspamd/patches/patch-src_libcryptobox_cryptobox.c       Sun May 29 19:21:46 2022
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_libcryptobox_cryptobox.c,v 1.3 2022/05/29 19:21:46 gavan Exp $
+
+--- src/libcryptobox/cryptobox.c.orig  2021-11-01 14:33:30.000000000 +0000
++++ src/libcryptobox/cryptobox.c
+@@ -118,7 +118,7 @@ rspamd_cryptobox_test_instr (gint instr)
+       }
+ 
+       switch (instr) {
+-#ifdef HAVE_SSE2
++#if defined HAVE_SSE2 && defined(__x86_64__)
+       case CPUID_SSE2:
+               __asm__ volatile ("psubb %xmm0, %xmm0");
+               break;
+@@ -146,7 +146,7 @@ rspamd_cryptobox_test_instr (gint instr)
+               __asm__ volatile ("pcmpeqq %xmm0, %xmm0");
+               break;
+ #endif
+-#ifdef HAVE_SSE42
++#if defined HAVE_SSE42 && defined(__x86_64__)
+       case CPUID_SSE42:
+               __asm__ volatile ("pushq %rax\n"
+                               "xorq %rax, %rax\n"



Home | Main Index | Thread Index | Old Index