<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[131841] trunk/dports/office</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/131841">131841</a></dd>
<dt>Author</dt> <dd>mk@macports.org</dd>
<dt>Date</dt> <dd>2015-01-19 11:26:09 -0800 (Mon, 19 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>charm(-qt5): new port for qt[45] (Thanks, Rene: see issue #46575)</pre>

<h3>Added Paths</h3>
<ul>
<li>trunk/dports/office/charm/</li>
<li><a href="#trunkdportsofficecharmPortfile">trunk/dports/office/charm/Portfile</a></li>
<li>trunk/dports/office/charm/files/</li>
<li><a href="#trunkdportsofficecharmfilesadapttoosxmacportspatch">trunk/dports/office/charm/files/adapt-to-osx-macports.patch</a></li>
<li><a href="#trunkdportsofficecharmfilespatchCMakeFilespatch">trunk/dports/office/charm/files/patch-CMakeFiles.patch</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsofficecharmPortfile"></a>
<div class="addfile"><h4>Added: trunk/dports/office/charm/Portfile (0 => 131841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/office/charm/Portfile                                (rev 0)
+++ trunk/dports/office/charm/Portfile        2015-01-19 19:26:09 UTC (rev 131841)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+# -*- 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
+# $Id$
+
+PortSystem          1.0
+PortGroup           github 1.0
+PortGroup           cmake 1.0
+
+github.setup        KDAB Charm aca5faf6
+
+# The last release version is too old:
+#github.setup        KDAB Charm 1.8.0
+#github.tarball_from releases
+
+name                charm
+version             1.8.0
+maintainers         gmail.com:rjvbertin
+categories          office
+license             GPL-2+ LGPL-2.1+
+description         Charm - the Cross-Platform Time Tracker
+long_description    Charm is a program for OS X, Linux and Windows that helps to keep track of time. It is built around two major ideas - tasks and events. Tasks are the things time is spend on, repeatedly. For example, ironing laundry is a task. The laundry done for two hours on last Tuesday is an event in that task. When doing laundry multiple times, the events will be accumulated, and can later be printed in activity reports or weekly/monthly time sheets. So in case laundry would be done for three hours on Wednesday again, the activity report for the &quot;Ironing Laundry&quot; task would list the event on tuesday, the event on wednesday and a total of five hours.
+platforms           darwin
+
+subport ${name}-qt5 {
+    PortGroup       qt5 1.0
+    conflicts       ${name}
+    depends_lib-append      port:qt5-mac-sqlite3-plugin
+    configure.args-append   -DWITH_QT4:BOOL=OFF
+}
+
+if {${subport} ne &quot;${name}-qt5&quot;} {
+    PortGroup       qt4 1.0
+    conflicts       ${name}-qt5
+    depends_build-append    port:automoc
+    depends_lib-append      port:qt4-mac-sqlite3-plugin
+    configure.args-append   -DWITH_QT4:BOOL=ON -DBIN_INSTALL_DIR:PATH=${qt_apps_dir}
+}
+
+configure.args-append   -DCharm_VERSION=&quot;${version}-${github.version}&quot; -DBIN_INSTALL_DIR:PATH=${qt_apps_dir}
+
+# aca5faf6
+checksums           rmd160  c0f938504705477a751f4be7f28220de261a1e56 \
+                    sha256  1651dc8fb4c5100c96137e1fe076ce86a89b98b2e81e652a4fae1b8a5c5860f7
+
+# 1.8.0
+#checksums           rmd160  95fca2fd3236f8d39bf9e67b5ca43e3466f6c205 \
+#                    sha256  d2cfefd78893288e99b8b813185fa5449a423988e070940b9894e304e0208c54
+
+patchfiles          patch-CMakeFiles.patch \
+                    adapt-to-osx-macports.patch
+
+post-extract                {file mkdir ${workpath}/build}
+# standard post-arg, where to find the primary CMakeLists.txt file.
+default configure.post_args {../${worksrcdir}}
+default configure.dir       {${workpath}/build}
+default build.dir           {${workpath}/build}
+
+use_parallel_build  yes
+
+post-destroot {
+    xinstall -m 0755 -d ${destroot}${qt_apps_dir}
+    ln -s ${qt_apps_dir}/Charm.app/Contents/MacOS/Charm ${destroot}${prefix}/bin/charmtimetracker
+}
+
</ins><span class="cx">Property changes on: trunk/dports/office/charm/Portfile
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdportsofficecharmfilesadapttoosxmacportspatch"></a>
<div class="addfile"><h4>Added: trunk/dports/office/charm/files/adapt-to-osx-macports.patch (0 => 131841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/office/charm/files/adapt-to-osx-macports.patch                                (rev 0)
+++ trunk/dports/office/charm/files/adapt-to-osx-macports.patch        2015-01-19 19:26:09 UTC (rev 131841)
</span><span class="lines">@@ -0,0 +1,124 @@
</span><ins>+diff --git Charm/ApplicationCore.cpp Charm/ApplicationCore.cpp
+index 17cd0fe..964d098 100644
+--- Charm/ApplicationCore.cpp
++++ Charm/ApplicationCore.cpp
+@@ -158,10 +158,12 @@ ApplicationCore::ApplicationCore( QObject* parent )
+              SLOT( slotQuitApplication() ) );

+     m_actionAboutDialog.setText( tr( &quot;About Charm&quot; ) );
++    m_actionAboutDialog.setMenuRole(QAction::AboutRole);
+     connect( &amp;m_actionAboutDialog, SIGNAL( triggered() ),
+              &amp;mainView(),  SLOT( slotAboutDialog() ) );

+     m_actionPreferences.setText( tr( &quot;Preferences&quot; ) );
++    m_actionPreferences.setMenuRole(QAction::PreferencesRole);
+     m_actionPreferences.setIcon( Data::configureIcon() );
+     connect( &amp;m_actionPreferences, SIGNAL( triggered( bool ) ),
+              &amp;mainView(),  SLOT( slotEditPreferences( bool ) ) );
+@@ -260,7 +262,7 @@ void ApplicationCore::createWindowMenu( QMenuBar *menuBar )
+     menu-&gt;addAction( &amp;m_actionActivityReport );
+     menu-&gt;addAction( &amp;m_actionWeeklyTimesheetReport );
+     menu-&gt;addAction( &amp;m_actionMonthlyTimesheetReport );
+-#ifndef Q_OS_OSX
++#if !defined(Q_OS_OSX) &amp;&amp; !defined(Q_OS_MAC)
+     menu-&gt;addSeparator();
+ #endif
+     menu-&gt;addAction( &amp;m_actionPreferences );
+@@ -277,7 +279,7 @@ void ApplicationCore::createFileMenu( QMenuBar *menuBar )
+     menu-&gt;addAction( &amp;m_actionSyncTasks );
+     menu-&gt;addAction( &amp;m_actionImportTasks );
+     menu-&gt;addAction( &amp;m_actionExportTasks );
+-#ifndef Q_OS_OSX
++#if !defined(Q_OS_OSX) &amp;&amp; !defined(Q_OS_MAC)
+     menu-&gt;addSeparator();
+ #endif
+     menu-&gt;addAction( &amp;m_actionQuit );
+diff --git Charm/Charm.cpp Charm/Charm.cpp
+index 4872e3a..951ba5a 100644
+--- Charm/Charm.cpp
++++ Charm/Charm.cpp
+@@ -13,9 +13,10 @@

+ static ApplicationCore* createApplicationCore()
+ {
+-#ifdef Q_OS_OSX
+-    return new MacApplicationCore;
+-#endif
++// #if defined(Q_OS_OSX) || defined(Q_OS_MAC)
++//     // this seems to disable (menu) shortcuts...
++//     return new MacApplicationCore;
++// #endif
+     return new ApplicationCore;
+ }

+@@ -46,6 +47,9 @@ int main ( int argc, char** argv )

+     try {
+         QApplication app( argc, argv );
++#if defined(Q_OS_MAC) || defined(Q_OS_OSX)
++        app.setAttribute(Qt::AA_DontShowIconsInMenus);
++#endif
+         QScopedPointer&lt;ApplicationCore&gt; core( createApplicationCore() );
+         QObject::connect( &amp;app, SIGNAL(commitDataRequest(QSessionManager&amp;)), core.data(), SLOT(commitData(QSessionManager&amp;)) );
+         QObject::connect( &amp;app, SIGNAL(saveStateRequest(QSessionManager&amp;)), core.data(), SLOT(saveState(QSessionManager&amp;)) );
+diff --git Charm/Data.cpp Charm/Data.cpp
+index ad8abfa..a7778b1 100644
+--- Charm/Data.cpp
++++ Charm/Data.cpp
+@@ -18,7 +18,7 @@ const QIcon&amp; Data::charmTrayIcon()
+     // On X11: pure-Qt apps get 22x22 from QSystemTrayIcon.
+     // KDE apps seem to get 24x24 in KSystemTrayIcon via KIconLoader, which is actually better.

+-#ifdef Q_OS_OSX
++#if !defined(Q_OS_OSX) &amp;&amp; !defined(Q_OS_MAC)
+     static const QString iconPath = QLatin1String(&quot;:/Charm/charmtray_mac.png&quot;);
+ #else
+     static const QString iconPath = QLatin1String(&quot;:/Charm/charmtray22.png&quot;);
+@@ -37,7 +37,7 @@ const QIcon&amp; Data::charmTrayActiveIcon()
+     // On X11: pure-Qt apps get 22x22 from QSystemTrayIcon.
+     // KDE apps seem to get 24x24 in KSystemTrayIcon via KIconLoader, which is actually better.

+-#ifdef Q_OS_OSX
++#if !defined(Q_OS_OSX) &amp;&amp; !defined(Q_OS_MAC)
+     static const QString iconPath = QLatin1String(&quot;:/Charm/charmtrayactive_mac.png&quot;);
+ #else
+     static const QString iconPath = QLatin1String(&quot;:/Charm/charmtrayactive22.png&quot;);
+diff --git Charm/Idle/IdleDetector.cpp Charm/Idle/IdleDetector.cpp
+index 131e76e..47c575c 100644
+--- Charm/Idle/IdleDetector.cpp
++++ Charm/Idle/IdleDetector.cpp
+@@ -20,7 +20,7 @@ IdleDetector::IdleDetector( QObject* parent )
+ IdleDetector* IdleDetector::createIdleDetector( QObject* parent )
+ {
+ #ifdef CHARM_IDLE_DETECTION
+-#ifdef Q_OS_OSX
++#if defined(Q_OS_OSX) || defined(Q_OS_MAC)
+     return new MacIdleDetector( parent );
+ #endif

+diff --git Charm/Widgets/CharmWindow.cpp Charm/Widgets/CharmWindow.cpp
+index 375aedc..8bd7657 100644
+--- Charm/Widgets/CharmWindow.cpp
++++ Charm/Widgets/CharmWindow.cpp
+@@ -85,7 +85,7 @@ void CharmWindow::setWindowNumber( int number )
+     delete m_shortcut;
+     m_shortcut = new QShortcut( this );
+     QKeySequence sequence( tr( &quot;Ctrl+%1&quot; ).arg( number ) );
+-#ifdef Q_OS_OSX
++#if !defined(Q_OS_OSX) &amp;&amp; !defined(Q_OS_MAC)
+     m_shortcut-&gt;setKey( sequence );
+ #endif
+     m_shortcut-&gt;setContext( Qt::ApplicationShortcut );
+diff --git Charm/Widgets/EventView.cpp Charm/Widgets/EventView.cpp
+index 2fb9ef4..2eae8aa 100644
+--- Charm/Widgets/EventView.cpp
++++ Charm/Widgets/EventView.cpp
+@@ -96,7 +96,7 @@ EventView::EventView( QToolBar* toolBar, QWidget* parent )
+     m_actionDeleteEvent.setText( tr( &quot;Delete Event...&quot; ) );
+     QList&lt;QKeySequence&gt; deleteShortcuts;
+     deleteShortcuts &lt;&lt; QKeySequence::Delete;
+-#ifdef Q_OS_OSX
++#if !defined(Q_OS_OSX) &amp;&amp; !defined(Q_OS_MAC)
+     deleteShortcuts &lt;&lt; Qt::Key_Backspace;
+ #endif
+     m_actionDeleteEvent.setShortcuts(deleteShortcuts);
</ins></span></pre></div>
<a id="trunkdportsofficecharmfilespatchCMakeFilespatch"></a>
<div class="addfile"><h4>Added: trunk/dports/office/charm/files/patch-CMakeFiles.patch (0 => 131841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/office/charm/files/patch-CMakeFiles.patch                                (rev 0)
+++ trunk/dports/office/charm/files/patch-CMakeFiles.patch        2015-01-19 19:26:09 UTC (rev 131841)
</span><span class="lines">@@ -0,0 +1,100 @@
</span><ins>+diff --git CMakeLists.txt CMakeLists.txt
+index 4e735a1..55f78bc 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -38,8 +38,10 @@ CMAKE_MINIMUM_REQUIRED( VERSION 2.6.0 )
+ SET( CMAKE_MODULE_PATH &quot;${CMAKE_SOURCE_DIR}/CMake&quot; )
+ SET( CMAKE_AUTOMOC ON )

+-# try Qt5 first, and prefer that if found
+-find_package(Qt5Core QUIET)
++if(NOT WITH_QT4)
++    # try Qt5 first, and prefer that if found
++    find_package(Qt5Core QUIET)
++endif()
+ IF (Qt5Core_FOUND)
+     find_package(Qt5Widgets REQUIRED)
+     find_package(Qt5Xml REQUIRED)
+@@ -61,11 +63,11 @@ IF (Qt5Core_FOUND)
+         SET(QT_PLATFORM_SPECIFIC_LIBRARIES)
+     ENDIF()

+-    IF(APPLE)
++#     IF(APPLE)
+         find_package(Qt5MacExtras REQUIRED)
+         include_directories(${Qt5MacExtras_INCLUDE_DIRS})
+         set(QT_PLATFORM_SPECIFIC_LIBRARIES ${Qt5MacExtras_LIBRARIES})
+-    ENDIF()
++#     ENDIF()

+     IF(NOT APPLE)
+         find_package(Qt5DBus)
+@@ -124,7 +126,7 @@ ELSE()

+     SET(CHARM_MAC_HIGHRES_SUPPORT_ENABLED OFF)

+-    IF(UNIX AND NOT APPLE)
++    IF(UNIX) # AND NOT APPLE)
+         find_package(Qt4 COMPONENTS QtDBus)
+         IF (QT_QTDBUS_FOUND)
+             set(HAVE_DBUS ON)
+@@ -197,8 +199,10 @@ IF( UNIX AND NOT APPLE )
+     SET( DOC_INSTALL_DIR share/doc/${Charm_EXECUTABLE} )
+ ELSE()
+     set( Charm_EXECUTABLE Charm )
+-    SET( BIN_INSTALL_DIR . )
+-    SET( DOC_INSTALL_DIR . )
++    if(NOT BIN_INSTALL_DIR)
++        SET( BIN_INSTALL_DIR . )
++    endif()
++    SET( DOC_INSTALL_DIR share/doc/${Charm_EXECUTABLE} )
+ ENDIF()
+ SET( ICONS_DIR &quot;${CMAKE_SOURCE_DIR}/Charm/Icons&quot; )

+@@ -223,9 +227,9 @@ CONFIGURE_FILE( CharmCMake.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/CharmCMake.h )

+ SET( LICENSE_FILE &quot;License.txt&quot; )
+ SET( README_FILE &quot;ReadMe.txt&quot; )
+-IF( NOT APPLE )
++#IF( NOT APPLE )
+     INSTALL( FILES &quot;${LICENSE_FILE}&quot; &quot;${README_FILE}&quot; DESTINATION ${DOC_INSTALL_DIR} )
+-ENDIF()
++#ENDIF()

+     # Only support CPack packaging on newer versions of CMake.
+ IF( NOT &quot;${CMAKE_VERSION}&quot; VERSION_LESS &quot;2.8.4&quot; )
+@@ -252,7 +256,7 @@ IF( NOT &quot;${CMAKE_VERSION}&quot; VERSION_LESS &quot;2.8.4&quot; )
+             &quot;${README_FILE}&quot; &quot;Readme&quot;
+         )
+         SET( CPACK_NSIS_MUI_FINISHPAGE_RUN &quot;${CPACK_NSIS_INSTALLED_ICON_NAME}&quot; )
+-    ELSEIF( APPLE )
++    ELSEIF( APPLENATIVE )
+         SET( CPACK_GENERATOR &quot;DragNDrop&quot; )
+         SET( CPACK_DMG_FORMAT &quot;UDBZ&quot; )
+         SET( CPACK_DMG_VOLUME_NAME &quot;Charm&quot; )
+diff --git Charm/CMakeLists.txt Charm/CMakeLists.txt
+index e11bae3..a9faff9 100644
+--- Charm/CMakeLists.txt
++++ Charm/CMakeLists.txt
+@@ -180,7 +180,7 @@ IF( WIN32 )
+ ENDIF()
+ MESSAGE( STATUS &quot;Charm will be installed to ${CMAKE_INSTALL_PREFIX}&quot; )

+-IF( UNIX AND NOT APPLE )
++IF( UNIX) # AND NOT APPLE )
+     SET( XDG_APPS_INSTALL_DIR share/applications )
+     INSTALL( FILES charmtimetracker.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
+     INSTALL( FILES Icons/Charm-128x128.png DESTINATION share/icons/hicolor/128x128/apps )
+@@ -217,8 +217,8 @@ IF( NOT &quot;${CMAKE_VERSION}&quot; VERSION_LESS &quot;2.8.4&quot; )
+                  DESTINATION ${BIN_INSTALL_DIR} )
+     ENDIF()

+-    IF( APPLE OR WIN32 )
+-        INCLUDE( DeployQt4 )
+-        INSTALL_QT4_EXECUTABLE( &quot;${EXECUTABLE}&quot; &quot;qsqlite&quot; )
+-    ENDIF()
++#     IF( APPLE OR WIN32 )
++#         INCLUDE( DeployQt4 )
++#         INSTALL_QT4_EXECUTABLE( &quot;${EXECUTABLE}&quot; &quot;qsqlite&quot; )
++#     ENDIF()
+ ENDIF()
</ins></span></pre>
</div>
</div>

</body>
</html>