50-libzmq.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/bash
  2. SCRIPT_REPO="https://github.com/zeromq/libzmq.git"
  3. SCRIPT_COMMIT="1f7580ab7d5c2508de30ba8dcbbf2fd103daab5c"
  4. ffbuild_enabled() {
  5. return 0
  6. }
  7. ffbuild_dockerbuild() {
  8. mkdir build && cd build
  9. local myconf=(
  10. -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN"
  11. -DCMAKE_BUILD_TYPE=Release
  12. -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX"
  13. -DBUILD_SHARED=OFF
  14. -DBUILD_STATIC=ON
  15. -DBUILD_TESTS=OFF
  16. -DENABLE_INTRINSICS=ON
  17. -DENABLE_DRAFTS=OFF
  18. -DWITH_TLS=OFF
  19. -DWITH_DOCS=OFF
  20. -DENABLE_CPACK=OFF
  21. -DENABLE_NO_EXPORT=ON
  22. )
  23. if [[ $TARGET == win* ]]; then
  24. myconf+=( -DPOLLER="epoll" )
  25. fi
  26. cmake "${myconf[@]}" ..
  27. make -j$(nproc)
  28. make install
  29. {
  30. echo "Cflags.private: -DZMQ_NO_EXPORT -DZMQ_STATIC"
  31. [[ $TARGET != win* ]] || echo "Libs.private: -lws2_32 -liphlpapi"
  32. } >> "$FFBUILD_PREFIX"/lib/pkgconfig/libzmq.pc
  33. }
  34. ffbuild_configure() {
  35. echo --enable-libzmq
  36. }
  37. ffbuild_unconfigure() {
  38. echo --disable-libzmq
  39. }