pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/ada-gnatcoll-core-25
Module Name: pkgsrc
Committed By: dkazankov
Date: Tue Oct 7 20:45:11 UTC 2025
Modified Files:
pkgsrc/devel/ada-gnatcoll-core-25: Makefile distinfo
pkgsrc/devel/ada-gnatcoll-core-25/patches: patch-Makefile
patch-core_src_executable__path.c
patch-core_src_os_unix_libc-wrappers.c
Added Files:
pkgsrc/devel/ada-gnatcoll-core-25/patches:
patch-core_gnatcoll__core.gpr.py
patch-core_src_gnatcoll-io-remote-unix.adb
patch-core_src_gnatcoll-utils.adb
patch-core_src_os_gnatcoll-os-fs.adb
patch-core_src_os_gnatcoll-os-fsutil.adb
patch-core_src_os_unix_gnatcoll-os-libc.ads
patch-core_src_os_unix_gnatcoll-os-libc__constants____bsd.ads
patch-core_src_os_unix_gnatcoll-os-libc__constants____linux.ads
patch-core_src_os_unix_gnatcoll-os-libc__constants____osx.ads
patch-testsuite_drivers_build__run__diff.py
patch-testsuite_run-tests
patch-testsuite_tests_opt__parse_help__whitespace_help__120__wrap_test.sh
patch-testsuite_tests_opt__parse_help__whitespace_help__80__wrap_test.sh
patch-testsuite_tests_opt__parse_help__whitespace_help__long__arg_test.sh
patch-testsuite_tests_opt__parse_help__whitespace_help__short__arg_test.sh
patch-testsuite_tests_opt__parse_usage_test.sh
patch-testsuite_tests_os_fsutil_others_test.yaml
Log Message:
ada-gnatcoll-core-25: bug fixing
* Add tests support
* Many (not all) NetBSD port bugs fixed after tests:
PASS 431
FAIL 16
SKIP 1
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/ada-gnatcoll-core-25/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/ada-gnatcoll-core-25/distinfo
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-Makefile
cvs rdiff -u -r0 -r1.1 \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_gnatcoll__core.gpr.py \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_gnatcoll-io-remote-unix.adb \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_gnatcoll-utils.adb \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_gnatcoll-os-fs.adb \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_gnatcoll-os-fsutil.adb \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc.ads \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc__constants____bsd.ads \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc__constants____linux.ads \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc__constants____osx.ads \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_drivers_build__run__diff.py \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_run-tests \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__120__wrap_test.sh \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__80__wrap_test.sh \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__long__arg_test.sh \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__short__arg_test.sh \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_usage_test.sh \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_os_fsutil_others_test.yaml
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_executable__path.c \
pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_libc-wrappers.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/ada-gnatcoll-core-25/Makefile
diff -u pkgsrc/devel/ada-gnatcoll-core-25/Makefile:1.4 pkgsrc/devel/ada-gnatcoll-core-25/Makefile:1.5
--- pkgsrc/devel/ada-gnatcoll-core-25/Makefile:1.4 Sat Sep 13 05:25:00 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/Makefile Tue Oct 7 20:45:10 2025
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.4 2025/09/13 05:25:00 dkazankov Exp $
+# $NetBSD: Makefile,v 1.5 2025/10/07 20:45:10 dkazankov Exp $
DISTNAME= ${GITHUB_PROJECT}-${PKGVERSION_NOREV}
PKGNAME= ${GITHUB_PROJECT}-${GNAT_NAME}-25.0.0
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GITHUB:=AdaCore/}
GITHUB_PROJECT= gnatcoll-core
@@ -36,9 +36,16 @@ SUBST_MESSAGE.opendir= Replace opendir w
SUBST_STAGE.opendir= post-extract
SUBST_FILES.opendir= core/src/os/unix/gnatcoll-os-libc-dirent.ads
SUBST_SED.opendir= -e "s,\"opendir\",\"__gnatcoll_opendir\","
+
+SUBST_CLASSES+= unix
+SUBST_MESSAGE.unix= Use BSD implementation in ${SUBST_FILES.const}
+SUBST_STAGE.unix= post-extract
+SUBST_FILES.unix= core/gnatcoll_core.gpr
+SUBST_SED.unix= -e "s,\"gnatcoll-os-libc_constants__linux.ads\",\"gnatcoll-os-libc_constants__bsd.ads\","
+#SUBST_SED.unix+= -e "s,\"gnatcoll-os-fs-open_pipe__linux.adb\",\"gnatcoll-os-fs-open_pipe__unix.adb\","
.endif
-MAKE_FLAGS+= PYTHON=${PYTHONBIN:Q} prefix=${DESTDIR}${GNAT_PREFIX} BUILD=PROD
+MAKE_FLAGS+= PYTHON=${TOOL_PYTHONBIN:Q} prefix=${DESTDIR}${GNAT_PREFIX} BUILD=PROD
PLIST_VARS+= shlibs
@@ -52,6 +59,12 @@ BUILDLINK_DEPMETHOD.libgpr-25= full
MAKE_FLAGS+= ENABLE_SHARED=no
.endif
+TEST_TARGET= test
+TEST_ENV+= PYTHON_EXEC_PATH=${TOOL_PYTHONBIN:Q}
+
+TEST_DEPENDS+= ${PYPKGPREFIX}-e3-core>=22.6.0:../../devel/py-e3-core
+TEST_DEPENDS+= ${PYPKGPREFIX}-e3-testsuite>=25.0:../../devel/py-e3-testsuite
+
pre-install:
${RUN} ${MKDIR} ${DESTDIR}${GNAT_PREFIX}
Index: pkgsrc/devel/ada-gnatcoll-core-25/distinfo
diff -u pkgsrc/devel/ada-gnatcoll-core-25/distinfo:1.2 pkgsrc/devel/ada-gnatcoll-core-25/distinfo:1.3
--- pkgsrc/devel/ada-gnatcoll-core-25/distinfo:1.2 Sat Sep 13 05:25:00 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/distinfo Tue Oct 7 20:45:10 2025
@@ -1,11 +1,28 @@
-$NetBSD: distinfo,v 1.2 2025/09/13 05:25:00 dkazankov Exp $
+$NetBSD: distinfo,v 1.3 2025/10/07 20:45:10 dkazankov Exp $
BLAKE2s (gnatcoll-core-25.0.0.tar.gz) = 4e3053b10a27ea4bd4fc1c8ba2e8ab936087507f8969e9c71b33c0fbb5a81a4c
SHA512 (gnatcoll-core-25.0.0.tar.gz) = efa19b9760bd16b402445d4932dfd28f087f9a09b91ec688c6976b7b83fe5986580b1871378ac024e9a712df8ee75963e5dc88629a72ee1ce76f1d1403b8e122
Size (gnatcoll-core-25.0.0.tar.gz) = 7492612 bytes
-SHA1 (patch-Makefile) = febed9b664ee7b30877e8d68a757a96d9a09ab0a
-SHA1 (patch-core_src_executable__path.c) = a4105333ea497cae722b2870149725f69de2dbe9
-SHA1 (patch-core_src_os_unix_libc-wrappers.c) = 322ecd62a2b35febec07f1195b4cfd2f098a2556
+SHA1 (patch-Makefile) = 368a8d92b314cd9ac3fadf55fdd4bff868dd8881
+SHA1 (patch-core_gnatcoll__core.gpr.py) = 6fa74d0a60b65183ba01a598683d5d56cf66db28
+SHA1 (patch-core_src_executable__path.c) = fa1c8e31c771c03d7a13ec94788ce8c399e093a4
+SHA1 (patch-core_src_gnatcoll-io-remote-unix.adb) = 2eb47b2f4976b3bf9fc38e520494a7ee5627d2e9
+SHA1 (patch-core_src_gnatcoll-utils.adb) = 0132adddc2d5ee9196d9282ec8732240e46088ae
+SHA1 (patch-core_src_os_gnatcoll-os-fs.adb) = b4a807f3b4ca3dde7afaf027552c34cd78742023
+SHA1 (patch-core_src_os_gnatcoll-os-fsutil.adb) = 1d82de2f8add2952c25574babd690830da4f668d
+SHA1 (patch-core_src_os_unix_gnatcoll-os-libc.ads) = 18132b0d83dea64676e6bfe364ec1be69a58238f
+SHA1 (patch-core_src_os_unix_gnatcoll-os-libc__constants____bsd.ads) = b32dcd66a0563e287e2d0f8eaeb54d82bdbb783a
+SHA1 (patch-core_src_os_unix_gnatcoll-os-libc__constants____linux.ads) = bbf6596fa6138814f61530268a9c88b378282239
+SHA1 (patch-core_src_os_unix_gnatcoll-os-libc__constants____osx.ads) = 0e9b2eec720463b9c78694078535ac17a8ff6548
+SHA1 (patch-core_src_os_unix_libc-wrappers.c) = c50cd2fce34132015375d7c751841d451d597e46
SHA1 (patch-core_src_os_unix_process-wrappers.c) = ef3696e8098b9ca434a83093aa53698c578fd0cc
SHA1 (patch-gprproject_____init____.py) = ac5ac38f93b4b6e11627aecc2cca84e3d3d6c4e6
SHA1 (patch-gprproject_gprbuild.py) = 96bbf5565e72465da06e53c1eb38c81f1e3c3af7
+SHA1 (patch-testsuite_drivers_build__run__diff.py) = baea59b1e0982fa159c30412ba004886c75c3254
+SHA1 (patch-testsuite_run-tests) = c20507e20779125377e5822b6d04c2e73fd5b84a
+SHA1 (patch-testsuite_tests_opt__parse_help__whitespace_help__120__wrap_test.sh) = f73697d59210320473f5d82b6c220074a27bbddb
+SHA1 (patch-testsuite_tests_opt__parse_help__whitespace_help__80__wrap_test.sh) = a3823b055ad6917fa713be83aa8c18b27acee98d
+SHA1 (patch-testsuite_tests_opt__parse_help__whitespace_help__long__arg_test.sh) = 5959ac5ebb6515334ea08f3f53f67ce559bed4f6
+SHA1 (patch-testsuite_tests_opt__parse_help__whitespace_help__short__arg_test.sh) = 28b11167d8516c0ad24d818b30181240ec85a66e
+SHA1 (patch-testsuite_tests_opt__parse_usage_test.sh) = 59d35040c87c3279d6dd2e725b04b31457ca9e13
+SHA1 (patch-testsuite_tests_os_fsutil_others_test.yaml) = 1d58ec71a37117d9b70081669c88a660e11ca89e
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-Makefile
diff -u pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-Makefile:1.2 pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-Makefile:1.3
--- pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-Makefile:1.2 Sat Sep 13 05:25:01 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-Makefile Tue Oct 7 20:45:10 2025
@@ -1,9 +1,10 @@
-$NetBSD: patch-Makefile,v 1.2 2025/09/13 05:25:01 dkazankov Exp $
+$NetBSD: patch-Makefile,v 1.3 2025/10/07 20:45:10 dkazankov Exp $
Fix target calculation
Add necessary parameters for pkgsrc build
Fix gnatcoll.gpr installation
Fix destdir building in rsync absence
+Make test target
--- Makefile.orig 2024-09-24 12:28:32.000000000 +0300
+++ Makefile
@@ -16,7 +17,15 @@ Fix destdir building in rsync absence
ifeq ($(NORMALIZED_TARGET),)
$(error No toolchain found for target "$(TARGET)")
endif
-@@ -98,8 +98,13 @@
+@@ -75,6 +75,7 @@
+ ENABLE_SHARED = yes
+ INTEGRATED = no
+ GNATCOV =
++TESTSUITE_DIR := $(shell pwd)/testsuite
+
+ all: build
+
+@@ -98,8 +99,13 @@
--build=$(BUILD) \
--target=$(NORMALIZED_TARGET) \
--prefix=local-install \
@@ -32,7 +41,7 @@ Fix destdir building in rsync absence
build:
rm -rf local-install
-@@ -112,18 +117,23 @@
+@@ -112,18 +118,28 @@
endif
$(PYTHON) $(SOURCE_DIR)/minimal/gnatcoll_minimal.gpr.py build $(INSTR_BUILD_OPTS) $(BUILD_ARGS)
@@ -54,6 +63,11 @@ Fix destdir building in rsync absence
@echo "Installing gnatcoll into $(prefix)"
- rsync -av ./local-install/ $(prefix)$(integrated_install)
+ cp -r ./local-install/* $(prefix)$(integrated_install)
++
++test:
++ $(PYTHON) testsuite/run-tests --recompile \
++ -t $(TESTSUITE_DIR)/temp -d $(TESTSUITE_DIR)/dest -o $(TESTSUITE_DIR)/out \
++ --no-random-temp-subdir --cleanup-mode none --show-error-output
###########
# Cleanup #
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_executable__path.c
diff -u pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_executable__path.c:1.1 pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_executable__path.c:1.2
--- pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_executable__path.c:1.1 Thu Jul 10 18:52:41 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_executable__path.c Tue Oct 7 20:45:10 2025
@@ -1,4 +1,4 @@
-$NetBSD: patch-core_src_executable__path.c,v 1.1 2025/07/10 18:52:41 dkazankov Exp $
+$NetBSD: patch-core_src_executable__path.c,v 1.2 2025/10/07 20:45:10 dkazankov Exp $
Add NetBSD support
@@ -9,7 +9,7 @@ Add NetBSD support
}
-#elif defined (__linux__)
-+#elif defined (__linux__) || defined (__NetBSD__)
++#elif defined (__linux__) || defined (__unix__)
/* Linux implementation */
#include <unistd.h>
int
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_libc-wrappers.c
diff -u pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_libc-wrappers.c:1.1 pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_libc-wrappers.c:1.2
--- pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_libc-wrappers.c:1.1 Thu Jul 10 18:52:41 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_libc-wrappers.c Tue Oct 7 20:45:11 2025
@@ -1,10 +1,19 @@
-$NetBSD: patch-core_src_os_unix_libc-wrappers.c,v 1.1 2025/07/10 18:52:41 dkazankov Exp $
+$NetBSD: patch-core_src_os_unix_libc-wrappers.c,v 1.2 2025/10/07 20:45:11 dkazankov Exp $
Fix linker version warning on NetBSD
Add NetBSD support
--- core/src/os/unix/libc-wrappers.c.orig 2024-09-24 12:28:32.000000000 +0300
+++ core/src/os/unix/libc-wrappers.c
+@@ -365,7 +365,7 @@
+ */
+ int __gnatcoll_pipe(int* fds)
+ {
+-#if defined(__linux__) && defined(O_CLOEXEC)
++#if (defined(__linux__) || defined(__NetBSD__)) && defined(O_CLOEXEC)
+ return pipe2(fds, O_CLOEXEC);
+ #else
+ return pipe(fds);
@@ -400,6 +400,13 @@
char name[GNATCOLL_DIRENT_NAME_MAX];
};
Added files:
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_gnatcoll__core.gpr.py
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_gnatcoll__core.gpr.py:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_gnatcoll__core.gpr.py Tue Oct 7 20:45:10 2025
@@ -0,0 +1,24 @@
+$NetBSD: patch-core_gnatcoll__core.gpr.py,v 1.1 2025/10/07 20:45:10 dkazankov Exp $
+
+Add NetBSD support
+
+--- core/gnatcoll_core.gpr.py.orig 2024-09-24 12:28:32.000000000 +0300
++++ core/gnatcoll_core.gpr.py
+@@ -40,6 +40,8 @@
+ # Compute which implementation should be used for blake3
+ if gpr.target in ("x86_64-linux", "aarch64-linux", "x86_64-windows"):
+ blake3_arch = gpr.target
++ elif gpr.target in ("x86_64-netbsd"):
++ blake3_arch = "x86_64-linux"
+ else:
+ blake3_arch = "generic"
+
+@@ -47,7 +49,7 @@
+ gpr.set_variable("GNATCOLL_BLAKE3_ARCH", blake3_arch)
+
+ # Compute which implementation should be used for xxhash
+- if gpr.target in ("x86_64-linux", "x86_64-windows"):
++ if gpr.target in ("x86_64-linux", "x86_64-windows", "x86_64-netbsd"):
+ xxhash_arch = "x86_64"
+ else:
+ xxhash_arch = "generic"
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_gnatcoll-io-remote-unix.adb
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_gnatcoll-io-remote-unix.adb:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_gnatcoll-io-remote-unix.adb Tue Oct 7 20:45:10 2025
@@ -0,0 +1,25 @@
+$NetBSD: patch-core_src_gnatcoll-io-remote-unix.adb,v 1.1 2025/10/07 20:45:10 dkazankov Exp $
+
+Unportable fix - most close BSD variant is -T
+BSD variant is -R, Linux also understands it
+
+--- core/src/gnatcoll-io-remote-unix.adb.orig 2024-09-24 12:28:32.000000000 +0300
++++ core/src/gnatcoll-io-remote-unix.adb
+@@ -295,7 +295,7 @@
+ Args : GNAT.OS_Lib.Argument_List :=
+ (new String'("ls"),
+ new String'("-l"),
+- new String'("--time-style=full-iso"),
++ new String'("-T"),
+ new String'("""" & String (File) & """"),
+ new String'("2>"),
+ new String'("/dev/null"));
+@@ -755,7 +755,7 @@
+ is
+ Args : GNAT.OS_Lib.Argument_List :=
+ (new String'("cp"),
+- new String'("-rf"),
++ new String'("-Rf"),
+ new String'("'" & String (From) & "'"),
+ new String'("'" & String (Dest) & "'"));
+
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_gnatcoll-utils.adb
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_gnatcoll-utils.adb:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_gnatcoll-utils.adb Tue Oct 7 20:45:10 2025
@@ -0,0 +1,16 @@
+$NetBSD: patch-core_src_gnatcoll-utils.adb,v 1.1 2025/10/07 20:45:10 dkazankov Exp $
+
+Fix empty output on poll
+
+--- core/src/gnatcoll-utils.adb.orig 2024-09-24 12:28:32.000000000 +0300
++++ core/src/gnatcoll-utils.adb
+@@ -638,7 +638,8 @@
+ -- This loop runs until the call to Expect raises Process_Died
+
+ loop
+- Expect (Command.all, Result, ".+", Timeout => -1);
++ Expect (Command.all, Result, ".+", Timeout => -1,
++ Full_Buffer => True);
+
+ declare
+ NOutput : String_Access;
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_gnatcoll-os-fs.adb
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_gnatcoll-os-fs.adb:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_gnatcoll-os-fs.adb Tue Oct 7 20:45:10 2025
@@ -0,0 +1,33 @@
+$NetBSD: patch-core_src_os_gnatcoll-os-fs.adb,v 1.1 2025/10/07 20:45:10 dkazankov Exp $
+
+Fix portability
+
+--- core/src/os/gnatcoll-os-fs.adb.orig 2024-09-24 12:28:32.000000000 +0300
++++ core/src/os/gnatcoll-os-fs.adb
+@@ -80,7 +80,7 @@
+ Result : Integer;
+ begin
+ Result := Unsafe_Read (FD, Buffer (Buffer'First)'Address, Buffer'Length);
+- if Result < 0 then
++ if Result = -1 then
+ raise OS_Error with "read error";
+ end if;
+
+@@ -109,7 +109,7 @@
+
+ Result := C_Read (FD, Buffer (First)'Address, size_t (Last - First + 1));
+
+- if Result < 0 then
++ if Result = -1 then
+ raise OS_Error with "read error";
+ end if;
+
+@@ -201,7 +201,7 @@
+ begin
+ Result := C_Write (FD, Buffer (Buffer'First)'Address, Buffer'Length);
+
+- if Result < 0 then
++ if Result = -1 then
+ raise OS_Error with "write error";
+ end if;
+
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_gnatcoll-os-fsutil.adb
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_gnatcoll-os-fsutil.adb:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_gnatcoll-os-fsutil.adb Tue Oct 7 20:45:10 2025
@@ -0,0 +1,28 @@
+$NetBSD: patch-core_src_os_gnatcoll-os-fsutil.adb,v 1.1 2025/10/07 20:45:10 dkazankov Exp $
+
+There is no point in continuing if this is a directory.
+It also doesn't work correctly on NetBSD.
+
+--- core/src/os/gnatcoll-os-fsutil.adb.orig 2024-09-24 12:28:32.000000000 +0300
++++ core/src/os/gnatcoll-os-fsutil.adb
+@@ -71,6 +71,7 @@
+ return Result_Type
+ is
+ FD : FS.File_Descriptor;
++ FA : File_Attributes;
+ Context : State_Type;
+ N : Integer;
+ Buffer : String_Access;
+@@ -84,6 +85,12 @@
+ raise OS_Error with "Failed to open " & String (Path);
+ end if;
+
++ FA := Fstat (FD);
++ if Is_Directory (FA) then
++ FS.Close (FD);
++ raise OS_Error with String (Path) & " is a directory";
++ end if;
++
+ Buffer := new String (1 .. Buffer_Size);
+
+ begin
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc.ads
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc.ads:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc.ads Tue Oct 7 20:45:11 2025
@@ -0,0 +1,52 @@
+$NetBSD: patch-core_src_os_unix_gnatcoll-os-libc.ads,v 1.1 2025/10/07 20:45:11 dkazankov Exp $
+
+Use separate package for constants definition
+
+--- core/src/os/unix/gnatcoll-os-libc.ads.orig 2024-09-24 12:28:32.000000000 +0300
++++ core/src/os/unix/gnatcoll-os-libc.ads
+@@ -157,19 +157,17 @@
+ -- See POSIX posix_fadvise function. Note that on some platforms such as
+ -- MacOS, the function does nothing as the underlying system call does not
+ -- exist.
+- type Posix_Fadvise_Code is
+- (POSIX_FADV_NORMAL,
+- POSIX_FADV_SEQUENTIAL,
+- POSIX_FADV_RANDOM,
+- POSIX_FADV_NOREUSE,
+- POSIX_FADV_WILLNEED);
+- for Posix_Fadvise_Code'Size use Integer'Size;
+- for Posix_Fadvise_Code use
+- (POSIX_FADV_NORMAL => 0,
+- POSIX_FADV_SEQUENTIAL => 1,
+- POSIX_FADV_RANDOM => 2,
+- POSIX_FADV_NOREUSE => 3,
+- POSIX_FADV_WILLNEED => 4);
++ type Posix_Fadvise_Code is new Integer;
++ POSIX_FADV_NORMAL : constant Posix_Fadvise_Code :=
++ Constants.POSIX_FADV_NORMAL;
++ POSIX_FADV_SEQUENTIAL : constant Posix_Fadvise_Code :=
++ Constants.POSIX_FADV_SEQUENTIAL;
++ POSIX_FADV_RANDOM : constant Posix_Fadvise_Code :=
++ Constants.POSIX_FADV_RANDOM;
++ POSIX_FADV_NOREUSE : constant Posix_Fadvise_Code :=
++ Constants.POSIX_FADV_NOREUSE;
++ POSIX_FADV_WILLNEED : constant Posix_Fadvise_Code :=
++ Constants.POSIX_FADV_WILLNEED;
+
+ function Posix_Fadvise
+ (FD : FS.File_Descriptor;
+@@ -246,11 +244,11 @@
+ Convention => C,
+ External_Name => "waitpid";
+
+- EPERM : constant Integer := 1;
++ EPERM : constant Integer := Constants.EPERM;
+ -- EPERM is set to 1 on all supported system
+
+- EINVAL : constant Integer := 22;
+- ENOSYS : constant Integer := 38;
++ EINVAL : constant Integer := Constants.EINVAL;
++ ENOSYS : constant Integer := Constants.ENOSYS;
+
+ function Errno return Integer
+ with Import => True,
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc__constants____bsd.ads
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc__constants____bsd.ads:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc__constants____bsd.ads Tue Oct 7 20:45:11 2025
@@ -0,0 +1,36 @@
+$NetBSD: patch-core_src_os_unix_gnatcoll-os-libc__constants____bsd.ads,v 1.1 2025/10/07 20:45:11 dkazankov Exp $
+
+Add NetBSD support
+
+--- /dev/null
++++ core/src/os/unix/gnatcoll-os-libc_constants__bsd.ads
+@@ -0,0 +1,29 @@
++-- SPDX-License-Identifier: BSD-2-Clause
++-- : OR GPL-3.0-or-later WITH GCC-exception-3.1
++-- Copyright (C) 2025, dkazankov%NetBSD.org@localhost
++
++package GNATCOLL.OS.Libc_Constants is
++
++ -- sys/fcntl.h
++ O_RDONLY : constant := 16#00000000#;
++ O_WRONLY : constant := 16#00000001#;
++ O_RDWR : constant := 16#00000002#;
++ O_NONBLOCK : constant := 16#00000004#;
++ O_APPEND : constant := 16#00000008#;
++ O_CREAT : constant := 16#00000200#;
++ O_TRUNC : constant := 16#00000400#;
++ O_EXCL : constant := 16#00000800#;
++ O_NOCTTY : constant := 16#00008000#;
++ O_CLOEXEC : constant := 16#00400000#;
++
++ POSIX_FADV_NORMAL : constant := 0;
++ POSIX_FADV_SEQUENTIAL : constant := 2;
++ POSIX_FADV_RANDOM : constant := 1;
++ POSIX_FADV_NOREUSE : constant := 5;
++ POSIX_FADV_WILLNEED : constant := 3;
++
++ EPERM : constant := 1;
++ EINVAL : constant := 22;
++ ENOSYS : constant := 78;
++
++end GNATCOLL.OS.Libc_Constants;
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc__constants____linux.ads
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc__constants____linux.ads:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc__constants____linux.ads Tue Oct 7 20:45:11 2025
@@ -0,0 +1,21 @@
+$NetBSD: patch-core_src_os_unix_gnatcoll-os-libc__constants____linux.ads,v 1.1 2025/10/07 20:45:11 dkazankov Exp $
+
+Add Linux constants definition
+
+--- core/src/os/unix/gnatcoll-os-libc_constants__linux.ads.orig 2024-09-24 12:28:32.000000000 +0300
++++ core/src/os/unix/gnatcoll-os-libc_constants__linux.ads
+@@ -35,4 +35,14 @@
+ O_NONBLOCK : constant := 8#00004000#;
+ O_CLOEXEC : constant := 8#02000000#;
+
++ POSIX_FADV_NORMAL : constant := 0;
++ POSIX_FADV_SEQUENTIAL : constant := 1;
++ POSIX_FADV_RANDOM : constant := 2;
++ POSIX_FADV_NOREUSE : constant := 3;
++ POSIX_FADV_WILLNEED : constant := 4;
++
++ EPERM : constant := 1;
++ EINVAL : constant := 22;
++ ENOSYS : constant := 38;
++
+ end GNATCOLL.OS.Libc_Constants;
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc__constants____osx.ads
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc__constants____osx.ads:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-core_src_os_unix_gnatcoll-os-libc__constants____osx.ads Tue Oct 7 20:45:11 2025
@@ -0,0 +1,39 @@
+$NetBSD: patch-core_src_os_unix_gnatcoll-os-libc__constants____osx.ads,v 1.1 2025/10/07 20:45:11 dkazankov Exp $
+
+Add MacOS constants definition
+
+--- core/src/os/unix/gnatcoll-os-libc_constants__osx.ads.orig 2024-09-24 12:28:32.000000000 +0300
++++ core/src/os/unix/gnatcoll-os-libc_constants__osx.ads
+@@ -24,14 +24,24 @@
+ package GNATCOLL.OS.Libc_Constants is
+
+ O_RDONLY : constant := 16#0000#;
+- O_WRONLY : constant := 16#0000#;
++ O_WRONLY : constant := 16#0001#;
+ O_RDWR : constant := 16#0002#;
+- O_NONBLOCK : constant := 16#0004#;
+- O_APPEND : constant := 16#0008#;
+- O_CREAT : constant := 16#0200#;
+- O_TRUNC : constant := 16#0400#;
+- O_EXCL : constant := 16#0800#;
+- O_NOCTTY : constant := 16#20000#;
+- O_CLOEXEC : constant := 16#1000000#;
++ O_NONBLOCK : constant := 16#00000004#;
++ O_APPEND : constant := 16#00000008#;
++ O_CREAT : constant := 16#00000200#;
++ O_TRUNC : constant := 16#00000400#;
++ O_EXCL : constant := 16#00000800#;
++ O_NOCTTY : constant := 16#00020000#;
++ O_CLOEXEC : constant := 16#01000000#;
++
++ POSIX_FADV_NORMAL : constant := 0;
++ POSIX_FADV_SEQUENTIAL : constant := 2;
++ POSIX_FADV_RANDOM : constant := 1;
++ POSIX_FADV_NOREUSE : constant := 5;
++ POSIX_FADV_WILLNEED : constant := 3;
++
++ EPERM : constant := 1;
++ EINVAL : constant := 22;
++ ENOSYS : constant := 78;
+
+ end GNATCOLL.OS.Libc_Constants;
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_drivers_build__run__diff.py
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_drivers_build__run__diff.py:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_drivers_build__run__diff.py Tue Oct 7 20:45:11 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-testsuite_drivers_build__run__diff.py,v 1.1 2025/10/07 20:45:11 dkazankov Exp $
+
+There is no shell other than bash ;-)
+
+--- testsuite/drivers/build_run_diff.py.orig 2024-09-24 12:28:32.000000000 +0300
++++ testsuite/drivers/build_run_diff.py
+@@ -82,7 +82,7 @@
+ else:
+ p = run_test_program(
+ self,
+- ["bash", self.working_dir("test.sh")],
++ ["/bin/sh", self.working_dir("test.sh")],
+ self.slot,
+ timeout=self.default_process_timeout,
+ )
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_run-tests
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_run-tests:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_run-tests Tue Oct 7 20:45:11 2025
@@ -0,0 +1,14 @@
+$NetBSD: patch-testsuite_run-tests,v 1.1 2025/10/07 20:45:11 dkazankov Exp $
+
+Fix GPR project path
+
+--- testsuite/run-tests.orig 2024-09-24 12:28:32.000000000 +0300
++++ testsuite/run-tests
+@@ -89,6 +89,7 @@
+ work_dir = os.path.join(TESTSUITE_ROOT_DIR, 'debug')
+ gpr_dir, _, _ = make_gnatcoll(work_dir, debug=True)
+ self.env.gnatcoll_debug_gpr_dir = gpr_dir
++ self.env.gnatcoll_gpr_dir = gpr_dir
+
+ def tear_down(self):
+ wd = TESTSUITE_ROOT_DIR
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__120__wrap_test.sh
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__120__wrap_test.sh:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__120__wrap_test.sh Tue Oct 7 20:45:11 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-testsuite_tests_opt__parse_help__whitespace_help__120__wrap_test.sh,v 1.1 2025/10/07 20:45:11 dkazankov Exp $
+
+NetBSD's grep does not support PCRE
+
+--- testsuite/tests/opt_parse/help_whitespace/help_120_wrap/test.sh.orig 2024-09-24 12:28:32.000000000 +0300
++++ testsuite/tests/opt_parse/help_whitespace/help_120_wrap/test.sh
+@@ -3,7 +3,7 @@
+ ./test --help > $STDOUT
+
+ # Check that the help message is structured as expected
+-if grep -q -P ".{81,}" $STDOUT; then
++if grep -q -E "^.{81,}$" $STDOUT; then
+ # Confirm that when permitted, the help text can exceed the previous 80
+ # character limit without wrapping.
+ echo "Help text doesn't wrap at 80 characters when permitted, as expected"
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__80__wrap_test.sh
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__80__wrap_test.sh:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__80__wrap_test.sh Tue Oct 7 20:45:11 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-testsuite_tests_opt__parse_help__whitespace_help__80__wrap_test.sh,v 1.1 2025/10/07 20:45:11 dkazankov Exp $
+
+NetBSD's grep does not support PCRE
+
+--- testsuite/tests/opt_parse/help_whitespace/help_80_wrap/test.sh.orig 2024-09-24 12:28:32.000000000 +0300
++++ testsuite/tests/opt_parse/help_whitespace/help_80_wrap/test.sh
+@@ -3,7 +3,7 @@
+ ./test --help > $STDOUT
+
+ # Check that the help message is structured as expected
+-if ! grep -q -P ".{81,}" $STDOUT; then
++if ! grep -q -E "^.{81,}$" $STDOUT; then
+ # Confirm that help text wraps at the 80 character limit as expected
+ echo "Help text wrapped at 80 characters as expected"
+ fi
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__long__arg_test.sh
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__long__arg_test.sh:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__long__arg_test.sh Tue Oct 7 20:45:11 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-testsuite_tests_opt__parse_help__whitespace_help__long__arg_test.sh,v 1.1 2025/10/07 20:45:11 dkazankov Exp $
+
+NetBSD's grep does not support PCRE
+
+--- testsuite/tests/opt_parse/help_whitespace/help_long_arg/test.sh.orig 2024-09-24 12:28:32.000000000 +0300
++++ testsuite/tests/opt_parse/help_whitespace/help_long_arg/test.sh
+@@ -3,7 +3,7 @@
+ ./test --help > $STDOUT
+
+ # Check that the help message is structured as expected
+-if grep -q -P "( ){20,}" $STDOUT; then
++if grep -q -E "^( ){20,}" $STDOUT; then
+ # Opposite to help_short_80. There should be more than 20 spaces, which
+ # was the previous limit after a single character arg like "-c" and a
+ # fixed 25 character column
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__short__arg_test.sh
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__short__arg_test.sh:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_help__whitespace_help__short__arg_test.sh Tue Oct 7 20:45:11 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-testsuite_tests_opt__parse_help__whitespace_help__short__arg_test.sh,v 1.1 2025/10/07 20:45:11 dkazankov Exp $
+
+NetBSD's grep does not support PCRE
+
+--- testsuite/tests/opt_parse/help_whitespace/help_short_arg/test.sh.orig 2024-09-24 12:28:32.000000000 +0300
++++ testsuite/tests/opt_parse/help_whitespace/help_short_arg/test.sh
+@@ -3,7 +3,7 @@
+ ./test --help > $STDOUT
+
+ # Check that the help message is structured as expected
+-if ! grep -q -P "( ){4,}" $STDOUT; then
++if ! grep -q -E "^( ){4,}" $STDOUT; then
+ # The biggest whitespace should be the three characters before optional
+ # arguments as "--help, -h" and "--char, -C" are the same lenght, and
+ # while they are less than 25 characters, the column number the help
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_usage_test.sh
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_usage_test.sh:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_opt__parse_usage_test.sh Tue Oct 7 20:45:11 2025
@@ -0,0 +1,40 @@
+$NetBSD: patch-testsuite_tests_opt__parse_usage_test.sh,v 1.1 2025/10/07 20:45:11 dkazankov Exp $
+
+NetBSD's grep does not support PCRE
+
+--- testsuite/tests/opt_parse/usage/test.sh.orig 2024-09-24 12:28:32.000000000 +0300
++++ testsuite/tests/opt_parse/usage/test.sh
+@@ -8,27 +8,27 @@
+ python parse_output.py
+
+ # Check that the help text contains updated usage information
+-if grep -P -q "\[--charset\|-C <charset name>\]" $STDOUT; then
++if grep -q -E "\[--charset\|-C <charset name>\]" $STDOUT; then
+ echo "stdout contained new usage text for option"
+ fi
+
+-if grep -P -q "\[--day\|-D <three letter day of week>\]" $STDOUT; then
++if grep -q -E "\[--day\|-D <three letter day of week>\]" $STDOUT; then
+ echo "stdout contained new usage text for enum option"
+ fi
+
+-if grep -P -q "\[--files\|-F <list of filepaths to parse>\]" $STDOUT; then
++if grep -q -E "\[--files\|-F <list of filepaths to parse>\]" $STDOUT; then
+ echo "stdout contained new usage text for option list"
+ fi
+
+ # Check that the help text contains default usage information
+-if grep -P -q "\[--charset2\|-C2 CHARSET2\]" $STDOUT; then
++if grep -q -E "\[--charset2\|-C2 CHARSET2\]" $STDOUT; then
+ echo "stdout contained default usage text for option"
+ fi
+
+-if grep -P -q "\[--day2\|-D2 DAY2\]" $STDOUT; then
++if grep -q -E "\[--day2\|-D2 DAY2\]" $STDOUT; then
+ echo "stdout contained default usage text for enum option"
+ fi
+
+-if grep -P -q "\[--files2\|-F2 FILES2 \[FILES2...\]\]" $STDOUT; then
++if grep -q -E "\[--files2\|-F2 FILES2 \[FILES2...\]\]" $STDOUT; then
+ echo "stdout contained default usage text for option list"
+ fi
Index: pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_os_fsutil_others_test.yaml
diff -u /dev/null pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_os_fsutil_others_test.yaml:1.1
--- /dev/null Tue Oct 7 20:45:11 2025
+++ pkgsrc/devel/ada-gnatcoll-core-25/patches/patch-testsuite_tests_os_fsutil_others_test.yaml Tue Oct 7 20:45:11 2025
@@ -0,0 +1,13 @@
+$NetBSD: patch-testsuite_tests_os_fsutil_others_test.yaml,v 1.1 2025/10/07 20:45:11 dkazankov Exp $
+
+Increase default timeout value (300 sec) for this test
+
+--- testsuite/tests/os/fsutil/others/test.yaml.orig 2024-09-24 12:28:32.000000000 +0300
++++ testsuite/tests/os/fsutil/others/test.yaml
+@@ -1,4 +1,5 @@
+ title: GNATCOLL.OS.FSUtil test
++timeout: 600
+ data: ["data.txt"]
+ control:
+ - [SKIP, "env.is_cross", "Test uses python which is not available on cross targets"]
+\ No newline at end of file
Home |
Main Index |
Thread Index |
Old Index