summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-05-08 04:44:53 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-08 18:12:01 +0200
commit2f3ded4dfd590bee6f16ec349610f7da30994ae5 (patch)
tree21f646e083716f59ad3d900a8b2488b02ad9a212 /Ports
parent5093b76f85d81b36a5ee5979e793ac7ad0b7d310 (diff)
downloadserenity-2f3ded4dfd590bee6f16ec349610f7da30994ae5.zip
Ports: Add port for libsodium
Diffstat (limited to 'Ports')
-rw-r--r--Ports/AvailablePorts.md1
-rwxr-xr-xPorts/libsodium/package.sh13
2 files changed, 14 insertions, 0 deletions
diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md
index dcfd0738f8..d46212d50f 100644
--- a/Ports/AvailablePorts.md
+++ b/Ports/AvailablePorts.md
@@ -59,6 +59,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`libphysfs`](libphysfs/) | PhysicsFS | 3.0.2 | https://icculus.org/physfs/ |
| [`libpng`](libpng/) | libpng | 1.6.37 | https://libpng.org/ |
| [`libpuffy`](libpuffy/) | libpuffy | 1.0 | https://github.com/ibara/libpuffy |
+| [`libsodium`](libsodium/) | libsodium | 1.0.18-stable | https://doc.libsodium.org/ |
| [`libtheora`](libtheora/) | libtheora | 1.1.1 | https://www.theora.org/ |
| [`libtiff`](libtiff/) | libtiff | 4.2.0 | http://www.libtiff.org/ |
| [`libtool`](libtool/) | libtool | 2.4 | https://www.gnu.org/software/libtool/ |
diff --git a/Ports/libsodium/package.sh b/Ports/libsodium/package.sh
new file mode 100755
index 0000000000..126550d907
--- /dev/null
+++ b/Ports/libsodium/package.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env -S bash ../.port_include.sh
+port=libsodium
+version=1.0.18-stable
+useconfigure=true
+workdir=libsodium-stable
+files="https://download.libsodium.org/libsodium/releases/libsodium-${version}.tar.gz libsodium-${version}.tar.gz 3c240fcd414189492d7c7dc12d2cf48f67bf04142ce2f60b620adb5bac6ca732"
+auth_type=sha256
+
+install() {
+ run make DESTDIR=${SERENITY_INSTALL_ROOT} $installopts install
+ ${CC} -shared -pthread -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libsodium.so -Wl,-soname,libsodium.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libsodium.a -Wl,--no-whole-archive
+ rm -f ${SERENITY_INSTALL_ROOT}/usr/local/lib/libsodium.la
+}