monkey: rebuild with cmake

This commit is contained in:
Đoàn Trần Công Danh 2025-08-30 19:31:55 +07:00
parent 351b7b836c
commit ced143b0e5
3 changed files with 32 additions and 11 deletions

View file

@ -0,0 +1,11 @@
--- a/plugins/fastcgi/fcgi_handler.c
+++ b/plugins/fastcgi/fcgi_handler.c
@@ -245,7 +245,7 @@ static inline int fcgi_add_param_net(str
struct sockaddr_in *s4 = (struct sockaddr_in *)&addr4;
memset(&addr4, 0, sizeof(addr4));
addr4.sin_family = AF_INET;
- addr4.sin_port = &s->sin6_port;
+ addr4.sin_port = s->sin6_port;
memcpy(&addr4.sin_addr.s_addr,
s->sin6_addr.s6_addr + 12,
sizeof(addr4.sin_addr.s_addr));

View file

@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,7 @@ include(GNUInstallDirs)
# Set default compiler options
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__file__")
# Monkey Version
set(MK_VERSION_MAJOR 1)

View file

@ -1,14 +1,13 @@
# Template file for 'monkey'
pkgname=monkey
version=1.6.9
revision=5
build_style=configure
configure_args="--prefix=/usr --sbindir=/usr/bin
--libdir=/usr/lib$XBPS_TARGET_WORDSIZE/$pkgname
--sysconfdir=/etc/monkey/ --enable-plugins=mbedtls --malloc-libc
--webroot=/srv/www/$pkgname --mandir=/usr/share/man --default-user=_monkey
--pidfile=/var/run/monkey.pid --logdir=/var/log/monkey"
hostmakedepends="cmake"
revision=6
build_style=cmake
configure_args="-DINSTALL_SYSCONFDIR=/etc/monkey/ -DWITH_PLUGINS=mbedtls
-DWITH_SYSTEM_MALLOC=ON -DINSTALL_WEBROOTDIR=/srv/www/monkey
-DCMAKE_INSTALL_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE/monkey
-DDEFAULT_USER=_monkey -DPID_FILE=/var/run/monkey.pid
-DINSTALL_LOGDIR=/var/log/monkey"
makedepends="mbedtls2-devel"
short_desc="Cross-arch embeddable lightweight HTTP server"
maintainer="Orphaned <orphan@voidlinux.org>"
@ -34,9 +33,9 @@ make_dirs="
CFLAGS="-fcommon"
case $XBPS_TARGET_MACHINE in
*-musl) configure_args+=" --musl-mode --no-backtrace ";;
esac
if [ $XBPS_TARGET_LIBC = musl ]; then
configure_args+=" -DWITH_MUSL=ON -DWITH_BACKTRACE=OFF"
fi
post_install() {
vmkdir usr/share/monkey/webroot