Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jun 2020 19:20:16 +0000 (UTC)
From:      Carlo Strub <cs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r538432 - in head/sysutils/aimage: . files
Message-ID:  <202006101920.05AJKGxZ000746@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cs
Date: Wed Jun 10 19:20:16 2020
New Revision: 538432
URL: https://svnweb.freebsd.org/changeset/ports/538432

Log:
  Fix build on 12 and 13
  
  PR:		246273
  Submitted by:	maintainer
  Reviewed by:	tobik@

Added:
  head/sysutils/aimage/files/patch-src_hash__t.h   (contents, props changed)
Modified:
  head/sysutils/aimage/Makefile

Modified: head/sysutils/aimage/Makefile
==============================================================================
--- head/sysutils/aimage/Makefile	Wed Jun 10 19:15:07 2020	(r538431)
+++ head/sysutils/aimage/Makefile	Wed Jun 10 19:20:16 2020	(r538432)
@@ -15,7 +15,7 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libafflib.so:sysutils/afflib
 
-USES=		gmake readline ssl
+USES=		gmake readline ssl ncurses
 GNU_CONFIGURE=	yes
 # Pretend ssl3_new exists for LibreSSL.  It's never really used but
 # configure checks for it.
@@ -23,11 +23,4 @@ CONFIGURE_ARGS=	ac_cv_lib_ssl_ssl3_new=yes
 
 PLIST_FILES=	bin/aimage
 
-.include <bsd.port.pre.mk>
-
-.if ${SSL_DEFAULT} == base
-BROKEN_FreeBSD_12=	error: field has incomplete type 'EVP_MD_CTX' (aka 'evp_md_ctx_st')
-BROKEN_FreeBSD_13=	error: field has incomplete type 'EVP_MD_CTX' (aka 'evp_md_ctx_st')
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Added: head/sysutils/aimage/files/patch-src_hash__t.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/aimage/files/patch-src_hash__t.h	Wed Jun 10 19:20:16 2020	(r538432)
@@ -0,0 +1,47 @@
+--- src/hash_t.h.orig	2011-08-17 23:33:08 UTC
++++ src/hash_t.h
+@@ -160,7 +160,7 @@ typedef hash__<sha512_> sha512_t;
+ template<typename T> 
+ class hash_generator__:T { 			/* generates the hash */
+     const EVP_MD *md;
+-    EVP_MD_CTX mdctx;	     /* the context for computing the value */
++    EVP_MD_CTX *mdctx;	     /* the context for computing the value */
+     bool initialized;	       /* has the context been initialized? */
+     bool finalized;
+     /* Static function to determine if something is zero */
+@@ -189,8 +189,8 @@ class hash_generator__:T { 			/* generates the hash */
+     }
+     void init(){
+ 	if(initialized==false){
+-	    EVP_MD_CTX_init(&mdctx);
+-	    EVP_DigestInit_ex(&mdctx, md, NULL);
++	    mdctx = EVP_MD_CTX_create();
++	    EVP_DigestInit_ex(mdctx, md, NULL);
+ 	    initialized = true;
+ 	    finalized = false;
+ 	    hashed_bytes = 0;
+@@ -202,12 +202,13 @@ class hash_generator__:T { 			/* generates the hash */
+ 	    std::cerr << "hashgen_t::update called after finalized\n";
+ 	    exit(1);
+ 	}
+-	EVP_DigestUpdate(&mdctx,buf,bufsize);
++	EVP_DigestUpdate(mdctx,buf,bufsize);
+ 	hashed_bytes += bufsize;
+     }
+     void release(){			/* free allocated memory */
+ 	if(initialized){
+-	    EVP_MD_CTX_cleanup(&mdctx);
++	    EVP_MD_CTX_destroy(mdctx);
++	    mdctx = NULL;
+ 	    initialized = false;
+ 	    hashed_bytes = 0;
+ 	}
+@@ -223,7 +224,7 @@ class hash_generator__:T { 			/* generates the hash */
+ 	}
+ 	hash__<T> val;
+ 	unsigned int len = sizeof(val.digest);
+-	EVP_DigestFinal(&mdctx,val.digest,&len);
++	EVP_DigestFinal(mdctx,val.digest,&len);
+ 	finalized = true;
+ 	return val;
+     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006101920.05AJKGxZ000746>