--- Portfile	2011-07-05 13:08:17.000000000 -0500
+++ Portfile.mine	2011-07-05 13:08:09.000000000 -0500
@@ -4,8 +4,7 @@
 PortSystem          1.0
 
 name                gtkpod
-version             1.0.0
-revision            3
+version             2.0.2
 categories          multimedia gnome
 platforms           darwin
 maintainers         rmstonecipher openmaintainer
@@ -13,11 +12,12 @@
 long_description    ${description} It supports the first to fifth Generation including the iPod mini, iPod Photo, iPod Shuffle, iPod nano, and iPod Video.
 homepage            http://www.gtkpod.org/
 master_sites        sourceforge:gtkpod
-checksums           md5     cadd402dcd1cfbedda0357bf24965a7c \
-                    sha1    77b768663458069a414c59b7aad285020c93a035 \
-                    rmd160  271e9aeb25493b89933f203ebce4c004ce0da573
+checksums           md5     a24d4b882fa1e71c486ee90d87c7ce45 \
+                    sha1    d93e7618653d00a8bc845fd070305c5b38eea1e8 \
+                    rmd160  0810947c013c137f57599a999f63d07d6710b6c7
 depends_build       port:pkgconfig
 depends_lib         port:autoconf \
+                    port:anjuta \
                     port:flex \
                     path:lib/pkgconfig/glib-2.0.pc:glib2 \
                     port:libglade2 \
@@ -25,27 +25,57 @@
                     port:libid3tag \
                     port:mp4v2
 
+use_autoreconf      yes
+
 # python-related tweaks 
-set python.branch   2.7
-set python.prefix   ${frameworks_dir}/Python.framework/Versions/${python.branch}
-set python.bin      ${python.prefix}/bin/python${python.branch}
-configure.args-append  --prefix=${python.prefix}
-configure.env-append    PYGOBJECT_CODEGEN=${python.prefix}/bin/pygobject-codegen-2.0
-configure.pkg_config_path  ${python.prefix}/lib/pkgconfig
-options         python.link_binaries python.link_binaries_suffix
-default python.link_binaries yes
-default python.link_binaries_suffix {-${python.branch}}
-post-destroot {
-    if {${python.link_binaries}} {
-        foreach bin [glob -nocomplain -tails -directory "${destroot}${python.prefix}/bin" *] {
-            if {[catch {file type "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"}]} {
-                ln -s "${python.prefix}/bin/${bin}" "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"
+if {![variant_isset python27] && ![variant_isset python26]} {
+    default_variants +python27
+}
+variant python27 conflicts python26 description {Build using Python 2.7} {
+    set python.branch   2.7
+    depends_lib-append  port:python27
+    set python.prefix   ${frameworks_dir}/Python.framework/Versions/${python.branch}
+    set python.bin      ${python.prefix}/bin/python${python.branch}
+    configure.args-append  --prefix=${python.prefix}
+    configure.env-append    PYGOBJECT_CODEGEN=${python.prefix}/bin/pygobject-codegen-2.0
+    configure.pkg_config_path  ${python.prefix}/lib/pkgconfig
+    options         python.link_binaries python.link_binaries_suffix
+    default python.link_binaries yes
+    default python.link_binaries_suffix {-${python.branch}}
+    post-destroot {
+        if {${python.link_binaries}} {
+            foreach bin [glob -nocomplain -tails -directory "${destroot}${python.prefix}/bin" *] {
+                if {[catch {file type "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"}]} {
+                    ln -s "${python.prefix}/bin/${bin}" "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"
+                }
+            }
+        }
+    }
+}
+
+variant python26 conflicts python27 description {Build using Python 2.6} {
+    set python.branch   2.6
+    depends_lib-append  port:python26
+    set python.prefix   ${frameworks_dir}/Python.framework/Versions/${python.branch}
+    set python.bin      ${python.prefix}/bin/python${python.branch}
+    configure.args-append  --prefix=${python.prefix}
+    configure.env-append    PYGOBJECT_CODEGEN=${python.prefix}/bin/pygobject-codegen-2.0
+    configure.pkg_config_path  ${python.prefix}/lib/pkgconfig
+    options         python.link_binaries python.link_binaries_suffix
+    default python.link_binaries yes
+    default python.link_binaries_suffix {-${python.branch}}
+    post-destroot {
+        if {${python.link_binaries}} {
+            foreach bin [glob -nocomplain -tails -directory "${destroot}${python.prefix}/bin" *] {
+                if {[catch {file type "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"}]} {
+                    ln -s "${python.prefix}/bin/${bin}" "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"
+                }
             }
         }
     }
 }
 
-patchfiles          patch-src-mp4file.c.diff
+patchfiles          patch-configure.ac.diff
 
 livecheck.type      regex
 livecheck.url       http://sourceforge.net/projects/gtkpod/files/gtkpod/
