view src/graphicsmagick-2-dynamicpath.patch @ 5531:eae508c12529

Add build rule for build-octave (bug #49503). * src/build-octave.mk: Add new build rule for build-octave which can be used for cross-building binary packages that depend on Octave as a build tool. * dist-files.mk: Add new file to list. * index.html: Add new package to list. * src/of-communications.mk, src/of-image.mk, src/of-mapping.mk, src/of-optiminterp.mk, src/of-sparsersb.mk, src/of-statistics.mk, src/of-windows.mk: Add optional dependency on build-octave. * configure.ac: Add new configure switch "--disable-system-octave" that is needed to build the build-octave package. * Makefile.in: Add variable "USE_SYSTEM_OCTAVE". Exclude build-octave from the default build tools and build it only if a package explicitly depends on it. Display warning about missing native Octave version only if necessary.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 08 Sep 2020 23:04:38 +0200
parents 7c3e3151bf58
children 7ac858194666
line wrap: on
line source

diff -ur GraphicsMagick-1.3.30.orig/magick/blob.c GraphicsMagick-1.3.30/magick/blob.c
--- GraphicsMagick-1.3.30.orig/magick/blob.c	2018-07-16 08:55:01.552444311 -0400
+++ GraphicsMagick-1.3.30/magick/blob.c	2018-07-17 09:27:05.584144673 -0400
@@ -1955,6 +1955,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
Only in GraphicsMagick-1.3.30/magick: .blob.c.swp
diff -ur GraphicsMagick-1.3.30.orig/magick/module.c GraphicsMagick-1.3.30/magick/module.c
--- GraphicsMagick-1.3.30.orig/magick/module.c	2018-07-16 08:55:01.539443999 -0400
+++ GraphicsMagick-1.3.30/magick/module.c	2018-07-17 08:22:22.161123799 -0400
@@ -1021,6 +1021,33 @@
           start += length+1;
         }
     }
+#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)