diff options
| author | Yelninei <yelninei@tutamail.com> | 2026-01-02 08:43:56 +0000 |
|---|---|---|
| committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2026-02-07 22:37:16 +0100 |
| commit | 3afbbf8ae30a63e6787b2dda11398ee89cee8782 (patch) | |
| tree | 13eee1c8f5ac920214bc906771a0303787854a1b /gnu | |
| parent | 8b19b95599cf6221ed09aaed15b642af9dd9e5c1 (diff) | |
gnu: opensp: Fix build on the Hurd.
* gnu/packages/patches/opensp-maxpathlen.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/xml.scm (opensp): Add phase for adding the patch.
Change-Id: I47278396eb5ded8f654708019e51b7d88b13b976
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/patches/opensp-maxpathlen.patch | 41 | ||||
| -rw-r--r-- | gnu/packages/xml.scm | 7 |
3 files changed, 49 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 696fe73d96d..e619ab688ce 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -2027,6 +2027,7 @@ dist_patch_DATA = \ | |||
| 2027 | %D%/packages/patches/openrgb-unbundle-hueplusplus.patch \ | 2027 | %D%/packages/patches/openrgb-unbundle-hueplusplus.patch \ |
| 2028 | %D%/packages/patches/openscad-fix-path-in-expected-test-results-to-acommodate-diff.patch \ | 2028 | %D%/packages/patches/openscad-fix-path-in-expected-test-results-to-acommodate-diff.patch \ |
| 2029 | %D%/packages/patches/opensles-add-license-file.patch \ | 2029 | %D%/packages/patches/opensles-add-license-file.patch \ |
| 2030 | %D%/packages/patches/opensp-maxpathlen.patch \ | ||
| 2030 | %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ | 2031 | %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ |
| 2031 | %D%/packages/patches/openssl-3.0-c-rehash-in.patch \ | 2032 | %D%/packages/patches/openssl-3.0-c-rehash-in.patch \ |
| 2032 | %D%/packages/patches/openssl-hurd64.patch \ | 2033 | %D%/packages/patches/openssl-hurd64.patch \ |
diff --git a/gnu/packages/patches/opensp-maxpathlen.patch b/gnu/packages/patches/opensp-maxpathlen.patch new file mode 100644 index 00000000000..9b141472ed9 --- /dev/null +++ b/gnu/packages/patches/opensp-maxpathlen.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | Adapted from https://sources.debian.org/src/opensp/1.5.2-15.2/debian/patches/diff-1.0.patch | ||
| 2 | |||
| 3 | Index: OpenSP-1.5.2/sx/XmlOutputEventHandler.cxx | ||
| 4 | =================================================================== | ||
| 5 | --- OpenSP-1.5.2.orig/sx/XmlOutputEventHandler.cxx | ||
| 6 | +++ OpenSP-1.5.2/sx/XmlOutputEventHandler.cxx | ||
| 7 | @@ -1199,12 +1199,22 @@ void XmlOutputEventHandler::inputOpened( | ||
| 8 | // Check to make sure we haven't passed outside of the | ||
| 9 | // output directory | ||
| 10 | char *dirs = strdup (filePath); | ||
| 11 | +#ifdef MAXPATHLEN | ||
| 12 | char realDirs[MAXPATHLEN]; | ||
| 13 | char realOutputDir[MAXPATHLEN]; | ||
| 14 | +#else | ||
| 15 | + char *realDirs; | ||
| 16 | + char *realOutputDir; | ||
| 17 | +#endif | ||
| 18 | char *outputDir = strdup(outputDir_); | ||
| 19 | |||
| 20 | +#ifdef MAXPATHLEN | ||
| 21 | realpath((const char *)dirname(dirs), realDirs); | ||
| 22 | realpath((const char *)dirname(outputDir), realOutputDir); | ||
| 23 | +#else | ||
| 24 | + realDirs = realpath((const char *)dirname(dirs), NULL); | ||
| 25 | + realOutputDir = realpath((const char *)dirname(outputDir), NULL); | ||
| 26 | +#endif | ||
| 27 | |||
| 28 | if (strncmp(realDirs, realOutputDir, strlen (realOutputDir)) != 0) { | ||
| 29 | app_->message(XmlOutputMessages::pathOutsideOutputDirectory, | ||
| 30 | @@ -1214,6 +1224,11 @@ void XmlOutputEventHandler::inputOpened( | ||
| 31 | } | ||
| 32 | } | ||
| 33 | |||
| 34 | +#ifndef MAXPATHLEN | ||
| 35 | + free(realDirs); | ||
| 36 | + free(realOutputDir); | ||
| 37 | +#endif | ||
| 38 | + | ||
| 39 | // Make the necessary directories | ||
| 40 | maybeCreateDirectories(dirname(dirs)); | ||
| 41 | |||
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 38606df7a1f..1660feb8538 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm | |||
| @@ -1845,6 +1845,13 @@ modular implementation of XML-RPC for C and C++.") | |||
| 1845 | #:make-flags #~(list "TESTS_THAT_FAIL=") | 1845 | #:make-flags #~(list "TESTS_THAT_FAIL=") |
| 1846 | #:phases | 1846 | #:phases |
| 1847 | #~(modify-phases %standard-phases | 1847 | #~(modify-phases %standard-phases |
| 1848 | #$@(if (target-hurd?) | ||
| 1849 | #~((add-after 'unpack 'patch-hurd | ||
| 1850 | (lambda _ | ||
| 1851 | (let ((patch #$(local-file | ||
| 1852 | (search-patch "opensp-maxpathlen.patch")))) | ||
| 1853 | (invoke "patch" "--force" "-p1" "-i" patch))))) | ||
| 1854 | #~()) | ||
| 1848 | (add-after 'unpack 'delete-configure | 1855 | (add-after 'unpack 'delete-configure |
| 1849 | ;; The configure script in the release was made with an older | 1856 | ;; The configure script in the release was made with an older |
| 1850 | ;; Autoconf and lacks support for the `--docdir' option. | 1857 | ;; Autoconf and lacks support for the `--docdir' option. |
