aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.eu>2021-01-13 23:56:27 +0100
committerAndy Postnikov <apostnikov@gmail.com>2021-01-14 08:09:08 +0000
commit91a95c466960ceb91e719af22b366692bebe5a74 (patch)
tree791b2e3162f6b01f519503bd291c263748006e16
parent192d04207429114453e0892456d85a36910bbc54 (diff)
downloadaports-91a95c466960ceb91e719af22b366692bebe5a74.tar.gz
aports-91a95c466960ceb91e719af22b366692bebe5a74.tar.bz2
aports-91a95c466960ceb91e719af22b366692bebe5a74.tar.xz
community/pev: upgrade to 0.81
-rw-r--r--community/pev/APKBUILD42
-rw-r--r--community/pev/fix-openssl.patch46
2 files changed, 30 insertions, 58 deletions
diff --git a/community/pev/APKBUILD b/community/pev/APKBUILD
index d8d7fb6b15..9c48137cd1 100644
--- a/community/pev/APKBUILD
+++ b/community/pev/APKBUILD
@@ -1,27 +1,45 @@
# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=pev
-pkgver=0.80
+pkgver=0.81
pkgrel=0
-pkgdesc="pev the PE file analysis toolkit"
+pkgdesc="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"
+license="GPL-2.0-or-later AND MIT AND BSD-2-Clause"
+makedepends="bsd-compat-headers linux-headers openssl-dev"
+checkdepends="bash python3-wininst"
subpackages="$pkgname-doc"
-source="https://sourceforge.net/projects/pev/files/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz
- fix-openssl.patch
- "
-builddir="$srcdir/$pkgname"
+source="https://sourceforge.net/projects/pev/files/pev-$pkgver/pev-$pkgver.tar.gz"
+
+case "$CARCH" in
+ s390x)
+ # Testing pepack /usr/lib/python3.8/distutils/command/wininst-10.0-amd64.exe... ERROR [-18]: not a PE file ((null))
+ options="!check"
+esac
build() {
- make prefix=/usr
+ make
+}
+
+# Check() code from
+# https://github.com/void-linux/void-packages/blob/master/srcpkgs/pev/template#L37
+_real_check() {
+ local py3_ver="3.8"
+ local f
+ for f in /usr/lib/python"$py3_ver"/distutils/command/*.exe; do
+ tests/run.sh pe32 "$f"
+ done
+}
+
+check() {
+ export LD_LIBRARY_PATH=$(pwd)/src/build
+ ln -sf ../../lib/libpe/libpe.so src/build/libpe.so.1
+ ! _real_check | tee /dev/stderr | grep -q 'NOK$'
}
package() {
make prefix=/usr DESTDIR="$pkgdir" install
}
-sha512sums="d0c8ff8fcd60470899d5dbccfd7a7e4d960da007f42be9c7eab6b22a3d7cf4dde3c3d5cd9c7d70e369164503fb124640cf508ceda3d4792244cf33d11ab83321 pev-0.80.tar.gz
-cca72a19d7e5dd6d7a12ff3dbff6a03dad4764b2ed7126907f8508c7fce569530835fa56eed4d4d0feb221dcf21c08b80b0c9698a0dd7620d0c4d199dad1bc35 fix-openssl.patch"
+sha512sums="d8ac24e4160a2aba6a0c788c2933fc8dac6e19d4446cfb45efd5ced939596453ed0fc4734f9669b3943d916201f913b5a363ecfb9419f4b30ed33baf62e2db90 pev-0.81.tar.gz"
diff --git a/community/pev/fix-openssl.patch b/community/pev/fix-openssl.patch
deleted file mode 100644
index 2d52ab9c4d..0000000000
--- a/community/pev/fix-openssl.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- 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();