aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2006-12-23 15:07:56 +0800
committerrafan <rafan@FreeBSD.org>2006-12-23 15:07:56 +0800
commitfd3189170643a47e67ff3b9fbf04f7a2715ea9f8 (patch)
tree3fbd99a90494ebd798aebcb78287f058a5eae354
parent837f21467072b2cb96e6f9ec51c4ee8959fc4efd (diff)
downloadfreebsd-ports-gnome-fd3189170643a47e67ff3b9fbf04f7a2715ea9f8.tar.gz
freebsd-ports-gnome-fd3189170643a47e67ff3b9fbf04f7a2715ea9f8.tar.zst
freebsd-ports-gnome-fd3189170643a47e67ff3b9fbf04f7a2715ea9f8.zip
- Fix build when libpng is compiled with assembler code support.
For example, setting CPUTYPE to p3 or above triggers this. This is the same bug happened in ImageMagick, and the original patch can be found at http://www.imagemagick.org/pipermail/magick-developers/2006-April/002550.html In fact, this patch was submitted in PR 101361, but a wrong version was committed. PR: ports/107086 Obtained from: GraphicsMagick cvs
-rw-r--r--graphics/GraphicsMagick/files/patch-coders-png.c22
-rw-r--r--graphics/GraphicsMagick12/files/patch-coders-png.c22
-rw-r--r--graphics/GraphicsMagick13/files/patch-coders-png.c22
3 files changed, 66 insertions, 0 deletions
diff --git a/graphics/GraphicsMagick/files/patch-coders-png.c b/graphics/GraphicsMagick/files/patch-coders-png.c
new file mode 100644
index 000000000000..7a3b687f08cf
--- /dev/null
+++ b/graphics/GraphicsMagick/files/patch-coders-png.c
@@ -0,0 +1,22 @@
+--- coders/png.c 2004/11/11 03:10:42 1.369.2.3
++++ coders/png.c 2006/08/18 04:03:02 1.369.2.4
+@@ -1709,7 +1709,7 @@ static Image *ReadOnePNGImage(MngInfo *m
+ #if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \
+ && (PNG_LIBPNG_VER >= 10200)
+ /* Disable thread-unsafe features of pnggccrd */
+- if (png_access_version() >= 10200)
++ if (png_access_version_number() >= 10200)
+ {
+ png_uint_32 mmx_disable_mask=0;
+ png_uint_32 asm_flags;
+@@ -1718,8 +1718,8 @@ static Image *ReadOnePNGImage(MngInfo *m
+ | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
+ | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
+ | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
+- asm_flags=png_get_asm_flags(png_ptr);
+- png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask);
++ asm_flags=png_get_asm_flags(ping);
++ png_set_asm_flags(ping, asm_flags & ~mmx_disable_mask);
+ }
+ #endif
+
diff --git a/graphics/GraphicsMagick12/files/patch-coders-png.c b/graphics/GraphicsMagick12/files/patch-coders-png.c
new file mode 100644
index 000000000000..7a3b687f08cf
--- /dev/null
+++ b/graphics/GraphicsMagick12/files/patch-coders-png.c
@@ -0,0 +1,22 @@
+--- coders/png.c 2004/11/11 03:10:42 1.369.2.3
++++ coders/png.c 2006/08/18 04:03:02 1.369.2.4
+@@ -1709,7 +1709,7 @@ static Image *ReadOnePNGImage(MngInfo *m
+ #if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \
+ && (PNG_LIBPNG_VER >= 10200)
+ /* Disable thread-unsafe features of pnggccrd */
+- if (png_access_version() >= 10200)
++ if (png_access_version_number() >= 10200)
+ {
+ png_uint_32 mmx_disable_mask=0;
+ png_uint_32 asm_flags;
+@@ -1718,8 +1718,8 @@ static Image *ReadOnePNGImage(MngInfo *m
+ | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
+ | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
+ | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
+- asm_flags=png_get_asm_flags(png_ptr);
+- png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask);
++ asm_flags=png_get_asm_flags(ping);
++ png_set_asm_flags(ping, asm_flags & ~mmx_disable_mask);
+ }
+ #endif
+
diff --git a/graphics/GraphicsMagick13/files/patch-coders-png.c b/graphics/GraphicsMagick13/files/patch-coders-png.c
new file mode 100644
index 000000000000..7a3b687f08cf
--- /dev/null
+++ b/graphics/GraphicsMagick13/files/patch-coders-png.c
@@ -0,0 +1,22 @@
+--- coders/png.c 2004/11/11 03:10:42 1.369.2.3
++++ coders/png.c 2006/08/18 04:03:02 1.369.2.4
+@@ -1709,7 +1709,7 @@ static Image *ReadOnePNGImage(MngInfo *m
+ #if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \
+ && (PNG_LIBPNG_VER >= 10200)
+ /* Disable thread-unsafe features of pnggccrd */
+- if (png_access_version() >= 10200)
++ if (png_access_version_number() >= 10200)
+ {
+ png_uint_32 mmx_disable_mask=0;
+ png_uint_32 asm_flags;
+@@ -1718,8 +1718,8 @@ static Image *ReadOnePNGImage(MngInfo *m
+ | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
+ | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
+ | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
+- asm_flags=png_get_asm_flags(png_ptr);
+- png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask);
++ asm_flags=png_get_asm_flags(ping);
++ png_set_asm_flags(ping, asm_flags & ~mmx_disable_mask);
+ }
+ #endif
+