diff options
| author | Janneke Nieuwenhuizen <janneke@gnu.org> | 2023-06-13 07:18:26 +0200 |
|---|---|---|
| committer | Janneke Nieuwenhuizen <janneke@gnu.org> | 2023-07-20 10:11:36 +0200 |
| commit | d3a1684c8a092bb729d68a840abea28092dfc587 (patch) | |
| tree | 075573a3257c8dd0f472daef0feb99ceff742d86 /gnu | |
| parent | 6f15b4204fb2205c1b6cae81d396b2a95bdd818e (diff) | |
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.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/documentation.scm | 12 | ||||
| -rw-r--r-- | gnu/packages/patches/doxygen-hurd.patch | 30 |
3 files changed, 42 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index ad31e8d2dee..0c1425a1186 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -1065,6 +1065,7 @@ dist_patch_DATA = \ | |||
| 1065 | %D%/packages/patches/doc++-segfault-fix.patch \ | 1065 | %D%/packages/patches/doc++-segfault-fix.patch \ |
| 1066 | %D%/packages/patches/dovecot-opensslv3.patch \ | 1066 | %D%/packages/patches/dovecot-opensslv3.patch \ |
| 1067 | %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \ | 1067 | %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \ |
| 1068 | %D%/packages/patches/doxygen-hurd.patch \ | ||
| 1068 | %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \ | 1069 | %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \ |
| 1069 | %D%/packages/patches/dstat-skip-devices-without-io.patch \ | 1070 | %D%/packages/patches/dstat-skip-devices-without-io.patch \ |
| 1070 | %D%/packages/patches/dune-common-skip-failing-tests.patch \ | 1071 | %D%/packages/patches/dune-common-skip-failing-tests.patch \ |
diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm index ec70ca4d8f7..5d455431d3c 100644 --- a/gnu/packages/documentation.scm +++ b/gnu/packages/documentation.scm | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de> | 12 | ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de> |
| 13 | ;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org> | 13 | ;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org> |
| 14 | ;;; Copyright © 2022 Maxim Cournoyer <maxim.counoyer@gmail.com> | 14 | ;;; Copyright © 2022 Maxim Cournoyer <maxim.counoyer@gmail.com> |
| 15 | ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org> | ||
| 15 | ;;; | 16 | ;;; |
| 16 | ;;; This file is part of GNU Guix. | 17 | ;;; This file is part of GNU Guix. |
| 17 | ;;; | 18 | ;;; |
| @@ -40,6 +41,7 @@ | |||
| 40 | #:use-module (guix build-system python) | 41 | #:use-module (guix build-system python) |
| 41 | #:use-module (guix build-system qt) | 42 | #:use-module (guix build-system qt) |
| 42 | #:use-module (guix deprecation) | 43 | #:use-module (guix deprecation) |
| 44 | #:use-module (guix utils) | ||
| 43 | #:use-module (gnu packages) | 45 | #:use-module (gnu packages) |
| 44 | #:use-module (gnu packages autotools) | 46 | #:use-module (gnu packages autotools) |
| 45 | #:use-module (gnu packages backup) | 47 | #:use-module (gnu packages backup) |
| @@ -224,7 +226,15 @@ markup) can be customized and extended by the user.") | |||
| 224 | (let ((/bin/sh (search-input-file inputs "/bin/sh"))) | 226 | (let ((/bin/sh (search-input-file inputs "/bin/sh"))) |
| 225 | (substitute* "src/portable.cpp" | 227 | (substitute* "src/portable.cpp" |
| 226 | (("/bin/sh") | 228 | (("/bin/sh") |
| 227 | /bin/sh)))))))) | 229 | /bin/sh))))) |
| 230 | #$@(if (target-hurd?) | ||
| 231 | #~((add-after 'unpack 'apply-patch | ||
| 232 | (lambda _ | ||
| 233 | (let ((patch-file | ||
| 234 | #$(local-file | ||
| 235 | (search-patch "doxygen-hurd.patch")))) | ||
| 236 | (invoke "patch" "--force" "-p1" "-i" patch-file))))) | ||
| 237 | #~())))) | ||
| 228 | (synopsis "Generate documentation from annotated sources") | 238 | (synopsis "Generate documentation from annotated sources") |
| 229 | (description "Doxygen is the de facto standard tool for generating | 239 | (description "Doxygen is the de facto standard tool for generating |
| 230 | documentation from annotated C++ sources, but it also supports other popular | 240 | 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 00000000000..a40923184b7 --- /dev/null +++ b/gnu/packages/patches/doxygen-hurd.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | Upstream status: Adapted from upstream. | ||
| 2 | |||
| 3 | From d3d968e5835f449d7ea715f45160db81ea906303 Mon Sep 17 00:00:00 2001 | ||
| 4 | From: Samuel Thibault <samuel.thibault@ens-lyon.org> | ||
| 5 | Date: Tue, 16 Aug 2022 20:29:54 +0200 | ||
| 6 | Subject: [PATCH] Fix build on GNU/Hurd | ||
| 7 | |||
| 8 | There is no path length limitation there, even via pathconf. But glibc | ||
| 9 | provides a getcwd function that allocates the buffer dynamically so we can | ||
| 10 | just leverage that. | ||
| 11 | --- | ||
| 12 | include/ghc/filesystem.hpp | 7 +++++++ | ||
| 13 | 1 file changed, 7 insertions(+) | ||
| 14 | |||
| 15 | --- a/filesystem/filesystem.hpp.orig 2022-08-11 22:14:32.000000000 +0200 | ||
| 16 | +++ b/filesystem/filesystem.hpp 2023-06-13 07:26:25.310000000 +0200 | ||
| 17 | @@ -4081,6 +4081,13 @@ | ||
| 18 | return path(); | ||
| 19 | } | ||
| 20 | return path(std::wstring(buffer.get()), path::native_format); | ||
| 21 | +#elif defined(__GLIBC__) | ||
| 22 | + std::unique_ptr<char, decltype(&std::free)> buffer { ::getcwd(NULL, 0), std::free }; | ||
| 23 | + if (buffer == nullptr) { | ||
| 24 | + ec = detail::make_system_error(); | ||
| 25 | + return path(); | ||
| 26 | + } | ||
| 27 | + return path(buffer.get()); | ||
| 28 | #else | ||
| 29 | size_t pathlen = static_cast<size_t>(std::max(int(::pathconf(".", _PC_PATH_MAX)), int(PATH_MAX))); | ||
| 30 | std::unique_ptr<char[]> buffer(new char[pathlen + 1]); | ||
