hotdoc: fix build with gcc15
- add patch from merged upstream commit: https://github.com/hotdoc/hotdoc/commit/adf8518431fafb78c9b47862a0a9a58824b6a421 Fixes build failure with gcc15: ``` /build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l: In function ‘yylex’: /build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:49:10: error: too many arguments to function ‘parse_comment’; expected 0, have 1 49 | "/*" { return parse_comment (comments);} | ^~~~~~~~~~~~~ ~~~~~~~~ /build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:37:12: note: declared here 37 | static int parse_comment (); | ^~~~~~~~~~~~~ /build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:50:10: error: too many arguments to function ‘parse_define’; expected 0, have 1 50 | {HASH}{SPACE}*"define"{SPACE}* { return parse_define (comments); } | ^~~~~~~~~~~~ ~~~~~~~~ /build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:38:12: note: declared here 38 | static int parse_define (); | ^~~~~~~~~~~~ /build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l: At top level: /build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:80:1: error: conflicting types for ‘parse_define’; have ‘int(PyObject *)’ {aka ‘int(struct _object *)’} 80 | parse_define (PyObject *comments) | ^~~~~~~~~~~~ /build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:38:12: note: previous declaration of ‘parse_define’ with type ‘int(void)’ 38 | static int parse_define (); | ^~~~~~~~~~~~ /build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:126:1: error: conflicting types for ‘parse_comment’; have ‘int(PyObject *)’ {aka ‘int(struct _object *)’} 126 | parse_comment (PyObject *comments) | ^~~~~~~~~~~~~ /build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:37:12: note: previous declaration of ‘parse_comment’ with type ‘int(void)’ 37 | static int parse_comment (); | ^~~~~~~~~~~~~ ```
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonApplication,
|
||||
fetchpatch,
|
||||
fetchPypi,
|
||||
replaceVars,
|
||||
clang,
|
||||
@@ -45,6 +46,13 @@ buildPythonApplication rec {
|
||||
clang = lib.getExe clang;
|
||||
libclang = "${lib.getLib libclang}/lib/libclang${stdenv.hostPlatform.extensions.sharedLibrary}";
|
||||
})
|
||||
|
||||
# Fix build with gcc15
|
||||
(fetchpatch {
|
||||
name = "hotdoc-fix-c_comment_scanner-function-prototypes-gcc15.patch";
|
||||
url = "https://github.com/hotdoc/hotdoc/commit/adf8518431fafb78c9b47862a0a9a58824b6a421.patch";
|
||||
hash = "sha256-5y50Yk+AjV3aSk8H3k9od/Yvy09FyQQOcVOAcstQnw8=";
|
||||
})
|
||||
];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
Reference in New Issue
Block a user