Blame SOURCES/python-pycryptodomex-3.10.1-use_external_libtomcrypt.patch

db4bc9
diff -up ./setup.py.bak ./setup.py
db4bc9
--- ./setup.py.bak	2021-02-08 22:14:54.000000000 +0100
db4bc9
+++ ./setup.py	2021-02-09 15:55:53.785892041 +0100
db4bc9
@@ -367,12 +367,14 @@ ext_modules = [
db4bc9
         sources=["src/CAST.c"],
db4bc9
         py_limited_api=True),
db4bc9
     Extension("Crypto.Cipher._raw_des",
db4bc9
-        include_dirs=['src/', 'src/libtom/'],
db4bc9
+        include_dirs=['src/'],
db4bc9
         sources=["src/DES.c"],
db4bc9
+        extra_link_args=["-ltomcrypt"],
db4bc9
         py_limited_api=True),
db4bc9
     Extension("Crypto.Cipher._raw_des3",
db4bc9
-        include_dirs=['src/', 'src/libtom/'],
db4bc9
+        include_dirs=['src/'],
db4bc9
         sources=["src/DES3.c"],
db4bc9
+        extra_link_args=["-ltomcrypt"],
db4bc9
         py_limited_api=True),
db4bc9
     Extension("Crypto.Util._cpuid_c",
db4bc9
         include_dirs=['src/'],
db4bc9
@@ -410,8 +412,9 @@ ext_modules = [
db4bc9
         sources=["src/ARC4.c"],
db4bc9
         py_limited_api=True),
db4bc9
     Extension("Crypto.Cipher._Salsa20",
db4bc9
-        include_dirs=['src/', 'src/libtom/'],
db4bc9
+        include_dirs=['src/'],
db4bc9
         sources=["src/Salsa20.c"],
db4bc9
+        extra_link_args=["-ltomcrypt"],
db4bc9
         py_limited_api=True),
db4bc9
     Extension("Crypto.Cipher._chacha20",
db4bc9
         include_dirs=['src/'],
db4bc9
diff -up ./src/DES.c.bak ./src/DES.c
db4bc9
--- ./src/DES.c.bak	2021-02-08 22:14:54.000000000 +0100
db4bc9
+++ ./src/DES.c	2021-02-09 15:55:53.785892041 +0100
db4bc9
@@ -39,7 +39,7 @@ FAKE_INIT(raw_des3)
db4bc9
 
db4bc9
 /* Include the actial DES implementation */
db4bc9
 #define LTC_NO_PROTOTYPES
db4bc9
-#include "libtom/tomcrypt_des.c"
db4bc9
+#include <tomcrypt.h>
db4bc9
 
db4bc9
 struct block_state {
db4bc9
     symmetric_key sk;