Bug 117225 - digikam requires at least libpng >= 1.2.7
Summary: digikam requires at least libpng >= 1.2.7
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-PNG (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-28 19:57 UTC by alfons.hoogervorst
Modified: 2017-07-30 16:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.0


Attachments
Require a png version that has png_set_add_alpha (1.49 KB, patch)
2005-11-28 19:58 UTC, alfons.hoogervorst
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alfons.hoogervorst 2005-11-28 19:57:10 UTC
Version:           CVS (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.3.1 compiled from sources
OS:                Linux

Hiya,

Latest digiKam from svn didn't build on my system, with libpng 1.2.5. Since recently digiKam uses png_set_add_alpha(), which was introduced in libpng 1.2.7 (cursory glance at the png changelog). 
The attached patch fixes it in a straight forward way by telling the compiler to use a newer libpng.
Comment 1 alfons.hoogervorst 2005-11-28 19:58:17 UTC
Created attachment 13666 [details]
Require a png version that has png_set_add_alpha
Comment 2 caulier.gilles 2005-11-28 22:51:16 UTC
SVN commit 483962 by cgilles:

patch from alfons hoogervorst: digikam 0.9.0 requires at least libpng >= 1.2.7

CCBUG: 117225

 M  +10 -0     configure.in.bot  
 M  +15 -0     configure.in.in  


--- trunk/extragear/graphics/digikam/configure.in.bot #483961:483962
@@ -72,6 +72,16 @@
   echo "-- libtiff found.................. YES"
 fi
 
+if test "x$have_png" != "xyes"; then
+  echo "-- libpng found................... NO"
+  echo ""
+  echo "digiKam needs libpng. You need to install the correct version (>= 1.2.7)."
+  echo ""
+  all_tests=bad
+else
+  echo "-- libpng found................... YES"
+fi
+
 if test "x$have_lcms" != "xyes"; then
   echo "-- lcms found..................... NO"
   echo ""
--- trunk/extragear/graphics/digikam/configure.in.in #483961:483962
@@ -251,6 +251,21 @@
 fi
 
 #------------------------------------------------------------------
+# Check for libpng with png_set_add_alpha() function
+#------------------------------------------------------------------
+
+have_png=no
+KDE_CHECK_LIB(png, png_set_add_alpha,
+        have_png=yes,
+        AC_MSG_WARN([digiKam requires libpng >= 1.2.7]),
+        -lpng -lz -lm)
+
+if test "x$have_png" != "xyes"; then
+  AC_WARN([digiKam requires libpng >= 1.2.7; digiKam will not be compiled.])
+  DO_NOT_COMPILE="digikam digikamimageplugins $DO_NOT_COMPILE"
+fi  
+
+#------------------------------------------------------------------
 # Check for lcms (backported from krita)
 #------------------------------------------------------------------
 
Comment 3 caulier.gilles 2005-11-28 22:58:35 UTC
Thanks for this patch Alfons.
Gilles
Comment 4 Rex Dieter 2005-11-29 17:32:43 UTC
Would it be possible to make the alpha support, ie, the calls to png_set_add_alpha() that require libpng >= 1.2.7, optional?  Else, you'll be locking out a lot of users (of older distributions).
Comment 5 caulier.gilles 2005-11-29 18:24:49 UTC
perhaps if i have more time because i'm very busy with digiKam core actually.

If anyone can provide a patch...

Gilles Caulier
Comment 6 Rex Dieter 2005-11-29 18:30:00 UTC
Wouldn't it be as easy as replacing every
png_set_add_alpha()

with something like:
#if (PNG_LIBPNG_VER_MAJOR >= 1 ) && (PNG_LIBPNG_VER_MINOR >= 2) && (PNG_LIBPNG_VER_RELEASE >= 7)
png_set_add_alpha()
#endif


#define PNG_LIBPNG_VER_MAJOR   1
#define PNG_LIBPNG_VER_MINOR   2
#define PNG_LIBPNG_VER_RELEASE 8
Comment 7 caulier.gilles 2005-11-29 18:34:55 UTC
Well, it's easy to make patch (:=))) I'm busy on other digiKam part...

Gilles