expresscpp: Fix build with recent GCC and Clang and enable aarch64 builds (#23902)

This commit is contained in:
Hernan Martinez 2025-04-08 08:56:35 -06:00 committed by GitHub
parent e870db6a94
commit f7fdd7d0ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 40 additions and 5 deletions

View File

@ -0,0 +1,22 @@
diff -bur expresscpp-0.20.0-orig/include/expresscpp/url.hpp expresscpp-0.20.0/include/expresscpp/url.hpp
--- expresscpp-0.20.0-orig/include/expresscpp/url.hpp 2025-04-08 08:43:35.565101800 -0600
+++ expresscpp-0.20.0/include/expresscpp/url.hpp 2025-04-08 08:43:43.053145300 -0600
@@ -1,6 +1,7 @@
#pragma once
#include <string>
+#include <cstdint>
#include "expresscpp/exports.hpp"
diff -bur expresscpp-0.20.0-orig/src/middleware/serve_static_provider.cpp expresscpp-0.20.0/src/middleware/serve_static_provider.cpp
--- expresscpp-0.20.0-orig/src/middleware/serve_static_provider.cpp 2025-04-08 08:43:35.549577000 -0600
+++ expresscpp-0.20.0/src/middleware/serve_static_provider.cpp 2025-04-08 08:44:40.469674400 -0600
@@ -1,6 +1,7 @@
#include "expresscpp/middleware/serve_static_provider.hpp"
#include <filesystem>
+#include <fstream>
#include "expresscpp/console.hpp"
#include "expresscpp/impl/session.hpp"

View File

@ -3,10 +3,10 @@
pkgbase=mingw-w64-expresscpp
pkgname="${MINGW_PACKAGE_PREFIX}-expresscpp"
pkgver=0.20.0
pkgrel=3
pkgrel=4
pkgdesc='Fast, unopinionated, minimalist web framework for C++ Perfect for building REST APIs.(mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://github.com/expresscpp/expresscpp'
license=(spdx:MIT)
depends=("${MINGW_PACKAGE_PREFIX}-fmt"
@ -16,13 +16,26 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja")
source=("https://github.com/expresscpp/expresscpp/archive/v${pkgver}/expresscpp-${pkgver}.tar.gz"
"0001-Windows-dll-mingw.patch")
"001-Windows-dll-mingw.patch"
"002-missing-headers.patch")
sha512sums=('afe554f01d8f43253a23daea086e9b67d9593b057534929e18ead99da5e41cb826374cf8c67b3df8c25e78aa6966fdb3afa0659482f96da67cec460882aa5461'
'a0a9bc22817835ff35c33f8dbf6311bd35d5a6a898fac1fc99427e6212ad376c314c270cf4ac8ac899f35f446ad4b361f12cd43a04b42617263518845fbd2bc7')
'a0a9bc22817835ff35c33f8dbf6311bd35d5a6a898fac1fc99427e6212ad376c314c270cf4ac8ac899f35f446ad4b361f12cd43a04b42617263518845fbd2bc7'
'396c09ff3ef07cf60794b04a557cac926eee6c64067737fe8cae66c3808580202a8ef24f8f9ae02d7ea561113fe1daf474bceee4d099a19e860b687706d133f6')
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying $_patch"
patch -Nbp1 -i "${srcdir}/$_patch"
done
}
prepare(){
cd "${srcdir}"/expresscpp-${pkgver}
patch -Np1 -i "${srcdir}/0001-Windows-dll-mingw.patch"
apply_patch_with_msg \
001-Windows-dll-mingw.patch \
002-missing-headers.patch
}
build() {