aboutsummaryrefslogtreecommitdiff
path: root/net-im/amsn
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2012-06-01 05:26:28 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2012-06-01 05:26:28 +0000
commit2b74a89bc8342f0b9b737c37d87737caf7b0ea1e (patch)
treec04604583d8be53b3ed7f10975be828c731f87cb /net-im/amsn
parent24315159daa0089f08acea4ba1b130fb6721ad5c (diff)
downloadports-2b74a89bc8342f0b9b737c37d87737caf7b0ea1e.tar.gz
ports-2b74a89bc8342f0b9b737c37d87737caf7b0ea1e.zip
Notes
Diffstat (limited to 'net-im/amsn')
-rw-r--r--net-im/amsn/Makefile4
-rw-r--r--net-im/amsn/files/patch-ximapng.cpp74
-rw-r--r--net-im/amsn/files/patch-ximapng.h19
3 files changed, 96 insertions, 1 deletions
diff --git a/net-im/amsn/Makefile b/net-im/amsn/Makefile
index d957ff3b386c..2dc13c7b39d8 100644
--- a/net-im/amsn/Makefile
+++ b/net-im/amsn/Makefile
@@ -7,6 +7,7 @@
PORTNAME= amsn
PORTVERSION= 0.98.9
+PORTREVISION= 1
CATEGORIES= net-im
MASTER_SITES= SF
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
@@ -17,7 +18,7 @@ COMMENT= Alvano\'s MSN Messenger
LIB_DEPENDS= Imlib.5:${PORTSDIR}/graphics/imlib \
gstfarsight-0.10.0:${PORTSDIR}/net-im/farsight2 \
jpeg.11:${PORTSDIR}/graphics/jpeg \
- png.6:${PORTSDIR}/graphics/png
+ png15:${PORTSDIR}/graphics/png
BUILD_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils \
${LOCALBASE}/lib/tls/tls.tcl:${PORTSDIR}/devel/tcltls \
snack>=2.2.10_4:${PORTSDIR}/audio/snack
@@ -43,6 +44,7 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-tcl=${TCL_LIBDIR} \
--with-tk=${TK_LIBDIR}
+CXXFLAGS+= -I${LOCALBASE}/include/libpng15
CONFIGURE_ENV+= CFLAGS+="-I${LOCALBASE}/include" \
LDFLAGS+="-L${LOCALBASE}/lib"
diff --git a/net-im/amsn/files/patch-ximapng.cpp b/net-im/amsn/files/patch-ximapng.cpp
new file mode 100644
index 000000000000..623f9ee17a9d
--- /dev/null
+++ b/net-im/amsn/files/patch-ximapng.cpp
@@ -0,0 +1,74 @@
+--- utils/TkCximage/src/CxImage/ximapng.cpp.orig 2010-01-29 10:09:27.000000000 +0100
++++ utils/TkCximage/src/CxImage/ximapng.cpp 2012-05-05 13:25:32.000000000 +0200
+@@ -15,7 +15,7 @@
+ void CxImagePNG::ima_png_error(png_struct *png_ptr, char *message)
+ {
+ strcpy(info.szLastError,message);
+- longjmp(png_ptr->jmpbuf, 1);
++ longjmp(png_jmpbuf(png_ptr), 1);
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ #if CXIMAGE_SUPPORT_DECODE
+@@ -62,7 +62,7 @@
+ /* Set error handling if you are using the setjmp/longjmp method (this is
+ * the normal method of doing things with libpng). REQUIRED unless you
+ * set up your own error handlers in the png_create_read_struct() earlier. */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* Free all of the memory associated with the png_ptr and info_ptr */
+ delete [] row_pointers;
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+@@ -80,7 +80,7 @@
+ head.biWidth = info_ptr->width;
+ head.biHeight= info_ptr->height;
+ info.dwType = CXIMAGE_FORMAT_PNG;
+- longjmp(png_ptr->jmpbuf, 1);
++ longjmp(png_jmpbuf(png_ptr), 1);
+ }
+
+ /* calculate new number of channels */
+@@ -101,7 +101,7 @@
+ break;
+ default:
+ strcpy(info.szLastError,"unknown PNG color type");
+- longjmp(png_ptr->jmpbuf, 1);
++ longjmp(png_jmpbuf(png_ptr), 1);
+ }
+
+ //find the right pixel depth used for cximage
+@@ -111,7 +111,7 @@
+ if (channels >= 3) pixel_depth=24;
+
+ if (!Create(info_ptr->width, info_ptr->height, pixel_depth, CXIMAGE_FORMAT_PNG)){
+- longjmp(png_ptr->jmpbuf, 1);
++ longjmp(png_jmpbuf(png_ptr), 1);
+ }
+
+ /* get metrics */
+@@ -207,7 +207,7 @@
+ }
+
+ // <vho> - handle cancel
+- if (info.nEscape) longjmp(png_ptr->jmpbuf, 1);
++ if (info.nEscape) longjmp(png_jmpbuf(png_ptr), 1);
+
+ // row_bytes is the width x number of channels x (bit-depth / 8)
+ row_pointers = new BYTE[info_ptr->rowbytes + 8];
+@@ -230,7 +230,7 @@
+ do {
+
+ // <vho> - handle cancel
+- if (info.nEscape) longjmp(png_ptr->jmpbuf, 1);
++ if (info.nEscape) longjmp(png_jmpbuf(png_ptr), 1);
+
+ #if CXIMAGE_SUPPORT_ALPHA // <vho>
+ if (AlphaIsValid()) {
+@@ -362,7 +362,7 @@
+ /* Set error handling. REQUIRED if you aren't supplying your own
+ * error hadnling functions in the png_create_write_struct() call.
+ */
+- if (setjmp(png_ptr->jmpbuf)){
++ if (setjmp(png_jmpbuf(png_ptr))){
+ /* If we get here, we had a problem reading the file */
+ if (info_ptr->palette) free(info_ptr->palette);
+ png_destroy_write_struct(&png_ptr, (png_infopp)&info_ptr);
diff --git a/net-im/amsn/files/patch-ximapng.h b/net-im/amsn/files/patch-ximapng.h
new file mode 100644
index 000000000000..2e1080f1d7a8
--- /dev/null
+++ b/net-im/amsn/files/patch-ximapng.h
@@ -0,0 +1,19 @@
+--- utils/TkCximage/src/CxImage/ximapng.h.orig 2012-05-05 13:24:02.000000000 +0200
++++ utils/TkCximage/src/CxImage/ximapng.h 2012-05-07 06:43:30.000000000 +0200
+@@ -23,6 +23,7 @@
+
+ extern "C" {
+ #include <png.h>
++#include <pngpriv.h>
+ }
+
+ class CxImagePNG: public CxImage
+@@ -65,7 +66,7 @@
+ static void PNGAPI user_error_fn(png_structp png_ptr,png_const_charp error_msg)
+ {
+ strncpy((char*)png_ptr->error_ptr,error_msg,255);
+- longjmp(png_ptr->jmpbuf, 1);
++ longjmp(png_jmpbuf(png_ptr), 1);
+ }
+ };
+