Revision
141231
Author
jeremyhu@macports.org
Date
2015-10-12 23:42:15 -0700 (Mon, 12 Oct 2015)

Log Message

stardict: Fix build failure with recent compilers

Modified Paths

Added Paths

Diff

Modified: trunk/dports/textproc/stardict/Portfile (141230 => 141231)


--- trunk/dports/textproc/stardict/Portfile	2015-10-13 06:31:46 UTC (rev 141230)
+++ trunk/dports/textproc/stardict/Portfile	2015-10-13 06:42:15 UTC (rev 141231)
@@ -34,7 +34,7 @@
 		port:libsigcxx2 \
 		port:popt
 
-patchfiles	patch-zlib-1.2.6.diff
+patchfiles	patch-zlib-1.2.6.diff atoi.patch
 
 # update dict/m4/intltool.m4 and autoreconf
 

Added: trunk/dports/textproc/stardict/files/atoi.patch (0 => 141231)


--- trunk/dports/textproc/stardict/files/atoi.patch	                        (rev 0)
+++ trunk/dports/textproc/stardict/files/atoi.patch	2015-10-13 06:42:15 UTC (rev 141231)
@@ -0,0 +1,45 @@
+diff -Naurp stardict-3.0.4.orig/dict/src/dictmanagedlg.cpp stardict-3.0.4/dict/src/dictmanagedlg.cpp
+--- dict/src/dictmanagedlg.cpp	2012-12-24 02:04:24.000000000 -0800
++++ dict/src/dictmanagedlg.cpp	2015-10-12 23:36:06.000000000 -0700
+@@ -26,6 +26,8 @@
+ #include <glib/gi18n.h>
+ #include <algorithm>
+ 
++#include <stdlib.h>
++
+ #ifdef _WIN32
+ #  include <gdk/gdkwin32.h>
+ #endif
+diff -Naurp stardict-3.0.4.orig/dict/src/lib/dict_client.cpp stardict-3.0.4/dict/src/lib/dict_client.cpp
+--- dict/src/lib/dict_client.cpp	2012-01-12 22:21:32.000000000 -0800
++++ dict/src/lib/dict_client.cpp	2015-10-12 23:36:10.000000000 -0700
+@@ -27,6 +27,7 @@
+ #endif
+ 
+ #include <glib.h>
++#include <stdlib.h>
+ 
+ #include "sockets.h"
+ 
+diff -Naurp stardict-3.0.4.orig/dict/src/lib/stddict.cpp stardict-3.0.4/dict/src/lib/stddict.cpp
+--- dict/src/lib/stddict.cpp	2012-02-17 00:58:47.000000000 -0800
++++ dict/src/lib/stddict.cpp	2015-10-12 23:36:20.000000000 -0700
+@@ -34,6 +34,7 @@
+ #include <glib/gstdio.h>
+ #include <algorithm>
+ #include <memory>
++#include <stdlib.h>
+ 
+ #include "ifo_file.h"
+ #include "edit-distance.h"
+diff -Naurp stardict-3.0.4.orig/dict/src/mainwin.cpp stardict-3.0.4/dict/src/mainwin.cpp
+--- dict/src/mainwin.cpp	2012-12-24 02:50:21.000000000 -0800
++++ dict/src/mainwin.cpp	2015-10-12 23:36:23.000000000 -0700
+@@ -23,6 +23,7 @@
+ #include <glib/gi18n.h>
+ #include <gdk/gdkkeysyms.h>
+ #include <algorithm>
++#include <stdlib.h>
+ 
+ #ifdef _WIN32
+ #define VERSION "3.0.4"