patch to get --with-png working on FreeBSD

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
ScottJ
Posts: 6
Joined: 2011-01-18T15:28:29-07:00
Authentication code: 8675308

patch to get --with-png working on FreeBSD

Post by ScottJ »

I was having trouble getting configure to enable PNG on FreeBSD 8.1-rel. Googling for "test: no: unexpected operator" I discovered viewtopic.php?t=16644&p=61122, and I found the same problem exists for PNG. I patched up configure and everything seems to work.

Code: Select all

*** configure   Sun Oct  9 11:48:22 2011
--- configure.fixed     Tue Oct 11 22:21:26 2011
***************
*** 30070,30077 ****

    if test $passed -gt 0; then
      for var in 5 4 2 '' ; do
!       if test "$have_png" == 'no' ; then
!         if test "x${var}" == 'x' ; then
            pnglib='png'
          else
            pnglib="png1${var}"
--- 30070,30077 ----

    if test $passed -gt 0; then
      for var in 5 4 2 '' ; do
!       if test "$have_png" = 'no' ; then
!         if test "x${var}" = 'x' ; then
            pnglib='png'
          else
            pnglib="png1${var}"
***************
*** 30080,30086 ****
  #       Test for compatible LIBPNG library
          failed=0
          passed=0
!         if test "$with_png" == 'yes' -o "$with_png" == "libpng1${var}" ; then
            if test "${pnglib}" != 'png' ; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBPNG1${var} support " >&5
  $as_echo_n "checking for LIBPNG1${var} support ... " >&6; }
--- 30080,30086 ----
  #       Test for compatible LIBPNG library
          failed=0
          passed=0
!         if test "$with_png" = 'yes' -o "$with_png" = "libpng1${var}" ; then
            if test "${pnglib}" != 'png' ; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBPNG1${var} support " >&5
  $as_echo_n "checking for LIBPNG1${var} support ... " >&6; }
ScottJ
Posts: 6
Joined: 2011-01-18T15:28:29-07:00
Authentication code: 8675308

Re: patch to get --with-png working on FreeBSD

Post by ScottJ »

This is from IM 6.7.3-0.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: patch to get --with-png working on FreeBSD

Post by magick »

Thanks for the problem report and patch. We'll get it into ImageMagick 6.7.3-1 Beta by sometime tomorrow.
Post Reply