FreeOrion

Forums for the FreeOrion project
It is currently Wed Jun 19, 2013 8:40 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: gigi problems with libpng 1.4.x
PostPosted: Wed Aug 25, 2010 7:02 pm 
Offline
Space Krill

Joined: Wed Aug 25, 2010 6:49 pm
Posts: 2
hi,

please adapt gigi to the latest libpng branch which is 1.4.x, because gigi doesnt compile with it.

thanks


Top
 Profile  
 
 Post subject: Re: gigi problems with libpng 1.4.x
PostPosted: Wed Aug 25, 2010 9:11 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8056
Location: Vancouver, BC
This issue has been known for a while, but unfortunately won't be fixed soon due to the unavailability of the GG maintainer. For now, I suggest using libpng 1.2.x if you can.


Top
 Profile  
 
 Post subject: Re: gigi problems with libpng 1.4.x
PostPosted: Sat Sep 04, 2010 10:41 am 
Offline
Space Krill

Joined: Sat Sep 04, 2010 10:28 am
Posts: 2
http://www.freeorion.org/forum/viewtopic.php?p=43308#p43308
contains the proper solution.


Top
 Profile  
 
 Post subject: Re: gigi problems with libpng 1.4.x
PostPosted: Sun Sep 26, 2010 11:09 pm 
Offline
Space Floater

Joined: Sun Sep 26, 2010 11:05 pm
Posts: 22
Hi,

I created a small patch to allow gigi to compile with libpng 1.4:
Code:
--- src/GIL/extension/io/png_io.hpp.orig   2010-09-26 13:48:14.524669596 -0600
+++ src/GIL/extension/io/png_io.hpp   2010-09-26 13:48:24.601670929 -0600
@@ -9,6 +9,8 @@
*/

/*************************************************************************************************/
+#define png_infopp_NULL (png_infopp)NULL
+#define int_p_NULL (int*)NULL

#ifndef GIL_PNG_IO_H
#define GIL_PNG_IO_H
--- src/GIL/extension/io/png_io_private.hpp.orig   2010-09-26 13:47:45.113932056 -0600
+++ src/GIL/extension/io/png_io_private.hpp   2010-09-26 13:48:04.873671113 -0600
@@ -10,6 +10,8 @@
     See http://stlab.adobe.com/gil for most recent version including documentation.
*/
/*************************************************************************************************/
+#define png_infopp_NULL (png_infopp)NULL
+#define int_p_NULL (int*)NULL

#ifndef GIL_PNG_IO_PRIVATE_H
#define GIL_PNG_IO_PRIVATE_H
--- src/GIL/extension/io/png_io_private.hpp.orig   2010-09-26 14:01:59.000000000 -0600
+++ src/GIL/extension/io/png_io_private.hpp   2010-09-26 14:03:52.000000000 -0600
@@ -312,7 +312,7 @@ public:
             case 4:
             case 8:
                 if(bit_depth < 8)
-                    png_set_gray_1_2_4_to_8(_png_ptr);
+                    png_set_expand_gray_1_2_4_to_8(_png_ptr);
                 png_read_and_convert_pixels<gray8_pixel_t,gray8_ref_t>(view,_cc,_png_ptr,width,height,interlaced);
                 break;
             case 16:
@@ -350,7 +350,7 @@ public:
             case 4:
             case 8:
                 if(bit_depth < 8)
-                    png_set_gray_1_2_4_to_8(_png_ptr);
+                    png_set_expand_gray_1_2_4_to_8(_png_ptr);
                 png_read_and_convert_pixels<gray_alpha8_pixel_t,gray_alpha8_ref_t>(view,_cc,_png_ptr,width,height,interlaced);
                 break;
             case 16:




also to get by compiling with gcc 4.5:
Code:
--- GG/adobe/cmath.hpp.orig   2010-09-26 14:09:50.000000000 -0600
+++ GG/adobe/cmath.hpp   2010-09-26 14:10:21.000000000 -0600
@@ -37,7 +37,7 @@ back to include math.h. This also needs

#define ADOBE_HAS_CPP_CMATH

-#elif ((__GNUC__ == 4) && (__GNUC_MINOR__ <= 4))
+#elif ((__GNUC__ == 4) && (__GNUC_MINOR__ <= 5))
/*
     The currently supported version of GNUC has C99 extensions in math.h. But no TR1 extensions.
*/




Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group