aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits
diff options
context:
space:
mode:
Diffstat (limited to 'x11-toolkits')
-rw-r--r--x11-toolkits/libgdiplus/Makefile9
-rw-r--r--x11-toolkits/libgdiplus/files/patch-pngcodec.c20
2 files changed, 27 insertions, 2 deletions
diff --git a/x11-toolkits/libgdiplus/Makefile b/x11-toolkits/libgdiplus/Makefile
index fd3b07ee0bb0..ba4625740441 100644
--- a/x11-toolkits/libgdiplus/Makefile
+++ b/x11-toolkits/libgdiplus/Makefile
@@ -26,11 +26,16 @@ USE_XLIB= yes
USE_LDCONFIG= yes
LIBTOOLFILES= configure cairo/configure
USE_AUTOTOOLS= libtool:22
-CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib"
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
+ LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
# Included cairo does not work for us. Enable below when Mono catches
# up with our port. For now, use included but patch out glitz manually.
#CONFIGURE_ARGS+= --with-cairo=installed
+CPPFLAGS+= -DPNG_DEPSTRUCT=
+
+post-patch:
+ ${REINPLACE_CMD} -e 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' \
+ ${WRKSRC}/cairo/src/cairo-png.c
.include <bsd.port.pre.mk>
diff --git a/x11-toolkits/libgdiplus/files/patch-pngcodec.c b/x11-toolkits/libgdiplus/files/patch-pngcodec.c
new file mode 100644
index 000000000000..ee59278468dc
--- /dev/null
+++ b/x11-toolkits/libgdiplus/files/patch-pngcodec.c
@@ -0,0 +1,20 @@
+--- src/pngcodec.c.orig 2009-06-08 19:30:15.000000000 +0200
++++ src/pngcodec.c 2010-03-28 15:27:01.000000000 +0200
+@@ -352,7 +352,7 @@
+ info_ptr->palette[i].blue,
+ info_ptr->palette[i].green,
+ info_ptr->palette[i].red,
+- info_ptr->trans[i]); /* alpha */
++ info_ptr->trans_alpha[i]); /* alpha */
+ }
+ }
+
+@@ -418,7 +418,7 @@
+ }
+
+ if ((color_type == PNG_COLOR_TYPE_GRAY) && (bit_depth < 8)) {
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ }
+
+ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {