Index: Portfile
===================================================================
--- Portfile	(revision 142532)
+++ Portfile	(working copy)
@@ -1,15 +1,13 @@
 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
 
 PortSystem          1.0
-PortGroup           cmake 1.0
 PortGroup           bitbucket 1.0
+PortGroup           cmake 1.1
 
-bitbucket.setup     petebunting rsgislib 9135d61
-version             2.1.20140825
-revision            3
+bitbucket.setup     petebunting rsgislib 3.4.9
 categories          gis
 license             GPL-3
-maintainers         vince
+maintainers         {vince @Veence}
 description         RSGISlib - Remote Sensing and GIS Library
 long_description    This library provides a lot of advanced tools to \
                     perform image analysis and feature detection in \
@@ -16,7 +14,12 @@
                     remote sensing and GIS applications.
 platforms           darwin
 homepage            http://www.rsgislib.org
+bitbucket.tarball_from  downloads
 
+checksums               rmd160  028471cc352fc787ed8fd3e230f68c7db486107d \
+                        sha256  a271aee61395166542f3283fe899eff317ffb782f59ca90da0f008a203ebe5f3 \
+                        size    8092496
+
 depends_lib-append      port:gdal \
                         port:geos \
                         port:cgal \
@@ -36,46 +39,38 @@
     }
 }
 
-fetch.type              hg
+patchfiles              patch-CMakeLists.txt.diff
 
-patchfiles              patch-cmakelists_txt.diff
+# /bin/sh: line 0: cd: build/python: No such file or directory
+cmake.out_of_source     no
 
-pre-configure {
-    if {[file exists ${prefix}/lib/libboost_filesystem-mt.dylib]} {
-        reinplace -E "s|(boost_\[^ )\]*)|\\1-mt|g" ${worksrcpath}/CMakeLists.txt
-        reinplace -E "s|(DESTINATION) doc|\\1 share\/doc\/rsgislib|" \
-            ${worksrcpath}/CMakeLists.txt
-    }
-}
+configure.args-append   -DBOOST_INCLUDE_DIR=${prefix}/include \
+                        -DBOOST_LIB_PATH=${prefix}/lib \
+                        -DCGAL_INCLUDE_DIR=${prefix}/include \
+                        -DCGAL_LIB_PATH=${prefix}/lib \
+                        -DFFTW_INCLUDE_DIR=${prefix}/include \
+                        -DFFTW_LIB_PATH=${prefix}/lib \
+                        -DGDAL_INCLUDE_DIR=${prefix}/include \
+                        -DGDAL_LIB_PATH=${prefix}/lib \
+                        -DGEOS_INCLUDE_DIR=${prefix}/include \
+                        -DGEOS_LIB_PATH=${prefix}/lib \
+                        -DGMP_INCLUDE_DIR=${prefix}/include \
+                        -DGMP_LIB_PATH=${prefix}/lib \
+                        -DGSL_INCLUDE_DIR=${prefix}/include \
+                        -DGSL_LIB_PATH=${prefix}/lib \
+                        -DHDF5_INCLUDE_DIR=${prefix}/include \
+                        -DHDF5_LIB_PATH=${prefix}/lib \
+                        -DINSTALL_PYTHON_USING_PREFIX=ON \
+                        -DKEA_INCLUDE_DIR=${prefix}/include \
+                        -DKEA_LIB_PATH=${prefix}/lib \
+                        -DMPFR_INCLUDE_DIR=${prefix}/include \
+                        -DMPFR_LIB_PATH=${prefix}/lib \
+                        -DMUPARSER_INCLUDE_DIR=${prefix}/include \
+                        -DMUPARSER_LIB_PATH=${prefix}/lib \
+                        -DXERCESC_INCLUDE_DIR=${prefix}/include \
+                        -DXERCESC_LIB_PATH=${prefix}/lib
 
-#configure.dir           ${worksrcpath}/trunk
-configure.args-append   -DBOOST_INCLUDE_DIR=${prefix} \
-                        -DBOOST_LIB_PATH=${prefix}\
-                        -DGDAL_INCLUDE_DIR=${prefix} \
-                        -DGDAL_LIB_PATH=${prefix}\
-                        -DHDF5_INCLUDE_DIR=${prefix} \
-                        -DHDF5_LIB_PATH=${prefix} \
-                        -DXERCESC_INCLUDE_DIR=${prefix} \
-                        -DXERCESC_LIB_PATH=${prefix} \
-                        -DGSL_INCLUDE_DIR=${prefix} \
-                        -DGSL_LIB_PATH=${prefix} \
-                        -DFFTW_INCLUDE_DIR=${prefix} \
-                        -DFFTW_LIB_PATH=${prefix} \
-                        -DGEOS_INCLUDE_DIR=${prefix} \
-                        -DGEOS_LIB_PATH=${prefix} \
-                        -DMUPARSER_INCLUDE_DIR=${prefix} \
-                        -DMUPARSER_LIB_PATH=${prefix} \
-                        -DCGAL_INCLUDE_DIR=${prefix} \
-                        -DCGAL_LIB_PATH=${prefix} \
-                        -DGMP_INCLUDE_DIR=${prefix} \
-                        -DGMP_LIB_PATH=${prefix} \
-                        -DMPFR_INCLUDE_DIR=${prefix} \
-                        -DMPFR_LIB_PATH=${prefix} \
-                        -DKEA_INCLUDE_DIR=${prefix} \
-                        -DKEA_LIB_PATH=${prefix} \
-                        -DCMAKE_VERBOSE_MAKEFILE=ON 
-
-variant python27 description {builds with Python 27 bindings} \
+variant python27 description {Build with Python 2.7 bindings} \
                  conflicts python33 python34 {
 
     depends_build-append    port:py27-numpy
@@ -83,7 +78,7 @@
     configure.args-append   -DPYTHON_INSTALL_PREFIX=${destroot}${frameworks_dir}/Python.framework/Versions/2.7/
 }
 
-variant python33 description {builds with Python 33 bindings} \
+variant python33 description {Build with Python 3.3 bindings} \
                  conflicts python27 python34 {
 
     depends_build-append    port:py33-numpy
@@ -91,7 +86,7 @@
     configure.args-append   -DPYTHON_INSTALL_PREFIX=${destroot}${frameworks_dir}/Python.framework/Versions/3.3/
 }
 
-variant python34 description {builds with Python 34 bindings} \
+variant python34 description {Build with Python 3.4 bindings} \
                  conflicts python27 python33 {
 
     depends_build-append    port:py34-numpy
@@ -98,5 +93,3 @@
     configure.args-append   -DPYTHON_EXE=${prefix}/bin/python3.4
     configure.args-append   -DPYTHON_INSTALL_PREFIX=${destroot}${frameworks_dir}/Python.framework/Versions/3.4/
 }
-
-#build.dir               ${worksrcpath}/trunk
