Mercurial > mxe-octave
comparison src/graphicsmagick-2-dynamicpath.patch @ 4773:7c3e3151bf58
graphicsmagic: enable modules, allow dynaic paths in windows
* src/graphicsmagick-2-dynamicpath.patch: new file
* dist-files.mk: ref graphicsmagick-2-dynamicpath.patch
* src/graphicsmagick.mk; enable modules
author | John Donoghue |
---|---|
date | Tue, 17 Jul 2018 11:41:39 -0400 |
parents | |
children | 7ac858194666 |
comparison
equal
deleted
inserted
replaced
4772:7d3a56e36206 | 4773:7c3e3151bf58 |
---|---|
1 diff -ur GraphicsMagick-1.3.30.orig/magick/blob.c GraphicsMagick-1.3.30/magick/blob.c | |
2 --- GraphicsMagick-1.3.30.orig/magick/blob.c 2018-07-16 08:55:01.552444311 -0400 | |
3 +++ GraphicsMagick-1.3.30/magick/blob.c 2018-07-17 09:27:05.584144673 -0400 | |
4 @@ -1955,6 +1955,29 @@ | |
5 AddConfigurePath(path_map,&path_index,MagickLibConfigPath,exception); | |
6 # endif /* defined(MagickLibConfigPath) */ | |
7 | |
8 +#if defined(MSWINDOWS) | |
9 + { | |
10 + char buf[FILENAME_MAX+100]; | |
11 + if (GetModuleFileName(NULL, buf, FILENAME_MAX + 1)) | |
12 + { | |
13 + char *ptr = strrchr(buf, '\\'); | |
14 + if(ptr) { | |
15 + *(ptr+1) = 0; | |
16 + strcat(buf, "..\\lib\\"); | |
17 + strcat(buf, MagickShareConfigSubDir); | |
18 + strcat(buf, "\\"); | |
19 + AddConfigurePath(path_map,&path_index,buf,exception); | |
20 + | |
21 + *(ptr+1) = 0; | |
22 + strcat(buf, "..\\share\\"); | |
23 + strcat(buf, MagickLibConfigSubDir); | |
24 + strcat(buf, "\\"); | |
25 + AddConfigurePath(path_map,&path_index,buf,exception); | |
26 + } | |
27 + } | |
28 + } | |
29 +#endif | |
30 + | |
31 # if defined(MSWINDOWS) && !(defined(MagickLibConfigPath) || defined(MagickShareConfigPath)) | |
32 { | |
33 char | |
34 Only in GraphicsMagick-1.3.30/magick: .blob.c.swp | |
35 diff -ur GraphicsMagick-1.3.30.orig/magick/module.c GraphicsMagick-1.3.30/magick/module.c | |
36 --- GraphicsMagick-1.3.30.orig/magick/module.c 2018-07-16 08:55:01.539443999 -0400 | |
37 +++ GraphicsMagick-1.3.30/magick/module.c 2018-07-17 08:22:22.161123799 -0400 | |
38 @@ -1021,6 +1021,33 @@ | |
39 start += length+1; | |
40 } | |
41 } | |
42 +#if defined(MSWINDOWS) | |
43 + { | |
44 + char buf[FILENAME_MAX+100]; | |
45 + if (GetModuleFileName(NULL, buf, FILENAME_MAX + 1)) | |
46 + { | |
47 + char *ptr = strrchr(buf, '\\'); | |
48 + if(ptr) | |
49 + { | |
50 + *(ptr+1) = 0; | |
51 + strcat(buf, "..\\lib\\"); | |
52 + switch (module_type) | |
53 + { | |
54 + case MagickCoderModule: | |
55 + default: | |
56 + strcat(buf, MagickCoderModulesSubdir); | |
57 + break; | |
58 + case MagickFilterModule: | |
59 + strcat(buf, MagickFilterModulesSubdir); | |
60 + break; | |
61 + } | |
62 + strcat(buf, "\\"); | |
63 + AddModulePath(path_map,&path_index,buf,exception); | |
64 + } | |
65 + } | |
66 + } | |
67 +#endif | |
68 + | |
69 | |
70 #if defined(UseInstalledMagick) | |
71 # if defined(MagickCoderModulesPath) |