summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2020-04-26 19:26:48 +0200
committerDaiki Ueno <ueno@gnu.org>2020-05-04 14:26:13 +0200
commitde52bcc82e672f188e6d763cf95436738154f481 (patch)
treeef8a1d6c6f6bf261cadc6468fe07df8fc63f08ed /devel
parent108a0b233bea58b8fd3f624eba81f77304879b87 (diff)
downloadgnutls-de52bcc82e672f188e6d763cf95436738154f481.tar.gz
nettle: rename import-chacha-from-nettle.sh to import-from-nettle.sh
This script will handle other backports except ECC as well. Signed-off-by: Daiki Ueno <ueno@gnu.org>
Diffstat (limited to 'devel')
-rwxr-xr-xdevel/import-from-nettle.sh (renamed from devel/import-chacha-from-nettle.sh)14
1 files changed, 7 insertions, 7 deletions
diff --git a/devel/import-chacha-from-nettle.sh b/devel/import-from-nettle.sh
index 4b686df765..835248e63f 100755
--- a/devel/import-chacha-from-nettle.sh
+++ b/devel/import-from-nettle.sh
@@ -1,13 +1,13 @@
#!/bin/sh
-# This script copies the ChaCha20 implementation from the
-# nettle upstream, with necessary adjustments for bundling in GnuTLS.
+# This script copies files from the nettle upstream, with necessary
+# adjustments for bundling in GnuTLS.
set +e
: ${srcdir=.}
SRC=$srcdir/devel/nettle
-DST=$srcdir/lib/nettle/chacha
+DST=$srcdir/lib/nettle/backport
IMPORTS="
chacha-core-internal.c
@@ -66,7 +66,7 @@ for f in $IMPORTS; do
# Rename header guard so as not to conflict with the public ones.
if grep '^#ifndef NETTLE_.*_H\(_INCLUDED\)*' $dst 2>&1 >/dev/null; then
g=$(sed -n 's/^#ifndef NETTLE_\(.*_H\(_INCLUDED\)*\)/\1/p' $dst)
- sed 's/\(NETTLE_'$g'\)/GNUTLS_LIB_NETTLE_CHACHA_\1/' $dst > $dst-t && \
+ sed 's/\(NETTLE_'$g'\)/GNUTLS_LIB_NETTLE_BACKPORT_\1/' $dst > $dst-t && \
mv $dst-t $dst
fi
;;
@@ -74,9 +74,9 @@ for f in $IMPORTS; do
case $dst in
*.h)
# Add prefix to function symbols avoid clashing with the public ones.
- sed -e 's/^#define \(.*\) nettle_\1/#define \1 gnutls_nettle_chacha_\1/' \
- -e 's/^#define _\(.*\) _nettle_\1/#define _\1 _gnutls_nettle_chacha_\1/' \
- -e 's/^#define \(.*\) _nettle_\1/#define \1 _gnutls_nettle_chacha_\1/' \
+ sed -e 's/^#define \(.*\) nettle_\1/#define \1 gnutls_nettle_backport_\1/' \
+ -e 's/^#define _\(.*\) _nettle_\1/#define _\1 _gnutls_nettle_backport_\1/' \
+ -e 's/^#define \(.*\) _nettle_\1/#define \1 _gnutls_nettle_backport_\1/' \
$dst > $dst-t && \
mv $dst-t $dst
;;