pkgsrc/security/argon2/patches/patch-Makefile
wiz 362d11ad3d Import argon2-20151102 as security/argon2.
This is the reference C implementation of Argon2, the password-hashing
function that won the Password Hashing Competition (PHC).

You should use Argon2 whenever you need to hash passwords for
credential storage, key derivation, or other applications.

There are two main versions of Argon2, Argon2i and Argon2d. Argon2i
is the safest against side-channel attacks, while Argon2d provides
the highest resistance against GPU cracking attacks.

Argon2i and Argon2d are parametrized by

* A time cost, which defines the amount of computation realized
  and therefore the execution time, given in number of iterations
* A memory cost, which defines the memory usage, given in kibibytes
* A parallelism degree, which defines the number of parallel threads
2015-11-05 08:50:33 +00:00

27 lines
741 B
Text

$NetBSD: patch-Makefile,v 1.1 2015/11/05 08:50:33 wiz Exp $
Disable -march=native since it causes problems on NetBSD.
Add NetBSD support.
--- Makefile.orig 2015-11-02 15:20:31.000000000 +0000
+++ Makefile
@@ -24,7 +24,6 @@ CFLAGS = -std=c89 -pthread -O3 -Wall -g
#OPT=TRUE
ifeq ($(OPT), TRUE)
- CFLAGS += -march=native
SRC += src/opt.c
else
SRC += src/ref.c
@@ -39,6 +38,11 @@ ifeq ($(KERNEL_NAME), Linux)
LIB_CFLAGS := -shared -fPIC
LIB_PATH := -Wl,-rpath=$(BUILD_PATH)
endif
+ifeq ($(KERNEL_NAME), NetBSD)
+ LIB_EXT := so
+ LIB_CFLAGS := -shared -fPIC
+ LIB_PATH := -Wl,-rpath=$(BUILD_PATH)
+endif
ifeq ($(KERNEL_NAME), Darwin)
LIB_EXT := dylib
LIB_CFLAGS := -dynamiclib -install_name @rpath/lib$(LIB_NAME).$(LIB_EXT)