Mercurial > mxe-octave
view src/graphicsmagick-2-dynamicpath.patch @ 6161:8fcac4d6d983 release
of-queueing: Fix syntax error with Octave 7 (bug #62314).
* src/of-queueing-1-octave7.patch: Add new file.
* dist-files.mk: Include new patch.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 14 Apr 2022 19:27:13 +0200 |
parents | 7ac858194666 |
children |
line wrap: on
line source
diff -ur GraphicsMagick-1.3.37.orig/magick/blob.c GraphicsMagick-1.3.37/magick/blob.c --- GraphicsMagick-1.3.37.orig/magick/blob.c 2021-12-14 12:59:54.946462559 -0500 +++ GraphicsMagick-1.3.37/magick/blob.c 2021-12-14 13:05:57.022604525 -0500 @@ -1975,6 +1975,29 @@ AddConfigurePath(path_map,&path_index,MagickLibConfigPath,exception); # endif /* defined(MagickLibConfigPath) */ +#if defined(MSWINDOWS) + { + char buf[FILENAME_MAX+100]; + if (GetModuleFileName(NULL, buf, FILENAME_MAX + 1)) + { + char *ptr = strrchr(buf, '\\'); + if(ptr) { + *(ptr+1) = 0; + strcat(buf, "..\\lib\\"); + strcat(buf, MagickShareConfigSubDir); + strcat(buf, "\\"); + AddConfigurePath(path_map,&path_index,buf,exception); + + *(ptr+1) = 0; + strcat(buf, "..\\share\\"); + strcat(buf, MagickLibConfigSubDir); + strcat(buf, "\\"); + AddConfigurePath(path_map,&path_index,buf,exception); + } + } + } +#endif + # if defined(MSWINDOWS) && !(defined(MagickLibConfigPath) || defined(MagickShareConfigPath)) { char diff -ur GraphicsMagick-1.3.37.orig/magick/module.c GraphicsMagick-1.3.37/magick/module.c --- GraphicsMagick-1.3.37.orig/magick/module.c 2021-12-14 12:59:54.935462099 -0500 +++ GraphicsMagick-1.3.37/magick/module.c 2021-12-14 13:08:20.667611735 -0500 @@ -1036,6 +1036,33 @@ } } +#if defined(MSWINDOWS) + { + char buf[FILENAME_MAX+100]; + if (GetModuleFileName(NULL, buf, FILENAME_MAX + 1)) + { + char *ptr = strrchr(buf, '\\'); + if(ptr) + { + *(ptr+1) = 0; + strcat(buf, "..\\lib\\"); + switch (module_type) + { + case MagickCoderModule: + default: + strcat(buf, MagickCoderModulesSubdir); + break; + case MagickFilterModule: + strcat(buf, MagickFilterModulesSubdir); + break; + } + strcat(buf, "\\"); + AddModulePath(path_map,&path_index,buf,exception); + } + } + } +#endif + #if defined(UseInstalledMagick) # if defined(MagickCoderModulesPath) {