Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37839544
en ru br
ALT Linux repos
S:0.23.0-alt1

Group :: Graphics
RPM: xmedcon

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: xmedcon-0.10.5-alt-libpng15.patch
Download


diff --git a/xmedcon/configure b/xmedcon/configure
index ef68f29..1757b91 100755
--- a/xmedcon/configure
+++ b/xmedcon/configure
@@ -21369,13 +21369,13 @@ else
 fi
 
 if test x"$png_prefix" != "x"; then
-    PNG_LDFLAGS="-L$png_prefix/lib -lpng12"
+    PNG_LDFLAGS="-L$png_prefix/lib -lpng"
     PNG_CFLAGS="-I$png_prefix/include"
 
     LDFLAGS="$LDFLAGS -lm $PNG_LDFLAGS $ZLIB_FLAGS"
     CPPFLAGS="$CPPFLAGS $PNG_CFLAGS"
 else
-    PNG_LDFLAGS="-lpng12"
+    PNG_LDFLAGS="-lpng"
     PNG_CFLAGS=""
 fi
 
@@ -21530,13 +21530,13 @@ else
 fi
 
 
-  { $as_echo "$as_me:$LINENO: checking for png_read_png in -lpng12" >&5
-$as_echo_n "checking for png_read_png in -lpng12... " >&6; }
+  { $as_echo "$as_me:$LINENO: checking for png_read_png in -lpng" >&5
+$as_echo_n "checking for png_read_png in -lpng... " >&6; }
 if test "${ac_cv_lib_png12_png_read_png+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng12 $ZLIB_LDFLAGS $LIBS"
+LIBS="-lpng $ZLIB_LDFLAGS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
diff --git a/xmedcon/source/m-png.c b/xmedcon/source/m-png.c
index fc73201..f9eca10 100644
--- a/xmedcon/source/m-png.c
+++ b/xmedcon/source/m-png.c
@@ -65,7 +65,7 @@ static void MdcPngErr(png_structp png_ptr, png_const_charp error_msg)
 
   if (!png_ptr) return; 
 
-  longjmp(png_ptr->jmpbuf, 1);
+  longjmp(png_jmpbuf(png_ptr), 1);
 }
 
 static void MdcPngWarn(png_structp png_ptr, png_const_charp warning_msg)
@@ -160,22 +160,26 @@ char *MdcReadPNG(FILEINFO *fi)
     png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette);
   }
 
+	png_textp text_ptr;
+	int num_text;
+	png_get_text(png_ptr, info_ptr, &text_ptr, &num_text);
+
   /* get comment */
-  if(info_ptr->num_text > 0) {
+  if(num_text > 0) {
     commentsize = 1;
 
-    for(i = 0; i < info_ptr->num_text; i++)
-      commentsize += strlen(info_ptr->text[i].key) + 1 +
-                     info_ptr->text[i].text_length + 2;
+    for(i = 0; i < num_text; i++)
+      commentsize += strlen(text_ptr[i].key) + 1 +
+                     text_ptr[i].text_length + 2;
     
     if ((fi->comment = malloc(commentsize)) == NULL) {
       MdcPngWarn(png_ptr,"PNG  Can't malloc comment string");
     }else{ 
       fi->comment[0] = '\0';
-      for (i = 0; i < info_ptr->num_text; i++) {
-        strcat(fi->comment, info_ptr->text[i].key);
+      for (i = 0; i < num_text; i++) {
+        strcat(fi->comment, text_ptr[i].key);
         strcat(fi->comment, "::");
-        strcat(fi->comment, info_ptr->text[i].text);
+        strcat(fi->comment, text_ptr[i].text);
         strcat(fi->comment, "\n");
       }
     }
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin