<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/122114/">https://git.reviewboard.kde.org/r/122114/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On January 17th, 2015, 11:49 p.m. CET, <b>Friedrich W. H. Kossebau</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/122114/diff/1/?file=342456#file342456line14" style="color: black; font-weight: bold; text-decoration: underline;">cmake/modules/FindOpenJPEG.cmake</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">14</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="s">//opt//local//include/openjpeg-1.5</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Hm, these // things at least need a comment, because this strange path will surprise any clueless reader of the code.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">But then I wonder if this is a standard approach to this problem. Adding a hack like this just for MacPorts opens the can for all distris to add hacks for some custom solutions.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I propose we first look for a more cmake/usual solution for the problem of supporting non-standard installation paths of used libs.</p></pre>
</blockquote>
<p>On January 18th, 2015, 4:51 p.m. CET, <b>René J.V. Bertin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I agree that this change is a weird one to propose "upstream" (i.e. here), and almost excluded it.
Yes, it's a standard approach for MacPorts to use a patch file to insert a placeholder into files, that is replaced with the actual prefix path later on. It's my version of that approach to use a placeholder that evaluates to the default prefix path under standard path normalisation rules.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Looking at the issue again, I realise that another approach is possible too here: using a variable that is already available to cmake.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This is the cmake invocation is it current is generated through my Portfile; ${CMAKE_INSTALL_PREFIX} would be the obvious choice (i.e. //opt//local//include/openjpeg-1.5 would become something like ${CMAKE_INSTALL_PREFIX}/include/openjpeg-1.5?) :</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">cmake -DCMAKE_INSTALL_PREFIX=${prefix} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_RPATH=${prefix}/lib -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib -DCMAKE_SYSTEM_PREFIX_PATH="${prefix};/usr" -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DCMAKE_MODULE_PATH="${prefix}/share/cmake/Modules;${prefix}/share/cmake/Modules" -DBUILD_SHARED_LIBS=ON -DBUNDLE_INSTALL_DIR=/Applications/MacPorts/KDE4 -DKDE_DISTRIBUTION_TEXT="MacPorts/Mac OS X" -DQT_QT_INCLUDE_DIR=${prefix}/include/qt4 -DQT_QMAKESPEC=macx-g++ -DQT_ZLIB_LIBRARY=${prefix}/lib/libz.dylib -DQT_PNG_LIBRARY=${prefix}/lib/libpng.dylib -DDOCBOOKXSL_DIR=${prefix}/share/xsl/docbook-xsl -DGETTEXT_INCLUDE_DIR=${prefix}/include -DGETTEXT_LIBRARY=${prefix}/lib/libgettextlib.dylib -DGIF_INCLUDE_DIR=${prefix}/include -DGIF_LIBRARY=${prefix}/lib/libgif.dylib -DJASPER_INCLUDE_DIR=${prefix}/include -DJASPER_LIBRARY=${prefix}/lib/libjasper.dylib -DJPEG_INCLUDE_DIR=${prefix}/include -DJPEG_LIBRARY=${prefix}/lib/libjpeg.dylib -DLBER_LIBRARIES=${prefix}/lib/liblber.dylib -DLDAP_INCLUDE_DIR=${prefix}/include -DLDAP_LIBRARIES=${prefix}/lib/libldap.dylib -DLIBEXSLT_INCLUDE_DIR=${prefix}/include -DLIBEXSLT_LIBRARIES=${prefix}/lib/libexslt.dylib -DLIBICALSS_LIBRARY=${prefix}/lib/libicalss.dylib -DLIBICAL_INCLUDE_DIRS=${prefix}/include -DLIBICAL_LIBRARY=${prefix}/lib/libical.dylib -DLIBINTL_INCLUDE_DIR=${prefix}/include -DLIBINTL_LIBRARY=${prefix}/lib/libintl.dylib -DLIBXML2_INCLUDE_DIR=${prefix}/include/libxml2 -DLIBXML2_LIBRARIES=${prefix}/lib/libxml2.dylib -DLIBXML2_XMLLINT_EXECUTABLE=${prefix}/bin/xmllint -DLIBXSLT_INCLUDE_DIR=${prefix}/include -DLIBXSLT_LIBRARIES=${prefix}/lib/libxslt.dylib -DMYSQLD_EXECUTABLE=${prefix}/libexec/mysqld -DMYSQL_INCLUDE_DIR=${prefix}/include/mysql5/mysql -DMYSQL_LIB_DIR=${prefix}/lib/mysql5/mysql -DMYSQLCONFIG_EXECUTABLE=${prefix}/bin/mysql_config5 -DOPENAL_INCLUDE_DIR=/System/Library/Frameworks/OpenAL.framework/Headers -DOPENAL_LIBRARY=/System/Library/Frameworks/OpenAL.framework -DPNG_INCLUDE_DIR=${prefix}/include -DPNG_PNG_INCLUDE_DIR=${prefix}/include -DPNG_LIBRARY=${prefix}/lib/libpng.dylib -DTIFF_INCLUDE_DIR=${prefix}/include -DTIFF_LIBRARY=${prefix}/lib/libtiff.dylib -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_STRIP:FILEPATH=/bin/echo -DPhonon_DIR=${prefix}/share/cmake/modules/phonon -DICONV_INCLUDE_DIR=${prefix}/include -DICONV_LIBRARIES=${prefix}/lib/libiconv.dylib -DFreeTDS_INCLUDE_DIR=${prefix}/include/freetds -DFreeTDS_LIBRARIES=${prefix}/lib/libsybdb.dylib -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.9" -DCMAKE_OSX_SYSROOT="/" ../${worksrcpath}</code></p></pre>
</blockquote>
<p>On January 18th, 2015, 8:47 p.m. CET, <b>Friedrich W. H. Kossebau</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">CMAKE_INSTALL_PREFIX might not be the best solution when trying to follow cmake's philosophy, as this var is only about to which prefix the current software should be installed.
Looking into http://www.cmake.org/cmake/help/v2.8.12/cmake.html#command:find_path and other Find*.cmake macros it seems that making use of <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">CMAKE_SYSTEM_PREFIX_PATH</code> (and/or <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ENV Project_ROOT</code>) might be closer to the cmake ideas. Some search hits seemed to hint that cmake already supports MacPorts & Fink, so the extra paths should already be added to <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">CMAKE_SYSTEM_PREFIX_PATH</code>.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Please check by adding some <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">message(STATUS "Content of CMAKE_SYSTEM_PREFIX_PATH: ${CMAKE_SYSTEM_PREFIX_PATH}")</code> and see if whatever special parts are part already (seems that CMAKE_INSTALL_PREFIX is also added there, so might be duplicated). Oh, I just see in your cmake invocation snippet that <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">-DCMAKE_SYSTEM_PREFIX_PATH="${prefix};/usr"</code> is passed. No idea how that is generated, but whereever it is might be the correct place to control the extra root vars (which might be prefix in all cases) where MacPorts specific stuff should be found.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">So could you please try if these find commands work for you?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">FindOpenJPEG.cmake:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h
PATHS
<span style="color: #666666">/</span>usr<span style="color: #666666">/</span>local<span style="color: #666666">/</span>include<span style="color: #666666">/</span>openjpeg
<span style="color: #666666">/</span>usr<span style="color: #666666">/</span>local<span style="color: #666666">/</span>include
<span style="color: #666666">/</span>usr<span style="color: #666666">/</span>include<span style="color: #666666">/</span>openjpeg
<span style="color: #666666">/</span>usr<span style="color: #666666">/</span>include<span style="color: #666666">/</span>openjpeg<span style="color: #666666">-1.5</span>
<span style="color: #666666">/</span>usr<span style="color: #666666">/</span>include
PATH_SUFFIXES
openjpeg<span style="color: #666666">-1.5</span>
openjpeg
)
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">(not touching the list in PATHS, even if possible half could be dropped)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">FindPqxx.cmake:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">find_path(PQXX_INCLUDE_DIR pqxx
PATHS
<span style="border: 1px solid #FF0000">#</span> ENV PQXX_ROOT perhaps as well<span style="color: #666666">?</span>
<span style="color: #666666">/</span>usr<span style="color: #666666">/</span>include<span style="color: #666666">/</span>pqxx
<span style="color: #666666">/</span>usr<span style="color: #666666">/</span>local<span style="color: #666666">/</span>include<span style="color: #666666">/</span>pqxx
PATH_SUFFIXES
pqxx
)
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">FindVc.cmake:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">find_package(Vc <span style="color: #BC7A00">${</span>Vc_FIND_VERSION<span style="color: #BC7A00">}</span> QUIET NO_MODULE PATHS <span style="color: #19177C">$ENV</span>{HOME} /opt/Vc PATH_SUFFIXES Vc)
</pre></div>
</p></pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">message(STATUS "Content of CMAKE_SYSTEM_PREFIX_PATH: ${CMAKE_SYSTEM_PREFIX_PATH}")
prints:</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">Content of CMAKE_SYSTEM_PREFIX_PATH<span style="color: #666666">:</span> <span style="color: #666666">/</span>opt<span style="color: #666666">/</span>local;<span style="color: #666666">/</span>usr;<span style="color: #666666">/</span>usr<span style="color: #666666">/</span>local;<span style="color: #666666">/</span>usr;<span style="color: #666666">/</span>;<span style="color: #666666">/</span>Volumes<span style="color: #666666">/</span>Debian<span style="color: #666666">/</span>MP9;<span style="color: #666666">/</span>opt<span style="color: #666666">/</span>local;<span style="color: #408080; font-style: italic">//usr;/sw;/opt/local</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">/Volumes/Debian/MP9 is the target of the symlink /opt/local on my system; /sw is where Fink would be installed (not present on my system).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Your modification to FindOpenJPEG.cmake works, I've dropped trying to build with pqxx (and its dependencies) for now so I can only assume that the same mod should work there too.</p></pre>
<br />
<p>- René J.V.</p>
<br />
<p>On January 18th, 2015, 4:54 p.m. CET, René J.V. Bertin wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for Calligra and KDE Software on Mac OS X.</div>
<div>By René J.V. Bertin.</div>
<p style="color: grey;"><i>Updated Jan. 18, 2015, 4:54 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
calligra
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This patch adapts the build system to OS X with KDE4, Qt4 and other dependencies installed through MacPorts. </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">In order of appearance in the patch file:
- <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">-DQT_EXCEPTIONS</code>: this is for use with Qt built with its -no-exceptions option, which MacPorts provides as an optional variant.
- Newer OS X variants only provide the clang compiler
- The default install location for MacPorts is <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">/opt/local</code>, but this can be changed by the user. The header and library search paths required for OpenJPEG, libpqxx and OpenVC are added using <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">//opt//local//</code> which is of course equivalent to <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">/opt/local</code> but easier to search-and-replace with the true install location in MacPorts' post-patch stage.
- the product set for OS X has been extended to all applications and features that build and make sense. (Calligra Gemini builds, but does not function properly.)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">A "Portfile" and accompanying patches that don't have the vocation to be included "upstream" in calligra will be uploaded to MacPorts' trac system soon.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">On OS X 10.9.5 with kdelibs 4.14.4 and Qt 4.8.6 installed through MacPorts.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>CMakeLists.txt <span style="color: grey">(facb5f9)</span></li>
<li>cmake/modules/FindOpenJPEG.cmake <span style="color: grey">(6bfd93c)</span></li>
<li>cmake/modules/FindPqxx.cmake <span style="color: grey">(3e24a0c)</span></li>
<li>cmake/modules/FindVc.cmake <span style="color: grey">(bb9823f)</span></li>
<li>cmake/productsets/osx.cmake <span style="color: grey">(1fe8f1c)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/122114/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>