Improve font paths in QtPdf. Add default X11Base fonts as well "${LOCALBASE}/share/fonts/noto" which is a run dependency.
OK? Index: Makefile =================================================================== RCS file: /cvs/ports/x11/qt5/qtwebengine/Makefile,v retrieving revision 1.43 diff -u -p -u -p -r1.43 Makefile --- Makefile 31 Jul 2023 06:17:40 -0000 1.43 +++ Makefile 8 Sep 2023 06:07:57 -0000 @@ -15,7 +15,7 @@ COMMENT = Chromium-based web engine for # Many parts are copied from www/chromium port, so keep in sync DISTNAME = qtwebengine-everywhere-opensource-src-${QT5_WEBENGINE_VERSION} QT5NAME = QtWebEngine -REVISION = 2 +REVISION = 3 CATEGORIES = www @@ -130,6 +130,7 @@ pre-configure: pre-build: ${SUBST_CMD} ${CHROMESRC}/build/gn_run_binary.py \ + ${WRKSRC}/src/3rdparty/chromium/third_party/pdfium/core/fxge/fx_ge_linux.cpp \ ${CHROMESRC}/v8/tools/run.py \ ${CHROMESRC}/tools/protoc_wrapper/protoc_wrapper.py Index: patches/patch-src_3rdparty_chromium_third_party_pdfium_core_fxge_fx_ge_linux_cpp =================================================================== RCS file: /cvs/ports/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_pdfium_core_fxge_fx_ge_linux_cpp,v retrieving revision 1.4 diff -u -p -u -p -r1.4 patch-src_3rdparty_chromium_third_party_pdfium_core_fxge_fx_ge_linux_cpp --- patches/patch-src_3rdparty_chromium_third_party_pdfium_core_fxge_fx_ge_linux_cpp 10 Jul 2023 19:55:06 -0000 1.4 +++ patches/patch-src_3rdparty_chromium_third_party_pdfium_core_fxge_fx_ge_linux_cpp 8 Sep 2023 06:07:57 -0000 @@ -10,15 +10,23 @@ Index: src/3rdparty/chromium/third_party #error "Included on the wrong platform" #endif -@@ -165,9 +165,8 @@ class CLinuxPlatform : public CFX_GEModule::PlatformIf +@@ -165,10 +165,16 @@ class CLinuxPlatform : public CFX_GEModule::PlatformIf std::unique_ptr<SystemFontInfoIface> CreateDefaultSystemFontInfo() override { auto pInfo = std::make_unique<CFX_LinuxFontInfo>(); if (!pInfo->ParseFontCfg(CFX_GEModule::Get()->GetUserFontPaths())) { - pInfo->AddPath("/usr/share/fonts"); - pInfo->AddPath("/usr/share/X11/fonts/Type1"); - pInfo->AddPath("/usr/share/X11/fonts/TTF"); ++#if defined(OS_BSD) ++ pInfo->AddPath("${X11BASE}/X11/fonts/Type1"); ++ pInfo->AddPath("${X11BASE}/X11/fonts/TTF"); ++ pInfo->AddPath("${LOCALBASE}/share/fonts/noto"); ++ pInfo->AddPath("${LOCALBASE}/share/fonts"); ++#else + pInfo->AddPath("/usr/X11R6/lib/X11/fonts/Type1"); + pInfo->AddPath("/usr/X11R6/lib/X11/fonts/TTF"); pInfo->AddPath("/usr/local/share/fonts"); ++#endif } return pInfo; + }