commit:     a457ca66361ff3b68cd39b0ed38e770077de0db0
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 31 17:54:15 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Oct 31 17:54:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a457ca66

app-crypt/shash: update EAPI 6 -> 8

Closes: https://bugs.gentoo.org/871258
Closes: https://bugs.gentoo.org/874942
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 app-crypt/shash/files/0.2.6-manpage-fixes.patch    |   5 +-
 app-crypt/shash/files/shash-0.2.6-C99-decls.patch  | 195 +++++++++++++++++++++
 .../shash/files/shash-0.2.6-binary-files.patch     |   4 +-
 .../shash/files/shash-0.2.6-format-security.patch  |   4 +-
 ...shash-0.2.6-r3.ebuild => shash-0.2.6-r4.ebuild} |  17 +-
 5 files changed, 213 insertions(+), 12 deletions(-)

diff --git a/app-crypt/shash/files/0.2.6-manpage-fixes.patch 
b/app-crypt/shash/files/0.2.6-manpage-fixes.patch
index 0376e15c3572..111730c57823 100644
--- a/app-crypt/shash/files/0.2.6-manpage-fixes.patch
+++ b/app-crypt/shash/files/0.2.6-manpage-fixes.patch
@@ -1,6 +1,5 @@
-diff -pruN shash-0.2.6/doc/shash.1 shash-0.2.6-r1/doc/shash.1
---- shash-0.2.6/doc/shash.1    2004-09-18 09:51:04.004647112 +0100
-+++ shash-0.2.6-r1/doc/shash.1 2004-09-18 09:57:26.062565480 +0100
+--- a/doc/shash.1
++++ b/doc/shash.1
 @@ -31,7 +31,7 @@ Because of this shash also supports HMAC
  a mechanism for message authentication using cryptographic hash functions.
  So shash can use a key with a hash algorithm to produce hashes that can only

diff --git a/app-crypt/shash/files/shash-0.2.6-C99-decls.patch 
b/app-crypt/shash/files/shash-0.2.6-C99-decls.patch
new file mode 100644
index 000000000000..bf2f3ab79d85
--- /dev/null
+++ b/app-crypt/shash/files/shash-0.2.6-C99-decls.patch
@@ -0,0 +1,195 @@
+--- a/src/environ.c
++++ b/src/environ.c
+@@ -4,7 +4,7 @@
+ #endif
+ #include "environ.h"
+ 
+-int check_env()
++int check_env(void)
+ {
+ 
+       if (getenv(SHASH_KEY) != NULL
+@@ -15,7 +15,7 @@
+ }
+ 
+ char *
+- get_env_key()
++ get_env_key(void)
+ {
+ 
+       if (getenv(SHASH_KEY) != NULL) {
+@@ -26,7 +26,7 @@
+ 
+ }
+ 
+-char *get_env_bit_mode()
++char *get_env_bit_mode(void)
+ {
+ 
+       return getenv(SHASH_KEYMODE);
+--- a/src/environ.h
++++ b/src/environ.h
+@@ -3,7 +3,7 @@
+ #define SHASH_KEY "SHASH_KEY"
+ #define SHASH_KEYMODE "SHASH_KEYMODE"
+ 
+-int check_env();
+-char * get_env_key();
+-char * get_env_bit_mode();
++int check_env(void);
++char * get_env_key(void);
++char * get_env_bit_mode(void);
+ 
+--- a/src/errors.c
++++ b/src/errors.c
+@@ -1,5 +1,7 @@
+ #include <defines.h>
+ 
++#include <stdio.h>
++
+ extern int quiet;
+ 
+ void err_quit(char *errmsg)
+--- a/src/extra.c
++++ b/src/extra.c
+@@ -1,5 +1,10 @@
+ #include <defines.h>
+ 
++#include <pwd.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/stat.h>
++
+ #ifdef HAVE_STAT
+ 
+ int check_file(char *filename)
+--- a/src/gaaout.c
++++ b/src/gaaout.c
+@@ -11,6 +11,11 @@
+ #endif
+ #endif
+ 
++void hash_license(void);
++void hash_version(void);
++void list_keygen_algorithms(void);
++int hash_list(void);
++
+ void* gaa_malloc( size_t size) {
+ void* ret;
+       ret = malloc(size);
+--- a/src/random.c
++++ b/src/random.c
+@@ -24,7 +24,7 @@
+ static FILE *ffd;
+ 
+ word32
+-get_rand32()
++get_rand32(void)
+ {
+       int fd, x;
+       word32 rand_data;
+@@ -46,7 +46,7 @@
+ 
+ 
+ word8
+-get_rand8()
++get_rand8(void)
+ {
+ 
+       int fd, x;
+@@ -69,7 +69,7 @@
+ 
+ 
+ word32
+-get_safe_rand32()
++get_safe_rand32(void)
+ {
+       int fd, x;
+       word32 rand_data;
+@@ -91,7 +91,7 @@
+ 
+ 
+ word8
+-get_safe_rand8()
++get_safe_rand8(void)
+ {
+ 
+       int fd, x;
+@@ -131,13 +131,13 @@
+       return 0;
+ }
+ 
+-void close_rand()
++void close_rand(void)
+ {
+       fclose(ffd);
+ }
+ 
+ word32
+-get_o_rand32()
++get_o_rand32(void)
+ {
+       int x;
+       word32 rand_data;
+@@ -152,7 +152,7 @@
+ }
+ 
+ word8
+-get_o_rand8()
++get_o_rand8(void)
+ {
+ 
+       int x;
+--- a/src/random.h
++++ b/src/random.h
+@@ -1,14 +1,14 @@
+ 
+ #ifdef HAVE_DEV_RANDOM
+ 
+-word32 get_rand32();
+-word8 get_rand8();
+-word32 get_safe_rand32();
+-word8 get_safe_rand8();
++word32 get_rand32(void);
++word8 get_rand8(void);
++word32 get_safe_rand32(void);
++word8 get_safe_rand8(void);
+ 
+ int open_rand(int);
+-void close_rand();
+-word32 get_o_rand32();
+-word8 get_o_rand8();
++void close_rand(void);
++word32 get_o_rand32(void);
++word8 get_o_rand8(void);
+ 
+ #endif
+--- a/src/shash.c
++++ b/src/shash.c
+@@ -485,7 +485,7 @@
+       }
+ }
+ 
+-int hash_list()
++int hash_list(void)
+ {
+       hashid i;
+       char *y;
+@@ -715,7 +715,7 @@
+       return counter;
+ }
+ 
+-void hash_license()
++void hash_license(void)
+ {
+       fprintf(stdout, ("\nCopyright (C) 1999,2001,2002 Nikos 
Mavroyanopoulos\n"
+ "This program is free software; you can redistribute it and/or modify \n"
+@@ -733,7 +733,7 @@
+ "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\n"));
+ }
+ 
+-void hash_version()
++void hash_version(void)
+ {
+       fprintf(stderr, ("shash v.%s (%s-%s-%s)\n"), VERSION, T_CPU,
+               T_VENDOR, T_OS);

diff --git a/app-crypt/shash/files/shash-0.2.6-binary-files.patch 
b/app-crypt/shash/files/shash-0.2.6-binary-files.patch
index 1eb0cba17613..9cb5a7dc4c09 100644
--- a/app-crypt/shash/files/shash-0.2.6-binary-files.patch
+++ b/app-crypt/shash/files/shash-0.2.6-binary-files.patch
@@ -1,5 +1,5 @@
---- shash-0.2.6/src/shash.c
-+++ shash-0.2.6/src/shash.c
+--- a/src/shash.c
++++ b/src/shash.c
 @@ -631,11 +631,11 @@
  
                if (nosalt == FALSE && hmac == 1) {

diff --git a/app-crypt/shash/files/shash-0.2.6-format-security.patch 
b/app-crypt/shash/files/shash-0.2.6-format-security.patch
index 4e46639e2807..20f850316ccc 100644
--- a/app-crypt/shash/files/shash-0.2.6-format-security.patch
+++ b/app-crypt/shash/files/shash-0.2.6-format-security.patch
@@ -1,5 +1,5 @@
---- shash-0.2.6/src/errors.c
-+++ shash-0.2.6/src/errors.c
+--- a/src/errors.c
++++ b/src/errors.c
 @@ -4,7 +4,7 @@
  
  void err_quit(char *errmsg)

diff --git a/app-crypt/shash/shash-0.2.6-r3.ebuild 
b/app-crypt/shash/shash-0.2.6-r4.ebuild
similarity index 79%
rename from app-crypt/shash/shash-0.2.6-r3.ebuild
rename to app-crypt/shash/shash-0.2.6-r4.ebuild
index f2730ac61dc3..2094f2880276 100644
--- a/app-crypt/shash/shash-0.2.6-r3.ebuild
+++ b/app-crypt/shash/shash-0.2.6-r4.ebuild
@@ -1,9 +1,9 @@
 # Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=8
 
-inherit bash-completion-r1
+inherit autotools bash-completion-r1
 
 DESCRIPTION="Generate or check digests or MACs of files"
 HOMEPAGE="http://mcrypt.hellug.gr/shash/";
@@ -14,7 +14,8 @@ SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
 IUSE="static"
 
-DEPEND=">=app-crypt/mhash-0.8.18-r1
+DEPEND="
+       >=app-crypt/mhash-0.8.18-r1
        static? ( app-crypt/mhash[static-libs(+)] )"
 RDEPEND="${DEPEND}"
 
@@ -22,14 +23,20 @@ PATCHES=(
        "${FILESDIR}"/${PV}-manpage-fixes.patch
        "${FILESDIR}"/${P}-binary-files.patch
        "${FILESDIR}"/${P}-format-security.patch
+       "${FILESDIR}"/${P}-C99-decls.patch
 )
 
+src_prepare() {
+       default
+       eautoreconf
+}
+
 src_configure() {
        econf $(use_enable static static-link)
 }
 
 src_install() {
-       emake install DESTDIR="${D}"
-       dodoc AUTHORS ChangeLog INSTALL NEWS doc/sample.shashrc doc/FORMAT
+       default
+       dodoc doc/sample.shashrc doc/FORMAT
        newbashcomp "${FILESDIR}"/shash.bash-completion ${PN}
 }

Reply via email to