pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

devel/gprbuild: modify gprbuild-24.0.0



Module Name:	pkgsrc-wip
Committed By:	Dmytro Kazankov <dmytro.kazankov%gmail.com@localhost>
Pushed By:	dkazankov
Date:		Tue Mar 12 12:31:16 2024 +0200
Changeset:	d1390f49bddeb3204aa4df10cbe09b9b59e2518d

Modified Files:
	gprbuild/Makefile
	gprbuild/distinfo
	gprbuild/patches/patch-Makefile
	gprbuild/patches/patch-bootstrap.sh
	gprbuild/patches/patch-gpr_src_gpr_imports.c
Added Files:
	gprbuild/patches/patch-deps_xmlada_Makefile.in
	gprbuild/patches/patch-gpr_gpr.gpr
	gprbuild/patches/patch-gpr_src_gpr-util-put__resource__usage____netbsd.adb
	gprbuild/version.mk
Removed Files:
	gprbuild/files/patch-Makefile.in
	gprbuild/files/patch-gpr_src_put_resource_usage__unix.adb

Log Message:
devel/gprbuild: modify gprbuild-24.0.0

* Build steps were rearranged to match step names and pkgsrc logic
* Some patches were done in a normal way
* xmlada and gprconfig_kb sources were made as github submodules

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d1390f49bddeb3204aa4df10cbe09b9b59e2518d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gprbuild/Makefile                                  |  61 +++++-----
 gprbuild/distinfo                                  |  21 ++--
 gprbuild/files/patch-Makefile.in                   |  16 ---
 .../patch-gpr_src_put_resource_usage__unix.adb     |  15 ---
 gprbuild/patches/patch-Makefile                    |   2 +-
 gprbuild/patches/patch-bootstrap.sh                |  11 +-
 gprbuild/patches/patch-deps_xmlada_Makefile.in     |  16 +++
 gprbuild/patches/patch-gpr_gpr.gpr                 |  16 +++
 ...src_gpr-util-put__resource__usage____netbsd.adb | 127 +++++++++++++++++++++
 gprbuild/patches/patch-gpr_src_gpr_imports.c       |   2 +-
 gprbuild/version.mk                                |   3 +
 11 files changed, 211 insertions(+), 79 deletions(-)

diffs:
diff --git a/gprbuild/Makefile b/gprbuild/Makefile
index 9fdfb68a96..fb3866c37e 100644
--- a/gprbuild/Makefile
+++ b/gprbuild/Makefile
@@ -1,6 +1,8 @@
-# $NetBSD: Makefile,v 1.0 2023/12/11 11:20:00 dkazankov Exp $
+# $NetBSD: Makefile,v 1.1 2024/03/12 11:00:00 dkazankov Exp $
 
-DISTNAME=	gprbuild-24.0.0
+.include "version.mk"
+
+DISTNAME=	gprbuild-${GPRBUILD_VERSION}
 CATEGORIES=	devel
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 MASTER_SITES=	${MASTER_SITE_GITHUB:=AdaCore/}
@@ -12,11 +14,10 @@ LICENSE=	gnu-gpl-v3
 
 USE_LANGUAGES=	c ada
 
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
-DISTFILES+=	xmlada-${PKGVERSION_NOREV}${EXTRACT_SUFX}
-DISTFILES+=	gprconfig_kb-${PKGVERSION_NOREV}${EXTRACT_SUFX}
+GITHUB_SUBMODULES+=	AdaCore	xmlada	${GITHUB_TAG}	deps/xmlada
+GITHUB_SUBMODULES+=	AdaCore	gprconfig_kb	${GITHUB_TAG}	deps/gprconfig_kb
 
-USE_TOOLS+=	gmake patch
+USE_TOOLS+=	gmake
 
 HAS_CONFIGURE=	yes
 
@@ -26,12 +27,11 @@ OBJDIR=		${WRKDIR}/build
 BOOTSTRAPDIR=	${WRKDIR}/bootstrap
 CGPRDIR=	${WRKDIR}
 
-PRECONFIGURE_ENV=	${CONFIGURE_ENV}
-POSTCONFIGURE_ENV=	${CONFIGURE_ENV}
-
-PRECONFIGURE_ENV+=	CC=${CC}
-PRECONFIGURE_ENV+=	CFLAGS=${CFLAGS:M:Q}
-PRECONFIGURE_ENV+=	GNATMAKE=${GMKPATH}
+# environment for bootstrap build
+PREBUILD_ENV=	${CONFIGURE_ENV}
+PREBUILD_ENV+=	CC=${CC}
+PREBUILD_ENV+=	CFLAGS=${CFLAGS:M:Q}
+PREBUILD_ENV+=	GNATMAKE=${GMKPATH}
 
 CONFIGURE_DIRS=		${OBJDIR}
 CONFIG_SHELL=		${MAKE_PROGRAM} -f
@@ -49,7 +49,7 @@ INSTALL_MAKE_FLAGS=	GPRBUILD_OPTIONS='--config=${CGPRDIR}/buildlink.cgpr -aP ${W
 INSTALL_MAKE_FLAGS+=	GPRINSTALL_OPTIONS='--config=${CGPRDIR}/buildlink.cgpr -aP ${WRKDIR}/.buildlink/share/gpr'
 
 SUBST_CLASSES+=			buildlink
-SUBST_STAGE.buildlink=		pre-configure
+SUBST_STAGE.buildlink=		post-configure
 SUBST_FILES.buildlink=		../buildlink.cgpr
 SUBST_MESSAGE.buildlink=	Set work directory path in config project
 SUBST_VARS.buildlink=		WRKDIR
@@ -60,34 +60,29 @@ GENERATE_PLIST+= \
 
 .include "../../mk/bsd.prefs.mk"
 
-post-patch:
-	${RUN} cd ${PKGDIR} \
-	&& ${PATCH} -d ${WRKDIR}/xmlada-${PKGVERSION_NOREV} -E -p0 -F0 <files/patch-Makefile.in
-.if ${MACHINE_PLATFORM:MNetBSD-*-*}
-	${RUN} cd ${PKGDIR} \
-	&& ${PATCH} -d ${WRKSRC} -E -p0 -F0 <files/patch-gpr_src_put_resource_usage__unix.adb
-.endif
+pre-configure:
 	${RUN} ${CP} ${PKGDIR}/files/buildlink.cgpr ${CGPRDIR}/
+	${RUN} ${MKDIR} ${OBJDIR}
 
-pre-configure:
+post-configure:
+	${RUN} cd ${WRKSRC}/deps/xmlada \
+	&& set -x ; env ${CONFIGURE_ENV} \
+	./configure \
+	    --prefix=${WRKDIR}/.buildlink
+
+pre-build:
+# Bootstrap build
 	${RUN} ${MKDIR} ${BOOTSTRAPDIR}
 	${RUN} cd ${BOOTSTRAPDIR} \
-	&& env ${PRECONFIGURE_ENV} \
+	&& set -x ; env ${PREBUILD_ENV} \
 	${SHELL} ${WRKSRC}/bootstrap.sh \
 	    --prefix=${WRKDIR}/.buildlink \
 	    --srcdir=${WRKSRC} \
-	    --with-xmlada=${WRKDIR}/xmlada-${PKGVERSION_NOREV} \
-	    --with-kb=${WRKDIR}/gprconfig_kb-${PKGVERSION_NOREV}
-	${RUN} ${MKDIR} ${OBJDIR}
-
-post-configure:
-	${RUN} cd ${WRKDIR}/xmlada-${PKGVERSION_NOREV} \
-	&& set -x ; env ${POSTCONFIGURE_ENV} \
-	./configure \
-	    --prefix=${WRKDIR}/.buildlink \
+	    --with-xmlada=${WRKSRC}/deps/xmlada \
+	    --with-kb=${WRKSRC}/deps/gprconfig_kb
+# Build xmlada with bootstrapped gprbuild. It then will be used in normal build.
+	${RUN} cd ${WRKSRC}/deps/xmlada \
 	&& set -x ; env ${MAKE_ENV} \
 	${MAKE_PROGRAM} all install GPROPTS='--config=${CGPRDIR}/buildlink.cgpr'
 
 .include "../../mk/bsd.pkg.mk"
-SITES.xmlada-${PKGVERSION_NOREV}${EXTRACT_SUFX}=	-${MASTER_SITE_GITHUB:=AdaCore/}xmlada/archive/${GITHUB_TAG}${EXTRACT_SUFX}
-SITES.gprconfig_kb-${PKGVERSION_NOREV}${EXTRACT_SUFX}=	-${MASTER_SITE_GITHUB:=AdaCore/}gprconfig_kb/archive/${GITHUB_TAG}${EXTRACT_SUFX}
diff --git a/gprbuild/distinfo b/gprbuild/distinfo
index 297cc1110d..39d08308f6 100644
--- a/gprbuild/distinfo
+++ b/gprbuild/distinfo
@@ -1,15 +1,18 @@
 $NetBSD: distinfo,v 1.0 2023/12/11 12:00:00 dkazankov Exp $
 
+BLAKE2s (AdaCore-gprconfig_kb-v24.0.0.tar.gz) = e39c1e70b80923db53f0e6c4687536fcbfdc951209a34dc039423f9cc31319fa
+SHA512 (AdaCore-gprconfig_kb-v24.0.0.tar.gz) = 1bd28b7eba57a8952635f3fb61e06278935c31ed196182e19e9e8c2ffa3edbccea5a9b97b3f5a3c820e7c3f5b6878d87f7b42d66a7f57e083d0b56cb91a6eb84
+Size (AdaCore-gprconfig_kb-v24.0.0.tar.gz) = 43010 bytes
+BLAKE2s (AdaCore-xmlada-v24.0.0.tar.gz) = a02dae17a91d326f06fc85e9b69ee5bfe181ab97ca3f7e3a846b71bc5928b643
+SHA512 (AdaCore-xmlada-v24.0.0.tar.gz) = 4e6773a5fdf9b6ebb5afca913d77aba9f697768f28ef9b23b9277aa4ea4ce09de4e53655dd5559e2326ff847327adb53fa6b776775aa923100a2624df415c97d
+Size (AdaCore-xmlada-v24.0.0.tar.gz) = 1053363 bytes
 BLAKE2s (gprbuild-24.0.0.tar.gz) = d8279a6ae9f2df9fa76fa5eccb9d58a39f0a71cf27773ed140f2e20f93778e12
 SHA512 (gprbuild-24.0.0.tar.gz) = 09da4d54f2f151e9f9453e1a459533e2373eb5d4c51831be2bf90964ebcf653752de2f8b271c77f7b599f62146516fc60258ec3c96779fa2b52cd52979c6bd03
 Size (gprbuild-24.0.0.tar.gz) = 959615 bytes
-BLAKE2s (gprconfig_kb-24.0.0.tar.gz) = e39c1e70b80923db53f0e6c4687536fcbfdc951209a34dc039423f9cc31319fa
-SHA512 (gprconfig_kb-24.0.0.tar.gz) = 1bd28b7eba57a8952635f3fb61e06278935c31ed196182e19e9e8c2ffa3edbccea5a9b97b3f5a3c820e7c3f5b6878d87f7b42d66a7f57e083d0b56cb91a6eb84
-Size (gprconfig_kb-24.0.0.tar.gz) = 43010 bytes
-BLAKE2s (xmlada-24.0.0.tar.gz) = a02dae17a91d326f06fc85e9b69ee5bfe181ab97ca3f7e3a846b71bc5928b643
-SHA512 (xmlada-24.0.0.tar.gz) = 4e6773a5fdf9b6ebb5afca913d77aba9f697768f28ef9b23b9277aa4ea4ce09de4e53655dd5559e2326ff847327adb53fa6b776775aa923100a2624df415c97d
-Size (xmlada-24.0.0.tar.gz) = 1053363 bytes
-SHA1 (patch-Makefile) = f1e28cd16cdfa08d2780dcd3c8cd733a07b09e01
-SHA1 (patch-bootstrap.sh) = 4797fef547d62e10b0ed5b0f5bac6feedb5fc756
-SHA1 (patch-gpr_src_gpr_imports.c) = 874a482a153463310e9ebe76b287f301363c5802
+SHA1 (patch-Makefile) = 2feb8ed77093d88d70163366206ab4e4a716614a
+SHA1 (patch-bootstrap.sh) = f314016c046426d3f2a40013a9332cf433a4196a
+SHA1 (patch-deps_xmlada_Makefile.in) = 98632303e6829b0540abeca6a5a7cd427b455adf
+SHA1 (patch-gpr_gpr.gpr) = 28c7779f044db45b1daa029833c39e9c818fa061
+SHA1 (patch-gpr_src_gpr-util-put__resource__usage____netbsd.adb) = d0acc610cce5a2a24b00efa196a658cbfd0afe77
+SHA1 (patch-gpr_src_gpr_imports.c) = 945eefee50b198695ade7a4b88d4f87dd50f7925
 SHA1 (patch-gprbuild.gpr) = 557472a3b1fca73e14434b8ecd614e4fdfa726be
diff --git a/gprbuild/files/patch-Makefile.in b/gprbuild/files/patch-Makefile.in
deleted file mode 100644
index 6549dda041..0000000000
--- a/gprbuild/files/patch-Makefile.in
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-Makefile.in,v 1.0 2023/12/26 11:40:00 dkazankov Exp $
-
-Make possible install params
-
---- Makefile.in.orig	2023-09-07 14:33:41.000000000 +0300
-+++ Makefile.in	2023-12-26 11:37:39.332465731 +0200
-@@ -34,7 +34,8 @@
- MODULES=unicode input_sources sax dom schema
- MODULE_INSTALL=${MODULES:%=%_inst}
- 
--GPROPTS=-XXMLADA_BUILD_MODE=${MODE} -XPROCESSORS=${PROCESSORS}
-+GPROPTS=
-+GPROPTS+=-XXMLADA_BUILD_MODE=${MODE} -XPROCESSORS=${PROCESSORS}
- 
- ifeq (${HOST},${TARGET})
- IPREFIX=${DESTDIR}${prefix}
diff --git a/gprbuild/files/patch-gpr_src_put_resource_usage__unix.adb b/gprbuild/files/patch-gpr_src_put_resource_usage__unix.adb
deleted file mode 100644
index f07895d85e..0000000000
--- a/gprbuild/files/patch-gpr_src_put_resource_usage__unix.adb
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-gpr_src_gpr-util-put_resource_usage__unix.adb,v 1.0 2023/12/22 12:40:00 dkazankov Exp $
-
-Correct warning at link stage
-
---- gpr/src/gpr-util-put_resource_usage__unix.adb.orig	2023-10-09 21:31:11.000000000 +0300
-+++ gpr/src/gpr-util-put_resource_usage__unix.adb	2023-12-22 12:36:20.531382047 +0200
-@@ -69,7 +69,7 @@
-       procedure Print (This : STC.Timeval);
- 
-       function Getrusage (Who : Integer; usage : out Rusage) return Integer
--        with Import, Convention => C;
-+        with Import, Convention => C, External_Name => "__netbsd_getrusage";
- 
-       -----------
-       -- Print --
diff --git a/gprbuild/patches/patch-Makefile b/gprbuild/patches/patch-Makefile
index 3af5098f4d..5837421fa6 100644
--- a/gprbuild/patches/patch-Makefile
+++ b/gprbuild/patches/patch-Makefile
@@ -1,6 +1,6 @@
 $NetBSD: patch-Makefile,v 1.0 2023/12/26 13:25:00 dkazankov Exp $
 
-Make it possible to set install parameters, correct install parameters
+Make it possible to set install parameters, fix install parameters
 
 --- Makefile.orig	2023-10-09 21:31:11.000000000 +0300
 +++ Makefile	2023-12-26 15:07:17.160442141 +0200
diff --git a/gprbuild/patches/patch-bootstrap.sh b/gprbuild/patches/patch-bootstrap.sh
index 9f6bc02295..01abf2f7bf 100644
--- a/gprbuild/patches/patch-bootstrap.sh
+++ b/gprbuild/patches/patch-bootstrap.sh
@@ -1,10 +1,10 @@
-$NetBSD: patch-bootstrap.sh,v 1.0 2023/12/22 12:25:00 dkazankov Exp $
+$NetBSD: patch-bootstrap.sh,v 1.1 2024/03/11 18:88:00 dkazankov Exp $
 
-Correct out-of-tree bootstrap build
+Fix out-of-tree bootstrap build and fix link time warning on NetBSD
 
 --- bootstrap.sh.orig	2023-10-09 21:31:11.000000000 +0300
-+++ bootstrap.sh	2023-12-22 12:31:00.399396853 +0200
-@@ -90,13 +90,13 @@
++++ bootstrap.sh	2024-03-12 11:02:08.865606070 +0200
+@@ -90,13 +90,16 @@
  UName=`uname | cut -b -5`
  PutUsage=gpr/src/gpr-util-put_resource_usage
  
@@ -15,6 +15,9 @@ Correct out-of-tree bootstrap build
  then
 -	cp ${PutUsage}__null.adb ${PutUsage}.adb
 +	cp ${srcdir}/${PutUsage}__null.adb ${srcdir}/${PutUsage}.adb
++elif [ "$UName" = "NetBS" ]
++then
++	ln ${srcdir}/${PutUsage}__netbsd.adb ${srcdir}/${PutUsage}.adb
  else
 -	ln -s $PWD/${PutUsage}__unix.adb ${PutUsage}.adb
 +	ln -s ${srcdir}/${PutUsage}__unix.adb ${srcdir}/${PutUsage}.adb
diff --git a/gprbuild/patches/patch-deps_xmlada_Makefile.in b/gprbuild/patches/patch-deps_xmlada_Makefile.in
new file mode 100644
index 0000000000..0c1d0d84e6
--- /dev/null
+++ b/gprbuild/patches/patch-deps_xmlada_Makefile.in
@@ -0,0 +1,16 @@
+$NetBSD: patch-Makefile.in,v 1.0 2023/12/26 11:40:00 dkazankov Exp $
+
+Make possible install params
+
+--- deps/xmlada/Makefile.in.orig	2023-09-07 14:33:41.000000000 +0300
++++ deps/xmlada/Makefile.in	2023-12-26 11:37:39.332465731 +0200
+@@ -34,7 +34,8 @@
+ MODULES=unicode input_sources sax dom schema
+ MODULE_INSTALL=${MODULES:%=%_inst}
+ 
+-GPROPTS=-XXMLADA_BUILD_MODE=${MODE} -XPROCESSORS=${PROCESSORS}
++GPROPTS=
++GPROPTS+=-XXMLADA_BUILD_MODE=${MODE} -XPROCESSORS=${PROCESSORS}
+ 
+ ifeq (${HOST},${TARGET})
+ IPREFIX=${DESTDIR}${prefix}
diff --git a/gprbuild/patches/patch-gpr_gpr.gpr b/gprbuild/patches/patch-gpr_gpr.gpr
new file mode 100644
index 0000000000..7c3eeba315
--- /dev/null
+++ b/gprbuild/patches/patch-gpr_gpr.gpr
@@ -0,0 +1,16 @@
+$NetBSD: patch-gpr_gpr.gpr,v 1.0 2024/03/12 10:00:00 dkazankov Exp $
+
+Fix link time warning on NetBSD
+
+--- gpr/gpr.gpr.orig	2023-10-09 21:31:11.000000000 +0300
++++ gpr/gpr.gpr	2024-03-12 10:52:35.183409588 +0200
+@@ -87,7 +87,8 @@
+              for Body ("GPR.Jobserver") use "gpr-jobserver__win.adb";
+          when "UNIX" =>
+              for Body ("GPR.Util.Put_Resource_Usage")
+-               use "gpr-util-put_resource_usage__unix.adb";
++--               use "gpr-util-put_resource_usage__unix.adb";
++               use "gpr-util-put_resource_usage__netbsd.adb";
+       end case;
+    end Naming;
+
diff --git a/gprbuild/patches/patch-gpr_src_gpr-util-put__resource__usage____netbsd.adb b/gprbuild/patches/patch-gpr_src_gpr-util-put__resource__usage____netbsd.adb
new file mode 100644
index 0000000000..8bb1615369
--- /dev/null
+++ b/gprbuild/patches/patch-gpr_src_gpr-util-put__resource__usage____netbsd.adb
@@ -0,0 +1,127 @@
+$NetBSD: gpr_src_gpr-util-put__resource__usage____netbsd.adb, v 1.0 2024/03/11 17:00:00 dkazankov Exp $
+
+Fix warning at link stage on NetBSD, it is a modified gpr/src/gpr-util-put_resource_usage__unix.adb file
+
+--- /dev/null	2024-03-11 16:30:59.689872070 +0200
++++ gpr/src/gpr-util-put_resource_usage__netbsd.adb	2024-03-11 16:30:59.725273095 +0200
+@@ -0,0 +1,120 @@
++------------------------------------------------------------------------------
++--                                                                          --
++--                           GPR PROJECT MANAGER                            --
++--                                                                          --
++--                     Copyright (C) 2022-2023, AdaCore                     --
++--                                                                          --
++-- This library is free software;  you can redistribute it and/or modify it --
++-- under terms of the  GNU General Public License  as published by the Free --
++-- Software  Foundation;  either version 3,  or (at your  option) any later --
++-- version. This library is distributed in the hope that it will be useful, --
++-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
++-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            --
++--                                                                          --
++-- As a special exception under Section 7 of GPL version 3, you are granted --
++-- additional permissions described in the GCC Runtime Library Exception,   --
++-- version 3.1, as published by the Free Software Foundation.               --
++--                                                                          --
++-- You should have received a copy of the GNU General Public License and    --
++-- a copy of the GCC Runtime Library Exception along with this program;     --
++-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
++-- <http://www.gnu.org/licenses/>.                                          --
++--                                                                          --
++------------------------------------------------------------------------------
++
++pragma Warnings (Off, "is an internal GNAT unit");
++with GNAT.Sockets.Thin_Common;
++pragma Warnings (On, "is an internal GNAT unit");
++
++separate (GPR.Util)
++procedure Put_Resource_Usage (Filename : String) is
++   package STC renames GNAT.Sockets.Thin_Common;
++
++   type Rusage is record
++      ru_utime    : STC.Timeval;  -- user time used
++      ru_stime    : STC.Timeval;  -- system time used
++      ru_maxrss   : Long_Integer; -- maximum resident set size
++      ru_ixrss    : Long_Integer; -- integral shared memory size
++      ru_idrss    : Long_Integer; -- integral unshared data size
++      ru_isrss    : Long_Integer; -- integral unshared stack size
++      ru_minflt   : Long_Integer; -- page reclaims
++      ru_majflt   : Long_Integer; -- page faults
++      ru_nswap    : Long_Integer; -- swaps
++      ru_inblock  : Long_Integer; -- block input operations
++      ru_oublock  : Long_Integer; -- block output operations
++      ru_msgsnd   : Long_Integer; -- messages sent
++      ru_msgrcv   : Long_Integer; -- messages received
++      ru_nsignals : Long_Integer; -- signals received
++      ru_nvcsw    : Long_Integer; -- voluntary context switches
++      ru_nivcsw   : Long_Integer; -- involuntary context switches
++   end record with Convention => C;
++
++   Log : File_Type;
++
++   RUSAGE_SELF     : constant := 0;
++   RUSAGE_CHILDREN : constant := -1;
++   RUSAGE_THREAD   : constant := 1;
++
++   procedure Print (Who : Integer);
++
++   -----------
++   -- Print --
++   -----------
++
++   procedure Print (Who : Integer) is
++      Usage : Rusage;
++      Longs : array (1 .. 14) of Long_Integer
++        with Import, Convention => C, Address => Usage.ru_maxrss'Address;
++
++      procedure Print (This : STC.Timeval);
++
++      function Getrusage (Who : Integer; usage : out Rusage) return Integer
++        with Import, Convention => C, External_Name => "__netbsd_getrusage";
++
++      -----------
++      -- Print --
++      -----------
++
++      procedure Print (This : STC.Timeval) is
++
++         function No_1st_Space (S : String) return String is
++           (if S /= "" and then S (S'First) = ' '
++            then S (S'First + 1 .. S'Last) else S);
++
++         Uimg : constant String := No_1st_Space (This.Tv_Usec'Img);
++      begin
++         Put (Log, This.Tv_Sec'Img);
++         Put (Log, '.');
++         if Uimg'Length < 6 then
++            Put (Log, (1 .. 6 - Uimg'Length => '0'));
++         end if;
++         Put (Log, Uimg);
++      end Print;
++
++   begin
++      if Getrusage (Who, Usage) /= 0 then
++         Put_Line (Log, "error: " & GNAT.OS_Lib.Errno_Message);
++         return;
++      end if;
++
++      Print (Usage.ru_utime);
++      Print (Usage.ru_stime);
++
++      for L of Longs loop
++         Put (Log, L'Img);
++      end loop;
++
++      New_Line (Log);
++
++      pragma Assert (Longs (Longs'Last)'Address = Usage.ru_nivcsw'Address);
++   end Print;
++
++begin
++   Create (Log, Out_File, Filename);
++
++   Print (RUSAGE_THREAD);
++   Print (RUSAGE_SELF);
++   Print (RUSAGE_CHILDREN);
++
++   Close (Log);
++end Put_Resource_Usage;
diff --git a/gprbuild/patches/patch-gpr_src_gpr_imports.c b/gprbuild/patches/patch-gpr_src_gpr_imports.c
index 660777f7ef..dad461a56e 100644
--- a/gprbuild/patches/patch-gpr_src_gpr_imports.c
+++ b/gprbuild/patches/patch-gpr_src_gpr_imports.c
@@ -1,6 +1,6 @@
 $NetBSD: patch-gpr_src_gpr_imports.c,v 1.0 2023/12/21 20:16:00 dkazankov Exp $
 
-Add support for NetBSD (same as for FreeBSD) and correct getrusage() warning at linking stage
+Add support for NetBSD (same as for FreeBSD) and fix getrusage() warning at linking stage
 
 --- gpr/src/gpr_imports.c.orig	2023-10-09 21:31:11.000000000 +0300
 +++ gpr/src/gpr_imports.c	2023-12-21 19:52:58.220771312 +0200
diff --git a/gprbuild/version.mk b/gprbuild/version.mk
new file mode 100644
index 0000000000..13d12d2f8e
--- /dev/null
+++ b/gprbuild/version.mk
@@ -0,0 +1,3 @@
+# $NetBSD: version.mk,v 1.0 2024/03/12 12:00:00 dkazankov Exp $
+
+GPRBUILD_VERSION:=	24.0.0


Home | Main Index | Thread Index | Old Index