From 2d4ea68b9635bcee8c2b837eb1c043cddb241c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D9=87=D8=AF=D9=8A=20=D8=B4=D9=8A=D9=86=D9=88=D9=86?= =?UTF-8?q?=20=28Mehdi=20Chinoune=29?= Date: Sat, 11 Nov 2023 11:47:18 +0100 Subject: [PATCH] flint: update to 3.0.1 --- mingw-w64-arb/PKGBUILD | 59 -------------------- mingw-w64-flint/001-dont-define-strcpy.patch | 11 ++++ mingw-w64-flint/PKGBUILD | 32 +++++++---- 3 files changed, 32 insertions(+), 70 deletions(-) delete mode 100644 mingw-w64-arb/PKGBUILD create mode 100644 mingw-w64-flint/001-dont-define-strcpy.patch diff --git a/mingw-w64-arb/PKGBUILD b/mingw-w64-arb/PKGBUILD deleted file mode 100644 index 849c8de66c462..0000000000000 --- a/mingw-w64-arb/PKGBUILD +++ /dev/null @@ -1,59 +0,0 @@ -# Contributor: Mehdi Chinoune - -_realname=arb -pkgbase=mingw-w64-${_realname} -pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=2.23.0 -pkgrel=1 -pkgdesc="C library for arbitrary-precision ball arithmetic (mingw-w64)" -arch=('any') -mingw_arch=('ucrt64' 'clang64') -url='https://arblib.org' -license=('spdx:LGPL-2.1-or-later') -msys2_repository_url="https://github.com/fredrik-johansson/arb" -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-flint" - "${MINGW_PACKAGE_PREFIX}-gmp" - "${MINGW_PACKAGE_PREFIX}-libwinpthread-git" - "${MINGW_PACKAGE_PREFIX}-mpfr") -makedepends=("${MINGW_PACKAGE_PREFIX}-cc" - "${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-ninja") -source=("https://github.com/fredrik-johansson/arb/archive/${pkgver}/${_realname}-${pkgver}.tar.gz") -sha256sums=('977d41bde46f5442511d5165c705cec32c03e852c84d7d1836135d412ce702bb') - -build() { - mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}" - - declare -a _extra_config - if check_option "debug" "n"; then - _extra_config+=("-DCMAKE_BUILD_TYPE=Release") - else - _extra_config+=("-DCMAKE_BUILD_TYPE=Debug") - fi - - MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ - "${MINGW_PREFIX}"/bin/cmake.exe \ - -GNinja \ - -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ - "${_extra_config[@]}" \ - ../${_realname}-${pkgver} - - "${MINGW_PREFIX}"/bin/cmake.exe --build . -} - -check() { - cd "${srcdir}/build-${MSYSTEM}" - - "${MINGW_PREFIX}"/bin/cmake.exe -DBUILD_TESTING=ON ../${_realname}-${pkgver} - "${MINGW_PREFIX}"/bin/cmake.exe --build . - "${MINGW_PREFIX}"/bin/ctest.exe || true -} - -package() { - cd "${srcdir}/build-${MSYSTEM}" - - DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake.exe --install . - - install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" -} diff --git a/mingw-w64-flint/001-dont-define-strcpy.patch b/mingw-w64-flint/001-dont-define-strcpy.patch new file mode 100644 index 0000000000000..d3f31fb1f7d72 --- /dev/null +++ b/mingw-w64-flint/001-dont-define-strcpy.patch @@ -0,0 +1,11 @@ +--- a/src/qsieve/factor.c ++++ b/src/qsieve/factor.c +@@ -13,7 +13,7 @@ + + #define _STDC_FORMAT_MACROS + +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !(defined(__MINGW32__) && defined(__clang__)) + # define strcpy __builtin_strcpy + #else + # include diff --git a/mingw-w64-flint/PKGBUILD b/mingw-w64-flint/PKGBUILD index 7db7eecbef0d4..d01a8a5d16fa2 100644 --- a/mingw-w64-flint/PKGBUILD +++ b/mingw-w64-flint/PKGBUILD @@ -3,25 +3,34 @@ _realname=flint pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.9.0 -pkgrel=2 +pkgver=3.0.1 +pkgrel=1 pkgdesc="Fast Library for Number Theory (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32') -depends=("${MINGW_PACKAGE_PREFIX}-mpfr" +url="https://www.flintlib.org/" +license=('spdx:LGPL-2.1-or-later') +msys2_repository_url="https://github.com/flintlib/flint" +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-mpfr" "${MINGW_PACKAGE_PREFIX}-gmp" + "${MINGW_PACKAGE_PREFIX}-openblas" "${MINGW_PACKAGE_PREFIX}-libwinpthread-git") -makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" +makedepends=("${MINGW_PACKAGE_PREFIX}-cc" + "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-ninja" - "${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-python") -license=('spdx:LGPL-2.1-or-later') -url="https://www.flintlib.org/" -source=(https://www.flintlib.org/${_realname}-${pkgver}.tar.gz) -sha256sums=('2fc090d51033c93208e6c10d406397a53c983ae5343b958eb25f72a57a4ce76a') +source=(https://www.flintlib.org/${_realname}-${pkgver}.tar.gz + 001-dont-define-strcpy.patch) +sha256sums=('7b311a00503a863881eb8177dbeb84322f29399f3d7d72f3b1a4c9ba1d5794b4' + 'f1b25323e067f642c1e0ebbd4152b5af683782fa1f08e5e2b2faa2736dbd2a84') + +prepare() { + cd ${_realname}-${pkgver} + patch -p1 -i "${srcdir}"/001-dont-define-strcpy.patch +} build() { - [[ -d "${srcdir}/build-${MSYSTEM}" ]] && rm -rf "${srcdir}/build-${MSYSTEM}" mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}" declare -a _extra_config @@ -35,7 +44,8 @@ build() { ${MINGW_PREFIX}/bin/cmake.exe \ -G Ninja \ -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ - ${_extra_config[@]} \ + "${_extra_config[@]}" \ + -DPython_EXECUTABLE=${MINGW_PREFIX}/bin/python \ -DBUILD_TESTING=OFF \ "../${_realname}-${pkgver}"