diff --git a/graphics/comix/Portfile b/graphics/comix/Portfile
index f6a466f..5580ce1 100644
--- a/graphics/comix/Portfile
+++ b/graphics/comix/Portfile
@@ -4,7 +4,7 @@ PortSystem          1.0
 
 name                comix
 version             4.0.4
-revision            2
+revision            3
 categories          graphics
 maintainers         perry openmaintainer
 platforms           darwin
@@ -22,7 +22,15 @@ livecheck.regex     {Comix (.*) released}
 livecheck.type      regex
 livecheck.url       ${homepage}
 
-depends_lib         port:py26-pygtk port:py26-pil port:python26 port:unrar
+patchfiles          patch-pillow-compat.diff
+
+set python.version  26
+set python.branch   "[string range ${python.version} 0 end-1].[string index ${python.version} end]"
+
+depends_lib         port:py${python.version}-pygtk \
+                    path:${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/PIL:py${python.version}-Pillow \
+                    port:python${python.version} \
+                    port:unrar
 
 master_sites        sourceforge
 
@@ -32,7 +40,7 @@ use_configure       no
 
 build               {}
 
-set python.bin      ${prefix}/bin/python2.6
+set python.bin      ${prefix}/bin/python${python.branch}
 
 pre-destroot {
     reinplace "s|^#!/usr/bin/env python\$|#!${python.bin}|" ${worksrcpath}/src/comix.py
diff --git a/graphics/comix/files/patch-pillow-compat.diff b/graphics/comix/files/patch-pillow-compat.diff
new file mode 100644
index 0000000..520cbbe
--- /dev/null
+++ b/graphics/comix/files/patch-pillow-compat.diff
@@ -0,0 +1,113 @@
+--- install.py.old	2014-07-10 20:19:31.000000000 +0200
++++ install.py	2014-07-10 20:20:08.000000000 +0200
+@@ -240,7 +240,7 @@
+         print '    !!! PyGTK .................... Not found'
+         required_found = False
+     try:
+-        import Image
++        from PIL import Image
+         assert Image.VERSION >= '1.1.5'
+         print '    Python Imaging Library ....... OK'
+     except ImportError:
+--- mime/comicthumb.old	2014-07-10 20:19:32.000000000 +0200
++++ mime/comicthumb	2014-07-10 20:20:08.000000000 +0200
+@@ -22,7 +22,7 @@
+ import subprocess
+ 
+ try:
+-    import Image
++    from PIL import Image
+ except ImportError:
+     print '! Could not import the Image module (PIL).'
+     print __doc__
+--- src/comix.py.old	2014-07-10 20:19:32.000000000 +0200
++++ src/comix.py	2014-07-10 20:20:08.000000000 +0200
+@@ -49,7 +49,7 @@
+     sys.exit(1)
+ 
+ try:
+-    import Image
++    from PIL import Image
+     assert Image.VERSION >= '1.1.5'
+ except AssertionError:
+     print "You don't have the required version of the Python Imaging",
+--- src/histogram.py.old	2014-07-10 20:19:32.000000000 +0200
++++ src/histogram.py	2014-07-10 20:20:08.000000000 +0200
+@@ -1,9 +1,9 @@
+ """histogram.py - Draw histograms (RGB) from pixbufs."""
+ 
+ import gtk
+-import Image
+-import ImageDraw
+-import ImageOps
++from PIL import Image
++from PIL import ImageDraw
++from PIL import ImageOps
+ 
+ import image
+ 
+--- src/image.py.old	2014-07-10 20:19:32.000000000 +0200
++++ src/image.py	2014-07-10 20:20:08.000000000 +0200
+@@ -1,10 +1,10 @@
+ """image.py - Various image manipulations."""
+ 
+ import gtk
+-import Image
+-import ImageEnhance
+-import ImageOps
+-import ImageStat
++from PIL import Image
++from PIL import ImageEnhance
++from PIL import ImageOps
++from PIL import ImageStat
+ 
+ from preferences import prefs
+ 
+--- src/library.py.old	2014-07-10 20:19:32.000000000 +0200
++++ src/library.py	2014-07-10 20:20:08.000000000 +0200
+@@ -8,8 +8,8 @@
+ import gtk
+ import gobject
+ import pango
+-import Image
+-import ImageDraw
++from PIL import Image
++from PIL import ImageDraw
+ 
+ import archive
+ import encoding
+--- src/thumbbar.py.old	2014-07-10 20:19:32.000000000 +0200
++++ src/thumbbar.py	2014-07-10 20:20:08.000000000 +0200
+@@ -4,8 +4,8 @@
+ 
+ import gtk
+ import gobject
+-import Image
+-import ImageDraw
++from PIL import Image
++from PIL import ImageDraw
+ 
+ import image
+ from preferences import prefs
+--- src/thumbnail.py.old	2014-07-10 20:19:32.000000000 +0200
++++ src/thumbnail.py	2014-07-10 20:20:08.000000000 +0200
+@@ -15,7 +15,7 @@
+ import tempfile
+ 
+ import gtk
+-import Image
++from PIL import Image
+ 
+ import archive
+ import constants
+--- src/thumbremover.py.old	2014-07-10 20:19:32.000000000 +0200
++++ src/thumbremover.py	2014-07-10 20:20:08.000000000 +0200
+@@ -7,7 +7,7 @@
+ 
+ import gtk
+ import pango
+-import Image
++from PIL import Image
+ 
+ import encoding
+ import labels
diff --git a/graphics/ipe-tools/Portfile b/graphics/ipe-tools/Portfile
index 7ed8452..0bf479b 100644
--- a/graphics/ipe-tools/Portfile
+++ b/graphics/ipe-tools/Portfile
@@ -59,6 +59,9 @@ eval build.env          CPPFLAGS+='${configure.cppflags}' \
                         LDFLAGS+='${configure.cc_archflags}' \
                         CC=${configure.cc} CXX=${configure.cxx}
 
+set python.version  "DUMMY_VALUE_WILL_BE_OVERWRITTEN"
+set python.branch   "DUMMY_VALUE_WILL_BE_OVERWRITTEN"
+
 build {
         system "cd ${workpath}/figtoipe-${figtoipe-vers} && ${build.env} ${build.cmd} ${build.target} CXX=${configure.cxx}"
         system "cd ${workpath}/ipe5toxml && ${build.env} ${build.cmd}"
@@ -89,16 +92,22 @@ variant python25 conflicts python24 python26 python27 description {Use PIL from
 }
 
 variant python26 conflicts python24 python25 python27 description {Use PIL from MacPorts Python 2.6} {
-    depends_lib-append port:py26-pil
+    set python.version  26
+    set python.branch   "[string range ${python.version} 0 end-1].[string index ${python.version} end]"
+
+    depends_lib-append  path:${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/PIL:py${python.version}-Pillow
     post-patch {
-        reinplace "s|__MP_PYTHON_BIN__|${prefix}/bin/python2.6|" ${workpath}/svgtoipe-${svgtoipe-vers}/svgtoipe.py
+        reinplace "s|__MP_PYTHON_BIN__|${prefix}/bin/python${python.branch}|" ${workpath}/svgtoipe-${svgtoipe-vers}/svgtoipe.py
     }
 }
 
 variant python27 conflicts python24 python25 python26 description {Use PIL from MacPorts Python 2.7} {
-    depends_lib-append port:py27-pil
+    set python.version  27
+    set python.branch   "[string range ${python.version} 0 end-1].[string index ${python.version} end]"
+
+    depends_lib-append  path:${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/PIL:py${python.version}-Pillow
     post-patch {
-        reinplace "s|__MP_PYTHON_BIN__|${prefix}/bin/python2.7|" ${workpath}/svgtoipe-${svgtoipe-vers}/svgtoipe.py
+        reinplace "s|__MP_PYTHON_BIN__|${prefix}/bin/python${python.branch}|" ${workpath}/svgtoipe-${svgtoipe-vers}/svgtoipe.py
     }
 }
 
diff --git a/python/py-astlib/Portfile b/python/py-astlib/Portfile
index 373aa5d..c996ffb 100644
--- a/python/py-astlib/Portfile
+++ b/python/py-astlib/Portfile
@@ -31,15 +31,8 @@ if {${name} ne ${subport}} {
                         port:py${python.version}-pyfits \
                         port:py${python.version}-numpy \
                         port:py${python.version}-scipy \
-                        port:py${python.version}-matplotlib
-
-    if {[expr ${python.branch} < 3]} { 
-        depends_lib-append \
-                        port:py${python.version}-pil
-    } else {
-        depends_lib-append \
-                        port:py${python.version}-pillow
-    }
+                        port:py${python.version}-matplotlib \
+                        path:${python.pkgd}/PIL:py${python.version}-Pillow
 
 }
 
diff --git a/python/py-spyder-devel/Portfile b/python/py-spyder-devel/Portfile
index aedd863..293916e 100644
--- a/python/py-spyder-devel/Portfile
+++ b/python/py-spyder-devel/Portfile
@@ -128,10 +128,10 @@ if {${name} ne ${subport}} {
 
     if { ${python.version} < 30 } {
         variant pil description {
-           Support image objects in editor through PIL (many dependencies.)
+           Support image objects in editor through PIL or Pillow (many dependencies.)
         } {
             depends_lib-append \
-                port:py${python.version}-pil
+                path:${python.pkgd}/PIL:py${python.version}-Pillow
         }
     }
 
diff --git a/python/py-spyder/Portfile b/python/py-spyder/Portfile
index af760d5..2cbaa31 100644
--- a/python/py-spyder/Portfile
+++ b/python/py-spyder/Portfile
@@ -120,10 +120,10 @@ if {${name} ne ${subport}} {
     }
 
     variant pil description {
-       Support image objects in editor through PIL (many dependencies.)
+       Support image objects in editor through PIL or Pillow (many dependencies.)
     } {
         depends_lib-append \
-            port:py${python.version}-pil
+            path:${python.pkgd}/PIL:py${python.version}-Pillow
     }
 
     post-extract {
