mupdf: fix build of vendored freeglut with gcc15
- add patch from `freeglut` upstream to vendored fork version: https://www.github.com/freeglut/freeglut/pull/187 Fixes build failure with gcc15: ``` /build/source/src/x11/fg_init_x11.c:348:6: error: conflicting types for 'fgPlatformDestroyContext'; have 'void(SFG_PlatformDisplay, struct __GLXcontextRec *)' {aka 'void(struct tagSFG_PlatformDisplay, struct __GLXcontextRec *)'} 348 | void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext ) | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /build/source/src/x11/fg_init_x11.c:34: /build/source/src/egl/fg_init_egl.h:31:13: note: previous declaration of 'fgPlatformDestroyContext' with type 'void(void)' 31 | extern void fgPlatformDestroyContext(); | ^~~~~~~~~~~~~~~~~~~~~~~~ ```
This commit is contained in:
@@ -55,7 +55,15 @@ let
|
||||
hash = "sha256-0fuE0lm9rlAaok2Qe0V1uUrgP4AjMWgp3eTbw8G6PMM=";
|
||||
};
|
||||
|
||||
patches = [ ];
|
||||
patches = [
|
||||
# Fix build with gcc15
|
||||
# https://github.com/freeglut/freeglut/pull/187
|
||||
(fetchpatch {
|
||||
name = "freeglut-fix-fgPlatformDestroyContext-prototype-for-C23.patch";
|
||||
url = "https://github.com/freeglut/freeglut/commit/800772e993a3ceffa01ccf3fca449d3279cde338.patch";
|
||||
hash = "sha256-agXw3JHq81tx5514kkorvuU5mX4E3AV930hy1OJl4L0=";
|
||||
})
|
||||
];
|
||||
|
||||
# cmake 4 compatibility, upstream is dead
|
||||
postPatch = ''
|
||||
|
||||
Reference in New Issue
Block a user