[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
71/89: gnu: doxygen: Fix build for the Hurd.
From: |
guix-commits |
Subject: |
71/89: gnu: doxygen: Fix build for the Hurd. |
Date: |
Tue, 20 Jun 2023 05:59:01 -0400 (EDT) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit 78f36026d81e7c4c1854e2e8c89db680bfec5f17
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Tue Jun 13 07:18:26 2023 +0200
gnu: doxygen: Fix build for the Hurd.
* gnu/packages/patches/doxygen-hurd.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/documentation.scm (doxygen)[arguments]: When building for the
Hurd, add new phase 'apply-patch' and use it.
---
gnu/local.mk | 1 +
gnu/packages/documentation.scm | 12 +++++++++++-
gnu/packages/patches/doxygen-hurd.patch | 30 ++++++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 80380eb9dd..2b063d9571 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1066,6 +1066,7 @@ dist_patch_DATA =
\
%D%/packages/patches/doc++-segfault-fix.patch \
%D%/packages/patches/dovecot-opensslv3.patch \
%D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \
+ %D%/packages/patches/doxygen-hurd.patch \
%D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \
%D%/packages/patches/dstat-skip-devices-without-io.patch \
%D%/packages/patches/dune-common-skip-failing-tests.patch \
diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm
index be64bc4f95..047a074c3d 100644
--- a/gnu/packages/documentation.scm
+++ b/gnu/packages/documentation.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2022 Maxim Cournoyer <maxim.counoyer@gmail.com>
+;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,6 +41,7 @@
#:use-module (guix build-system python)
#:use-module (guix build-system qt)
#:use-module (guix deprecation)
+ #:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages backup)
@@ -224,7 +226,15 @@ markup) can be customized and extended by the user.")
(let ((/bin/sh (search-input-file inputs "/bin/sh")))
(substitute* "src/portable.cpp"
(("/bin/sh")
- /bin/sh))))))))
+ /bin/sh)))))
+ #$@(if (target-hurd?)
+ #~((add-after 'unpack 'apply-patch
+ (lambda _
+ (let ((patch-file
+ #$(local-file
+ (search-patch "doxygen-hurd.patch"))))
+ (invoke "patch" "--force" "-p1" "-i" patch-file)))))
+ #~()))))
(synopsis "Generate documentation from annotated sources")
(description "Doxygen is the de facto standard tool for generating
documentation from annotated C++ sources, but it also supports other popular
diff --git a/gnu/packages/patches/doxygen-hurd.patch
b/gnu/packages/patches/doxygen-hurd.patch
new file mode 100644
index 0000000000..a40923184b
--- /dev/null
+++ b/gnu/packages/patches/doxygen-hurd.patch
@@ -0,0 +1,30 @@
+Upstream status: Adapted from upstream.
+
+From d3d968e5835f449d7ea715f45160db81ea906303 Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Tue, 16 Aug 2022 20:29:54 +0200
+Subject: [PATCH] Fix build on GNU/Hurd
+
+There is no path length limitation there, even via pathconf. But glibc
+provides a getcwd function that allocates the buffer dynamically so we can
+just leverage that.
+---
+ include/ghc/filesystem.hpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/filesystem/filesystem.hpp.orig 2022-08-11 22:14:32.000000000 +0200
++++ b/filesystem/filesystem.hpp 2023-06-13 07:26:25.310000000 +0200
+@@ -4081,6 +4081,13 @@
+ return path();
+ }
+ return path(std::wstring(buffer.get()), path::native_format);
++#elif defined(__GLIBC__)
++ std::unique_ptr<char, decltype(&std::free)> buffer { ::getcwd(NULL, 0),
std::free };
++ if (buffer == nullptr) {
++ ec = detail::make_system_error();
++ return path();
++ }
++ return path(buffer.get());
+ #else
+ size_t pathlen = static_cast<size_t>(std::max(int(::pathconf(".",
_PC_PATH_MAX)), int(PATH_MAX)));
+ std::unique_ptr<char[]> buffer(new char[pathlen + 1]);
- 25/89: gnu: netdde: Resurrect and update to 2.6.32.65-2-e67c284ac1., (continued)
- 25/89: gnu: netdde: Resurrect and update to 2.6.32.65-2-e67c284ac1., guix-commits, 2023/06/20
- 26/89: hurd-boot: Cater for netdde., guix-commits, 2023/06/20
- 27/89: system: hurd: Add netdde to %base-packages/hurd., guix-commits, 2023/06/20
- 29/89: gnu: gnumach: Disable builtin networking., guix-commits, 2023/06/20
- 30/89: gnu: commencement: Add autoconf-boot0., guix-commits, 2023/06/20
- 53/89: gnu: libgpg-error: Skip failing test on the Hurd., guix-commits, 2023/06/20
- 64/89: gnu: openssl-1.1: Fix shared build for the Hurd., guix-commits, 2023/06/20
- 63/89: gnu: cairo: Support building for the Hurd., guix-commits, 2023/06/20
- 39/89: gnu: grep: Update hanging and failing tests on the Hurd., guix-commits, 2023/06/20
- 45/89: hurd: Support system init in /libexec/runsystem., guix-commits, 2023/06/20
- 71/89: gnu: doxygen: Fix build for the Hurd.,
guix-commits <=
- 41/89: gnu: findutils: Move test-strerror_r from XFAIL to skip on the Hurd., guix-commits, 2023/06/20
- 69/89: gnu: cmake-bootstrap: Fix build for the Hurd., guix-commits, 2023/06/20
- 35/89: gnu: commencement: hurd-minimal-boot0: Update to 0.9.git20230216., guix-commits, 2023/06/20
- 52/89: gnu: c-ares: Skip failing tests on the Hurd., guix-commits, 2023/06/20
- 38/89: gnu: coreutils: Skip hanging and failing test on the Hurd., guix-commits, 2023/06/20
- 58/89: gnu: emacs: Depend on libc-for-target., guix-commits, 2023/06/20
- 67/89: gnu: swig: Skip tests when building for the Hurd., guix-commits, 2023/06/20
- 57/89: gnu: git: Skip failing test on the Hurd., guix-commits, 2023/06/20
- 43/89: gnu: gettext-minimal: Remove XFAIL_TESTS for the Hurd., guix-commits, 2023/06/20
- 48/89: gnu: python: Support native build on the Hurd., guix-commits, 2023/06/20