From 5b1d4552462a15e3e700cde003e8ce4259d31921 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Tue, 6 Dec 2016 18:06:23 +0100 Subject: [PATCH] hashcat: update to 3.20. --- srcpkgs/hashcat/patches/musl.patch | 30 ++++++++++++++++++++++++++++++ srcpkgs/hashcat/template | 12 ++++++++---- 2 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/hashcat/patches/musl.patch diff --git a/srcpkgs/hashcat/patches/musl.patch b/srcpkgs/hashcat/patches/musl.patch new file mode 100644 index 00000000000..630a0e2e81e --- /dev/null +++ b/srcpkgs/hashcat/patches/musl.patch @@ -0,0 +1,30 @@ +--- include/affinity.h.orig ++++ include/affinity.h +@@ -11,7 +11,7 @@ + + #if defined (_POSIX) + #include +-#if defined (__linux__) ++#if defined (__GLIBC__) + #include + #endif // __linux__ + #endif // _POSIX +--- include/sort_r.h.orig ++++ include/sort_r.h +@@ -187,10 +187,15 @@ + /* no qsort_r in glibc before 2.8, need to use nested qsort */ + sort_r_simple(base, nel, width, compar, arg); + +- #else ++ #elif defined __GLIBC__ + + qsort_r(base, nel, width, compar, arg); + ++ #else ++ ++ /* Fall back to our own quicksort implementation */ ++ sort_r_simple(base, nel, width, compar, arg); ++ + #endif + + #elif defined _SORT_R_BSD diff --git a/srcpkgs/hashcat/template b/srcpkgs/hashcat/template index 8c52b11c288..7ef389bdbe9 100644 --- a/srcpkgs/hashcat/template +++ b/srcpkgs/hashcat/template @@ -1,22 +1,26 @@ # Template file for 'hashcat' pkgname=hashcat -version=3.10 +version=3.20 revision=1 build_style=gnu-makefile make_build_target="native" -make_build_args="LFLAGS=$LDFLAGS" +make_build_args="LFLAGS=$LDFLAGS PREFIX=/usr" makedepends="gmp-devel opencl2-headers" short_desc="Advanced CPU-based password recovery utility" maintainer="Duncaen " license="MIT" homepage="https://hashcat.net/hashcat/" distfiles="https://github.com/hashcat/hashcat/archive/v${version}.tar.gz" -checksum=3b555e5f7b35ab6a4558bc460f28d80b32f5a211bf9e08d6a1ba1bad5203e3e9 +checksum=7efb93073a79a80d7fe6a26740c6e099d456f6a06abff842eb0fb617618586cc CFLAGS="-W -Wall -std=c99 -Iinclude/ -IOpenCL/" pre_build() { - sed -i -e 's|-ldl|-ldl $(LDFLAGS)|g' -e 's| -s$||g' src/Makefile + sed -i \ + -e 's|-ldl|-ldl $(LDFLAGS)|g' \ + -e 's| -s$||g' \ + -e '/-march=native/d' \ + src/Makefile } post_install() {