From 36f45c9ec3d63c656e87c7cdfcc08bc1ac59a806 Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Sat, 9 Jul 2022 02:41:14 -0300 Subject: [Project] Chat Privacy A Minecraft mod which partially fixes Microsoft's danger to Minecraft players. --- libotr/.gitignore | 4 +++ libotr/HOWTOBUILD.md | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 libotr/.gitignore create mode 100644 libotr/HOWTOBUILD.md (limited to 'libotr') diff --git a/libotr/.gitignore b/libotr/.gitignore new file mode 100644 index 0000000..5eb3b3d --- /dev/null +++ b/libotr/.gitignore @@ -0,0 +1,4 @@ +/libotr-* +/libgcrypt-* +/libgpg-error-* +/buildenv diff --git a/libotr/HOWTOBUILD.md b/libotr/HOWTOBUILD.md new file mode 100644 index 0000000..09106a0 --- /dev/null +++ b/libotr/HOWTOBUILD.md @@ -0,0 +1,72 @@ +How to build (wasm) +=================== + +For libgpg-error +---------------- + +First create `src/syscfg/lock-obj-pub.wasm32-unknown-none.h` with the below: + +``` +## lock-obj-pub.wasm32-unknown-emscripten.h +## File created by gen-posix-lock-obj - DO NOT EDIT +## To be included by mkheader into gpg-error.h + +typedef struct +{ + long _vers; + union { + volatile char _priv[28]; + long _x_align; + long *_xp_align; + } u; +} gpgrt_lock_t; + +#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \ + 0,0,0,0,0,0,0,0, \ + 0,0,0,0,0,0,0,0, \ + 0,0,0,0}}} +## +## Local Variables: +## mode: c +## buffer-read-only: t +## End: +## +``` + +(source: ) + +Then do: + +``` +emconfigure ./configure CFLAGS='-s PURE_WASI=1' --host=wasm32-unknown-none --prefix="$(cd ../buildenv; pwd)" --build=$YOURSYS +emmake make +emmake make install +``` + +(replace `$YOURSYS` with the system you're building on, e.g. `x86_64-pc-linux-gnu`) + +For libgcrypt +------------- + +First do libgpg-error, then just do: + +``` +emconfigure ./configure CFLAGS='-s PURE_WASI=1' --host=wasm32-unknown-none --build=$YOURSYS --prefix="$(cd ../buildenv; pwd)" --with-gpg-error-prefix="$(cd ../buildenv; pwd)" +emmake make +emmake make install +``` + +(replace `$YOURSYS` with the system you're building on, e.g. `x86_64-pc-linux-gnu`) + +For libotr +---------- + +First do libgcrypt, then just do: + +``` +emconfigure ./configure CFLAGS='-s PURE_WASI=1' --host=wasm32-unknown-none --build=$YOURSYS --prefix="$(cd ../buildenv; pwd)" --with-libgcrypt-prefix="$(cd ../buildenv; pwd)" --disable-gcc-hardening +emmake make +emmake make install +``` + +(replace `$YOURSYS` with the system you're building on, e.g. `x86_64-pc-linux-gnu`) -- cgit 1.4.1