You are not logged in.

#1 2010-02-25 19:48:46

goran'agar
Member
From: Nothern Italy
Registered: 2009-05-19
Posts: 171

fvwm-patched - fix to compile with the new libpng

Hi.
fvwm-patched in AUR does not compile since ligpng14 hit the repos.

I created the small patch below which works for me.

19-Fix-build-with-new-libpng.patch

--- libs/PictureImageLoader.c.orig      2010-02-25 18:35:41.725546806 +0100
+++ libs/PictureImageLoader.c   2010-02-25 18:37:46.812721435 +0100
@@ -417,7 +417,7 @@ Bool PImageLoadPng(FIMAGE_CMD_ARGS)
                return False;
        }
        fread(buf, 1, FPNG_BYTES_TO_CHECK, f);
-       if (!Fpng_check_sig(buf, FPNG_BYTES_TO_CHECK))
+       if (Fpng_sig_cmp(buf, 0, FPNG_BYTES_TO_CHECK))
        {
                fclose(f);
                return False;
@@ -503,7 +503,7 @@ Bool PImageLoadPng(FIMAGE_CMD_ARGS)
                Fpng_set_gray_to_rgb(Fpng_ptr);
                if (Fpng_get_bit_depth(Fpng_ptr, Finfo_ptr) < 8)
                {
-                       Fpng_set_gray_1_2_4_to_8(Fpng_ptr);
+                       Fpng_set_expand_gray_1_2_4_to_8(Fpng_ptr);
                }
        }
        for (i = 0; i < h; i++)
--- libs/Fpng.h.orig    2010-02-25 19:01:13.342068664 +0100
+++ libs/Fpng.h 2010-02-25 19:02:26.108727772 +0100
@@ -429,7 +429,7 @@ typedef Fpng_struct  **Fpng_structpp;
 #define FPNG_FILLER_AFTER PNG_FILLER_AFTER
 #define FPNG_INFO_tRNS PNG_INFO_tRNS
 
-#define Fpng_check_sig(a,b) png_check_sig(a,b)
+#define Fpng_sig_cmp(a,b,c) png_sig_cmp(a,b,c)
 #define Fpng_create_read_struct(a,b,c,d) png_create_read_struct(a,b,c,d)
 #define Fpng_create_info_struct(a) png_create_info_struct(a)
 #define Fpng_destroy_read_struct(a,b,c) png_destroy_read_struct(a,b,c)
@@ -444,7 +444,7 @@ typedef Fpng_struct  **Fpng_structpp;
 #define Fpng_set_packing(a) png_set_packing(a)
 #define Fpng_set_gray_to_rgb(a) png_set_gray_to_rgb(a)
 #define Fpng_get_bit_depth(a,b) png_get_bit_depth(a,b)
-#define Fpng_set_gray_1_2_4_to_8(a) png_set_gray_1_2_4_to_8(a)
+#define Fpng_set_expand_gray_1_2_4_to_8(a) png_set_expand_gray_1_2_4_to_8(a)
 #define Fpng_get_valid(a,b,c) png_get_valid(a,b,c)
 #define Fpng_read_end(a,b) png_read_end(a,b)
 #define Fpng_set_interlace_handling(a) png_set_interlace_handling(a)

Of course it has to be added to the PKGBUILD, with md5sum, etc.

Hope someone finds it useful.


Sony Vaio VPCM13M1E  - Arch Linux - LXDE

Offline

#2 2010-02-25 19:59:49

droog
Member
Registered: 2004-11-18
Posts: 877

Re: fvwm-patched - fix to compile with the new libpng

Thanks,
haven't built the patched fvwm in awhile just using devel, but every once in awhile i do to mess around with something.

Offline

#3 2010-03-04 21:51:42

ThomasAdam
Member
From: Southampton, England
Registered: 2005-10-26
Posts: 149

Re: fvwm-patched - fix to compile with the new libpng

I'll keep an eye on this -- although I don't like the patch as-is, so I will likely implement something similar upstream when libpng14 is a little more wide-spread.

What other patches does ArchLinux have kicking around for FVWM that I seemingly don't know about?  Who's responsible for maintaining these.  I am specifically *not* interested in patches which implement crappy features, but more the ones like this libpng patch, which are integration patches.

-- Thomas Adam

Offline

#4 2010-03-05 08:36:23

goran'agar
Member
From: Nothern Italy
Registered: 2009-05-19
Posts: 171

Re: fvwm-patched - fix to compile with the new libpng

ThomasAdam wrote:

I'll keep an eye on this -- although I don't like the patch as-is, so I will likely implement something similar upstream when libpng14 is a little more wide-spread.

What other patches does ArchLinux have kicking around for FVWM that I seemingly don't know about?  Who's responsible for maintaining these.  I am specifically *not* interested in patches which implement crappy features, but more the ones like this libpng patch, which are integration patches.

-- Thomas Adam

Hi.
Please have a look at this:  http://aur.archlinux.org/packages.php?ID=7195


Sony Vaio VPCM13M1E  - Arch Linux - LXDE

Offline

#5 2010-03-05 19:36:57

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: fvwm-patched - fix to compile with the new libpng

ThomasAdam wrote:

I'll keep an eye on this -- although I don't like the patch as-is, so I will likely implement something similar upstream when libpng14 is a little more wide-spread.

What other patches does ArchLinux have kicking around for FVWM that I seemingly don't know about?  Who's responsible for maintaining these.  I am specifically *not* interested in patches which implement crappy features, but more the ones like this libpng patch, which are integration patches.

-- Thomas Adam

I maintain the fvwm packages in the repo. The only patch currently used is similar to the one posted here to build with libpng14.  We also add a .desktop file to the package.

Offline

Board footer

Powered by FluxBB