diff --git a/mingw-w64-fmt/0001-no-private-clang-header.patch b/mingw-w64-fmt/0001-no-private-clang-header.patch deleted file mode 100644 index c41adf11f88c2..0000000000000 --- a/mingw-w64-fmt/0001-no-private-clang-header.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h -index e5ae9e18..7d194227 100644 ---- a/include/fmt/ostream.h -+++ b/include/fmt/ostream.h -@@ -13,8 +13,6 @@ - #if defined(_WIN32) && defined(__GLIBCXX__) - # include - # include --#elif defined(_WIN32) && defined(_LIBCPP_VERSION) --# include <__std_stream> - #endif - - #include "format.h" -@@ -37,10 +35,6 @@ class file_access { - template class file_access; - auto get_file(std::filebuf&) -> FILE*; --#elif defined(_WIN32) && defined(_LIBCPP_VERSION) --template class file_access, -- &std::__stdoutbuf::__file_>; --auto get_file(std::__stdoutbuf&) -> FILE*; - #endif - - inline bool write_ostream_unicode(std::ostream& os, fmt::string_view data) { -@@ -57,9 +51,6 @@ inline bool write_ostream_unicode(std::ostream& os, fmt::string_view data) { - else - return false; - if (c_file) return write_console(c_file, data); --#elif defined(_WIN32) && defined(_LIBCPP_VERSION) -- if (auto* buf = dynamic_cast*>(os.rdbuf())) -- if (FILE* f = get_file(*buf)) return write_console(f, data); - #else - ignore_unused(os, data); - #endif -diff --git a/src/fmt.cc b/src/fmt.cc -index a02167c6..0e1d2563 100644 ---- a/src/fmt.cc -+++ b/src/fmt.cc -@@ -63,9 +63,6 @@ module; - # if defined(__GLIBCXX__) - # include - # include --# elif defined(_LIBCPP_VERSION) --# include <__std_stream> --# endif - # define WIN32_LEAN_AND_MEAN - # include - #endif diff --git a/mingw-w64-fmt/PKGBUILD b/mingw-w64-fmt/PKGBUILD index 84804fb6d8c0f..f1a74092bf15b 100644 --- a/mingw-w64-fmt/PKGBUILD +++ b/mingw-w64-fmt/PKGBUILD @@ -5,75 +5,74 @@ _realname=fmt pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=10.1.1 -pkgrel=2 +pkgver=10.2.0 +pkgrel=1 pkgdesc="A modern formatting library for C++ (mingw-w64)" arch=('any') -mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') +mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') url="https://fmt.dev" -license=('MIT') +msys2_repository_url="https://github.com/fmtlib/fmt" +msys2_references=( + 'archlinux: fmt' +) +license=('spdx:MIT') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-ninja") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") -options=('staticlibs') -source=("${_realname}-${pkgver}.tar.gz::https://github.com/fmtlib/${_realname}/archive/${pkgver}.tar.gz" - "0001-no-private-clang-header.patch") -sha256sums=('78b8c0a72b1c35e4443a7e308df52498252d1cefc2b08c9a97bc9ee6cfe61f8b' - 'd18d366082b6ac0e9ba85461abd102d4585495c8cb6d82c6cff41604640dddd5') +source=("https://github.com/fmtlib/fmt/archive/${pkgver}/${_realname}-${pkgver}.tar.gz") +sha256sums=('3ca91733a7313a8ad41c0885929415f8ec0a2a31d4dc7e27e9331412f4ca26ac') prepare() { cd "${_realname}-${pkgver}" - - # https://github.com/fmtlib/fmt/issues/3654 - # XXX: this is just a hack that throws out the code that uses the private clang header - patch -Np1 -i "${srcdir}/0001-no-private-clang-header.patch" } build() { + declare -a _extra_config + if check_option "debug" "n"; then + _extra_config+=("-DCMAKE_BUILD_TYPE=Release") + else + _extra_config+=("-DCMAKE_BUILD_TYPE=Debug") + fi + # Shared Build - [[ -d "${srcdir}/build-${MSYSTEM}-shared" ]] && rm -rf "${srcdir}/build-${MSYSTEM}-shared" mkdir -p "${srcdir}/build-${MSYSTEM}-shared" && cd "${srcdir}/build-${MSYSTEM}-shared" MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"Ninja" \ -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ - -DCMAKE_BUILD_TYPE=Release \ + "${_extra_config[@]}" \ -DBUILD_SHARED_LIBS=ON \ -DFMT_TEST=OFF \ ../${_realname}-${pkgver} - cmake --build . + ${MINGW_PREFIX}/bin/cmake --build . # Static Build - [[ -d "${srcdir}/build-${MSYSTEM}-static" ]] && rm -rf "${srcdir}/build-${MSYSTEM}-static" mkdir -p "${srcdir}/build-${MSYSTEM}-static" && cd "${srcdir}/build-${MSYSTEM}-static" MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"Ninja" \ -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ - -DCMAKE_BUILD_TYPE=Release \ + "${_extra_config[@]}" \ -DBUILD_SHARED_LIBS=OFF \ -DFMT_TEST=OFF \ ../${_realname}-${pkgver} - cmake --build . + ${MINGW_PREFIX}/bin/cmake --build . } package() { # Static Install cd "${srcdir}/build-${MSYSTEM}-static" - DESTDIR=${pkgdir} cmake --install . + DESTDIR=${pkgdir} ${MINGW_PREFIX}/bin/cmake --install . # Shared Install cd "${srcdir}/build-${MSYSTEM}-shared" - DESTDIR=${pkgdir} cmake --install . - - # Copy the source files for including - install -m644 ${srcdir}/${_realname}-${pkgver}/src/*.cc ${pkgdir}${MINGW_PREFIX}/include/${_realname} + DESTDIR=${pkgdir} ${MINGW_PREFIX}/bin/cmake --install . # License - install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE.rst ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.rst + install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE }