From 87a50bd8ba02a84b8503b27a1af46e61f6968b49 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: Mon, 18 Mar 2024 15:34:09 +0100 Subject: [PATCH] libadalang: update to 24.0.0 --- mingw-w64-libadalang/PKGBUILD | 86 +++++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 34 deletions(-) diff --git a/mingw-w64-libadalang/PKGBUILD b/mingw-w64-libadalang/PKGBUILD index 2fcf9710da04c..8263d831ddde0 100644 --- a/mingw-w64-libadalang/PKGBUILD +++ b/mingw-w64-libadalang/PKGBUILD @@ -3,29 +3,41 @@ _realname=libadalang pkgbase=mingw-w64-${_realname} pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} -pkgver=23.0.0 -pkgrel=3 +pkgver=24.0.0 +pkgrel=1 pkgdesc="Library for parsing and semantic analysis of Ada code (mingw-w64)" arch=('any') mingw_arch=('mingw64' 'ucrt64') -url="https://github.com/AdaCore/libadalang/" +url="https://github.com/AdaCore/libadalang" msys2_references=( 'aur: libadalang' + 'gentoo: dev-ada/libadalang' ) -license=('spdx:GPL-3.0-or-later with GCC-exception-3.1') -makedepends=("${MINGW_PACKAGE_PREFIX}-gprbuild") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-gcc-ada" - "${MINGW_PACKAGE_PREFIX}-gnatcoll" - "${MINGW_PACKAGE_PREFIX}-libgpr" - "${MINGW_PACKAGE_PREFIX}-langkit_support" - "${MINGW_PACKAGE_PREFIX}-libiconv" - "${MINGW_PACKAGE_PREFIX}-gmp") -source=("https://github.com/AdaCore/libadalang/releases/download/v${pkgver}/libadalang-${pkgver}.tar.gz") -sha256sums=('7bc210f7a8015512b75ef4a149f804aa4fae13e82c93755d94ca004533be803f') - -_library_types="static static-pic relocatable" +license=('spdx:Apache-2.0 WITH LLVM-exception') +makedepends=("${MINGW_PACKAGE_PREFIX}-gprbuild" + "${MINGW_PACKAGE_PREFIX}-langkit" + "${MINGW_PACKAGE_PREFIX}-python-build" + "${MINGW_PACKAGE_PREFIX}-python-docutils" + "${MINGW_PACKAGE_PREFIX}-python-e3-core" + "${MINGW_PACKAGE_PREFIX}-python-funcy" + "${MINGW_PACKAGE_PREFIX}-python-installer" + "${MINGW_PACKAGE_PREFIX}-python-mako" + "${MINGW_PACKAGE_PREFIX}-python-setuptools" + "${MINGW_PACKAGE_PREFIX}-python-sphinx" + "${MINGW_PACKAGE_PREFIX}-python-wheel") +depends=("${MINGW_PACKAGE_PREFIX}-gcc-ada" + "${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-gnatcoll-core" + "${MINGW_PACKAGE_PREFIX}-gnatcoll-gmp" + "${MINGW_PACKAGE_PREFIX}-gnatcoll-iconv" + "${MINGW_PACKAGE_PREFIX}-gpr" + "${MINGW_PACKAGE_PREFIX}-langkit_support") +options=('!strip') +source=("https://github.com/AdaCore/libadalang/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz") +sha256sums=('418a6086cf5e790f66491ec78ae6979ef6e2dff3071b2c09d3f2dbd002471488') + +_library_types="static,static-pic,relocatable" _build_mode="prod" build() { @@ -33,27 +45,33 @@ build() { cp -r "${srcdir}/${_realname}-${pkgver}" "${srcdir}"/build-${MSYSTEM} cd "${srcdir}"/build-${MSYSTEM} - for _library_type in ${_library_types}; do - echo "Building ${_library_type}:" - gprbuild -p -P libadalang.gpr \ - -j"$(nproc)" \ - -XBUILD_MODE="${_build_mode}" \ - -XLIBRARY_TYPE="${_library_type}" \ - --relocate-build-tree="${_library_type}" - done + ${MINGW_PREFIX}/bin/python manage.py generate + + ${MINGW_PREFIX}/bin/python manage.py build \ + --library-types=${_library_types} \ + --build-mode=${_build_mode} \ + --disable-java \ + --gargs="-R" + + cd build/python + ${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation } package() { cd "${srcdir}"/build-${MSYSTEM} - for _library_type in ${_library_types}; do - echo "Installing ${_library_type}:" - gprinstall -p -P libadalang.gpr \ - --prefix="${pkgdir}${MINGW_PREFIX}" \ - -XBUILD_MODE="${_build_mode}" \ - -XLIBRARY_TYPE="${_library_type}" \ - --relocate-build-tree="${_library_type}" \ - --build-var=LIBRARY_TYPE \ - --build-name="${_library_type}" - done + # Install the Ada library with its C binding + ${MINGW_PREFIX}/bin/python manage.py install \ + --library-types=${_library_types} \ + --build-mode=${_build_mode} \ + "$pkgdir/${MINGW_PREFIX}" + + # Install the Python binding + cd build/python + MSYS2_ARG_CONV_EXCL="--prefix=" \ + ${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \ + --destdir="${pkgdir}" dist/*.whl + + install -Dm644 -t "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" \ + "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" }