Packages
sqlcipher nif interface
Retired package: Deprecated - usage not recommended, somewhat buggy/inconsistent interfance, still in beta stage
Current section
Files
Jump to
Current section
Files
esqlcipher
rebar.config.script
rebar.config.script
NifSharedSources = ["c_src/esqlcipher_nif.c", "c_src/queue.c"].
NifStaticSources = NifSharedSources ++ ["c_src/sqlite3/sqlite3.c"].
CFlagsDefault = "$CFLAGS -DSQLITE_DQS=0 -DSQLITE_HAS_CODEC -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DEPRECATED -DSQLITE_TEMPSTORE=2 -DSQLITE_THREADSAFE=1 -DSQLITE_USE_URI -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_JSON1".
CFlagsExt = " -Ic_src/sqlite3".
CFlags =
case os:getenv("ESQLCIPHER_CFLAGS") of
NotDefined when NotDefined == false; NotDefined == [] -> CFlagsDefault ++ CFlagsExt;
CFlagsOverride -> CFlagsOverride ++ CFlagsExt
end.
[
{require_min_otp_vsn, "R19"},
{port_env, [
%% Default darwin ldflags causes loading of system sqlite. Removed -bundle flag.
{"darwin", "DRV_LDFLAGS",
"-flat_namespace -undefined suppress $ERL_LDFLAGS"},
{"darwin", "CFLAGS",
"$CFLAGS -I/usr/local/opt/openssl/include -I/usr/local/include"},
{"solaris", "CFLAGS",
"$CFLAGS -std=c99"},
{"linux", "CFLAGS",
"$CFLAGS -std=c11"},
{"CFLAGS", CFlags},
{"LDFLAGS", "$LDFLAGS -lcrypto"}
]},
{port_specs, [
{"priv/esqlcipher_nif.so", NifStaticSources}
]},
{plugins, [pc]},
{deps, [
{ephemeral, "~> 2.0"}
]},
{provider_hooks,
[{post,
[{compile, {pc, compile}},
{clean, {pc, clean}}]}]}
].