Subject: bug#51658: [PATCH] Haiku port (again)

From: Po Lu <[email-masked]>
Date: Wed, 10 Nov 2021 08:00:25 +0800

Eli Zaretskii <[email-masked]> writes:

> Thanks.
>
> It's a large patch, so let's start with the general, a.k.a. "big"
> aspects.
>
> First, do we really need to use *.cc files and compile with a C++
> compiler?  Is that a necessity?  AFAICT, the code in those *.cc files
> is plain C, so why not use a C compiler, as we do on every other
> platform?

That isn't C code.  The code in the .cc code is written in C++, in order
to use the Haiku GUI libraries which require C++.  I tried to keep it
simple and understandable for people who don't know C++, but know C.

That C++ code, in turn, exports functions the rest of Emacs uses as
`extern "C"'.

> Next, the font backend stuff: do we really need 5 (five) backends?
> How about having just one: HarfBuzz+Cairo?  That's the direction we go
> on other platforms, so how about making the Haiku code smaller and
> simpler and support just that single backend, and drop all the older
> ones?  I'd definitely won't want to drag the unmaintained libm17n-flt
> into this port.

I'm fine with removing the ftbe backend, but I would prefer to keep the
haikufont backend working.  The reason is that Haiku users might not
have Cairo installed, and it likes to break every now and then, as it's
not considered important for that platform.

> If you are okay with the above, could you please update the patch, so
> that we could avoid reviewing code which eventually won't be
> installed?

Yes, but please tell me if you're OK with keeping haikufont first.
Thanks.