[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-release-team
Subject: Re: Review Request 110962: Switch to an external LibRaw
From: "Vadim Zhukov" <persgray () gmail ! com>
Date: 2013-06-11 18:33:51
Message-ID: 20130611183351.9176.96383 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On June 11, 2013, 10:03 p.m., Vadim Zhukov wrote:
> > cmake/modules/FindLibRaw.cmake, line 36
> > <http://git.reviewboard.kde.org/r/110962/diff/1/?file=149621#file149621line36>
> >
> > This check looks ugly. LibRaw itself provides LIBRAW_CHECK_VERSION() macros (in libraw_version.h), \
> > which could be used in compile check. This way it should be more future-compatible than parsing \
> > header file itself.
>
> Rolf Eike Beer wrote:
> I bet that macro is a C macro, not a CMake one. So for finding out in CMake code which version was \
> found this doesn't help.
> Pino Toscano wrote:
> Yes, I know about the macros in libraw_version.h, but they cannot be used at all in version checks at \
> CMake time. Currently, the version string is just printed, but in the future it might be used to force \
> a minimum version.
If you want only to get the libraw's version, then you could use libraw_version() function. Just compile \
sample code which calls libraw_version() and prints its output, and save output to the variable. As a \
bonus you'll early check if found libraw could be used at all.
- Vadim
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110962/#review34162
-----------------------------------------------------------
On June 11, 2013, 9:50 p.m., Pino Toscano wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110962/
> -----------------------------------------------------------
>
> (Updated June 11, 2013, 9:50 p.m.)
>
>
> Review request for KDE Graphics, Release Team and Gilles Caulier.
>
>
> Description
> -------
>
> Instead of using an embedded copy of LibRaw, look for an external LibRaw as mandatory dependency with a \
> new CMake module and using its variables.
> Considering some LibRaw versions seem to be underlinked and not linking to OpenMP, link it manually in \
> libkdcraw to overcome such lack.
> Switch back to the MAKE_KDCRAW_LIB define (i.e. the default set by KDE4_ADD_LIBRARY) as the one used to \
> check whether it is being built, as otherwise LIBRAW_BUILDLIB would conflict with LibRaw.
> Once this RR is approved, I will remove the libraw code copy and the CMake modules (FindLCMS2.cmake and \
> FindPthreads.cmake) needed for it.
>
> This addresses bug 307146.
> http://bugs.kde.org/show_bug.cgi?id=307146
>
>
> Diffs
> -----
>
> CMakeLists.txt f2f269609feb10947ec3bac10125b379c6c821dd
> cmake/modules/FindLibRaw.cmake PRE-CREATION
> libkdcraw/CMakeLists.txt cce5d6dba690fb5182638ccd1f10488bbd6ec2ce
> libkdcraw/libkdcraw_export.h 1a222a03502a0e068bdba4f03b7ff4961c4a8f2b
>
> Diff: http://git.reviewboard.kde.org/r/110962/diff/
>
>
> Testing
> -------
>
> Compiles fine with both LibRaw 0.14.7 and 0.15.1.
>
>
> Thanks,
>
> Pino Toscano
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/110962/">http://git.reviewboard.kde.org/r/110962/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On June 11th, 2013, 10:03 p.m. MSK, <b>Vadim Zhukov</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="http://git.reviewboard.kde.org/r/110962/diff/1/?file=149621#file149621line36" style="color: black; \
font-weight: bold; text-decoration: underline;">cmake/modules/FindLibRaw.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">36</font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="nb">file</span><span \
class="p">(</span><span class="s">READ</span> <span class="o">${</span><span \
class="nv">LIBRAW_INCLUDE_DIR</span><span class="o">}</span><span class="s">/libraw_version.h</span> \
<span class="s">LIBRAW_VERSION_CONTENT</span><span class="p">)</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;">This check looks ugly. LibRaw itself provides LIBRAW_CHECK_VERSION() \
macros (in libraw_version.h), which could be used in compile check. This way it should be more \
future-compatible than parsing header file itself.</pre> </blockquote>
<p>On June 11th, 2013, 10:14 p.m. MSK, <b>Rolf Eike Beer</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;">I bet that macro is a C macro, not a CMake one. So for finding out \
in CMake code which version was found this doesn't help.</pre> </blockquote>
<p>On June 11th, 2013, 10:25 p.m. MSK, <b>Pino Toscano</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;">Yes, I know about the macros in libraw_version.h, but they cannot be \
used at all in version checks at CMake time. Currently, the version string is just printed, but in the \
future it might be used to force a minimum version.</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;">If you want only to get the libraw's version, then \
you could use libraw_version() function. Just compile sample code which calls libraw_version() and prints \
its output, and save output to the variable. As a bonus you'll early check if found libraw could be \
used at all.</pre> <br />
<p>- Vadim</p>
<br />
<p>On June 11th, 2013, 9:50 p.m. MSK, Pino Toscano wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black solid;"> <tr>
<td>
<div>Review request for KDE Graphics, Release Team and Gilles Caulier.</div>
<div>By Pino Toscano.</div>
<p style="color: grey;"><i>Updated June 11, 2013, 9:50 p.m.</i></p>
<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;">Instead of using an embedded copy of LibRaw, \
look for an external LibRaw as mandatory dependency with a new CMake module and using its variables.
Considering some LibRaw versions seem to be underlinked and not linking to OpenMP, link it manually in \
libkdcraw to overcome such lack.
Switch back to the MAKE_KDCRAW_LIB define (i.e. the default set by KDE4_ADD_LIBRARY) as the one used to \
check whether it is being built, as otherwise LIBRAW_BUILDLIB would conflict with LibRaw.
Once this RR is approved, I will remove the libraw code copy and the CMake modules (FindLCMS2.cmake and \
FindPthreads.cmake) needed for it.</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;">Compiles fine with both LibRaw 0.14.7 and \
0.15.1.</pre> </td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=307146">307146</a>
</div>
<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">(f2f269609feb10947ec3bac10125b379c6c821dd)</span></li>
<li>cmake/modules/FindLibRaw.cmake <span style="color: grey">(PRE-CREATION)</span></li>
<li>libkdcraw/CMakeLists.txt <span style="color: \
grey">(cce5d6dba690fb5182638ccd1f10488bbd6ec2ce)</span></li>
<li>libkdcraw/libkdcraw_export.h <span style="color: \
grey">(1a222a03502a0e068bdba4f03b7ff4961c4a8f2b)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/110962/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
release-team mailing list
release-team@kde.org
https://mail.kde.org/mailman/listinfo/release-team
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic