--- /opt/local/site-ports/kde/digikam/macports-current/Portfile	2014-08-08 00:30:45.000000000 +0200
+++ /opt/local/site-ports/kde/digikam/Portfile	2014-12-24 13:03:47.000000000 +0100
@@ -6,21 +6,24 @@
 PortGroup           compiler_blacklist_versions 1.0
 
 name                digikam
-version             4.0.0
+version             4.6.0
+revision            1
 categories          kde kde4
 license             GPL-2+
 maintainers         hyper-world.de:jan openmaintainer \
                     gmail.com:caulier.gilles
 platforms           darwin
 
-description         Photo Management Program
-long_description    Digital photo management program to import, organize, enhance, search and export your digital images.
+description         Photo Management Programme
+long_description    Digital photo management programme to import, organise, enhance, search and export your digital images.
 
 homepage            http://www.digikam.org/
 master_sites        kde:stable/digikam/
 
-checksums           rmd160 1ffc3e164772d031ff4b017598265bcd1934b919 \
-                    sha256 984f7a47a3fdd5b5b30991b436848ed420fbcfffa01ffaa3abdf7202848b17ae
+#checksums           rmd160 540f243361aba3c95b675c05f84d8d60efab1948 \
+#                    sha256 5c68a2d200f5b502706128ea64839319aad333fb79548f49ecc92594e280d4e9
+checksums           rmd160 f1c6a0108b7bdd3b3301bf96de48b66a89a7dc1d \
+                    sha256 b047a3172203e036c35f73dbb93cc7e71408c05bedaa8f7f1e0cc539a355a345
 
 use_bzip2           yes
 
@@ -35,7 +38,8 @@
                     port:jpeg \
                     port:libpng \
                     port:opencv \
-                    port:marble 
+                    port:marble
+depends_lib-append  port:libpgf
 
 # Dependencies of kipi-plugins
 
@@ -66,13 +70,15 @@
 depends_run-append  port:kde4-baseapps \
                     port:kde4-runtime \
                     port:oxygen-icons \
-                    port:qt4-mac-sqlite3-plugin 
-# Following dependencies are needed for Panorama and ExpoBlending tools, but
+                    port:qt4-mac-sqlite3-plugin
+# Following dependency is needed for the Panorama (and ExpoBlending?) tool, but
 # cannot be installed on Intel Macs currently as far as I know. Also they need
 # wxWidgets which currently cannot be installed with XCode of OS X 10.7 or
 # newer.
+# RJVB 20140918: hugin needs wxWidgets 3 nowadays, which introduces a dependency to another GUI framework. Users who
+# want the Panorama tool can install hugin-app manually and then build digikam from source
+# (or we could add yet another variant)
 #                   port:hugin-app \
-#                   port:enblend
 
 # kde4-baseapps is not universal
 universal_variant   no
@@ -84,13 +90,20 @@
 
 # Configurations rules to compile fine #####################################
 
-configure.args-append -DCMAKE_C_FLAGS='-D__KDE_HAVE_GCC_VISIBILITY' \
-                      -DCMAKE_CXX_FLAGS='-D__KDE_HAVE_GCC_VISIBILITY' \
-                      -DCMAKE_SYSTEM_PREFIX_PATH=\"${prefix}\;/usr\" \
-                      -DCMAKE_MODULE_PATH=\"${prefix}/share/cmake-2.8/Modules\;${prefix}/share/cmake/modules\" \
-                      -DCMAKE_PREFIX_PATH=\"${prefix}/lib/cmake\" \
-                      -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
+# 20140918: do we really need to specify the CMAKE_MODULE_PATH nowadays?
+# -DCMAKE_MODULE_PATH=\"${prefix}/share/cmake-2.8/Modules\;${prefix}/share/cmake/modules\" \
+# We do need to add ENABLE_KDEPIMLIBSSUPPORT though, otherwise the dependency on kdepimlibs4 is
+# there for nothing!
+# There also appears to be no (more) need to force-defined __KDE_HAVE_GCC_VISIBILITY
+# -DCMAKE_CXX_FLAGS='-D__KDE_HAVE_GCC_VISIBILITY'
+#-DCMAKE_SYSTEM_PREFIX_PATH=\"${prefix}\;/usr\"
+#-DCMAKE_PREFIX_PATH=\"${prefix}/lib/cmake\"
+#-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
+
+configure.args-append -DENABLE_KDEPIMLIBSSUPPORT:BOOL=ON \
                       -DOpenCV_DIR=${prefix}/lib/cmake \
+                      -DDIGIKAMSC_COMPILE_LIBKGEOMAP:BOOL=ON -DDIGIKAMSC_COMPILE_LIBKVKONTAKTE:BOOL=ON \
+                      -DDIGIKAMSC_COMPILE_LIBMEDIAWIKI:BOOL=ON -DDIGIKAMSC_COMPILE_LIBKFACE:BOOL=ON \
                       -Wno-dev \
                       ../${distname}
 
@@ -101,7 +114,9 @@
 if {[variant_isset debug]} {
     configure.args-append -DCMAKE_BUILD_TYPE=debugfull
 } else {
-    configure.args-append -DCMAKE_BUILD_TYPE=releasewithdebug
+    # RJVB: use RelWithDebInfo instead of releasewithdebug, and prevent stripping
+    #configure.args-append -DCMAKE_BUILD_TYPE=releasewithdebug
+    configure.args-append -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_STRIP:FILEPATH=/bin/echo
 }
 
 # Option to compile handbook
@@ -117,9 +132,9 @@
 variant translations description {Build digiKam GUI translations} {}
 
 if {[variant_isset translations]} {
-    configure.args-append -DDIGIKAMSC_COMPILE_PO=on
+    configure.args-append -DDIGIKAMSC_COMPILE_PO=ON
 } else {
-    configure.args-append -DDIGIKAMSC_COMPILE_PO=off
+    configure.args-append -DDIGIKAMSC_CHECKOUT_PO:BOOL=OFF -DDIGIKAMSC_COMPILE_PO=off
 }
 
 # Option to compile target using internal implementation of KdeGraphics shared libs maintained by digiKam team
