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