Dependencies: add sockpp

BodgeMaster-unfinished
BodgeMaster 2022-07-12 01:51:23 +02:00
parent e01ce8f0ce
commit e608d82444
2 changed files with 19 additions and 1 deletions

View File

@ -26,6 +26,10 @@ This project requires bash and a C++20 compiler.
The project setup requires wget or curl, gzip, and tar.
Additional requirements for building dependencies:
- sockpp: CMake
**For people using other shells than bash:** You need to at least have bash
installed to use the scripts, but using it as your shell while working on
this project also allows you to use the provided aliases.
@ -47,8 +51,9 @@ point to `bin/lib`.
- `cd` to the project's base directory
- `scripts/setup_project.sh`
This will download the following dependenceis:
This will download (and build if applicable) the following dependenceis:
- [tiny-utf8](https://github.com/DuffsDevice/tiny-utf8)
- [sockpp](https://github.com/fpagliughi/sockpp)
### Building

View File

@ -55,8 +55,10 @@ scripts/clean.sh
echo "Cleaning dependencies..."
scripts/clean_dependencies.sh
set -e # failures are not acceptable here
mkdir -v dependencies/tmp
download https://github.com/DuffsDevice/tiny-utf8/archive/refs/tags/v4.4.3.tar.gz dependencies/tmp/tiny-utf8.tar.gz 8e3f61651909c9f3105d3501932a96aa65733127fb6e7cf94cb1b0a2dff42c8f
download https://github.com/fpagliughi/sockpp/archive/refs/tags/v0.7.1.tar.gz dependencies/tmp/sockpp.tar.gz 2e023528bebbd2ac083fc91fbe6d5c4158c3336bedbcff48f594f3b28f53b940
#TODO: keep the files somewhere else as a cache and only download the ones
# we don't have or that got corrupted
#TODO: once we cache files properly, have clean_dependencies.sh prune
@ -68,4 +70,15 @@ gzip -d dependencies/tmp/tiny-utf8.tar.gz
tar -xf dependencies/tmp/tiny-utf8.tar -C dependencies
echo "done."
echo -n "Extracting sockpp... "
gzip -d dependencies/tmp/sockpp.tar.gz
tar -xf dependencies/tmp/sockpp.tar -C dependencies
echo "done."
echo -n "Building sockpp... "
pushd dependencies/sockpp-0.7.1/ >/dev/null 2>&1
cmake -Bbuild .
cmake --build build
popd >/dev/null 2>&1
echo "done."
rm -rv dependencies/tmp