Mercurial > mxe-octave
view src/graphicsmagick-2-dynamicpath.patch @ 6215:d18a5545df0d release
build-gettext: Don't build emacs bindings.
* src/build-gettext.mk: The `emacs` installed on the build system might be
incompatible with the STL built by build-gcc. We probably don't need the emacs
bindings for the `gettext` build tool anyway. So skip building those bindings.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 07 May 2022 12:01:10 +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) {