Skip to content

Commit

Permalink
TEMP
Browse files Browse the repository at this point in the history
  • Loading branch information
subnut committed Mar 30, 2022
1 parent 757da06 commit e74bf49
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions srcpkgs/mongoose/template
Expand Up @@ -18,17 +18,33 @@ checksum=1ef09d971b6de1a6317c109980d6fb5a9c19b39efef2506d6b76869644b3dafa
export SSL=OPENSSL
CFLAGS+=" -fPIC"

case "$XBPS_TARGET_MACHINE" in
*-musl) CFLAGS+=" -Wno-error=sign-conversion" # FD(c_) macro is broken
make_check_args+=" NO_SANITIZE=1" ;; # libsanitizer-devel unavailable
*) checkdepends+=" libsanitizer-devel" ;;
esac
if [ "$XBPS_TARGET_LIBC" = musl ]; then
# libsanitizer-devel not available
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

post_extract() {
if [ "$XBPS_TARGET_LIBC" = musl ]; then
# GCC falsely flags musl's FD_SET macro as -Wsign-conversion
# https://github.com/cesanta/mongoose/issues/1501#issuecomment-1082750154
# https://inbox.vuxu.org/musl/20200803174707.GF6949@brightrain.aerifal.cx/T/
vsed -i src/sock.c -e '
/[[:space:]]FD_SET(/{i\
#pragma GCC diagnostic push\
#pragma GCC diagnostic ignored "-Wsign-conversion"
p;i\
#pragma GCC diagnostic pop
}'
fi
}

pre_check() {
# -Wunused-function -Werror and fix-tests.patch are enemies
CFLAGS+=" -Wno-error=unused-function"
Expand Down

0 comments on commit e74bf49

Please sign in to comment.