diff --git a/graphics/qwt/Portfile b/graphics/qwt/Portfile
index 25dc7c9..9a485bc 100644
--- a/graphics/qwt/Portfile
+++ b/graphics/qwt/Portfile
@@ -64,18 +64,24 @@ subport qwt60 {
 
 subport qwt61 {
 
-    version         6.1.2
-    revision        1
+    version         6.1.3
     distname        qwt-${version}
     conflicts       qwt qwt52 qwt60
-    checksums       sha1    6af82b6ee4132f779d1c8c2db872f01463b0d61c \
-                    sha256  2b08f18d1d3970e7c3c6096d850f17aea6b54459389731d3ce715d193e243d0c
+    checksums       sha1    90ec21bc42f7fae270482e1a0df3bc79cb10e5c7 \
+                    sha256  f3ecd34e72a9a2b08422fb6c8e909ca76f4ce5fa77acad7a2883b701f4309733
+    use_parallel_build  yes
 
     patchfiles      patch-designer_designer.pro.61.diff \
                     patch-qwtconfig.pri.61.diff \
                     patch-qwtbuild.pri.61.diff 
     livecheck.url   http://sourceforge.net/api/file/index/project-id/13693/mtime/desc/rss
     livecheck.regex \\/qwt\\/(6\\.1\\.\\d+)\\/
+    post-patch {
+        reinplace "s|@INSTALL_DOCS@@|${qt_docs_dir}/${subport}|" \
+                    ${worksrcpath}/qwtconfig.pri
+        reinplace "s|@INSTALL_HEADERS@@|${qt_includes_dir}|" \
+                    ${worksrcpath}/qwtconfig.pri
+    }
 
 }
 
@@ -126,8 +132,13 @@ post-patch {
     # setup for examples, if selected
 
     if {![variant_isset examples]} {
+        # I presume this worked with qwt < 6.1
         reinplace "s@QwtExamples@@" \
             ${worksrcpath}/qwtconfig.pri
+    } else {
+        # qwt 6.1.2 disables the examples by default, so reenable them when requested
+        reinplace "s@#QWT_CONFIG     += QwtExamples@QWT_CONFIG     += QwtExamples@" \
+            ${worksrcpath}/qwtconfig.pri
     }
 }
 
@@ -169,19 +180,26 @@ if {${qwt_major} < 6} {
     # QWT 6+ uses Qt4+ only
     if {![variant_isset qt5]} {
         PortGroup qt4 1.0
+        PortGroup qmake 1.0
     } else {
         PortGroup           qt5 1.0
+        PortGroup           qmake5 1.0
         set qt_arch_types   "x86_64"
         post-patch {
             reinplace "s|QT_STATIC_CONST|static const|" \
                 ${worksrcpath}/src/qwt_scale_map.cpp \
                 ${worksrcpath}/src/qwt_scale_map.h
+            reinplace "s/QT_INSTALL_FRAMEWORKS/QT_INSTALL_LIBS/" \
+                ${worksrcpath}/qwtconfig.pri
         }
+        configure.args-append \
+                -config absolute_library_soname
     }
 }
 
-configure.cmd       ${qt_qmake_cmd}
-configure.pre_args  INSTALLBASE="${prefix}"
+# configure.cmd       ${qt_qmake_cmd}
+# configure.pre_args-delete  --prefix=${prefix}
+configure.pre_args-append  INSTALLBASE="${prefix}"
 
 # qmake does not handle these flags
 configure.universal_args-delete --disable-dependency-tracking
@@ -249,6 +267,13 @@ post-destroot {
             }
         }
     }
+    if {[variant_isset examples]} {
+        set exdir ${destroot}${qt_examples_dir}/${subport}
+        xinstall -d -m 755 ${exdir}
+        foreach bin [glob -nocomplain ${build.dir}/examples/bin/*] {
+            copy ${bin} ${exdir}
+        }
+    }
 }
 
 variant debug description "Build release and debug versions" {}
diff --git a/graphics/qwt/files/patch-qwtconfig.pri.61.diff b/graphics/qwt/files/patch-qwtconfig.pri.61.diff
index 9a40b12..23769f3 100644
--- a/graphics/qwt/files/patch-qwtconfig.pri.61.diff
+++ b/graphics/qwt/files/patch-qwtconfig.pri.61.diff
@@ -3,10 +3,10 @@
 @@ -16,20 +16,10 @@
  # Install paths
  ######################################################################
- 
+
 -QWT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]
 +QWT_INSTALL_PREFIX = $$INSTALLBASE
- 
+
 -unix {
 -    QWT_INSTALL_PREFIX    = /usr/local/qwt-$$QWT_VERSION
 -    # QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION-qt-$$QT_VERSION
@@ -19,10 +19,10 @@
 -
 -QWT_INSTALL_DOCS      = $${QWT_INSTALL_PREFIX}/doc
 -QWT_INSTALL_HEADERS   = $${QWT_INSTALL_PREFIX}/include
-+QWT_INSTALL_DOCS      = $${QWT_INSTALL_PREFIX}/share/qwt/doc
-+QWT_INSTALL_HEADERS   = $${QWT_INSTALL_PREFIX}/include/qwt
++QWT_INSTALL_DOCS      = @INSTALL_DOCS@@
++QWT_INSTALL_HEADERS   = @INSTALL_HEADERS@@
  QWT_INSTALL_LIBS      = $${QWT_INSTALL_PREFIX}/lib
- 
+
  ######################################################################
 @@ -42,7 +32,7 @@
  # runtime environment of designer/creator.
