54 lines
1.5 KiB
Bash
54 lines
1.5 KiB
Bash
# Template file for 'mongoose'
|
|
pkgname=mongoose
|
|
version=7.6
|
|
revision=2
|
|
build_style=gnu-makefile
|
|
make_use_env=yes
|
|
make_check_target=test
|
|
make_build_target=linux-libs
|
|
makedepends="openssl-devel"
|
|
checkdepends="openssl-devel"
|
|
short_desc="Embedded HTTP/WebSocket/MQTT library for C/C++"
|
|
maintainer="Subhaditya Nath <sn03.general@gmail.com>"
|
|
license="GPL-2.0-only"
|
|
homepage="https://mongoose.ws/"
|
|
distfiles="https://github.com/cesanta/mongoose/archive/${version}.tar.gz"
|
|
checksum=1ef09d971b6de1a6317c109980d6fb5a9c19b39efef2506d6b76869644b3dafa
|
|
|
|
# -Wno-error=unused-function: patched tests leave some functions unused
|
|
# -Wno-error=sign-conversion: GCC falsely flags musl FD_{SET,ISSET,CLR}
|
|
CFLAGS="-fPIC -Wno-error=sign-conversion -Wno-error=unused-function"
|
|
|
|
export SSL=OPENSSL
|
|
|
|
# libsanitizer-devel is currenly not available on musl
|
|
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
|
make_check_args+=" NO_SANITIZE=1"
|
|
else
|
|
checkdepends+=" libsanitizer-devel"
|
|
fi
|
|
|
|
# GitHub CI runner doesn't support IPv6, causing tests to fail
|
|
if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
|
|
make_check_args+=" IPV6=0"
|
|
fi
|
|
|
|
mongoose-devel_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|
|
|
|
mongoose-doc_package() {
|
|
short_desc+=" - documentation"
|
|
pkg_install() {
|
|
vmkdir "usr/share/${sourcepkg}/doc"
|
|
vcopy examples "usr/share/${sourcepkg}/doc"
|
|
vcopy "docs/*" "usr/share/${sourcepkg}/doc"
|
|
}
|
|
}
|