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

758d52
diff -ru ImageMagick-7.1.1-15.orig/MagickCore/module.c ImageMagick-7.1.1-15/MagickCore/module.c
758d52
--- ImageMagick-7.1.1-15.orig/MagickCore/module.c	2023-07-30 13:49:52.000000000 +0200
758d52
+++ ImageMagick-7.1.1-15/MagickCore/module.c	2023-08-24 18:06:47.065366224 +0200
758d52
@@ -66,10 +66,6 @@
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
 
758d52
@@ -77,7 +74,7 @@
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"
758d52
@@ -893,11 +890,6 @@
4dc395
           if (status == MagickFalse)
4dc395
             ThrowFatalException(ResourceLimitFatalError,
4dc395
               "MemoryAllocationFailed");
758d52
-#if defined(MAGICKCORE_LTDL_DELEGATE)
4dc395
-          if (lt_dlinit() != 0)
4dc395
-            ThrowFatalException(ModuleFatalError,
4dc395
-              "UnableToInitializeModuleLoader");
758d52
-#endif
4dc395
           module_list=splay_tree;
4dc395
         }
4dc395
       UnlockSemaphoreInfo(module_semaphore);
758d52
@@ -994,11 +986,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
   /*
758d52
@@ -1014,10 +1006,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
758d52
@@ -1038,9 +1030,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
 
758d52
@@ -1285,11 +1277,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
   /*
758d52
@@ -1303,11 +1295,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(),
758d52
@@ -1317,11 +1309,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(),
758d52
@@ -1464,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)
758d52
@@ -1518,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
 }
758d52
758d52
758d52
@@ -1624,10 +1616,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);
758d52
diff -ru ImageMagick-7.1.1-15.orig/MagickCore/opencl.c ImageMagick-7.1.1-15/MagickCore/opencl.c
758d52
--- ImageMagick-7.1.1-15.orig/MagickCore/opencl.c	2023-07-30 13:49:52.000000000 +0200
758d52
+++ ImageMagick-7.1.1-15/MagickCore/opencl.c	2023-08-24 18:03:15.806759171 +0200
758d52
@@ -2610,7 +2610,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
 }
758d52
Only in ImageMagick-7.1.1-15/MagickCore: opencl.c.orig