bitwarden/system-libargon2.patch
2024-11-25 06:23:45 +00:00

66 lines
2.1 KiB
Diff

--- vendor/node_modules/argon2/binding.gyp.orig 2024-11-14 21:31:38.677408520 +0100
+++ vendor/node_modules/argon2/binding.gyp 2024-11-14 21:51:57.719983077 +0100
@@ -20,7 +20,7 @@
"Release": {
"target_conditions": [
["OS != 'win'", {
- "cflags+": ["-fdata-sections", "-ffunction-sections", "-fvisibility=hidden"],
+ "cflags+": ["-fvisibility=hidden"],
"ldflags+": ["-Wl,--gc-sections"]
}]
],
@@ -29,26 +29,7 @@
}
},
"targets": [
- {
- "target_name": "libargon2",
- "sources": [
- "argon2/src/argon2.c",
- "argon2/src/blake2/blake2b.c",
- "argon2/src/core.c",
- "argon2/src/encoding.c",
- "argon2/src/thread.c"
- ],
- "cflags+": ["-Wno-type-limits"],
- "conditions": [
- ["target_arch == 'ia32' or target_arch == 'x64'", {
- "cflags+": ["-msse", "-msse2"],
- "sources+": ["argon2/src/opt.c"]
- }, {
- "sources+": ["argon2/src/ref.c"]
- }]
- ],
- "type": "static_library"
- }, {
+{
"target_name": "argon2",
"defines+": [
"NAPI_VERSION=<(napi_build_version)",
@@ -58,10 +39,15 @@
"sources": [
"argon2.cpp"
],
- "cflags_cc+": ["-Wall", "-Wextra", "-Wformat", "-Wnon-virtual-dtor", "-pedantic", "-Werror"],
+ "cflags_cc+": ["-Wall", "-Wextra", "-Wformat", "-Wnon-virtual-dtor", "-pedantic"],
"cflags_cc!": ["-fno-exceptions"],
"include_dirs": ["<!(node -p \"require('node-addon-api').include_dir\")"],
- "dependencies": ["libargon2"],
+ "cflags": [
+ "<!@(pkg-config libargon2 --cflags)",
+ ],
+ "libraries": [
+ "<!@(pkg-config libargon2 --libs)",
+ ],
"configurations": {
"Debug": {
"conditions": [
--- vendor/node_modules/argon2/argon2.cpp.orig 2024-11-14 21:31:38.537338517 +0100
+++ vendor/node_modules/argon2/argon2.cpp 2024-11-14 21:56:26.220837915 +0100
@@ -1,4 +1,4 @@
-#include "argon2/include/argon2.h"
+#include <argon2.h>
#include <napi.h>
#include <string>