node-yara-rs

git clone git://archive.git.mtrnord.blog/MTRNord/node-yara-rs.git
Log | Files | Refs | README | LICENSE

commit 2d172a45e234dca80cfd18e104c794b752240598
parent fd293aecf61af40ae252528b8d892b01a9fa28d6
Author: MTRNord <mtrnord1@gmail.com>
Date:   Sun,  1 Oct 2023 14:46:38 +0200

Fix compiling yara on apple aarch64

Diffstat:
M.github/workflows/CI.yml | 2+-
MMakefile | 7+++++++
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml @@ -54,7 +54,7 @@ jobs: brew install libtool brew install pkg-config brew install libmagic - make yara + CFLAGS="-target arm64-apple-macos11" make yara yarn build --target aarch64-apple-darwin strip -x *.node # This is an nixos env so its all a little special diff --git a/Makefile b/Makefile @@ -9,6 +9,10 @@ CFLAGS += -I/usr/local/include LDFLAGS += -L/usr/local/lib endif +ifeq ($(findstring arm64,$(CFLAGS)),arm64) + CFGOPTS += --host=aarch64-apple-darwin +endif + YARA?=4.3.2 libyara: yara @@ -19,6 +23,9 @@ clean: cargo clean yara: clean + echo $(CFLAGS) + echo $(LDFLAGS) + echo $(CC) test -f $(BASE)/deps/yara-$(YARA).tar.gz || curl -L -k https://github.com/VirusTotal/yara/archive/v$(YARA).tar.gz > $(BASE)/deps/yara-$(YARA).tar.gz cd $(BASE)/deps && tar -xzvf yara-$(YARA).tar.gz cd $(BASE)/deps/yara-$(YARA) && ./bootstrap.sh