graphicsmagick: Fix build

This commit is contained in:
Alexey Pavlov
2021-01-21 12:37:01 +03:00
parent 64fed2f2ef
commit 744c1237b5
2 changed files with 24 additions and 12 deletions

View File

@@ -1,22 +1,34 @@
--- GraphicsMagick-1.3.36/configure.ac.orig 2021-01-21 09:47:33.791281700 +0300
+++ GraphicsMagick-1.3.36/configure.ac 2021-01-21 09:52:40.991805800 +0300
@@ -2749,11 +2749,13 @@
diff -r f6ed423fab8b -r 49c33f0323e1 configure.ac
--- a/configure.ac Fri Jan 01 12:46:59 2021 -0600
+++ b/configure.ac Fri Jan 01 13:52:34 2021 -0600
@@ -2749,15 +2749,21 @@
AC_MSG_RESULT()
failed=0
passed=0
+ found_libuser32=0
found_libgdi32=0
- found_libgdi32=0
+ #found_libgdi32=0
AC_CHECK_HEADER([windows.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
+ AC_CHECK_HEADER([winuser.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],[#include <windows.h>])
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`],,)
- if test $found_libgdi32 -gt 0
+ AC_CHECK_LIB([user32],[OpenClipboard],[found_libuser32=`expr $found_libuser32 + 1`],[],)
+ AC_CHECK_LIB([gdi32],[CreateDIBSection],[found_libgdi32=`expr $found_libgdi32 + 1`],[],[-luser32])
+ if test $found_libuser32 -gt 0 -a $found_libgdi32 -gt 0
+ # For some reason MSYS2 and Cygwin i686 build fails library tests.
+ #AC_CHECK_LIB([gdi32],[OpenClipboard],[found_libgdi32=`expr $found_libgdi32 + 1`],,)
+ #if test $found_libgdi32 -gt 0
+ #then
+ # passed=`expr $passed + 1`
+ #else
+ # failed=`expr $failed + 1`
+ #fi
+ if test "$cygwin_build" = yes -o "$native_win32_build" = yes
then
passed=`expr $passed + 1`
else
@@ -2767,7 +2769,7 @@
- else
- failed=`expr $failed + 1`
fi
AC_MSG_CHECKING([if Windows GDI32 support is complete])
if test $passed -gt 0
@@ -2767,7 +2773,7 @@
AC_MSG_RESULT([no -- some components failed test])
have_gdi32='no (failed tests)'
else

View File

@@ -4,7 +4,7 @@ _realname=graphicsmagick
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.3.36
pkgrel=3
pkgrel=4
pkgdesc="An image viewing/manipulation program (mingw-w64)"
arch=('any')
url="http://www.graphicsmagick.org/"
@@ -39,7 +39,7 @@ source=(https://sourceforge.net/projects/graphicsmagick/files/${_realname}/${pkg
002-fix-find-gdi32.patch)
sha256sums=('5d5b3fde759cdfc307aaf21df9ebd8c752e3f088bb051dd5df8aac7ba7338f46'
'69cb9a06f0f4ec096dd3ed6c89f925c29da5f9bb8a335681b03cd7a38207e428'
'f1d1c04a005ce88cb1c2067e65c986dc6d923b2fe50893c855e6d62eef34fb3d')
'a74a521226c5633697504899dda0956967ca4aec06ee91e6e0e23315a98eea36')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {