mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-16 12:16:33 +08:00
commit
db77fc9ced
@ -9,7 +9,7 @@ os:
|
||||
env:
|
||||
- BUILD_TYPE=default
|
||||
- BUILD_TYPE=android
|
||||
- BUILD_TYPE=tweetnacl
|
||||
- BUILD_TYPE=libsodium
|
||||
- BUILD_TYPE=cmake
|
||||
|
||||
sudo: false
|
||||
|
@ -22,14 +22,14 @@ option (ENABLE_CURVE "Enable CURVE security" ON)
|
||||
if (NOT ENABLE_CURVE)
|
||||
message (STATUS "CURVE security is disabled")
|
||||
|
||||
elseif (WITH_SODIUM)
|
||||
elseif (WITH_LIBSODIUM)
|
||||
find_package (Sodium)
|
||||
if (SODIUM_FOUND)
|
||||
message (STATUS "Using libsodium for CURVE security")
|
||||
include_directories (${SODIUM_INCLUDE_DIRS})
|
||||
|
||||
# On Solaris, libsodium depends on libssp
|
||||
if (${CMAKE_SYSTEM_NAME} matches "SunOS")
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
||||
target_link_libraries (libzmq ssp)
|
||||
endif ()
|
||||
set (HAVE_LIBSODIUM 1)
|
||||
|
@ -192,8 +192,6 @@ src_libzmq_la_SOURCES = \
|
||||
src/tipc_listener.hpp \
|
||||
src/trie.cpp \
|
||||
src/trie.hpp \
|
||||
src/tweetnacl.c \
|
||||
src/tweetnacl.h \
|
||||
src/udp_address.cpp \
|
||||
src/udp_address.hpp \
|
||||
src/udp_engine.cpp \
|
||||
@ -232,6 +230,12 @@ src_libzmq_la_SOURCES = \
|
||||
src/socket_poller.hpp \
|
||||
src/socket_poller.cpp
|
||||
|
||||
if USE_TWEETNACL
|
||||
src_libzmq_la_SOURCES += \
|
||||
src/tweetnacl.c \
|
||||
src/tweetnacl.h
|
||||
endif
|
||||
|
||||
if ON_MINGW
|
||||
src_libzmq_la_LDFLAGS = \
|
||||
-no-undefined \
|
||||
|
@ -30,7 +30,7 @@ fi
|
||||
|
||||
(android_build_verify_so "libsodium.so" &> /dev/null) || {
|
||||
rm -rf "${cache}/libsodium"
|
||||
(cd "${cache}" && git clone --depth 1 git://github.com/jedisct1/libsodium.git) || exit 1
|
||||
(cd "${cache}" && git clone -b stable --depth 1 git://github.com/jedisct1/libsodium.git) || exit 1
|
||||
(cd "${cache}/libsodium" && ./autogen.sh \
|
||||
&& ./configure --quiet "${ANDROID_BUILD_OPTS[@]}" --disable-soname-versions \
|
||||
&& make -j 4 \
|
||||
|
@ -18,8 +18,5 @@ CMAKE_OPTS+=("-DCMAKE_PREFIX_PATH:PATH=${BUILD_PREFIX}")
|
||||
CMAKE_OPTS+=("-DCMAKE_LIBRARY_PATH:PATH=${BUILD_PREFIX}/lib")
|
||||
CMAKE_OPTS+=("-DCMAKE_INCLUDE_PATH:PATH=${BUILD_PREFIX}/include")
|
||||
|
||||
git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git &&
|
||||
( cd libsodium; ./autogen.sh && ./configure --prefix=$BUILD_PREFIX && make && make install ) || exit 1
|
||||
|
||||
# Build, check, and install from local source
|
||||
( cd ../..; mkdir build_cmake && cd build_cmake && PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig cmake "${CMAKE_OPTS[@]}" .. && make all VERBOSE=1 && make install ) || exit 1
|
||||
|
@ -13,11 +13,17 @@ CONFIG_OPTS+=("LDFLAGS=-L${BUILD_PREFIX}/lib")
|
||||
CONFIG_OPTS+=("PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig")
|
||||
CONFIG_OPTS+=("--prefix=${BUILD_PREFIX}")
|
||||
|
||||
# Build required projects first
|
||||
|
||||
# libsodium
|
||||
git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
|
||||
( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX; make check; make install)
|
||||
|
||||
# Build and check this project
|
||||
(
|
||||
cd ../..;
|
||||
./autogen.sh &&
|
||||
./configure "${CONFIG_OPTS[@]}" --with-tweetnacl=yes &&
|
||||
./configure "${CONFIG_OPTS[@]}" --with-libsodium=yes &&
|
||||
make &&
|
||||
( if make check; then true; else cat test-suite.log; exit 1; fi ) &&
|
||||
make install
|
@ -14,16 +14,10 @@ if [ $BUILD_TYPE == "default" ]; then
|
||||
CONFIG_OPTS+=("PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig")
|
||||
CONFIG_OPTS+=("--prefix=${BUILD_PREFIX}")
|
||||
|
||||
# Build required projects first
|
||||
|
||||
# libsodium
|
||||
git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
|
||||
( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX; make check; make install)
|
||||
|
||||
# Build and check this project
|
||||
(
|
||||
./autogen.sh &&
|
||||
./configure "${CONFIG_OPTS[@]}" --with-libsodium=yes &&
|
||||
./configure "${CONFIG_OPTS[@]}" &&
|
||||
make &&
|
||||
( if make check; then true; else cat test-suite.log; exit 1; fi ) &&
|
||||
make install
|
||||
|
@ -461,7 +461,7 @@ else
|
||||
libzmq_pedantic="no" # Disable pedantic warnings
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USE_LIBSODIUM, test "$curve_library" == "sodium")
|
||||
AM_CONDITIONAL(USE_LIBSODIUM, test "$curve_library" == "libsodium")
|
||||
AM_CONDITIONAL(USE_TWEETNACL, test "$curve_library" == "tweetnacl")
|
||||
|
||||
# build using pgm
|
||||
|
Loading…
x
Reference in New Issue
Block a user