diff --git a/dports/lang/erlang/Portfile b/dports/lang/erlang/Portfile
index b3eaaa8..e3d7f4d 100644
--- a/dports/lang/erlang/Portfile
+++ b/dports/lang/erlang/Portfile
@@ -3,7 +3,7 @@
 PortSystem 1.0
 name		erlang
 version		R13B
-revision        2
+revision        3
 categories	lang erlang
 maintainers	bfulgham@macports.org
 platforms	darwin
@@ -58,7 +58,9 @@ patchfiles	patch-toolbar.erl \
                 patch-lib_ssl_c_src_Makefile.in \
                 patch-decode_big.c.diff \
                 patch-decode_fun.c.diff \
-                patch-erts_configure.diff
+                patch-erts_configure.diff \
+                patch-lib_wx_configure.in \
+                patch-lib_wx_configure
 
 configure.args  --prefix=${destroot}${prefix}	\
                 --enable-kernel-poll            \
diff --git a/dports/lang/erlang/files/patch-lib_wx_configure b/dports/lang/erlang/files/patch-lib_wx_configure
new file mode 100644
index 0000000..557549f
--- /dev/null
+++ b/dports/lang/erlang/files/patch-lib_wx_configure
@@ -0,0 +1,93 @@
+--- lib/wx/configure.orig	2009-05-05 11:06:59.000000000 -0400
++++ lib/wx/configure	2009-05-05 11:09:13.000000000 -0400
+@@ -4872,10 +4872,10 @@
+ #ifdef WIN32
+ 		# include <windows.h>
+ 	        # include <gl/gl.h>
+-	        #elif defined(HAVE_GL_GL_H)
+-	        # include <GL/gl.h>
+                 #elif defined(HAVE_OPENGL_GL_H)
+ 		# include <OpenGL/gl.h>
++	        #elif defined(HAVE_GL_GL_H)
++	        # include <GL/gl.h>
+ 		#endif
+ 
+ 
+@@ -4945,10 +4945,10 @@
+ #ifdef WIN32
+ 		# include <windows.h>
+ 	        # include <gl/gl.h>
+-	        #elif defined(HAVE_GL_GL_H)
+-	        # include <GL/gl.h>
+                 #elif defined(HAVE_OPENGL_GL_H)
+ 		# include <OpenGL/gl.h>
++	        #elif defined(HAVE_GL_GL_H)
++	        # include <GL/gl.h>
+ 		#endif
+ 
+ 
+@@ -5018,10 +5018,10 @@
+ #ifdef WIN32
+ 		# include <windows.h>
+ 	        # include <gl/gl.h>
+-	        #elif defined(HAVE_GL_GL_H)
+-	        # include <GL/gl.h>
+                 #elif defined(HAVE_OPENGL_GL_H)
+ 		# include <OpenGL/gl.h>
++	        #elif defined(HAVE_GL_GL_H)
++	        # include <GL/gl.h>
+ 		#endif
+ 
+ 
+@@ -5091,10 +5091,10 @@
+ #ifdef WIN32
+ 		# include <windows.h>
+ 	        # include <gl/gl.h>
+-	        #elif defined(HAVE_GL_GL_H)
+-	        # include <GL/gl.h>
+                 #elif defined(HAVE_OPENGL_GL_H)
+ 		# include <OpenGL/gl.h>
++	        #elif defined(HAVE_GL_GL_H)
++	        # include <GL/gl.h>
+ 		#endif
+ 
+ 
+@@ -5164,10 +5164,10 @@
+ #ifdef WIN32
+ 		# include <windows.h>
+ 	        # include <gl/gl.h>
+-	        #elif defined(HAVE_GL_GL_H)
+-	        # include <GL/gl.h>
+                 #elif defined(HAVE_OPENGL_GL_H)
+ 		# include <OpenGL/gl.h>
++	        #elif defined(HAVE_GL_GL_H)
++	        # include <GL/gl.h>
+ 		#endif
+ 
+ 
+@@ -5237,10 +5237,10 @@
+ #ifdef WIN32
+ 		# include <windows.h>
+ 	        # include <gl/gl.h>
+-	        #elif defined(HAVE_GL_GL_H)
+-	        # include <GL/gl.h>
+                 #elif defined(HAVE_OPENGL_GL_H)
+ 		# include <OpenGL/gl.h>
++	        #elif defined(HAVE_GL_GL_H)
++	        # include <GL/gl.h>
+ 		#endif
+ 
+ 
+@@ -5320,10 +5320,10 @@
+                 #ifdef WIN32
+ 		# include <windows.h>
+ 	        # include <gl/glu.h>
+-	        #elif defined(HAVE_GL_GL_H)
+-	        # include <GL/glu.h>
+                 #elif defined(HAVE_OPENGL_GL_H)
+ 		# include <OpenGL/glu.h>
++	        #elif defined(HAVE_GL_GL_H)
++	        # include <GL/glu.h>
+ 		#endif
+ 		#ifndef CALLBACK
+ 		# define CALLBACK
diff --git a/dports/lang/erlang/files/patch-lib_wx_configure.in b/dports/lang/erlang/files/patch-lib_wx_configure.in
new file mode 100644
index 0000000..9a2b985
--- /dev/null
+++ b/dports/lang/erlang/files/patch-lib_wx_configure.in
@@ -0,0 +1,41 @@
+--- lib/wx/configure.in.orig	2009-05-05 16:04:51.000000000 -0400
++++ lib/wx/configure.in	2009-05-05 16:06:10.000000000 -0400
+@@ -363,10 +363,10 @@
+ 	       [#ifdef WIN32
+ 		# include <windows.h>
+ 	        # include <gl/gl.h>
+-	        #elif defined(HAVE_GL_GL_H)
+-	        # include <GL/gl.h>
+                 #elif defined(HAVE_OPENGL_GL_H)
+ 		# include <OpenGL/gl.h>
++	        #elif defined(HAVE_GL_GL_H)
++	        # include <GL/gl.h>
+ 		#endif 
+ 		])
+  
+@@ -381,10 +381,10 @@
+                 #ifdef WIN32
+ 		# include <windows.h>
+ 	        # include <gl/glu.h>
+-	        #elif defined(HAVE_GL_GL_H)
+-	        # include <GL/glu.h>
+                 #elif defined(HAVE_OPENGL_GL_H)
+ 		# include <OpenGL/glu.h>
++	        #elif defined(HAVE_GL_GL_H)
++	        # include <GL/glu.h>
+ 		#endif 
+ 		#ifndef CALLBACK
+ 		# define CALLBACK
+@@ -431,10 +431,10 @@
+ 		#ifdef WIN32
+ 		# include <windows.h>
+ 	        # include <gl/gl.h>
+-	        #elif defined(HAVE_GL_GL_H)
+-	        # include <GL/gl.h>
+                 #elif defined(HAVE_OPENGL_GL_H)
+ 		# include <OpenGL/gl.h>
++	        #elif defined(HAVE_GL_GL_H)
++	        # include <GL/gl.h>
+ 		#endif 
+                 #include "wx/wx.h"
+ 		#include "wx/stc/stc.h"

