FS#73177 - [qt6-webengine] Qt PDF is missing and it-tree libevent

Attached to Project: Arch Linux
Opened by tinywrkb (tinywrkb) - Tuesday, 28 December 2021, 11:08 GMT
Last edited by Antonio Rojas (arojas) - Tuesday, 28 December 2021, 17:50 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I'm not using the package, but I'm packaging it as Flatpak, so I looked at the packaging here, and noticed that Qt PDF is not included while qt5-webengine has it.
Is there a reason it's missing? If not, then add it with

```
-DQT_FEATURE_qtpdf_build=ON
-DQT_FEATURE_qtpdf_widgets_build=ON
-DQT_FEATURE_qtpdf_quick_build=ON

```

Another issue is that I believe system libevent is disabled by default due to a COIN issue 711 (https://bugreports.qt.io/projects/COIN/issues/COIN-711), so it can be removed from the depends array.
I actually didn't confirm this with the build log of the Arch Linux package.
With my Flatpak package, forcing system libevent (i.e. `-DQT_FEATURE_webengine_system_libevent=ON`) ended with a linker failure, so it's possible you'll also need something like this:

```
sed -i '\@libs.*=@ s@event@/usr/lib/libevent.so@' src/3rdparty/chromium/base/third_party/libevent/BUILD.gn
```
This task depends upon

Closed by  Antonio Rojas (arojas)
Tuesday, 28 December 2021, 17:50 GMT
Reason for closing:  Deferred
Additional comments about closing:  QtPDF will be built in 6.3
Comment by Antonio Rojas (arojas) - Tuesday, 28 December 2021, 14:39 GMT
QtPDF is off by default in 6.2 and not included in their official builds
https://lists.qt-project.org/pipermail/interest/2021-September/037434.html

Thanks for the heads up about libevent
Comment by tinywrkb (tinywrkb) - Tuesday, 28 December 2021, 14:52 GMT
Note that I was wrong about the `libs` array usage, it only supports relative path for files, and it's very likely that for Arch Linux packaging we don't need to explicitly give a path to the lib, as I `pkg-config.py` probably add the correct libdir to the `lib_dirs` array.
If the linker can't find libevent, then the following might work.

diff --git a/chromium/build/config/linux/pkg-config.py b/chromium/build/config/linux/pkg-config.py
index 5adf70cc3bb..35f61d9f326 100755
--- a/chromium/build/config/linux/pkg-config.py
+++ b/chromium/build/config/linux/pkg-config.py
@@ -213,7 +213,7 @@ def main():
includes = []
cflags = []
libs = []
- lib_dirs = []
+ lib_dirs = [ "/usr/lib" ]

for flag in all_flags[:]:
if len(flag) == 0 or MatchesAnyRegexp(flag, strip_out):

Loading...