Skip to content

Commit

Permalink
Add libzmq
Browse files Browse the repository at this point in the history
  • Loading branch information
BtbN committed Aug 9, 2024
1 parent df31671 commit 02c4578
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions scripts.d/50-libzmq.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash

SCRIPT_REPO="https://github.com/zeromq/libzmq.git"
SCRIPT_COMMIT="b95d94935ed107679fd0ad9efd2f3d47309b6fd3"

ffbuild_enabled() {
return 0
}

ffbuild_dockerbuild() {
mkdir build && cd build

local myconf=(
-DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN"
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX"
-DBUILD_SHARED=OFF
-DBUILD_STATIC=ON
-DBUILD_TESTS=OFF
-DENABLE_INTRINSICS=ON
-DENABLE_DRAFTS=OFF
-DWITH_TLS=OFF
-DWITH_DOCS=OFF
-DENABLE_CPACK=OFF
-DENABLE_NO_EXPORT=ON
)

if [[ $TARGET == win* ]]; then
myconf+=( -DPOLLER="epoll" )
fi

cmake "${myconf[@]}" ..
make -j$(nproc)
make install

{
echo "Cflags.private: -DZMQ_NO_EXPORT -DZMQ_STATIC"
echo "Libs.private: -lws2_32 -liphlpapi"
} >> "$FFBUILD_PREFIX"/lib/pkgconfig/libzmq.pc
}

ffbuild_configure() {
echo --enable-libzmq
}

ffbuild_unconfigure() {
echo --disable-libzmq
}

0 comments on commit 02c4578

Please sign in to comment.