Эх сурвалжийг харах

app: fix android sqlite3 induced errs by bundling openssl

darkfi 2 сар өмнө
parent
commit
df92d9d614

+ 5 - 1
bin/app/Dockerfile

@@ -1,7 +1,7 @@
 FROM docker.io/archlinux
 
 RUN pacman -Syu --noconfirm
-RUN pacman -S --noconfirm jdk17-openjdk unzip wget cmake openssl pkgconf gcc git zip
+RUN pacman -S --noconfirm jdk17-openjdk unzip wget cmake make pkgconf gcc git zip
 
 # github override HOME, so here we are
 ENV RUSTUP_HOME=/usr/local/rustup \
@@ -43,6 +43,10 @@ RUN cd /opt/ && \
     rm android-ndk-r25-linux.zip
 ENV NDK_HOME /opt/android-ndk-r25/
 
+# Needed for cross compiling openssl which is used by bundled sqlcipher in drk
+ENV AR /opt/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
+ENV RANLIB /opt/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
+
 # Copy contents to container. Should only use this on a clean directory
 WORKDIR /root/
 RUN git clone https://github.com/narodnik/cargo-quad-apk cargo-apk

+ 3 - 0
bin/drk/Cargo.toml

@@ -51,5 +51,8 @@ serde = {version = "1.0.228", features = ["derive"]}
 structopt = "0.3.26"
 structopt-toml = "0.5.1"
 
+[target.'cfg(target_os = "android")'.dependencies]
+libsqlite3-sys = { version = "*", features = ["bundled-sqlcipher-vendored-openssl"] }
+
 [lints]
 workspace = true