diff --git a/README.md b/README.md index 2b61bf0d1fa9820ec601e56ec00ac789cb38994a..442a5342c0f7f12a29a9c8885bdf11aad96efaac 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,13 @@ configuration file: If you use the configure with the `--with-depends` option (needed on debian 10), you will need the following dependencies: -- the [curl](https://curl.haxx.se/) command line utility -- the [wget](https://www.gnu.org/software/wget/) command line utility +- the [curl](https://curl.haxx.se/) command line utility. It can be replaced by + the wget command line utility. +- the [wget](https://www.gnu.org/software/wget/) command line utility. Can be + replaced by curl command line utility. - the [git](https://git-scm.com/) command line utility +- the [cmake](https://cmake.org/download/) command line utility (to be deleted + when use of json-c is dropped) Note that because of the use of `curl` and `get`, building behind a proxy may be challenging. diff --git a/depends/depends.txt b/depends/depends.txt index 7c36c16cc7959b6c88aaf74edf5c1e9778e853bd..4d80e86e9a87ac5305d89d171a45eec8100d07f4 100644 --- a/depends/depends.txt +++ b/depends/depends.txt @@ -4,3 +4,4 @@ wget libcurl https://curl.haxx.se/download/curl-7.72.0.tar.gz wget zlib https://zlib.net/zlib-1.2.11.tar.gz zlib.tar.gz wget iconv https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz iconv.tar.gz wget openssl https://www.openssl.org/source/openssl-1.1.1h.tar.gz openssl.tar.gz +git json-c https://github.com/json-c/json-c.git json-c diff --git a/depends/rules.txt b/depends/rules.txt index 6e50ecb247c2db3d53e2510f7eea96cce7e4fa60..fee92de3d2ec290ae7ec629086943a3fcdd684ab 100644 --- a/depends/rules.txt +++ b/depends/rules.txt @@ -4,3 +4,4 @@ openssl sslconfigure no-shared -fPIC no-hw sqlite3 configure --disable-shared --disable-tcl CFLAGS=-fPIC --enable-update-limit --with-zlib=__BUILD_DIR__ sdl2 configure --disable-shared --enable-fcitx --enable-input-tslib=no CFLAGS=-fPIC libcurl configure --disable-shared --without-zlib --enable-optimize --disable-rt --disable-pop3 --disable-imap --disable-rtsp --disable-smtp --disable-smb --disable-smbs --disable-dict --disable-tftp --enable-https --enable-http --enable-mime --disable-threaded-resolver --without-zsh-functions-dir --without-fish-functions-dir --with-ssl=__BUILD_DIR__ --with-zlib=__BUILD_DIR__ +json-c cmake -DCMAKE_INSTALL_PREFIX=__BUILD_DIR__ -DBUILD_SHARED_LIBS=OFF -DDISABLE_STATIC_FPIC=OFF -DDISABLE_THREAD_LOCAL_STORAGE=OFF -DENABLE_THREADING=OFF -DDISABLE_WERROR=OFF diff --git a/scripts/depends.bash b/scripts/depends.bash index fe74458a3072a280effdb62c797ad39fe8a42b75..71461bd99fdef884e0459a1e78912f5e5418f11d 100755 --- a/scripts/depends.bash +++ b/scripts/depends.bash @@ -34,6 +34,11 @@ function git () [ $? -ne 0 ] && die "Failed to clone $URL into folder $DEST with options $OPT" } +function cmake () +{ + $CMAKE $* +} + function get () { local NUM=$1 @@ -61,10 +66,13 @@ CURL=`which curl 2>/dev/null` [ $? -ne 0 ] && die "Failed to find the curl binary" WGET=`which wget 2>/dev/null` [ $? -ne 0 ] && die "Failed to find the wget binary" + TAR=`which tar 2>/dev/null` [ $? -ne 0 ] && die "Failed to find the tar binary" GIT=`which git 2>/dev/null` [ $? -ne 0 ] && die "Failed to find the git binary" +CMAKE=`which cmake 2>/dev/null` +[ $? -ne 0 ] && die "Failed to find the cmake binary" ! [ -f $DEPENDS_FILE ] && die "You must run this script from the root of the project" ! [ -f $PWD/scripts/depends.bash ] && die "You must run thus script from the root of the project" @@ -168,6 +176,10 @@ do [ $? -ne 0 ] && die "Failed to configure $FOLD" INSTALL="install_sw" ;; + cmake) + # Yes, some projects build with cmake, will be deleted in future commits + CC=$CC CXX=$CXX cmake $ROOT_DIR/depends/$FOLD/ $OPT + [ $? -ne 0 ] && die "Failed to configure $FOLD" esac # Common part