mirror of
https://github.com/oxen-io/oxen-core.git
synced 2023-12-14 02:22:56 +01:00
Add sqlite3 support for depends and dockerfile
This commit is contained in:
parent
075c97b27f
commit
6db16af82c
5 changed files with 44 additions and 8 deletions
|
@ -1023,8 +1023,13 @@ if(NOT SODIUM_LIBRARIES)
|
|||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(SODIUM REQUIRED libsodium)
|
||||
endif()
|
||||
include_directories(${ZMQ_INCLUDE_DIRS} ${SODIUM_INCLUDE_DIRS})
|
||||
link_directories(${ZMQ_LIBRARY_DIRS} ${SODIUM_LIBRARY_DIRS})
|
||||
if (NOT SQLITE3_LIBRARIES)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(SQLITE3 REQUIRED sqlite3)
|
||||
endif()
|
||||
|
||||
include_directories(${ZMQ_INCLUDE_DIRS} ${SODIUM_INCLUDE_DIRS} ${SQLITE3_INCLUDE_DIRS})
|
||||
link_directories(${ZMQ_LIBRARY_DIRS} ${SODIUM_LIBRARY_DIRS} ${SQLITE3_LIBRARY_DIRS})
|
||||
|
||||
add_subdirectory(contrib)
|
||||
add_subdirectory(src)
|
||||
|
|
12
Dockerfile
12
Dockerfile
|
@ -165,6 +165,18 @@ RUN set -ex \
|
|||
&& make install \
|
||||
&& ldconfig
|
||||
|
||||
# Sqlite3
|
||||
ARG SQLITE_VERSION=3310100
|
||||
ARG SQLITE_HASH=62284efebc05a76f909c580ffa5c008a7d22a1287285d68b7825a2b6b51949ae
|
||||
RUN set -ex \
|
||||
&& curl -s -O https://sqlite.org/2020/sqlite-autoconf-${SQLITE_VERSION}.tar.gz \
|
||||
&& echo "${SQLITE_HASH} sqlite-autoconf-${SQLITE_VERSION}.tar.gz" | sha256sum -c \
|
||||
&& tar -xzf sqlite-autoconf-${SQLITE_VERSION}.tar.gz \
|
||||
&& cd sqlite-autoconf-${SQLITE_VERSION} \
|
||||
&& ./configure --disable-shared \
|
||||
&& make \
|
||||
&& make install
|
||||
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
packages:=boost openssl zeromq libiconv
|
||||
packages:=boost openssl zeromq libiconv sqlite3
|
||||
|
||||
native_packages :=
|
||||
|
||||
|
|
24
contrib/depends/packages/sqlite3.mk
Normal file
24
contrib/depends/packages/sqlite3.mk
Normal file
|
@ -0,0 +1,24 @@
|
|||
package=sqlite3
|
||||
$(package)_version=3310100
|
||||
$(package)_download_path=https://www.sqlite.org/2020/
|
||||
$(package)_file_name=sqlite-autoconf-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=62284efebc05a76f909c580ffa5c008a7d22a1287285d68b7825a2b6b51949ae
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_cflags=-Wformat -Wformat-security -fstack-protector -fstack-protector-strong
|
||||
$(package)_cxxflags=-std=C++11 -Wformat -Wformat-security -fstack-protector -fstack-protector-strong
|
||||
$(package)_config_opts=--prefix=$(host_prefix) --disable-shared
|
||||
$(package)_ldflags=-pie
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf) $($(package)_config_opts)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
5
external/CMakeLists.txt
vendored
5
external/CMakeLists.txt
vendored
|
@ -40,7 +40,6 @@ find_package(PkgConfig REQUIRED)
|
|||
if(NOT STATIC)
|
||||
pkg_check_modules(MINIUPNPC miniupnpc>=2.1)
|
||||
pkg_check_modules(UNBOUND libunbound)
|
||||
pkg_check_modules(SQLITE3 sqlite3)
|
||||
endif()
|
||||
|
||||
if(MINIUPNPC_FOUND)
|
||||
|
@ -91,10 +90,6 @@ else()
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT SQLITE3_FOUND)
|
||||
die("Could not find SQLite3 library. Please make sure you have installed libsqlite3-dev or the equivalent")
|
||||
endif()
|
||||
|
||||
add_subdirectory(db_drivers)
|
||||
add_subdirectory(easylogging++)
|
||||
add_subdirectory(randomx EXCLUDE_FROM_ALL)
|
||||
|
|
Loading…
Reference in a new issue