Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aircrack-ng: add patch for arm64 #19307

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions security/aircrack-ng/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ legacysupport.newest_darwin_requires_legacy 15

epoch 1
github.setup aircrack-ng aircrack-ng 1.7
revision 0
revision 1
checksums rmd160 aa9ff18ba8a667abed846f7d2a47d0992ce90d82 \
sha256 05a704e3c8f7792a17315080a21214a4448fd2452c1b0dd5226a3a55f90b58c3 \
size 7740634

categories security
license GPL-2+ BSD OpenSSL
maintainers {ryandesign @ryandesign} openmaintainer
supported_archs i386 x86_64
# Does not build on arm64:
# https://github.com/aircrack-ng/aircrack-ng/issues/1957

description Aircrack-ng is the next generation of aircrack with lots of new features

Expand All @@ -49,7 +46,8 @@ depends_lib port:hwloc \
port:pcre \
port:sqlite3

patchfiles-append aircrack_ng_mac.m4.patch
patchfiles-append aircrack_ng_mac.m4.patch\
patch-psedo_intrinsics.patch

# cpuid, cpuid_count, get_cpuid_max
# https://github.com/aircrack-ng/aircrack-ng/issues/1717
Expand Down
15 changes: 15 additions & 0 deletions security/aircrack-ng/files/patch-psedo_intrinsics.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- include/aircrack-ng/ce-wpa/pseudo_intrinsics.h.old
+++ include/aircrack-ng/ce-wpa/pseudo_intrinsics.h
@@ -162,8 +162,10 @@
#define vloadu vloadu_emu
#define VLOADU_EMULATED 1
#define vor(x, y) (vtype) vec_or((x).v32, (y).v32)
-#define vroti_epi32(x, i) (vtype) vec_rl((x).v32, (vset1_epi32(i)).v32)
-#define vroti_epi64(x, i) (vtype) vec_rl((x).v64, (vset1_epi64(i)).v64)
+#define (i > 0 ? (vtype)vsliq_n_u32(vshrq_n_u32((x).v32, 32 - ((i) & 31)), (x).v32, (i) & 31) : \
+ (vtype)vsriq_n_u32(vshlq_n_u32((x).v32, (32 + (i)) & 31), (x).v32, (-(i)) & 31))
+#define (i > 0 ? (vtype)vsliq_n_u64(vshrq_n_u64((x).v64, 64 - ((i) & 63)), (x).v64, (i) & 63) : \
+ (vtype)vsriq_n_u64(vshlq_n_u64((x).v64, (64 + (i)) & 63), (x).v64, (-(i)) & 63))
#define vroti16_epi32 vroti_epi32
#define vset1_epi32(x) vset_epi32(x, x, x, x)
#define vset1_epi64(x) vset_epi64(x, x)