--- Portfile.orig	2016-05-02 02:31:18.000000000 +0200
+++ Portfile	2016-05-16 22:32:01.000000000 +0200
@@ -8,7 +8,7 @@
 PortGroup           active_variants 1.1
 
 name                gnss-sdr
-maintainers         michaelld gmail.com:carlesfernandez openmaintainer
+maintainers         michaelld gmail.com:carles.fernandez openmaintainer
 description         An Open Source Global Navigation Satellite Systems (GNSS)(for example: GPS, Galileo, Glonass, Beidou, etc) Software Defined Radio (SDR) Receiver
 categories          science
 license             GPL-3
@@ -21,10 +21,9 @@
     long_description    ${description}: \
         This port is kept up with the GNSS-SDR release, which is typically updated every few months. This version compiles against the gnuradio port, which represents the current GNU Radio release.
 
-    github.setup        gnss-sdr gnss-sdr 0.0.6 v
-    revision            7
-    checksums           rmd160 3a578f4795f6230d3f627dbe6f80f77c7dac206e \
-                        sha256 ed81a5dff8d91b0b1d561ab8a240818da447c8358b95ab42d6a17b479e873c3e
+    github.setup        gnss-sdr gnss-sdr 0.0.7 v
+    checksums           rmd160 c9bee1c541979d2ae573ae63848051354ef3f68f \
+                        sha256 3b25a45c6faa48017176858c2673a1301ead3b4cf7cdc52bdfad3e05669e90ae
     github.tarball_from tags
 
     conflicts           gnss-sdr-devel gnss-sdr-next
@@ -33,16 +32,6 @@
 
     require_active_variants port:gnuradio uhd
 
-    # temporary patch to fix Volk #define in compatibility
-
-    patchfiles-append patch-volk.diff
-
-    # temporary patch; will be fixed in next release.
-
-    post-patch {
-        reinplace "s@multithread@opencl@g" ${worksrcpath}/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.cc
-    }
-
 }
 
 subport gnss-sdr-devel {
@@ -51,11 +40,10 @@
         This port is kept up with the GNSS-SDR GIT master branch, which is typically updated daily to weekly.  This version of GNSS-SDR generally contains fixes and new features that will be incorporated in an upcoming release, and compiles against the gnuradio-devel port, which represents GNU Radio GIT master branch.  This port may or not compile or function correctly, as it represents a work in progress.  If it does not work, check back in a few days.  Or try deactivating the currently active gnss-sdr and gnuradio ports, cleaning any current builds, and trying again.
 
     name                gnss-sdr-devel
-    github.setup        gnss-sdr gnss-sdr 3d44e0956cc4524598bbab012ef77ebe30c955b4
-    version             20151115
-    revision            7
-    checksums           rmd160 94c604bef6a7cf60a38320391ce58d7a859e7277 \
-                        sha256 5185d830813a50c0a7ec64f47d99f76a23574aeca4dc464e9b7afed8913dbd91
+    github.setup        gnss-sdr gnss-sdr a6df9f8c6f4c5665976cfa70e844ce1b56ac7323
+    version             20160516
+    checksums           rmd160 c9bee1c541979d2ae573ae63848051354ef3f68f \
+                        sha256 3b25a45c6faa48017176858c2673a1301ead3b4cf7cdc52bdfad3e05669e90ae
 
     conflicts           gnss-sdr gnss-sdr-next
 
@@ -70,11 +58,10 @@
         This port is kept up with the GNSS-SDR GIT next branch, which is typically updated daily to weekly.  This version of GNSS-SDR generally contains fixes and new features that will be incorporated in an upcoming release, and compiles against the gnuradio-next port, which represents GNU Radio GIT next branch.  This port may or not compile or function correctly, as it represents a work in progress.  If it does not work, check back in a few days.  Or try deactivating the currently active gnss-sdr and gnuradio ports, cleaning any current builds, and trying again.
 
     name                gnss-sdr-next
-    github.setup        gnss-sdr gnss-sdr 633655616370d06f406beed834f6607da7f41e52
-    version             20151115
-    revision            7
-    checksums           rmd160 53dd8fd6752337aad69773ddc94e9abc4b483573 \
-                        sha256 79787927a11e7aef0a4c4c903153e5c3b9520b7c7d9caccc0f0f903bd8ab20e0
+    github.setup        gnss-sdr gnss-sdr 51e9a3434da85547a7860d298fcc5c180e390f19
+    version             20160516
+    checksums           rmd160 ea87a5cc389ab366248a84131991396e3cfc815d \
+                        sha256 644a19b780ad3004fbe34924f0fb422b48febf565babc3c9f088192049bf3bc6
 
     conflicts           gnss-sdr gnss-sdr-devel
 
@@ -84,7 +71,7 @@
 
 }
 
-# override githib PortGroup homepage setting
+# override github PortGroup homepage setting
 
 homepage            http://gnss-sdr.org
 
@@ -96,16 +83,9 @@
     path:lib/libuhd.dylib:uhd \
     port:python27 \
     port:py27-cheetah \
+    port:gnutls \
     port:boost
 
-# release uses openssl while devel and next use gnutls;
-# next release update to just gnutls.
-
-if {${subport} eq "gnss-sdr"} {
-    depends_lib-append  path:lib/libssl.dylib:openssl
-} else {
-    depends_lib-append  port:gnutls
-}
 
 # require specific variants
 
@@ -120,9 +100,10 @@
 
 configure.ldflags-delete -L${prefix}/lib
 
+# build own google-flog until the port is fixed (builds well but fails at runtime)
 configure.args-append \
     -DENABLE_PACKAGING=OFF \
-    -DENABLE_OWN_GLOG=OFF \
+    -DENABLE_OWN_GLOG=ON \
     -DENABLE_GENERIC_ARCH=OFF
 
 # specify the Python version to use
