From 074547cbbae894473fce597a0a1fefc5b173fcaa Mon Sep 17 00:00:00 2001 From: Dirk Meyer Date: Sun, 28 Mar 2010 14:28:04 +0000 Subject: [PATCH] - fix build for png-1.4.1 --- graphics/imlib/Makefile | 2 +- graphics/imlib/files/patch-load.c | 11 +++++++++++ graphics/imlib2/Makefile | 2 +- graphics/imlib2/files/patch-loader_png.c | 11 +++++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 graphics/imlib/files/patch-load.c create mode 100644 graphics/imlib2/files/patch-loader_png.c diff --git a/graphics/imlib/Makefile b/graphics/imlib/Makefile index efb8d354f6b4..720e110618d1 100644 --- a/graphics/imlib/Makefile +++ b/graphics/imlib/Makefile @@ -8,7 +8,7 @@ PORTNAME= imlib PORTVERSION= 1.9.15 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= graphics MASTER_SITES= GNOME DIST_SUBDIR= gnome diff --git a/graphics/imlib/files/patch-load.c b/graphics/imlib/files/patch-load.c new file mode 100644 index 000000000000..a51987eb63ef --- /dev/null +++ b/graphics/imlib/files/patch-load.c @@ -0,0 +1,11 @@ +--- Imlib/load.c.orig 2004-09-21 02:23:20.000000000 +0200 ++++ Imlib/load.c 2010-03-28 16:23:13.000000000 +0200 +@@ -1619,7 +1619,7 @@ + return 0; + fread(buf, 1, 8, f); + rewind(f); +- return (int)png_check_sig(buf, 8); ++ return (int)!png_sig_cmp(buf, 0, 8); + #else + return 0; + #endif diff --git a/graphics/imlib2/Makefile b/graphics/imlib2/Makefile index 00019a8d5c67..a156483483ec 100644 --- a/graphics/imlib2/Makefile +++ b/graphics/imlib2/Makefile @@ -7,7 +7,7 @@ PORTNAME= imlib2 PORTVERSION= 1.4.1.000 -PORTREVISION= 4 +PORTREVISION= 5 PORTEPOCH= 2 CATEGORIES= graphics MASTER_SITES= ftp://ftp.springdaemons.com/pub/snapshots/e17/ \ diff --git a/graphics/imlib2/files/patch-loader_png.c b/graphics/imlib2/files/patch-loader_png.c new file mode 100644 index 000000000000..124961969439 --- /dev/null +++ b/graphics/imlib2/files/patch-loader_png.c @@ -0,0 +1,11 @@ +--- src/modules/loaders/loader_png.c.orig 2007-08-25 04:33:10.000000000 +0200 ++++ src/modules/loaders/loader_png.c 2010-03-28 16:18:53.000000000 +0200 +@@ -38,7 +38,7 @@ + + /* if we haven't read the header before, set the header data */ + fread(buf, 1, PNG_BYTES_TO_CHECK, f); +- if (!png_check_sig(buf, PNG_BYTES_TO_CHECK)) ++ if (png_check_sig(buf, 0, PNG_BYTES_TO_CHECK)) + { + fclose(f); + return 0;