pkgsrc-WIP-changes archive

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

qt5-qtwebengine: fix build on NetBSD-current



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <tk%giga.or.at@localhost>
Pushed By:	wiz
Date:		Thu Mar 18 11:03:30 2021 +0100
Changeset:	fd17771d3d5186ba65e15ea513e8c1f95e42045c

Modified Files:
	qt5-qtwebengine/Makefile
	qt5-qtwebengine/distinfo
	qt5-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.cc
Added Files:
	qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libxml_src_encoding.c

Log Message:
qt5-qtwebengine: fix build on NetBSD-current

Add some missing dependencies.

Use included libxml2 because pkgsrc's libxml2 default is built without icu
support. Add patch to make included libxml2 build against current icu.

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

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

diffstat:
 qt5-qtwebengine/Makefile                           |  6 +++++-
 qt5-qtwebengine/distinfo                           |  3 ++-
 ...omium_base_files_file__path__watcher__kqueue.cc | 24 ++++++++++++++++++----
 ...rty_chromium_third__party_libxml_src_encoding.c | 18 ++++++++++++++++
 4 files changed, 45 insertions(+), 6 deletions(-)

diffs:
diff --git a/qt5-qtwebengine/Makefile b/qt5-qtwebengine/Makefile
index 2ce8cf3748..2aed3608dd 100644
--- a/qt5-qtwebengine/Makefile
+++ b/qt5-qtwebengine/Makefile
@@ -20,6 +20,7 @@ TOOL_DEPENDS+=	gperf-[0-9]*:../../devel/gperf
 #TOOL_DEPENDS+=	libxslt-[0-9]*:../../textproc/libxslt
 TOOL_DEPENDS+=	${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
 TOOL_DEPENDS+=	yasm-[0-9]*:../../devel/yasm
+DEPENDS+=	nodejs-[0-9]*:../../lang/nodejs
 
 JPEG_ACCEPTED=	libjpeg-turbo
 
@@ -64,6 +65,8 @@ post-install:
 .include "../../mk/bsd.prefs.mk"
 
 .include "../../audio/alsa-lib/buildlink3.mk"
+.include "../../audio/pulseaudio/buildlink3.mk"
+.include "../../audio/libopus/buildlink3.mk"
 .include "../../devel/glib2/buildlink3.mk"
 .if ${OPSYS} == "Darwin" || ${OPSYS} == "Linux" || ${OPSYS} == "NetBSD"
 .include "../../devel/libexecinfo/buildlink3.mk"
@@ -90,7 +93,8 @@ PYTHON_FOR_BUILD_ONLY=	tool
 BUILDLINK_TRANSFORM+=   l:pci:pciutils
 .include "../../textproc/icu/buildlink3.mk"
 .include "../../textproc/jsoncpp/buildlink3.mk"
-.include "../../textproc/libxml2/buildlink3.mk"
+# needs libxml2 built with icu option, which is not default in pkgsrc
+#.include "../../textproc/libxml2/buildlink3.mk"
 .include "../../textproc/libxslt/buildlink3.mk"
 .if ${OPSYS} != "Darwin"
 .include "../../multimedia/gst-plugins1-bad/buildlink3.mk"
diff --git a/qt5-qtwebengine/distinfo b/qt5-qtwebengine/distinfo
index f1912a7759..b882ffcd71 100644
--- a/qt5-qtwebengine/distinfo
+++ b/qt5-qtwebengine/distinfo
@@ -21,7 +21,7 @@ SHA1 (patch-src_3rdparty_chromium_base_debug_proc_maps_linux.cc) = e45faff8aa4af
 SHA1 (patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc) = 0921f97c7bbaafa0572919b90fc98a790c21e614
 SHA1 (patch-src_3rdparty_chromium_base_debug_stack__trace__unittest.cc) = 52d16f70e49646cc02a2dd63f25a130cb040b21d
 SHA1 (patch-src_3rdparty_chromium_base_files_file__path__unittest.cc) = 964fdea2030b19b8f6c06851ce0f79b7d2276980
-SHA1 (patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.cc) = 8a1a29567c6b3e6916fb4e859f77a0f75e6da45c
+SHA1 (patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.cc) = 6ba235aa6b2dd7fdcca3798a475128f0bf8e0e00
 SHA1 (patch-src_3rdparty_chromium_base_files_file__path__watcher__stub.cc) = 7c3221fb3721b64239565db7b345d87fd365ebf3
 SHA1 (patch-src_3rdparty_chromium_base_files_file__path__watcher__unittest.cc) = 0c8200be1296c6e8b474e7fac064200dd45700ad
 SHA1 (patch-src_3rdparty_chromium_base_files_file__util.h) = 56de05301386a118ecb708daac4dcf188f377f11
@@ -591,6 +591,7 @@ SHA1 (patch-src_3rdparty_chromium_third__party_libdrm_BUILD.gn) = 1a96d67d4202de
 SHA1 (patch-src_3rdparty_chromium_third__party_libjpeg__turbo_BUILD.gn) = 85fe7e943474a1e7550f443d38561e68c6080538
 SHA1 (patch-src_3rdparty_chromium_third__party_libpng_pnglibconf.h) = 131371c66ba1acc25f0bebde8863b582c6e5c0dc
 SHA1 (patch-src_3rdparty_chromium_third__party_libxml_BUILD.gn) = 76b8617347c95b23991b2f1479cad40a9ede38f9
+SHA1 (patch-src_3rdparty_chromium_third__party_libxml_src_encoding.c) = 94eeadd0c4777fcd4597eed9550191b8500922ef
 SHA1 (patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn) = 5a7fd168a364798f7dbcb9cbaba81ddb9afb1313
 SHA1 (patch-src_3rdparty_chromium_third__party_libyuv_BUILD.gn) = 6409f4493f59ce8cc75ee747fd0246f357409951
 SHA1 (patch-src_3rdparty_chromium_third__party_minigbm_BUILD.gn) = b405d40de33a05700f17822a22306c015bae7c0e
diff --git a/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.cc b/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.cc
index 1bd055508f..22f9fd9ad0 100644
--- a/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.cc
+++ b/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.cc
@@ -1,15 +1,31 @@
 $NetBSD$
 
-static cast from a pointer to intptr_t is not allowed.
+data was intptr_t until NetBSD 9, then it switched to void * like every other operating system.
 
---- src/3rdparty/chromium/base/files/file_path_watcher_kqueue.cc.orig	2020-07-24 02:37:41.000000000 +0000
+--- src/3rdparty/chromium/base/files/file_path_watcher_kqueue.cc.orig	2020-11-07 01:22:36.000000000 +0000
 +++ src/3rdparty/chromium/base/files/file_path_watcher_kqueue.cc
-@@ -74,7 +74,7 @@ int FilePathWatcherKQueue::EventsForPath
+@@ -4,6 +4,15 @@
+ 
+ #include "base/files/file_path_watcher_kqueue.h"
+ 
++#ifdef __NetBSD__
++#include <sys/param.h>
++#if __NetBSD_Version__ < 999000000
++#define KEVENT_TYPE intptr_t
++#else
++#define KEVENT_TYPE void *
++#endif
++#endif
++
+ #include <fcntl.h>
+ #include <stddef.h>
+ #include <sys/param.h>
+@@ -74,7 +83,7 @@ int FilePathWatcherKQueue::EventsForPath
      struct kevent event;
      EV_SET(&event, fd, EVFILT_VNODE, (EV_ADD | EV_CLEAR | EV_RECEIPT),
             (NOTE_DELETE | NOTE_WRITE | NOTE_ATTRIB |
 -            NOTE_RENAME | NOTE_REVOKE | NOTE_EXTEND), 0, data);
-+            NOTE_RENAME | NOTE_REVOKE | NOTE_EXTEND), 0, reinterpret_cast<intptr_t>(data));
++            NOTE_RENAME | NOTE_REVOKE | NOTE_EXTEND), 0, reinterpret_cast<KEVENT_TYPE>(data));
      events->push_back(event);
    }
    return last_existing_entry;
diff --git a/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libxml_src_encoding.c b/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libxml_src_encoding.c
new file mode 100644
index 0000000000..71bc024f76
--- /dev/null
+++ b/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libxml_src_encoding.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Fix building with ICU 68.1.
+
+--- src/3rdparty/chromium/third_party/libxml/src/encoding.c.orig	2020-11-07 01:22:36.000000000 +0000
++++ src/3rdparty/chromium/third_party/libxml/src/encoding.c
+@@ -48,6 +48,11 @@
+ #include "buf.h"
+ #include "enc.h"
+ 
++#if !defined(FALSE)
++# define FALSE (1 == 0)
++# define TRUE (! FALSE)
++#endif
++
+ static xmlCharEncodingHandlerPtr xmlUTF16LEHandler = NULL;
+ static xmlCharEncodingHandlerPtr xmlUTF16BEHandler = NULL;
+ 


Home | Main Index | Thread Index | Old Index