Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Göran Uddeborg
8a3b49fa07 Rebuild with newer mapnik rhbz#2521794
- Bump to snapshot version including upstreamed patch
2026-08-29 16:43:35 +02:00
4 changed files with 3 additions and 51 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/autogen.sh
/viking-1.11.tar.gz
/viking-viking-1.11.tar.gz
/viking-2a2420963e4b913d0b37dcf8801dc3695ca72a6c.tar.gz

View file

@ -1,46 +0,0 @@
diff --git a/configure.ac b/configure.ac
index 8f665e36..abed70da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -512,7 +512,7 @@ AC_CACHE_CHECK([whether to enable MD5 Hash support],
[ac_cv_enable_nettle], [ac_cv_enable_nettle=yes])
case $ac_cv_enable_nettle in
yes)
- AC_CHECK_HEADER([nettle/md5-compat.h],[],[AC_MSG_ERROR([nettle/md5-compat.h is needed but not found - you will need to install package 'nettle-dev' or similar. The feature can be disabled with --disable-nettle])])
+ AC_CHECK_HEADER([nettle/md5.h],[],[AC_MSG_ERROR([nettle/md5.h is needed but not found - you will need to install package 'nettle-dev' or similar. The feature can be disabled with --disable-nettle])])
AC_CHECK_LIB([nettle], [main], [],
if test "$ac_mingw32" = "yes"; then
[LIBS="-lnettle $LIBS"
diff --git a/src/md5_hash.c b/src/md5_hash.c
index eaec8355..6508c636 100644
--- a/src/md5_hash.c
+++ b/src/md5_hash.c
@@ -26,7 +26,8 @@
#include "config.h"
#endif
#ifdef HAVE_LIBNETTLE
-#include <nettle/md5-compat.h>
+#include <nettle/version.h>
+#include <nettle/md5.h>
#endif
/**
@@ -37,10 +38,14 @@ char *md5_hash(const char *message)
char *answer = NULL;
#ifdef HAVE_LIBNETTLE
unsigned char result[16];
- MD5_CTX ctx;
- MD5Init ( &ctx );
- MD5Update ( &ctx, (const unsigned char*)message, strlen(message) );
- MD5Final ( &result[0], &ctx );
+ struct md5_ctx ctx;
+ md5_init ( &ctx );
+ md5_update ( &ctx, strlen(message), (const unsigned char*)message );
+#if defined(NETTLE_VERSION_MAJOR) && NETTLE_VERSION_MAJOR >= 4
+ md5_digest ( &ctx, &result[0] );
+#else
+ md5_digest ( &ctx, MD5_DIGEST_SIZE, &result[0] );
+#endif
/*
g_printf ( "%s: of string '%s' is: ", __FUNCTION__, message );
for(int i = 0; i < 16; i++)

View file

@ -1 +1 @@
SHA512 (viking-viking-1.11.tar.gz) = 8a1074a3729d41326021dec9873652be5eab89c231e6f58c30c11f690a30b69bd513a64d3311a6dd4845cfeb20ce6774d20376e2a1ebce2500475bf0cb435edc
SHA512 (viking-2a2420963e4b913d0b37dcf8801dc3695ca72a6c.tar.gz) = 94eb5f5f211ed4f1645a0b7b4d9ce3adeaffdf1502f3a9367bc99a37b9ad2e739337b7920766ac5b9719aca1ad95fab368b8343550420fda5cebbdcce5cdc795

View file

@ -2,7 +2,7 @@ Name: viking
%global forgeurl https://github.com/viking-gps/viking
%global version0 1.11
%global tag0 viking-%version0
%global commit 2a2420963e4b913d0b37dcf8801dc3695ca72a6c
%forgemeta
Version: %forgeversion
Release: %autorelease
@ -12,9 +12,6 @@ License: GPL-2.0-or-later
URL: %forgeurl
Source0: %forgesource
# https://github.com/viking-gps/viking/issues/387
# https://github.com/viking-gps/viking/pull/388
Patch0: nettle-4.patch
# Fails to build on s390x, not needed for multilib
ExcludeArch: s390x %{ix86}