Merge pull request #2276 from bluca/sodium_pkg

This commit is contained in:
Constantin Rack 2016-12-27 16:28:08 +01:00 committed by GitHub
commit ef88b8c760
4 changed files with 8 additions and 40 deletions

View File

@ -23,16 +23,8 @@ if [ -z $CURVE ]; then
elif [ $CURVE == "libsodium" ]; then
CMAKE_OPTS+=("-DWITH_LIBSODIUM=ON")
if command -v dpkg-query >/dev/null 2>&1; then
dpkg-query --list libsodium-dev >/dev/null 2>&1
HAVE_SODIUM=$?
elif command -v brew >/dev/null 2>&1; then
brew ls --versions libsodium >/dev/null 2>&1
HAVE_SODIUM=$?
else
HAVE_SODIUM=1
fi
if [ $HAVE_SODIUM -ne 0 ]; then
if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libsodium-dev >/dev/null 2>&1) || \
(command -v brew >/dev/null 2>&1 && brew ls --versions libsodium >/dev/null 2>&1)); then
git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX; make check; make install)
fi

View File

@ -19,16 +19,8 @@ if [ -z $CURVE ]; then
elif [ $CURVE == "libsodium" ]; then
CMAKE_OPTS+=("-DWITH_LIBSODIUM=ON")
if command -v dpkg-query >/dev/null 2>&1; then
dpkg-query --list libsodium-dev >/dev/null 2>&1
HAVE_SODIUM=$?
elif command -v brew >/dev/null 2>&1; then
brew ls --versions libsodium >/dev/null 2>&1
HAVE_SODIUM=$?
else
HAVE_SODIUM=1
fi
if [ $HAVE_SODIUM -ne 0 ]; then
if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libsodium-dev >/dev/null 2>&1) || \
(command -v brew >/dev/null 2>&1 && brew ls --versions libsodium >/dev/null 2>&1)); then
git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX; make check; make install)
fi

View File

@ -19,16 +19,8 @@ if [ -z $CURVE ]; then
elif [ $CURVE == "libsodium" ]; then
CONFIG_OPTS+=("--with-libsodium=yes")
if command -v dpkg-query >/dev/null 2>&1; then
dpkg-query --list libsodium-dev >/dev/null 2>&1
HAVE_SODIUM=$?
elif command -v brew >/dev/null 2>&1; then
brew ls --versions libsodium >/dev/null 2>&1
HAVE_SODIUM=$?
else
HAVE_SODIUM=1
fi
if [ $HAVE_SODIUM -ne 0 ]; then
if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libsodium-dev >/dev/null 2>&1) || \
(command -v brew >/dev/null 2>&1 && brew ls --versions libsodium >/dev/null 2>&1)); then
git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX; make check; make install)
fi

View File

@ -20,16 +20,8 @@ if [ $BUILD_TYPE == "default" ]; then
elif [ $CURVE == "libsodium" ]; then
CONFIG_OPTS+=("--with-libsodium=yes")
if command -v dpkg-query >/dev/null 2>&1; then
dpkg-query --list libsodium-dev >/dev/null 2>&1
HAVE_SODIUM=$?
elif command -v brew >/dev/null 2>&1; then
brew ls --versions libsodium >/dev/null 2>&1
HAVE_SODIUM=$?
else
HAVE_SODIUM=1
fi
if [ $HAVE_SODIUM -ne 0 ]; then
if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libsodium-dev >/dev/null 2>&1) || \
(command -v brew >/dev/null 2>&1 && brew ls --versions libsodium >/dev/null 2>&1)); then
git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX; make check; make install)
fi