Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cairo] Build with Meson, Update to 1.17.8 #2

Merged
merged 1 commit into from Mar 17, 2023

Conversation

attah
Copy link
Contributor

@attah attah commented Feb 7, 2023

I was bored and wanted to learn... and accidentally put some time into this such that even if i wasn't very efficient it might save you some time.
(This update is not something i need/want... purely done for fun)

Rumor has it they will be Meson-only from 1.18 and forward.
It did not build on current version, so updated to latest along with changing build system, which perhaps ideally should have been two steps.

NB: i have not dared to test this yet.

Summary of diff:

-Version:    1.17.4
+Version:    1.17.8

...and the submodule.
This did not work on 1.17.4... so stepped to latest.

-BuildRequires:  pkgconfig(pixman-1) >= 0.30.0
+BuildRequires:  pkgconfig(pixman-1) >= 0.36.0

Stolen from Fedora. We satisfy it.

-BuildRequires: pkgconfig(libxml-2.0)
SVG backend no longer needs this, since 1.1.10 - and xml backend removed.

-BuildRequires:  libGLESv2-devel
-BuildRequires:  libEGL-devel

Gl backend removed.

-BuildRequires: binutils-devel
See symbol-lookup below.

+BuildRequires: meson
Obviously...

+BuildRequires: ccache
Meson/ninja seems to want it. It just worked.


-%autogen --disable-static \
-    --disable-xlib \
-    --enable-ps \
-    --enable-pdf \
-    --enable-svg \
-    --enable-tee \
-    --enable-xml \
-    --enable-gobject \
-    --enable-glesv3 \
-    --disable-gtk-doc
+%meson \
+    -Dxlib=disabled \
+    -Dxcb=disabled \
+    -Dglib=enabled \
+    -Dgtk_doc=false \
+    -Dtests=disabled \
+    -Dtee=disabled \
+    -Dsymbol-lookup=disabled \
+    -Dspectre=disabled \
+    -Dfreetype=enabled \
+    -Dfontconfig=enabled \
+    -Dzlib=enabled \
+    -Dpng=enabled

--disable-xlib -> -Dxlib=disabled
-Dxcb=disabled Some other X11 dependency to disable
--enable-ps/pdf/svg Are enabled always it seems, and i can't see any "redundant" switches to use to guard against that changing.
--enable-xml Removed (even if there is a Dxml in this version) since it has since been removed upstream.
--enable-gobject -> -Dglib=enabled presumably.
--enable-glesv3 Removed. gles backend is removed upstream.
--disable-gtk-doc -> -Dgtk_doc=false

Now comes the iffy one:
-Dtee=disabled
This is broken in 1.17.8, and Cairo devs seems to think it is not much used.
Fedora has it enabled; but do we care about tee, aka flight data recorder aka fdr?

Somewhat well-founded guesswork:
-Dsymbol-lookup=disabled
Build fails with no reference to binutils bfd_openr
This is the (only afaict) dependency to binutils, removed above.
Not enabled in Fedora either. Do we use it?
Some mumblings about this being a Meson bug fixed in a few versions. Using 1.0 did not help for me.

-Dspectre=disabled
Ghostscript libspectre for rendering Postscript.
Not enabled in Fedora either. I don't think you depended on this before, nor have ghostscript.

Additions:
-Dfreetype=enabled, -Dfontconfig=enabled Clear dependencies. Fedora does this.
-Dzlib=enabled, -Dpng=enabled Looked through what options there are. These we obviously want.

Fedora spec for reference: https://src.fedoraproject.org/rpms/cairo/blob/rawhide/f/cairo.spec

files:
-%{_libdir}/cairo/cairo*.so*
After removing tee/fdr, there is only libcairo-trace.so here.
Also note that nothing matches cairo*.so.* with a trailing dot.

devel:
-%{_libdir}/cairo/cairo*.so*
Same.

NB that libcairo-trace.so is excluded in the trace package itself.
No idea why.

rpm/cairo.spec Outdated Show resolved Hide resolved
@attah
Copy link
Contributor Author

attah commented Mar 5, 2023

The XML surface has also been dropped upstream now, so removed.
That took sphinx with it, it seems.

@attah
Copy link
Contributor Author

attah commented Mar 9, 2023

Sorry for the spam :)

Copy link
Contributor

@pvuorela pvuorela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me seems all good here, and agree with the rationale on meson build flags.

@mlehtima
Copy link
Contributor

A small nitpick: the meson options would be more clear if those were in alphabetical order. Also I wonder if we should pick https://src.fedoraproject.org/rpms/cairo/blob/rawhide/f/cairo-1.17.8-ft-font-missing-glyph.patch from fedora, not sure if that is relevant for us but the issue mentions some characters becoming invisible in some cases without that.

@attah
Copy link
Contributor Author

attah commented Mar 16, 2023

Sorted.
Patch added,... apparently autosetup -p1 is needed. Why can't stuff just work by default?

Sidenote: this new thing with being forced to commit before you can prepare is really killing productivity/flow... :(
Please reconsider.

@attah attah requested a review from mlehtima March 16, 2023 18:41
@pvuorela pvuorela merged commit 61972ee into sailfishos:master Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants