From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5409015808B for ; Sun, 27 Feb 2022 09:52:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 90959E08C4; Sun, 27 Feb 2022 09:52:31 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7465BE08C4 for ; Sun, 27 Feb 2022 09:52:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 69F55343339 for ; Sun, 27 Feb 2022 09:52:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A1775D0 for ; Sun, 27 Feb 2022 09:52:27 +0000 (UTC) From: "Alfredo Tupone" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alfredo Tupone" Message-ID: <1645955537.c8c82bae8e84eed2f7692a228e6306febec0e7c5.tupone@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ada/gprbuild/files/, dev-ada/gprbuild/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-ada/gprbuild/files/gprbuild-22.0.0-2020.patch dev-ada/gprbuild/gprbuild-22.0.0-r1.ebuild X-VCS-Directories: dev-ada/gprbuild/ dev-ada/gprbuild/files/ X-VCS-Committer: tupone X-VCS-Committer-Name: Alfredo Tupone X-VCS-Revision: c8c82bae8e84eed2f7692a228e6306febec0e7c5 X-VCS-Branch: master Date: Sun, 27 Feb 2022 09:52:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bbd0864c-23ac-4861-b3f6-bdccd3f31506 X-Archives-Hash: 490e080bb887a77dd4fa453233a95b08 commit: c8c82bae8e84eed2f7692a228e6306febec0e7c5 Author: Alfredo Tupone gentoo org> AuthorDate: Sun Feb 27 09:52:17 2022 +0000 Commit: Alfredo Tupone gentoo org> CommitDate: Sun Feb 27 09:52:17 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8c82bae dev-ada/gprbuild: adding compatibility with gnat_2020 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Alfredo Tupone gentoo.org> dev-ada/gprbuild/files/gprbuild-22.0.0-2020.patch | 47 +++++++++++++++++++++++ dev-ada/gprbuild/gprbuild-22.0.0-r1.ebuild | 16 +++++++- 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/dev-ada/gprbuild/files/gprbuild-22.0.0-2020.patch b/dev-ada/gprbuild/files/gprbuild-22.0.0-2020.patch new file mode 100644 index 000000000000..ba5c2f858de7 --- /dev/null +++ b/dev-ada/gprbuild/files/gprbuild-22.0.0-2020.patch @@ -0,0 +1,47 @@ +--- a/gpr/src/gpr_imports.c 2022-02-27 10:10:34.053638209 +0100 ++++ b/gpr/src/gpr_imports.c 2022-02-27 10:12:03.898276758 +0100 +@@ -114,6 +114,44 @@ + const char *__gnat_default_libgcc_subdir = "lib"; + #endif + ++#include ++#include ++#include ++#include ++ ++ extern long long __gnat_file_time(char* name) ++ { ++ long long result; ++ ++ if (name == NULL) { ++ return LLONG_MIN; ++ } ++ /* Number of seconds between and . */ ++ static const long long ada_epoch_offset = (136 * 365 + 44 * 366) * 86400LL; ++ struct stat sb; ++ if (stat(name, &sb) != 0) { ++ return LLONG_MIN; ++ } ++ ++ // return (sb.st_mtim.tv_sec - ada_epoch_offset) * 1E9 ++ // + sb.st_mtim.tv_nsec; ++ // with check overflow below ++ ++ if (__builtin_ssubll_overflow(sb.st_mtim.tv_sec, ada_epoch_offset, &result)) { ++ return LLONG_MIN; ++ } ++ ++ if (__builtin_smulll_overflow(result, 1E9, &result)) { ++ return LLONG_MIN; ++ } ++ ++ if (__builtin_saddll_overflow(result, sb.st_mtim.tv_nsec, &result)) { ++ return LLONG_MIN; ++ } ++ ++ return result; ++ } ++ + #ifdef __cplusplus + } + #endif diff --git a/dev-ada/gprbuild/gprbuild-22.0.0-r1.ebuild b/dev-ada/gprbuild/gprbuild-22.0.0-r1.ebuild index 06eb16e01235..97506af95abf 100644 --- a/dev-ada/gprbuild/gprbuild-22.0.0-r1.ebuild +++ b/dev-ada/gprbuild/gprbuild-22.0.0-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -ADA_COMPAT=( gnat_2021 ) +ADA_COMPAT=( gnat_202{0,1} ) inherit ada multiprocessing @@ -53,6 +53,18 @@ src_prepare() { -e "s:@GNATBIND@:${GNATBIND}:g" \ src/gprlib.adb \ || die + if use ada_target_gnat_2020; then + sed -i \ + -e "s:Append_Vector:Append:g" \ + -e "s:Insert_Vector:Insert:g" \ + src/gprbuild-link.adb \ + src/gprinstall-install.adb \ + src/gprlib.adb \ + src/gprlib-build_shared_lib.adb \ + src/gprbind.adb \ + || die + eapply "${FILESDIR}"/${P}-2020.patch + fi } bin_progs="gprbuild gprconfig gprclean gprinstall gprname gprls"