Expose versions of dependencies.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4337 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2023-07-05 01:06:59 +00:00
parent ae0a8b0a33
commit d06aea2831
2 changed files with 16 additions and 1 deletions

View File

@ -247,7 +247,8 @@ SODIUM_SOURCES := \
deps/libsodium/src/libsodium/sodium/core.c \ deps/libsodium/src/libsodium/sodium/core.c \
deps/libsodium/src/libsodium/sodium/codecs.c \ deps/libsodium/src/libsodium/sodium/codecs.c \
deps/libsodium/src/libsodium/sodium/runtime.c \ deps/libsodium/src/libsodium/sodium/runtime.c \
deps/libsodium/src/libsodium/sodium/utils.c deps/libsodium/src/libsodium/sodium/utils.c \
deps/libsodium/src/libsodium/sodium/version.c
SODIUM_OBJS := $(call get_objs,SODIUM_SOURCES) SODIUM_OBJS := $(call get_objs,SODIUM_SOURCES)
$(SODIUM_OBJS): CFLAGS += \ $(SODIUM_OBJS): CFLAGS += \
-DCONFIGURED=1 \ -DCONFIGURED=1 \
@ -256,6 +257,7 @@ $(SODIUM_OBJS): CFLAGS += \
-Wno-unused-variable \ -Wno-unused-variable \
-Wno-type-limits \ -Wno-type-limits \
-Wno-unknown-pragmas \ -Wno-unknown-pragmas \
-Ideps/libsodium/builds/msvc \
-Ideps/libsodium/src/libsodium/include/sodium -Ideps/libsodium/src/libsodium/include/sodium
SQLITE_SOURCES := deps/sqlite/sqlite3.c SQLITE_SOURCES := deps/sqlite/sqlite3.c

View File

@ -21,6 +21,9 @@
#include "sqlite3.h" #include "sqlite3.h"
#include "unzip.h" #include "unzip.h"
#include "uv.h" #include "uv.h"
#include "zlib.h"
#include <openssl/crypto.h>
#ifndef _WIN32 #ifndef _WIN32
#include <unistd.h> #include <unistd.h>
@ -677,6 +680,16 @@ static JSValue _tf_task_version(JSContext* context, JSValueConst this_val, int a
JSValue version = JS_NewObject(context); JSValue version = JS_NewObject(context);
JS_SetPropertyStr(context, version, "number", JS_NewString(context, VERSION_NUMBER)); JS_SetPropertyStr(context, version, "number", JS_NewString(context, VERSION_NUMBER));
JS_SetPropertyStr(context, version, "name", JS_NewString(context, VERSION_NAME)); JS_SetPropertyStr(context, version, "name", JS_NewString(context, VERSION_NAME));
JS_SetPropertyStr(context, version, "libuv", JS_NewString(context, uv_version_string()));
JS_SetPropertyStr(context, version, "sqlite", JS_NewString(context, sqlite3_libversion()));
#if defined(OPENSSL_VERSION_STRING)
JS_SetPropertyStr(context, version, "openssl", JS_NewString(context, OpenSSL_version(OPENSSL_VERSION_STRING)));
#else
JS_SetPropertyStr(context, version, "openssl", JS_NewString(context, OpenSSL_version(OPENSSL_VERSION)));
#endif
const char* sodium_version_string();
JS_SetPropertyStr(context, version, "libsodium", JS_NewString(context, sodium_version_string()));
JS_SetPropertyStr(context, version, "zlib", JS_NewString(context, zlibVersion()));
tf_trace_end(task->_trace); tf_trace_end(task->_trace);
return version; return version;
} }