Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.

[Testing] Attempt to speedup flatpak builds #609

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions packaging/flatpak/org.tenacity.Tenacity.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,18 @@
"modules": [
{
"name": "wxwidgets",
"rm-configure": true,
"buildsystem": "cmake-ninja",
"config-opts": [
"--with-libpng",
"--with-zlib",
"--with-cxx=17",
"--disable-sdltest",
"--disable-webview",
"--disable-webviewwebkit",
"--disable-ribbon",
"--disable-propgrid",
"--disable-richtext",
"--with-expat=builtin",
"--with-libiconv=/usr"
"-D wxUSE_LIBPNG=builtin",
"-D wxUSE_ZLIB=builtin",
Comment on lines +46 to +47
Copy link
Member

Choose a reason for hiding this comment

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

Same here about builtin vs sys

Copy link
Member

Choose a reason for hiding this comment

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

From some older aarch64 flatpak CI build log I see this:

   Which libraries should wxWidgets use?
                                       STL                no
                                       jpeg               sys
                                       png                sys
                                       regex              builtin
                                       tiff               sys
                                       lzma               yes
                                       zlib               sys
                                       expat              builtin
                                       libmspack          no
                                       sdl                no

You are changing it from using system libpng and zlib, which are already built and available from the SDK, to bundled copies, increasing build time from sub-configuring and compiling those.

"-D wxBUILD_CXX_STANDARD=17",
"-D wxBUILD_TESTS=OFF",
"-D wxUSE_WEBVIEW=OFF",
"-D wxUSE_WEBVIEW_WEBKIT=OFF",
Comment on lines +50 to +51
Copy link
Member

Choose a reason for hiding this comment

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

There might be other things we can probably disable that we don't use, out of wx components. I can have a look later.

Copy link
Member

Choose a reason for hiding this comment

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

I think all these can be disabled:

wxUSE_LIBGNOMEVFS (probably gets disabled automatically due to no legacy gnome-vfs in flatpak SDK, might be good to be explicit)
wxUSE_WEBVIEW
wxUSE_WEBVIEW_WEBKIT
wxUSE_RIBBON
wxUSE_PROPGRID
wxUSE_AUI
wxUSE_STC
wxUSE_MDI
wxUSE_MEDIACTRL
wxUSE_RICHTEXT

For some reason we seem to do something about wxXML and XRC in toplevel cmake file, but I can't spot any actual usage of what would need wxUSE_XML and/or wxUSE_XRC.
We could probably disable some image formats too, like TIFF overall, but we can fine-tune later, it doesn't save much if using system library from SDK. The above are the "big ticket" items.

Copy link
Member

@leio leio Sep 13, 2021

Choose a reason for hiding this comment

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

Some of these might be useful for non-flatpak CI builds too, where we build wx ourselves too (Ubuntu). For example disabling wxUSE_MEDIACTRL gets rid of the need for gstreamer completely.

"-D wxUSE_RIBBON=OFF",
"-D wxUSE_PROPGRID=OFF",
"-D wxUSE_RICHTEXT=OFF",
"-D wxUSE_EXPAT=builtin"
Copy link
Member

Choose a reason for hiding this comment

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

I suspect expat is available in some flatpak SDK we depend on anyways, so system version could probably be used as well.

],
"cleanup": [
"/share/bakefile"
Expand Down Expand Up @@ -161,6 +160,7 @@
},
{
"name": "soundtouch",
"buildsystem": "cmake-ninja",
"sources": [
{
"type": "git",
Copy link
Contributor

Choose a reason for hiding this comment

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

While you're at it, can you update soundtouch to 2.3.1? It has some fixes for CMake. I'm not sure any of those are required for Tenacity, but still good to be on the latest version.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I had already noticed that version difference and was going to look into seeing if there were any breaking changes before doing exactly that

Copy link
Contributor

Choose a reason for hiding this comment

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

SoundTouch 2.3.1 has some build fixes for Mixxx. No changes should be required for Tenacity.

Expand All @@ -185,8 +185,8 @@
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=RelWithDebInfo",
"-DWX_CONFIG=/app/bin/wx-config"
"-D CMAKE_BUILD_TYPE=RelWithDebInfo",
"-D WX_CONFIG=/app/bin/wx-config"
],
"post-install": [
"install -Dm644 ../help/tenacity.metainfo.xml -t /app/share/metainfo",
Expand Down