Benjamin Piwowarski wrote:

> Hi,
> 
> While I was trying to update a patch for LyX, I had troubles compiling LYX
> on OS X 10.9 introduces quite some changes: - QT5 is required (as
> discussed on the mailing list) - libc++ (instead of libstdc++) is used by
> default systemwide
> 
> So here are some patches for compiling LyX on OS X 10.9 that take into
> account the above comments:

Hi Benjamin,

many thanks for the patches. I'll comment on what I understand, others 
hopefully can comment on the rest.

> [patch 1] is a patch for compiling with clang & libc++ that fixes those
> [issues:
> - in strfwd.h and debug.h, if libc++ is detected, then do not use forward
> std declarations (they break since libc++ define some classes in an
> anonymous namespace to provoque linking clashes when linked with
> libstdc++)

Is <ciso646> guaranteed to exist in C++03? If yes, then this change looks 
safe.

> - conversion from streams to boolean has to be explicit

We do not use C-style casts. Could you please rewrite this, e.g. like

bool const success = (os << contents) ? true : false;

and add comments why it is needed? I could do that, but I can't test whether 
it still fixes your problem, and the chance is extremely high that I would 
break something.

> [patch 3] QT5 and MacOs
> - this adds some QT components for Mac (MacExtras in qt4 and Gui in
> support [necessary to compile Package.cpp]) - use QT_OS_MACX instead of
> QT_WS_MACX (the latter is not defined anymore in Qt5) - in
> GuiWorkArea.cpp, use QProxyStyle instead of QMacStyle - [all platforms
> with cmake] during installation, create the qt.conf file + copy the
> platform plugin (qcocoa) on Mac

I can't comment on the cmake part, but the C++ changes look good. To our Mac 
expperts: Is there any reason why they are not already in?

> [patch 4] graceful libmagic error handling
> This patch just report an error if the magic file detection does not work,
> and proposes a workaround for the bug I had, related to an incorrect
> locale setting

Well, it also sets environment variables. Dou you have any documentation why 
this is needed? Did the fallback to the old code not work in case libmagic 
failed?

> Note that when bundling with cmake, the file magic database should be
> copied within the bundle (but it isn't for the moment)

I guess this is something for later, since libmagic is not essential. First 
we need to solve the bug below:
 
> With all this, I was able to have a "working" LyX application (that is,
> everything seems to work but the menu - known OS X bug)

Is it this one: http://www.lyx.org/trac/ticket/8925

Do you have any pointers to documentation about this bug?

> Hope it helps,
> Benjamin

Yes, this is really helpful. Thank you very much.


Georg

Reply via email to