pkgsrc-WIP-changes archive

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

devel/gprlib: Add 24.0.0



Module Name:	pkgsrc-wip
Committed By:	Dmytro Kazankov <dmytro.kazankov%gmail.com@localhost>
Pushed By:	dkazankov
Date:		Tue May 21 12:27:42 2024 +0300
Changeset:	571885cef855962e946e26f61e3e3ec45b7cf23e

Added Files:
	gprlib/DESCR
	gprlib/Makefile
	gprlib/PLIST
	gprlib/buildlink3.mk
	gprlib/distinfo
	gprlib/patches/patch-Makefile
	gprlib/patches/patch-gpr_gpr.gpr
	gprlib/patches/patch-gpr_src_gpr-util-put__resource__usage____unix.adb
	gprlib/patches/patch-gpr_src_gpr-version.ads
	gprlib/patches/patch-gpr_src_gpr_imports.c

Log Message:
devel/gprlib: Add 24.0.0

* LIBGPR library is part of GPRbuild project.
* The package is needed to build gnatcoll-core package.
* Development package - only static libraries are provided.
* For shared libraries, a separate package is supposed to be created
  (libgnatprj?).
* libgpr.so name conflicts with the name of internal gRPC library,
  so libgnatprj (as linux distros did) for library and gprlib for package
  names were chosen.

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

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

diffstat:
 gprlib/DESCR                                       |   4 +
 gprlib/Makefile                                    |  39 ++++
 gprlib/PLIST                                       | 255 +++++++++++++++++++++
 gprlib/buildlink3.mk                               |  23 ++
 gprlib/distinfo                                    |  10 +
 gprlib/patches/patch-Makefile                      |  70 ++++++
 gprlib/patches/patch-gpr_gpr.gpr                   |  30 +++
 ...r_src_gpr-util-put__resource__usage____unix.adb |  15 ++
 gprlib/patches/patch-gpr_src_gpr-version.ads       |  28 +++
 gprlib/patches/patch-gpr_src_gpr_imports.c         |  22 ++
 10 files changed, 496 insertions(+)

diffs:
diff --git a/gprlib/DESCR b/gprlib/DESCR
new file mode 100644
index 0000000000..2158837c4b
--- /dev/null
+++ b/gprlib/DESCR
@@ -0,0 +1,4 @@
+LIBGPR development libraries
+
+GPRbuild is an advanced build system designed to help automate the construction
+of multi-language systems
diff --git a/gprlib/Makefile b/gprlib/Makefile
new file mode 100644
index 0000000000..36e66d3f1d
--- /dev/null
+++ b/gprlib/Makefile
@@ -0,0 +1,39 @@
+# $NetBSD: Makefile,v 1.0 2024/05/06 15:00:00 dkazankov Exp $
+
+.include "../../devel/gprbuild/version.mk"
+
+PKGNAME=	gprlib-${GPRBUILD_VERSION}
+DISTNAME=	gprbuild-${PKGVERSION_NOREV}
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_GITHUB:=AdaCore/}
+GITHUB_PROJECT=	gprbuild
+GITHUB_TAG=	v${PKGVERSION_NOREV}
+
+HOMEPAGE=	https://github.com/AdaCore/gprbuild
+COMMENT=	LIBGPR development libraries
+LICENSE=	gnu-gpl-v3
+
+USE_TOOLS+=	gmake
+HAS_CONFIGURE=	yes
+
+.include "../../mk/bsd.prefs.mk"
+
+USE_LANGUAGES=	c ada
+GCC_REQD+=	13
+
+CONFIG_SHELL_FLAGS+=	prefix=${DESTDIR}${PREFIX} ENABLE_SHARED=no
+CONFIG_SHELL=		${MAKE_PROGRAM}
+CONFIGURE_SCRIPT=	setup
+
+BUILD_TARGET=		libgpr.build
+
+INSTALL_TARGET=		libgpr.install
+
+GENERATE_PLIST+= \
+	cd ${DESTDIR}${PREFIX} && \
+	${FIND} include lib share \( -type f -or -type l \) -print | ${SORT};
+
+.include "../../wip/gprbuild/buildlink3.mk"
+.include "../../wip/xmlada/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/gprlib/PLIST b/gprlib/PLIST
new file mode 100644
index 0000000000..26fd9c2e5f
--- /dev/null
+++ b/gprlib/PLIST
@@ -0,0 +1,255 @@
+@comment $NetBSD: PLIST,v 1.0 2024/05/08 18:00:00 dkazankov Exp $
+include/gpr/gpr.static-pic/gpr-ali.adb
+include/gpr/gpr.static-pic/gpr-ali.ads
+include/gpr/gpr.static-pic/gpr-attr-pm.adb
+include/gpr/gpr.static-pic/gpr-attr-pm.ads
+include/gpr/gpr.static-pic/gpr-attr.adb
+include/gpr/gpr.static-pic/gpr-attr.ads
+include/gpr/gpr.static-pic/gpr-com.ads
+include/gpr/gpr.static-pic/gpr-compilation-process-waiter.adb
+include/gpr/gpr.static-pic/gpr-compilation-process-waiter.ads
+include/gpr/gpr.static-pic/gpr-compilation-process.adb
+include/gpr/gpr.static-pic/gpr-compilation-process.ads
+include/gpr/gpr.static-pic/gpr-compilation-protocol.adb
+include/gpr/gpr.static-pic/gpr-compilation-protocol.ads
+include/gpr/gpr.static-pic/gpr-compilation-slave.adb
+include/gpr/gpr.static-pic/gpr-compilation-slave.ads
+include/gpr/gpr.static-pic/gpr-compilation-sync.adb
+include/gpr/gpr.static-pic/gpr-compilation-sync.ads
+include/gpr/gpr.static-pic/gpr-compilation.adb
+include/gpr/gpr.static-pic/gpr-compilation.ads
+include/gpr/gpr.static-pic/gpr-conf.adb
+include/gpr/gpr.static-pic/gpr-conf.ads
+include/gpr/gpr.static-pic/gpr-cset.adb
+include/gpr/gpr.static-pic/gpr-cset.ads
+include/gpr/gpr.static-pic/gpr-debug.adb
+include/gpr/gpr.static-pic/gpr-debug.ads
+include/gpr/gpr.static-pic/gpr-dect.adb
+include/gpr/gpr.static-pic/gpr-dect.ads
+include/gpr/gpr.static-pic/gpr-env.adb
+include/gpr/gpr.static-pic/gpr-env.ads
+include/gpr/gpr.static-pic/gpr-err-scanner.adb
+include/gpr/gpr.static-pic/gpr-err.adb
+include/gpr/gpr.static-pic/gpr-err.ads
+include/gpr/gpr.static-pic/gpr-erroutc.adb
+include/gpr/gpr.static-pic/gpr-erroutc.ads
+include/gpr/gpr.static-pic/gpr-ext.adb
+include/gpr/gpr.static-pic/gpr-ext.ads
+include/gpr/gpr.static-pic/gpr-jobserver.adb
+include/gpr/gpr.static-pic/gpr-jobserver.ads
+include/gpr/gpr.static-pic/gpr-knowledge.adb
+include/gpr/gpr.static-pic/gpr-knowledge.ads
+include/gpr/gpr.static-pic/gpr-names.adb
+include/gpr/gpr.static-pic/gpr-names.ads
+include/gpr/gpr.static-pic/gpr-nmsc.adb
+include/gpr/gpr.static-pic/gpr-nmsc.ads
+include/gpr/gpr.static-pic/gpr-opt.ads
+include/gpr/gpr.static-pic/gpr-osint.adb
+include/gpr/gpr.static-pic/gpr-osint.ads
+include/gpr/gpr.static-pic/gpr-output.adb
+include/gpr/gpr.static-pic/gpr-output.ads
+include/gpr/gpr.static-pic/gpr-part.adb
+include/gpr/gpr.static-pic/gpr-part.ads
+include/gpr/gpr.static-pic/gpr-pp.adb
+include/gpr/gpr.static-pic/gpr-pp.ads
+include/gpr/gpr.static-pic/gpr-proc.adb
+include/gpr/gpr.static-pic/gpr-proc.ads
+include/gpr/gpr.static-pic/gpr-scans.adb
+include/gpr/gpr.static-pic/gpr-scans.ads
+include/gpr/gpr.static-pic/gpr-script.adb
+include/gpr/gpr.static-pic/gpr-script.ads
+include/gpr/gpr.static-pic/gpr-sdefault.adb
+include/gpr/gpr.static-pic/gpr-sdefault.ads
+include/gpr/gpr.static-pic/gpr-sinput.adb
+include/gpr/gpr.static-pic/gpr-sinput.ads
+include/gpr/gpr.static-pic/gpr-snames.adb
+include/gpr/gpr.static-pic/gpr-snames.ads
+include/gpr/gpr.static-pic/gpr-strt.adb
+include/gpr/gpr.static-pic/gpr-strt.ads
+include/gpr/gpr.static-pic/gpr-tempdir.adb
+include/gpr/gpr.static-pic/gpr-tempdir.ads
+include/gpr/gpr.static-pic/gpr-tree.adb
+include/gpr/gpr.static-pic/gpr-tree.ads
+include/gpr/gpr.static-pic/gpr-util-aux.adb
+include/gpr/gpr.static-pic/gpr-util-aux.ads
+include/gpr/gpr.static-pic/gpr-util-knowledge.adb
+include/gpr/gpr.static-pic/gpr-util-put_resource_usage__unix.adb
+include/gpr/gpr.static-pic/gpr-util.adb
+include/gpr/gpr.static-pic/gpr-util.ads
+include/gpr/gpr.static-pic/gpr-version.adb
+include/gpr/gpr.static-pic/gpr-version.ads
+include/gpr/gpr.static-pic/gpr.adb
+include/gpr/gpr.static-pic/gpr.ads
+include/gpr/gpr.static-pic/gpr_build_util.adb
+include/gpr/gpr.static-pic/gpr_build_util.ads
+include/gpr/gpr.static-pic/gpr_imports.c
+include/gpr/gpr.static/gpr-ali.adb
+include/gpr/gpr.static/gpr-ali.ads
+include/gpr/gpr.static/gpr-attr-pm.adb
+include/gpr/gpr.static/gpr-attr-pm.ads
+include/gpr/gpr.static/gpr-attr.adb
+include/gpr/gpr.static/gpr-attr.ads
+include/gpr/gpr.static/gpr-com.ads
+include/gpr/gpr.static/gpr-compilation-process-waiter.adb
+include/gpr/gpr.static/gpr-compilation-process-waiter.ads
+include/gpr/gpr.static/gpr-compilation-process.adb
+include/gpr/gpr.static/gpr-compilation-process.ads
+include/gpr/gpr.static/gpr-compilation-protocol.adb
+include/gpr/gpr.static/gpr-compilation-protocol.ads
+include/gpr/gpr.static/gpr-compilation-slave.adb
+include/gpr/gpr.static/gpr-compilation-slave.ads
+include/gpr/gpr.static/gpr-compilation-sync.adb
+include/gpr/gpr.static/gpr-compilation-sync.ads
+include/gpr/gpr.static/gpr-compilation.adb
+include/gpr/gpr.static/gpr-compilation.ads
+include/gpr/gpr.static/gpr-conf.adb
+include/gpr/gpr.static/gpr-conf.ads
+include/gpr/gpr.static/gpr-cset.adb
+include/gpr/gpr.static/gpr-cset.ads
+include/gpr/gpr.static/gpr-debug.adb
+include/gpr/gpr.static/gpr-debug.ads
+include/gpr/gpr.static/gpr-dect.adb
+include/gpr/gpr.static/gpr-dect.ads
+include/gpr/gpr.static/gpr-env.adb
+include/gpr/gpr.static/gpr-env.ads
+include/gpr/gpr.static/gpr-err-scanner.adb
+include/gpr/gpr.static/gpr-err.adb
+include/gpr/gpr.static/gpr-err.ads
+include/gpr/gpr.static/gpr-erroutc.adb
+include/gpr/gpr.static/gpr-erroutc.ads
+include/gpr/gpr.static/gpr-ext.adb
+include/gpr/gpr.static/gpr-ext.ads
+include/gpr/gpr.static/gpr-jobserver.adb
+include/gpr/gpr.static/gpr-jobserver.ads
+include/gpr/gpr.static/gpr-knowledge.adb
+include/gpr/gpr.static/gpr-knowledge.ads
+include/gpr/gpr.static/gpr-names.adb
+include/gpr/gpr.static/gpr-names.ads
+include/gpr/gpr.static/gpr-nmsc.adb
+include/gpr/gpr.static/gpr-nmsc.ads
+include/gpr/gpr.static/gpr-opt.ads
+include/gpr/gpr.static/gpr-osint.adb
+include/gpr/gpr.static/gpr-osint.ads
+include/gpr/gpr.static/gpr-output.adb
+include/gpr/gpr.static/gpr-output.ads
+include/gpr/gpr.static/gpr-part.adb
+include/gpr/gpr.static/gpr-part.ads
+include/gpr/gpr.static/gpr-pp.adb
+include/gpr/gpr.static/gpr-pp.ads
+include/gpr/gpr.static/gpr-proc.adb
+include/gpr/gpr.static/gpr-proc.ads
+include/gpr/gpr.static/gpr-scans.adb
+include/gpr/gpr.static/gpr-scans.ads
+include/gpr/gpr.static/gpr-script.adb
+include/gpr/gpr.static/gpr-script.ads
+include/gpr/gpr.static/gpr-sdefault.adb
+include/gpr/gpr.static/gpr-sdefault.ads
+include/gpr/gpr.static/gpr-sinput.adb
+include/gpr/gpr.static/gpr-sinput.ads
+include/gpr/gpr.static/gpr-snames.adb
+include/gpr/gpr.static/gpr-snames.ads
+include/gpr/gpr.static/gpr-strt.adb
+include/gpr/gpr.static/gpr-strt.ads
+include/gpr/gpr.static/gpr-tempdir.adb
+include/gpr/gpr.static/gpr-tempdir.ads
+include/gpr/gpr.static/gpr-tree.adb
+include/gpr/gpr.static/gpr-tree.ads
+include/gpr/gpr.static/gpr-util-aux.adb
+include/gpr/gpr.static/gpr-util-aux.ads
+include/gpr/gpr.static/gpr-util-knowledge.adb
+include/gpr/gpr.static/gpr-util-put_resource_usage__unix.adb
+include/gpr/gpr.static/gpr-util.adb
+include/gpr/gpr.static/gpr-util.ads
+include/gpr/gpr.static/gpr-version.adb
+include/gpr/gpr.static/gpr-version.ads
+include/gpr/gpr.static/gpr.adb
+include/gpr/gpr.static/gpr.ads
+include/gpr/gpr.static/gpr_build_util.adb
+include/gpr/gpr.static/gpr_build_util.ads
+include/gpr/gpr.static/gpr_imports.c
+lib/gpr/static-pic/gpr/gpr-ali.ali
+lib/gpr/static-pic/gpr/gpr-attr-pm.ali
+lib/gpr/static-pic/gpr/gpr-attr.ali
+lib/gpr/static-pic/gpr/gpr-com.ali
+lib/gpr/static-pic/gpr/gpr-compilation-process-waiter.ali
+lib/gpr/static-pic/gpr/gpr-compilation-process.ali
+lib/gpr/static-pic/gpr/gpr-compilation-protocol.ali
+lib/gpr/static-pic/gpr/gpr-compilation-slave.ali
+lib/gpr/static-pic/gpr/gpr-compilation-sync.ali
+lib/gpr/static-pic/gpr/gpr-compilation.ali
+lib/gpr/static-pic/gpr/gpr-conf.ali
+lib/gpr/static-pic/gpr/gpr-cset.ali
+lib/gpr/static-pic/gpr/gpr-debug.ali
+lib/gpr/static-pic/gpr/gpr-dect.ali
+lib/gpr/static-pic/gpr/gpr-env.ali
+lib/gpr/static-pic/gpr/gpr-err.ali
+lib/gpr/static-pic/gpr/gpr-erroutc.ali
+lib/gpr/static-pic/gpr/gpr-ext.ali
+lib/gpr/static-pic/gpr/gpr-jobserver.ali
+lib/gpr/static-pic/gpr/gpr-knowledge.ali
+lib/gpr/static-pic/gpr/gpr-names.ali
+lib/gpr/static-pic/gpr/gpr-nmsc.ali
+lib/gpr/static-pic/gpr/gpr-opt.ali
+lib/gpr/static-pic/gpr/gpr-osint.ali
+lib/gpr/static-pic/gpr/gpr-output.ali
+lib/gpr/static-pic/gpr/gpr-part.ali
+lib/gpr/static-pic/gpr/gpr-pp.ali
+lib/gpr/static-pic/gpr/gpr-proc.ali
+lib/gpr/static-pic/gpr/gpr-scans.ali
+lib/gpr/static-pic/gpr/gpr-script.ali
+lib/gpr/static-pic/gpr/gpr-sdefault.ali
+lib/gpr/static-pic/gpr/gpr-sinput.ali
+lib/gpr/static-pic/gpr/gpr-snames.ali
+lib/gpr/static-pic/gpr/gpr-strt.ali
+lib/gpr/static-pic/gpr/gpr-tempdir.ali
+lib/gpr/static-pic/gpr/gpr-tree.ali
+lib/gpr/static-pic/gpr/gpr-util-aux.ali
+lib/gpr/static-pic/gpr/gpr-util.ali
+lib/gpr/static-pic/gpr/gpr-version.ali
+lib/gpr/static-pic/gpr/gpr.ali
+lib/gpr/static-pic/gpr/gpr_build_util.ali
+lib/gpr/static-pic/gpr/libgnatprj.a
+lib/gpr/static/gpr/gpr-ali.ali
+lib/gpr/static/gpr/gpr-attr-pm.ali
+lib/gpr/static/gpr/gpr-attr.ali
+lib/gpr/static/gpr/gpr-com.ali
+lib/gpr/static/gpr/gpr-compilation-process-waiter.ali
+lib/gpr/static/gpr/gpr-compilation-process.ali
+lib/gpr/static/gpr/gpr-compilation-protocol.ali
+lib/gpr/static/gpr/gpr-compilation-slave.ali
+lib/gpr/static/gpr/gpr-compilation-sync.ali
+lib/gpr/static/gpr/gpr-compilation.ali
+lib/gpr/static/gpr/gpr-conf.ali
+lib/gpr/static/gpr/gpr-cset.ali
+lib/gpr/static/gpr/gpr-debug.ali
+lib/gpr/static/gpr/gpr-dect.ali
+lib/gpr/static/gpr/gpr-env.ali
+lib/gpr/static/gpr/gpr-err.ali
+lib/gpr/static/gpr/gpr-erroutc.ali
+lib/gpr/static/gpr/gpr-ext.ali
+lib/gpr/static/gpr/gpr-jobserver.ali
+lib/gpr/static/gpr/gpr-knowledge.ali
+lib/gpr/static/gpr/gpr-names.ali
+lib/gpr/static/gpr/gpr-nmsc.ali
+lib/gpr/static/gpr/gpr-opt.ali
+lib/gpr/static/gpr/gpr-osint.ali
+lib/gpr/static/gpr/gpr-output.ali
+lib/gpr/static/gpr/gpr-part.ali
+lib/gpr/static/gpr/gpr-pp.ali
+lib/gpr/static/gpr/gpr-proc.ali
+lib/gpr/static/gpr/gpr-scans.ali
+lib/gpr/static/gpr/gpr-script.ali
+lib/gpr/static/gpr/gpr-sdefault.ali
+lib/gpr/static/gpr/gpr-sinput.ali
+lib/gpr/static/gpr/gpr-snames.ali
+lib/gpr/static/gpr/gpr-strt.ali
+lib/gpr/static/gpr/gpr-tempdir.ali
+lib/gpr/static/gpr/gpr-tree.ali
+lib/gpr/static/gpr/gpr-util-aux.ali
+lib/gpr/static/gpr/gpr-util.ali
+lib/gpr/static/gpr/gpr-version.ali
+lib/gpr/static/gpr/gpr.ali
+lib/gpr/static/gpr/gpr_build_util.ali
+lib/gpr/static/gpr/libgnatprj.a
+share/gpr/gpr.gpr
+share/gpr/manifests/gpr
diff --git a/gprlib/buildlink3.mk b/gprlib/buildlink3.mk
new file mode 100644
index 0000000000..e84b40d177
--- /dev/null
+++ b/gprlib/buildlink3.mk
@@ -0,0 +1,23 @@
+# $NetBSD: buildlink3.mk,v 1.0 2024/05/06 18:00:00 dkazankov Exp $
+
+BUILDLINK_TREE+=	gprlib
+
+.if !defined(GPRLIB_BUILDLINK3_MK)
+GPRLIB_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.gprlib+=	gprlib>=24.0.0
+BUILDLINK_PKGSRCDIR.gprlib=	../../wip/gprlib
+BUILDLINK_DEPMETHOD.gprlib?=	build
+
+BUILDLINK_AUTO_VARS.gprlib=	no
+BUILDLINK_AUTO_DIRS.gprlib=	no
+
+BUILDLINK_FILES.gprlib=		include/gpr/* lib/gpr/*
+BUILDLINK_FILES.gprlib+=	share/gpr/manifests/gpr share/gpr/gpr.gpr
+
+BUILDLINK_CONTENTS_FILTER.gprlib=	\
+	${EGREP} '(include/.*\.ads$$|lib/.*\.ali$$|lib/.*\.a$$|share/gpr/manifests/.*|share/gpr/.*\.gpr$$|/gpr\.adb$$|/gpr-util-put_resource_usage__unix\.adb$$)'
+
+.endif
+
+BUILDLINK_TREE+=	-gprlib
diff --git a/gprlib/distinfo b/gprlib/distinfo
new file mode 100644
index 0000000000..c1e4ff5e17
--- /dev/null
+++ b/gprlib/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.2 2024/03/19 13:20:35 wiz Exp $
+
+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
+SHA1 (patch-Makefile) = a6fad4177b6537675ca5775c317ad05dbae63c95
+SHA1 (patch-gpr_gpr.gpr) = afabf62f6de4645d4b3c74b5326f5ab9be7ff26a
+SHA1 (patch-gpr_src_gpr-util-put__resource__usage____unix.adb) = c134d5aad0b90da41eef03cd2e5d98e2f14611fb
+SHA1 (patch-gpr_src_gpr-version.ads) = 9321ae482f2f36b9d5a6c96225ae3a7a5e16a7e1
+SHA1 (patch-gpr_src_gpr_imports.c) = 945eefee50b198695ade7a4b88d4f87dd50f7925
diff --git a/gprlib/patches/patch-Makefile b/gprlib/patches/patch-Makefile
new file mode 100644
index 0000000000..ab26c9f32d
--- /dev/null
+++ b/gprlib/patches/patch-Makefile
@@ -0,0 +1,70 @@
+$NetBSD: patch-Makefile,v 1.2 2024/05/08 18:00:00 dkazankov Exp $
+
+Make it possible to set install parameters, fix install parameters, ENABLE_SHARED
+
+--- Makefile.orig	2023-10-09 21:31:11.000000000 +0300
++++ Makefile	2024-05-08 22:24:58.865354615 +0300
+@@ -34,6 +34,9 @@
+ SOURCE_DIR    := $(shell dirname "$(MAKEFILE_LIST)")
+ LIB_DIR       = lib/
+ 
++ENABLE_SHARED := $(shell gprbuild $(GTARGET) -c -q -p \
++	-P$(MAKEPREFIX)config/test_shared 2>/dev/null && echo "yes")
++
+ # Load current setup if any
+ -include makefile.setup
+ 
+@@ -45,6 +48,7 @@
+ GTARGET=--target=$(TARGET)
+ endif
+ 
++GPRINSTALL_OPTIONS=
+ INSTALLER=$(LIB_INSTALLER)
+ EXEC_INSTALLER=$(INSTALLER) -XBUILD=${BUILD}
+ 
+@@ -61,24 +65,21 @@
+ MAKEPREFIX=$(SOURCE_DIR)/
+ endif
+ 
+-ENABLE_SHARED := $(shell gprbuild $(GTARGET) -c -q -p \
+-	-P$(MAKEPREFIX)config/test_shared 2>/dev/null && echo "yes")
+-
+ ifeq ($(ENABLE_SHARED), yes)
+    LIBGPR_TYPES=static shared static-pic
+ else
+-   LIBGPR_TYPES=static
++   LIBGPR_TYPES=static static-pic
+ endif
+ 
+ # Make sure Windows's "OS" environment variable does not cause
+ # confusion for cross-Linux builds.
+-LIBGPR_OS = $(if $(findstring linux,$(TARGET)),-XOS=UNIX)
++LIBGPR_OS = $(if $(or $(findstring linux,$(TARGET)),$(findstring bsd,$(TARGET))),-XOS=UNIX)
+ 
+ # Used to pass extra options to GPRBUILD, like -d for instance
+ GPRBUILD_OPTIONS=
+ 
+ BUILDER=gprbuild -p -m $(GTARGET) $(RBD) -j${PROCESSORS} -XBUILD=${BUILD} ${GPRBUILD_OPTIONS}
+-LIB_INSTALLER=gprinstall -p -f --target=$(TARGET) $(RBD) "--prefix=${prefix}"
++LIB_INSTALLER=gprinstall -p -f $(GTARGET) $(RBD) "--prefix=${prefix}" ${GPRINSTALL_OPTIONS}
+ CLEANER=gprclean -q $(RBD)
+ 
+ GPRBUILD_BUILDER=$(BUILDER) $(GPRBUILD_GPR) \
+@@ -86,7 +87,7 @@
+ LIBGPR_BUILDER=$(BUILDER) $(GPR_GPR) $(LIBGPR_OS)
+ LIBGPR_INSTALLER=$(LIB_INSTALLER) $(GPR_GPR) $(LIBGPR_OS) -XBUILD=${BUILD} \
+ 	--install-name=gpr \
+-	--build-var=LIBRARY_TYPE --build-var=GPR_BUILD $(GTARGET)
++	--build-var=LIBRARY_TYPE --build-var=GPR_BUILD
+ LIBGPR_UNINSTALLER=$(LIB_INSTALLER) $(GPR_GPR) $(LIBGPR_OS) --install-name=gpr --uninstall
+ 
+ #########
+@@ -127,7 +128,7 @@
+ install:
+ 	$(EXEC_INSTALLER) --mode=usage --install-name=gprbuild \
+ 		-XINSTALL_MODE=nointernal $(GPRBUILD_GPR)
+-	$(EXEC_INSTALLER) --target=$(TARGET) --mode=usage  --install-name=gprbuild \
++	$(EXEC_INSTALLER) --mode=usage  --install-name=gprbuild \
+ 		-XINSTALL_MODE=internal $(GPRBUILD_GPR)
+ 
+ complete: all install libgpr.install.static
diff --git a/gprlib/patches/patch-gpr_gpr.gpr b/gprlib/patches/patch-gpr_gpr.gpr
new file mode 100644
index 0000000000..50e223a745
--- /dev/null
+++ b/gprlib/patches/patch-gpr_gpr.gpr
@@ -0,0 +1,30 @@
+$NetBSD: patch-gpr_gpr.gpr,v 1.3 2024/05/07 11:00:00 dkazankov Exp $
+
+Fix name conflict with grpc - same as linux distros
+Fix RELRO
+
+--- gpr/gpr.gpr.orig	2023-10-09 21:31:11.000000000 +0300
++++ gpr/gpr.gpr	2024-05-15 09:39:04.188652027 +0300
+@@ -38,7 +38,7 @@
+ 
+    for Source_Dirs use ("src");
+ 
+-   for Library_Name use "gpr";
++   for Library_Name use "gnatprj";
+    for Object_Dir use "libobj/" & Bld & "/" & Gnat_Lib_Type;
+    for Library_Dir use "lib/" & Bld & "/" & Gnat_Lib_Type;
+ 
+@@ -73,6 +73,13 @@
+             for Switches ("gpr*.ad?") use
+               Compiler'Default_Switches ("Ada") & ("-g1");
+       end case;
++      case Gnat_Lib_Type is
++         when "static" =>
++           null;
++         when "static-pic" | "relocatable" =>
++           for PIC_Option("Ada") use ("-fPIC");
++           for PIC_Option("C") use ("-fPIC");
++      end case;
+    end Compiler;
+ 
+    ------------
diff --git a/gprlib/patches/patch-gpr_src_gpr-util-put__resource__usage____unix.adb b/gprlib/patches/patch-gpr_src_gpr-util-put__resource__usage____unix.adb
new file mode 100644
index 0000000000..ffe988f0ff
--- /dev/null
+++ b/gprlib/patches/patch-gpr_src_gpr-util-put__resource__usage____unix.adb
@@ -0,0 +1,15 @@
+$NetBSD: patch-gpr_src_gpr-util-put__resource__usage____unix.adb,v 1.1 2024/05/07 11:00:00 dkazankov Exp $
+
+Fix warning at link stage on NetBSD
+
+--- 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	2024-05-07 10:36:42.700699231 +0300
+@@ -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/gprlib/patches/patch-gpr_src_gpr-version.ads b/gprlib/patches/patch-gpr_src_gpr-version.ads
new file mode 100644
index 0000000000..5ea2f3ca1f
--- /dev/null
+++ b/gprlib/patches/patch-gpr_src_gpr-version.ads
@@ -0,0 +1,28 @@
+$NetBSD: patch-gpr_src_gpr-version.ads,v 1.1 2024/03/19 13:20:35 wiz Exp $
+
+Fix incorrect version reporting
+
+--- gpr/src/gpr-version.ads.orig	2023-10-09 21:31:11.000000000 +0300
++++ gpr/src/gpr-version.ads	2024-03-19 14:10:13.533689309 +0200
+@@ -30,17 +30,17 @@
+ 
+ package GPR.Version is
+ 
+-   Gpr_Version : constant String := "18.0w";
++   Gpr_Version : constant String := "24.0.0";
+    --  Static string identifying this version
+ 
+-   Date : constant String := "19940713";
++   Date : constant String := "20231113";
+ 
+-   Current_Year : constant String := "2016";
++   Current_Year : constant String := "2023";
+ 
+    type Gnat_Build_Type is (Gnatpro, FSF, GPL);
+    --  See Get_Gnat_Build_Type below for the meaning of these values
+ 
+-   Build_Type : constant Gnat_Build_Type := Gnatpro;
++   Build_Type : constant Gnat_Build_Type := FSF;
+    --  Kind of GNAT Build:
+    --
+    --    FSF
diff --git a/gprlib/patches/patch-gpr_src_gpr_imports.c b/gprlib/patches/patch-gpr_src_gpr_imports.c
new file mode 100644
index 0000000000..a50d7d7791
--- /dev/null
+++ b/gprlib/patches/patch-gpr_src_gpr_imports.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-gpr_src_gpr_imports.c,v 1.1 2024/03/12 17:50:13 wiz Exp $
+
+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
+@@ -64,6 +64,15 @@
+ char __gnat_shared_libgcc_default = STATIC;
+ const char *__gnat_default_libgcc_subdir = "lib";
+ 
++#elif defined(__NetBSD__)
++int __gnat_link_max = 8192;
++char __gnat_shared_libgcc_default = STATIC;
++const char *__gnat_default_libgcc_subdir = "lib";
++#include "sys/resource.h"
++int __netbsd_getrusage(int who, struct rusage *rusage) {
++    return getrusage(who, rusage);
++}
++
+ #elif defined (__APPLE__)
+ int __gnat_link_max = 262144;
+ char __gnat_shared_libgcc_default = SHARED;


Home | Main Index | Thread Index | Old Index