pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

qt6: fix use of sytem libmd4c



Module Name:	pkgsrc-wip
Committed By:	Niclas Rosenvik <nros%NetBSD.org@localhost>
Pushed By:	nros
Date:		Tue Jan 12 21:19:00 2021 +0000
Changeset:	4e32872fd839259e784f3365324e5c3e8161d514

Modified Files:
	qt6-qtbase/Makefile
	qt6-qtbase/distinfo
	qt6-qtbase/patches/patch-src_gui_configure.cmake
Added Files:
	qt6-qtbase/patches/patch-src_gui_CMakeLists.txt
	qt6-qtbase/patches/patch-src_gui_text_qtextmarkdownimporter.cpp

Log Message:
qt6: fix use of sytem libmd4c

make -system-libmd4c work correctly in qt6-qtbase

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4e32872fd839259e784f3365324e5c3e8161d514

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 qt6-qtbase/Makefile                                |  1 +
 qt6-qtbase/distinfo                                |  4 +++-
 qt6-qtbase/patches/patch-src_gui_CMakeLists.txt    | 15 +++++++++++++++
 qt6-qtbase/patches/patch-src_gui_configure.cmake   | 22 ++++++++++++++++++++--
 .../patch-src_gui_text_qtextmarkdownimporter.cpp   | 15 +++++++++++++++
 5 files changed, 54 insertions(+), 3 deletions(-)

diffs:
diff --git a/qt6-qtbase/Makefile b/qt6-qtbase/Makefile
index 0fc81a19a4..557f0065d7 100644
--- a/qt6-qtbase/Makefile
+++ b/qt6-qtbase/Makefile
@@ -222,6 +222,7 @@ TOOL_DEPENDS+=	xmlstarlet-[0-9]*:../../textproc/xmlstarlet
 .include "../../security/mit-krb5/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
 .include "../../textproc/icu/buildlink3.mk"
+.include "../../wip/md4c/buildlink3.mk"
 .include "../../www/libproxy/buildlink3.mk"
 .if ${OPSYS} != "Darwin"
 .include "../../fonts/fontconfig/buildlink3.mk"
diff --git a/qt6-qtbase/distinfo b/qt6-qtbase/distinfo
index 03cd3d4a0f..38546d9d59 100644
--- a/qt6-qtbase/distinfo
+++ b/qt6-qtbase/distinfo
@@ -20,10 +20,12 @@ SHA1 (patch-src_corelib_io_qstandardpaths_unix.cpp) = b12a41da19b25e34e12fdf8071
 SHA1 (patch-src_corelib_io_qstorageinfo_unix.cpp) = 9919194e9f6b47f1f311b8f8223a6a7519152073
 SHA1 (patch-src_corelib_thread_qmutex__p.h) = 093089b8a37baa3071257c99bbde5f6295bd2eec
 SHA1 (patch-src_corelib_thread_qwaitcondition__unix.cpp) = 9dffdbfc81bc7d3259020cd32b4039b7be6ee2bd
-SHA1 (patch-src_gui_configure.cmake) = c83546416253522a96e2e8de418211ce3d0ec131
+SHA1 (patch-src_gui_CMakeLists.txt) = 927c4fe13b26a0800d2b08299b01b1fed3b6c51f
+SHA1 (patch-src_gui_configure.cmake) = 64c5ab4e9e3c6c8384ae0ac2d94a7ad96138de42
 SHA1 (patch-src_gui_kernel_qopenglcontext__platform.h) = 13f6c1c91f1ad3ca5a5090fd21d01f8e0c887251
 SHA1 (patch-src_gui_kernel_qplatformopenglcontext.h) = adbdbb18e2a6699454c042d4b1232a56eb35d1ab
 SHA1 (patch-src_gui_platform_unix_qunixnativeinterface.cpp) = 7bc8bd78c6c6f4ec70526f2efaff2551acb3697a
+SHA1 (patch-src_gui_text_qtextmarkdownimporter.cpp) = 64d74c8a7965687a833620b641253f3b94990f5e
 SHA1 (patch-src_network_kernel_qnetworkinterface__unix.cpp) = 2c5569eb2ba19999eb62e4fdb54f347c88f6e6a5
 SHA1 (patch-src_plugins_platforms_cocoa_qiosurfacegraphicsbuffer.mm) = 01afb2aef1d14370308c897c1d077b05c5e3f0a9
 SHA1 (patch-src_plugins_platforms_xcb_qxcbatom.cpp) = abbd0b04b881666e82f45adc18e49aafdb43d4be
diff --git a/qt6-qtbase/patches/patch-src_gui_CMakeLists.txt b/qt6-qtbase/patches/patch-src_gui_CMakeLists.txt
new file mode 100644
index 0000000000..7b03fd2776
--- /dev/null
+++ b/qt6-qtbase/patches/patch-src_gui_CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* Fix use of system libmd4c
+
+--- src/gui/CMakeLists.txt.orig	2020-12-04 10:14:27.000000000 +0000
++++ src/gui/CMakeLists.txt
+@@ -682,7 +682,7 @@ qt_internal_extend_target(Gui CONDITION 
+ 
+ qt_internal_extend_target(Gui CONDITION QT_FEATURE_system_textmarkdownreader AND QT_FEATURE_textmarkdownreader
+     LIBRARIES
+-        libmd4c
++        md4c::md4c
+ )
+ 
+ qt_internal_extend_target(Gui CONDITION QT_FEATURE_textmarkdownreader AND NOT QT_FEATURE_system_textmarkdownreader
diff --git a/qt6-qtbase/patches/patch-src_gui_configure.cmake b/qt6-qtbase/patches/patch-src_gui_configure.cmake
index 2398810420..ad1e89a2d7 100644
--- a/qt6-qtbase/patches/patch-src_gui_configure.cmake
+++ b/qt6-qtbase/patches/patch-src_gui_configure.cmake
@@ -3,10 +3,19 @@ $NetBSD$
 * check for X11 libs on all systems that support X11 not just linux
 * make QT_FEATURE_xcb_glx available everywhere so that glx can enabled
   on other platforms than linux
+* Fix use of system libmd4c
 
 --- src/gui/configure.cmake.orig	2020-12-04 10:14:27.000000000 +0000
 +++ src/gui/configure.cmake
-@@ -53,82 +53,82 @@ qt_find_package(Vulkan PROVIDED_TARGETS 
+@@ -41,6 +41,7 @@ qt_find_package(gbm PROVIDED_TARGETS gbm
+ qt_find_package(WrapSystemHarfbuzz 2.6.0 PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz)
+ qt_find_package(Libinput PROVIDED_TARGETS Libinput::Libinput MODULE_NAME gui QMAKE_LIB libinput)
+ qt_find_package(JPEG PROVIDED_TARGETS JPEG::JPEG MODULE_NAME gui QMAKE_LIB libjpeg)
++qt_find_package(md4c PROVIDED_TARGETS md4c::md4c MODULE_NAME gui QMAKE_LIB libmd4c)
+ qt_find_package(WrapSystemPNG PROVIDED_TARGETS WrapSystemPNG::WrapSystemPNG MODULE_NAME gui QMAKE_LIB libpng)
+ if(QT_FEATURE_system_zlib)
+     qt_add_qmake_lib_dependency(libpng zlib)
+@@ -53,82 +54,82 @@ qt_find_package(Vulkan PROVIDED_TARGETS 
  if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
      qt_find_package(Wayland PROVIDED_TARGETS Wayland::Server MODULE_NAME gui QMAKE_LIB wayland_server)
  endif()
@@ -110,7 +119,7 @@ $NetBSD$
      qt_find_package(XRender 0.6 PROVIDED_TARGETS PkgConfig::XRender MODULE_NAME gui QMAKE_LIB xrender)
  endif()
  qt_add_qmake_lib_dependency(xrender xlib)
-@@ -897,7 +897,7 @@ qt_feature("xcb-glx-plugin" PRIVATE
+@@ -897,7 +898,7 @@ qt_feature("xcb-glx-plugin" PRIVATE
      CONDITION QT_FEATURE_xcb_xlib AND QT_FEATURE_opengl AND NOT QT_FEATURE_opengles2
      EMIT_IF QT_FEATURE_xcb
  )
@@ -119,3 +128,12 @@ $NetBSD$
      LABEL "  XCB GLX"
      CONDITION XCB_GLX_FOUND
      EMIT_IF QT_FEATURE_xcb AND QT_FEATURE_xcb_glx_plugin
+@@ -963,7 +964,7 @@ qt_feature("textmarkdownreader" PUBLIC
+ qt_feature("system-textmarkdownreader" PUBLIC
+     SECTION "Kernel"
+     LABEL "  Using system libmd4c"
+-    CONDITION libs.libmd4c OR FIXME
++    CONDITION QT_FEATURE_textmarkdownreader AND TARGET md4c::md4c
+     ENABLE INPUT_libmd4c STREQUAL 'system'
+     DISABLE INPUT_libmd4c STREQUAL 'qt'
+ )
diff --git a/qt6-qtbase/patches/patch-src_gui_text_qtextmarkdownimporter.cpp b/qt6-qtbase/patches/patch-src_gui_text_qtextmarkdownimporter.cpp
new file mode 100644
index 0000000000..ee185b0992
--- /dev/null
+++ b/qt6-qtbase/patches/patch-src_gui_text_qtextmarkdownimporter.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* use system libmd4c
+
+--- src/gui/text/qtextmarkdownimporter.cpp.orig	2021-01-11 17:46:02.695729653 +0000
++++ src/gui/text/qtextmarkdownimporter.cpp
+@@ -48,7 +48,7 @@
+ #include <QTextDocumentFragment>
+ #include <QTextList>
+ #include <QTextTable>
+-#include "../../3rdparty/md4c/md4c.h"
++#include <md4c.h>
+ 
+ QT_BEGIN_NAMESPACE
+ 


Home | Main Index | Thread Index | Old Index