changeset 5633:8a8a240f3590

Add src/graphicsmagick-3-user32.patch * src/graphicsmagick-3-user32.patch: new file * dist-files.mk: add ref to graphicsmagick-3-user32.patch
author John Donoghue <john.donoghue@ieee.org>
date Sat, 02 Jan 2021 08:45:15 -0500
parents ac968ee70bf4
children 90c2dc72dd16
files dist-files.mk src/graphicsmagick-3-user32.patch
diffstat 2 files changed, 72 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Wed Dec 30 21:20:20 2020 -0500
+++ b/dist-files.mk	Sat Jan 02 08:45:15 2021 -0500
@@ -158,6 +158,7 @@
   gnutls.mk \
   graphicsmagick-1-fix-xml2-config.patch \
   graphicsmagick-2-dynamicpath.patch \
+  graphicsmagick-3-user32.patch \
   graphicsmagick-test.cpp \
   graphicsmagick.mk \
   gsl-test.c \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/graphicsmagick-3-user32.patch	Sat Jan 02 08:45:15 2021 -0500
@@ -0,0 +1,71 @@
+diff -ur GraphicsMagick-1.3.36.orig/configure.ac GraphicsMagick-1.3.36/configure.ac
+--- GraphicsMagick-1.3.36.orig/configure.ac	2021-01-01 09:35:17.966994198 -0500
++++ GraphicsMagick-1.3.36/configure.ac	2021-01-01 14:21:04.736125338 -0500
+@@ -2752,7 +2752,8 @@
+   found_libgdi32=0
+   AC_CHECK_HEADER([windows.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
+   AC_CHECK_HEADER([wingdi.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],[#include <windows.h>])
+-  AC_CHECK_LIB([gdi32],[OpenClipboard],[found_libgdi32=`expr $found_libgdi32 + 1`],,)
++  AC_CHECK_LIB([user32],[OpenClipboard],[found_libuser32=`expr $found_libuser32 + 1`],[],[])
++  AC_CHECK_LIB([gdi32],[CreateDIBSection],[found_libgdi32=`expr $found_libgdi32 + 1`],[],[])
+   if test $found_libgdi32 -gt 0
+   then
+     passed=`expr $passed + 1`
+@@ -2767,7 +2768,7 @@
+       AC_MSG_RESULT([no -- some components failed test])
+       have_gdi32='no (failed tests)'
+     else
+-      LIB_GDI32='-lgdi32'
++      LIB_GDI32='-lgdi32 -luser32'
+       LIBS="$LIB_GDI32 $LIBS"
+       AC_DEFINE([HasWINGDI32],[1],[Define to use the Windows GDI32 library])
+       AC_MSG_RESULT([yes])
+diff -ur GraphicsMagick-1.3.36.orig/magick/nt_feature.c GraphicsMagick-1.3.36/magick/nt_feature.c
+--- GraphicsMagick-1.3.36.orig/magick/nt_feature.c	2021-01-01 09:35:18.045998572 -0500
++++ GraphicsMagick-1.3.36/magick/nt_feature.c	2021-01-01 14:22:55.233205368 -0500
+@@ -78,6 +78,7 @@
+ %
+ %
+ */
++#if defined(HasWINGDI32)
+ MagickExport void *CropImageToHBITMAP(Image *image,
+   const RectangleInfo *geometry,ExceptionInfo *exception)
+ {
+@@ -217,6 +218,7 @@
+ 
+   return (void *)bitmapH;
+ }
++#endif
+ 
+ /*
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@@ -612,6 +614,7 @@
+ %
+ %
+ */
++#if defined(HasWINGDI32)
+ MagickExport void *ImageToHBITMAP(Image* image)
+ {
+   unsigned long
+@@ -696,5 +699,6 @@
+ 
+   return (void *)bitmapH;
+ }
++#endif
+ 
+ #endif
+diff -ur GraphicsMagick-1.3.36.orig/magick/nt_feature.h GraphicsMagick-1.3.36/magick/nt_feature.h
+--- GraphicsMagick-1.3.36.orig/magick/nt_feature.h	2021-01-01 09:35:18.038998185 -0500
++++ GraphicsMagick-1.3.36/magick/nt_feature.h	2021-01-01 14:23:42.008779169 -0500
+@@ -23,9 +23,11 @@
+ extern MagickExport char
+   *NTRegistryKeyLookup(const char *key);
+ 
++#if defined(HasWINGDI32)
+ extern MagickExport void
+   *CropImageToHBITMAP(Image *,const RectangleInfo *,ExceptionInfo *),
+   *ImageToHBITMAP(Image* image);
++#endif
+ 
+ #if !defined(XS_VERSION)
+