ayaports/backports/signal-desktop/bettersqlite-use-system-sqlcipher.patch

57 lines
1.5 KiB
Diff
Raw Permalink Normal View History

2023-01-11 13:23:51 +00:00
--- a/binding.gyp
+++ b/binding.gyp
@@ -7,7 +7,16 @@
'targets': [
{
'target_name': 'better_sqlite3',
- 'dependencies': ['deps/sqlite3.gyp:sqlite3'],
+ 'include_dirs': [
+ '/usr/include/sqlcipher',
+ 'tokenizer',
+ ],
2023-01-11 13:23:51 +00:00
+ 'link_settings': {
+ 'libraries': [
+ '-lsqlcipher',
+ '<!(pwd)/tokenizer/libsignal_tokenizer.a',
2023-01-11 13:23:51 +00:00
+ ]
+ },
'sources': ['src/better_sqlite3.cpp'],
'cflags_cc': ['-std=c++17'],
'xcode_settings': {
@@ -24,14 +33,22 @@
2023-01-11 13:23:51 +00:00
['OS=="linux"', {
'ldflags': [
'-Wl,-Bsymbolic',
- '-Wl,--exclude-libs,ALL',
],
}],
],
},
{
'target_name': 'test_extension',
- 'dependencies': ['deps/sqlite3.gyp:sqlite3'],
+ 'include_dirs': [
+ '/usr/include/sqlcipher',
+ 'tokenizer',
+ ],
2023-01-11 13:23:51 +00:00
+ 'link_settings': {
+ 'libraries': [
+ '-lsqlcipher',
+ '<!(pwd)/tokenizer/libsignal_tokenizer.a',
2023-01-11 13:23:51 +00:00
+ ]
+ },
'conditions': [['sqlite3 == ""', { 'sources': ['deps/test_extension.c'] }]],
},
],
--- a/package.json
+++ b/package.json
@@ -34,7 +34,7 @@
"sqlite3": "^5.0.2"
},
"scripts": {
- "install": "npm run download && npm run build-release",
+ "install": "npm run build-release",
"build-release": "node-gyp rebuild --release",
"build-debug": "node-gyp rebuild --debug",
"rebuild-release": "npm run lzz && npm run build-release",