Blame patches/imagemagick-7.1.1-3.local.patch

4dc395
diff -ru ImageMagick-7.1.0-51.orig/configure ImageMagick-7.1.0-51/configure
4dc395
--- ImageMagick-7.1.0-51.orig/configure	2022-10-16 17:54:02.000000000 +0200
4dc395
+++ ImageMagick-7.1.0-51/configure	2022-11-05 22:37:15.089499439 +0100
4dc395
@@ -18236,6 +18236,16 @@
4dc395
   dynamic_linker='GNU/Linux ld.so'
4dc395
   ;;
4dc395
 
4dc395
+midipix*)
4dc395
+  version_type=linux # correct to gnu/linux during the next big refactor
4dc395
+  need_lib_prefix=no
4dc395
+  need_version=no
4dc395
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4dc395
+  soname_spec='$libname$release$shared_ext$major'
4dc395
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4dc395
+  shlibpath_var=LD_LIBRARY_PATH
4dc395
+  ;;
4dc395
+
4dc395
 netbsd*)
4dc395
   version_type=sunos
4dc395
   need_lib_prefix=no
4dc395
@@ -22765,6 +22775,16 @@
4dc395
   dynamic_linker='GNU/Linux ld.so'
4dc395
   ;;
4dc395
 
4dc395
+midipix*)
4dc395
+  version_type=linux # correct to gnu/linux during the next big refactor
4dc395
+  need_lib_prefix=no
4dc395
+  need_version=no
4dc395
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4dc395
+  soname_spec='$libname$release$shared_ext$major'
4dc395
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4dc395
+  shlibpath_var=LD_LIBRARY_PATH
4dc395
+  ;;
4dc395
+
4dc395
 netbsd*)
4dc395
   version_type=sunos
4dc395
   need_lib_prefix=no
4dc395
Only in ImageMagick-7.1.0-51: configure.orig
4dc395
diff -ru ImageMagick-7.1.0-51.orig/MagickCore/module.c ImageMagick-7.1.0-51/MagickCore/module.c
4dc395
--- ImageMagick-7.1.0-51.orig/MagickCore/module.c	2022-10-16 17:53:13.000000000 +0200
4dc395
+++ ImageMagick-7.1.0-51/MagickCore/module.c	2022-11-05 22:34:35.101498468 +0100
4dc395
@@ -66,18 +66,14 @@
4dc395
 #include "MagickCore/utility.h"
4dc395
 #include "MagickCore/utility-private.h"
4dc395
 #if defined(MAGICKCORE_MODULES_SUPPORT)
4dc395
-#if defined(MAGICKCORE_LTDL_DELEGATE)
4dc395
-#include "ltdl.h"
4dc395
-typedef lt_dlhandle ModuleHandle;
4dc395
-#else
4dc395
+#include <dlfcn.h>
4dc395
 typedef void *ModuleHandle;
4dc395
-#endif
4dc395
 
4dc395
 /*
4dc395
   Define declarations.
4dc395
 */
4dc395
 #if defined(MAGICKCORE_LTDL_DELEGATE)
4dc395
-#  define ModuleGlobExpression "*.la"
4dc395
+#  define ModuleGlobExpression "*.so"
4dc395
 #else
4dc395
 #  if defined(_DEBUG)
4dc395
 #    define ModuleGlobExpression "IM_MOD_DB_*.dll"
4dc395
@@ -893,9 +889,6 @@
4dc395
           if (status == MagickFalse)
4dc395
             ThrowFatalException(ResourceLimitFatalError,
4dc395
               "MemoryAllocationFailed");
4dc395
-          if (lt_dlinit() != 0)
4dc395
-            ThrowFatalException(ModuleFatalError,
4dc395
-              "UnableToInitializeModuleLoader");
4dc395
           module_list=splay_tree;
4dc395
         }
4dc395
       UnlockSemaphoreInfo(module_semaphore);
4dc395
@@ -992,11 +985,11 @@
4dc395
   /*
4dc395
     Open the module.
4dc395
   */
4dc395
-  handle=(ModuleHandle) lt_dlopen(path);
4dc395
+  handle=(ModuleHandle) dlopen(path, RTLD_NOW);
4dc395
   if (handle == (ModuleHandle) NULL)
4dc395
     {
4dc395
       (void) ThrowMagickException(exception,GetMagickModule(),ModuleError,
4dc395
-        "UnableToLoadModule","'%s': %s",name,lt_dlerror());
4dc395
+        "UnableToLoadModule","'%s': %s",name,dlerror());
4dc395
       return(MagickFalse);
4dc395
     }
4dc395
   /*
4dc395
@@ -1012,10 +1005,10 @@
4dc395
     Execute the module.
4dc395
   */
4dc395
   ClearMagickException(exception);
4dc395
-  image_filter=(ImageFilterHandler *) lt_dlsym(handle,name);
4dc395
+  image_filter=(ImageFilterHandler *) dlsym(handle,name);
4dc395
   if (image_filter == (ImageFilterHandler *) NULL)
4dc395
     (void) ThrowMagickException(exception,GetMagickModule(),ModuleError,
4dc395
-      "UnableToLoadModule","'%s': %s",name,lt_dlerror());
4dc395
+      "UnableToLoadModule","'%s': %s",name,dlerror());
4dc395
   else
4dc395
     {
4dc395
       size_t
4dc395
@@ -1036,9 +1029,9 @@
4dc395
   /*
4dc395
     Close the module.
4dc395
   */
4dc395
-  if (lt_dlclose(handle) != 0)
4dc395
+  if (dlclose(handle) != 0)
4dc395
     (void) ThrowMagickException(exception,GetMagickModule(),ModuleWarning,
4dc395
-      "UnableToCloseModule","'%s': %s",name,lt_dlerror());
4dc395
+      "UnableToCloseModule","'%s': %s",name,dlerror());
4dc395
   return(exception->severity < ErrorException ? MagickTrue : MagickFalse);
4dc395
 }
4dc395
 
4dc395
@@ -1283,11 +1276,11 @@
4dc395
   */
4dc395
   (void) LogMagickEvent(ModuleEvent,GetMagickModule(),
4dc395
     "Opening module at path \"%s\"",path);
4dc395
-  handle=(ModuleHandle) lt_dlopen(path);
4dc395
+  handle=(ModuleHandle) dlopen(path, RTLD_NOW);
4dc395
   if (handle == (ModuleHandle) NULL)
4dc395
     {
4dc395
       (void) ThrowMagickException(exception,GetMagickModule(),ModuleError,
4dc395
-        "UnableToLoadModule","'%s': %s",path,lt_dlerror());
4dc395
+        "UnableToLoadModule","'%s': %s",path,dlerror());
4dc395
       return(MagickFalse);
4dc395
     }
4dc395
   /*
4dc395
@@ -1301,11 +1294,11 @@
4dc395
     Define RegisterFORMATImage method.
4dc395
   */
4dc395
   TagToModuleName(module_name,"Register%sImage",name);
4dc395
-  module_info->register_module=(size_t (*)(void)) lt_dlsym(handle,name);
4dc395
+  module_info->register_module=(size_t (*)(void)) dlsym(handle,name);
4dc395
   if (module_info->register_module == (size_t (*)(void)) NULL)
4dc395
     {
4dc395
       (void) ThrowMagickException(exception,GetMagickModule(),ModuleError,
4dc395
-        "UnableToRegisterImageFormat","'%s': %s",module_name,lt_dlerror());
4dc395
+        "UnableToRegisterImageFormat","'%s': %s",module_name,dlerror());
4dc395
       return(MagickFalse);
4dc395
     }
4dc395
   (void) LogMagickEvent(ModuleEvent,GetMagickModule(),
4dc395
@@ -1315,11 +1308,11 @@
4dc395
     Define UnregisterFORMATImage method.
4dc395
   */
4dc395
   TagToModuleName(module_name,"Unregister%sImage",name);
4dc395
-  module_info->unregister_module=(void (*)(void)) lt_dlsym(handle,name);
4dc395
+  module_info->unregister_module=(void (*)(void)) dlsym(handle,name);
4dc395
   if (module_info->unregister_module == (void (*)(void)) NULL)
4dc395
     {
4dc395
       (void) ThrowMagickException(exception,GetMagickModule(),ModuleError,
4dc395
-        "UnableToRegisterImageFormat","'%s': %s",module_name,lt_dlerror());
4dc395
+        "UnableToRegisterImageFormat","'%s': %s",module_name,dlerror());
4dc395
       return(MagickFalse);
4dc395
     }
4dc395
   (void) LogMagickEvent(ModuleEvent,GetMagickModule(),
4dc395
@@ -1471,7 +1464,7 @@
4dc395
   if (IsEventLogging() != MagickFalse)
4dc395
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",tag);
4dc395
 #if defined(MAGICKCORE_LTDL_DELEGATE)
4dc395
-  (void) FormatLocaleString(name,MagickPathExtent,"%s.la",tag);
4dc395
+  (void) FormatLocaleString(name,MagickPathExtent,"%s.so",tag);
4dc395
   (void) LocaleLower(name);
4dc395
 #else
4dc395
 #if defined(MAGICKCORE_WINDOWS_SUPPORT)
4dc395
@@ -1525,7 +1518,7 @@
4dc395
 #elif !defined(MAGICKCORE_LTDL_DELEGATE)
4dc395
   (void) FormatLocaleString(name,MagickPathExtent,"%s.dll",tag);
4dc395
 #else
4dc395
-  (void) FormatLocaleString(name,MagickPathExtent,"%s.la",tag);
4dc395
+  (void) FormatLocaleString(name,MagickPathExtent,"%s.so",tag);
4dc395
 #endif
4dc395
 }
4dc395
 
4dc395
@@ -1622,10 +1615,10 @@
4dc395
   if (module_info->unregister_module == NULL)
4dc395
     return(MagickTrue);
4dc395
   module_info->unregister_module();
4dc395
-  if (lt_dlclose((ModuleHandle) module_info->handle) != 0)
4dc395
+  if (dlclose((ModuleHandle) module_info->handle) != 0)
4dc395
     {
4dc395
       (void) ThrowMagickException(exception,GetMagickModule(),ModuleWarning,
4dc395
-        "UnableToCloseModule","'%s': %s",module_info->tag,lt_dlerror());
4dc395
+        "UnableToCloseModule","'%s': %s",module_info->tag,dlerror());
4dc395
       return(MagickFalse);
4dc395
     }
4dc395
   return(MagickTrue);
4dc395
diff -ru ImageMagick-7.1.0-51.orig/MagickCore/opencl.c ImageMagick-7.1.0-51/MagickCore/opencl.c
4dc395
--- ImageMagick-7.1.0-51.orig/MagickCore/opencl.c	2022-10-16 17:53:13.000000000 +0200
4dc395
+++ ImageMagick-7.1.0-51/MagickCore/opencl.c	2022-11-05 22:36:35.473499198 +0100
4dc395
@@ -2607,7 +2607,7 @@
4dc395
   if (openCL_library != (MagickLibrary *) NULL)
4dc395
     {
4dc395
       if (openCL_library->library != (void *) NULL)
4dc395
-        (void) lt_dlclose(openCL_library->library);
4dc395
+        (void) dlclose(openCL_library->library);
4dc395
       openCL_library=(MagickLibrary *) RelinquishMagickMemory(openCL_library);
4dc395
     }
4dc395
 }