diff --git a/config/ext.json b/config/ext.json index 4c6e6062..3c0b1960 100644 --- a/config/ext.json +++ b/config/ext.json @@ -292,7 +292,7 @@ "type": "builtin", "arg-type": "with", "lib-depends": [ - "sodium" + "libsodium" ] }, "sqlite3": { diff --git a/config/lib.json b/config/lib.json index 466763b8..bfe6ec6c 100644 --- a/config/lib.json +++ b/config/lib.json @@ -454,5 +454,11 @@ "zstd.h", "zstd_errors.h" ] + }, + "libsodium": { + "source": "libsodium", + "static-libs-unix": [ + "libsodium.a" + ] } } \ No newline at end of file diff --git a/config/source.json b/config/source.json index f86b51cd..d74fd496 100644 --- a/config/source.json +++ b/config/source.json @@ -411,5 +411,13 @@ "type": "file", "path": "LICENSE" } + }, + "libsodium": { + "type": "url", + "url": "https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz", + "license": { + "type": "file", + "path": "LICENSE" + } } } \ No newline at end of file diff --git a/src/SPC/builder/linux/library/libsodium.php b/src/SPC/builder/linux/library/libsodium.php new file mode 100644 index 00000000..76012bec --- /dev/null +++ b/src/SPC/builder/linux/library/libsodium.php @@ -0,0 +1,12 @@ +cd($this->source_dir) + ->exec("{$this->builder->configure_env} ./configure --enable-static --disable-shared --prefix=") + ->exec('make clean') + ->exec("make -j{$this->builder->concurrency}") + ->exec('make install DESTDIR=' . BUILD_ROOT_PATH); + } +}