-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
55 lines (50 loc) · 1.62 KB
/
template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Template file for 'mongoose'
pkgname=mongoose
version=7.6
revision=1
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 Networking Library for TCP,UDP,HTTP,MQTT,WebSocket and SSL/TLS"
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
CFLAGS="-fPIC -Wno-error=sign-conversion -Wno-error=unused-function"
# -Wno-error=unused-function fix-tests.patch
# -Wno-error=sign-conversion GCC falsely flags musl FD_{SET,ISSET,CLR}
# https://inbox.vuxu.org/musl/20200803174707.GF6949@brightrain.aerifal.cx/T/
# used in Makefile
export SSL=OPENSSL
# libsanitizer-devel is currenly not available on musl
if [ "$XBPS_TARGET_LIBC" = musl ]; then
make_check_args+=" NO_SANITIZE=1"
# NO_SANITIZE option is added by fix-makefile.patch
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"
}
}