aboutsummaryrefslogtreecommitdiffstats
path: root/community/pev
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.eu>2019-05-23 14:28:12 +0200
committerKevin Daudt <kdaudt@alpinelinux.org>2019-05-25 19:45:04 +0000
commit0629b711344aad065a9207ce2852e38ccc351ee6 (patch)
tree8c75bf0e17c681a133e4913cd577e7e2c037937f /community/pev
parent7b5edd4e29779c93764f8c2e8893dc3bb032f902 (diff)
downloadaports-0629b711344aad065a9207ce2852e38ccc351ee6.tar.bz2
aports-0629b711344aad065a9207ce2852e38ccc351ee6.tar.xz
community/pev: move from testing
Closes PH-8017
Diffstat (limited to 'community/pev')
-rw-r--r--community/pev/APKBUILD27
-rw-r--r--community/pev/fix-openssl.patch46
2 files changed, 73 insertions, 0 deletions
diff --git a/community/pev/APKBUILD b/community/pev/APKBUILD
new file mode 100644
index 0000000000..d8d7fb6b15
--- /dev/null
+++ b/community/pev/APKBUILD
@@ -0,0 +1,27 @@
+# Contributor: TBK <alpine@jjtc.eu>
+# Maintainer: TBK <alpine@jjtc.eu>
+pkgname=pev
+pkgver=0.80
+pkgrel=0
+pkgdesc="pev the PE file analysis toolkit"
+url="http://pev.sourceforge.net/"
+arch="all"
+license="GPL-2.0-or-later"
+options="!check" # No test suite provided
+makedepends="bsd-compat-headers linux-headers openssl-dev pcre2-dev"
+subpackages="$pkgname-doc"
+source="https://sourceforge.net/projects/pev/files/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz
+ fix-openssl.patch
+ "
+builddir="$srcdir/$pkgname"
+
+build() {
+ make prefix=/usr
+}
+
+package() {
+ make prefix=/usr DESTDIR="$pkgdir" install
+}
+
+sha512sums="d0c8ff8fcd60470899d5dbccfd7a7e4d960da007f42be9c7eab6b22a3d7cf4dde3c3d5cd9c7d70e369164503fb124640cf508ceda3d4792244cf33d11ab83321 pev-0.80.tar.gz
+cca72a19d7e5dd6d7a12ff3dbff6a03dad4764b2ed7126907f8508c7fce569530835fa56eed4d4d0feb221dcf21c08b80b0c9698a0dd7620d0c4d199dad1bc35 fix-openssl.patch"
diff --git a/community/pev/fix-openssl.patch b/community/pev/fix-openssl.patch
new file mode 100644
index 0000000000..2d52ab9c4d
--- /dev/null
+++ b/community/pev/fix-openssl.patch
@@ -0,0 +1,46 @@
+--- a/src/pehash.c
++++ b/src/pehash.c
+@@ -215,13 +215,25 @@
+ unsigned char md_value[EVP_MAX_MD_SIZE];
+ unsigned int md_len;
+
+- EVP_MD_CTX md_ctx;
++// See https://wiki.openssl.org/index.php/1.1_API_Changes
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++ EVP_MD_CTX md_ctx_auto;
++ EVP_MD_CTX *md_ctx = &md_ctx_auto;
++#else
++ EVP_MD_CTX *md_ctx = EVP_MD_CTX_new();
++#endif
++
+ // FIXME: Handle errors - Check return values.
+- EVP_MD_CTX_init(&md_ctx);
+- EVP_DigestInit_ex(&md_ctx, md, NULL);
+- EVP_DigestUpdate(&md_ctx, data, size);
+- EVP_DigestFinal_ex(&md_ctx, md_value, &md_len);
+- EVP_MD_CTX_cleanup(&md_ctx);
++ EVP_MD_CTX_init(md_ctx);
++ EVP_DigestInit_ex(md_ctx, md, NULL);
++ EVP_DigestUpdate(md_ctx, data, size);
++ EVP_DigestFinal_ex(md_ctx, md_value, &md_len);
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++ EVP_MD_CTX_cleanup(md_ctx);
++#else
++ EVP_MD_CTX_free(md_ctx);
++#endif
+
+ for (unsigned int i=0; i < md_len; i++)
+ sprintf(&output[i * 2], "%02x", md_value[i]);
+--- a/src/pesec.c
++++ b/src/pesec.c
+@@ -225,7 +225,10 @@
+ PKCS7 *p7 = NULL;
+ BIO *in = NULL;
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ CRYPTO_malloc_init();
++#endif
++
+ ERR_load_crypto_strings();
+ OpenSSL_add_all_algorithms();