pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/qt5-qtwebkit qt5-qtwebkit: fix building on Darwin;...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/da052ec418a7
branches:  trunk
changeset: 390822:da052ec418a7
user:      adam <adam%pkgsrc.org@localhost>
date:      Fri Dec 30 20:19:10 2022 +0000

description:
qt5-qtwebkit: fix building on Darwin; cleanups

diffstat:

 x11/qt5-qtwebkit/Makefile                                                               |  23 +++++----
 x11/qt5-qtwebkit/PLIST                                                                  |  20 ++++----
 x11/qt5-qtwebkit/distinfo                                                               |   6 ++-
 x11/qt5-qtwebkit/patches/patch-Source_JavaScriptCore_jsc.cpp                            |  15 ++++++
 x11/qt5-qtwebkit/patches/patch-Source_WebKit_qt_declarative_CMakeLists.txt              |  15 ++++++
 x11/qt5-qtwebkit/patches/patch-Source_WebKit_qt_declarative_experimental_CMakeLists.txt |  14 ++++++
 x11/qt5-qtwebkit/patches/patch-Source_cmake_WebKitMacros.cmake                          |  15 ++++++
 7 files changed, 87 insertions(+), 21 deletions(-)

diffs (236 lines):

diff -r b3551385e832 -r da052ec418a7 x11/qt5-qtwebkit/Makefile
--- a/x11/qt5-qtwebkit/Makefile Fri Dec 30 18:19:52 2022 +0000
+++ b/x11/qt5-qtwebkit/Makefile Fri Dec 30 20:19:10 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.100 2022/11/28 19:16:13 jperkin Exp $
+# $NetBSD: Makefile,v 1.101 2022/12/30 20:19:10 adam Exp $
 
 QTWKVERSION=   5.212.0-alpha4
 DISTNAME=      qtwebkit-${QTWKVERSION}
@@ -35,9 +35,10 @@
 CMAKE_ARGS+=           -DUSE_SYSTEM_MALLOC:BOOL=ON
 CMAKE_ARGS+=           -DUSE_LD_GOLD:BOOL=OFF
 CMAKE_ARGS+=           -DENABLE_API_TESTS=OFF
-
+CMAKE_ARGS+=           -DMACOS_BUILD_FRAMEWORKS=OFF
+CMAKE_ARGS+=           -DMACOS_USE_SYSTEM_ICU=OFF
+CMAKE_ARGS+=           -DMACOS_FORCE_SYSTEM_XML_LIBRARIES=OFF
 CMAKE_ARGS+=           -DKDE_INSTALL_LIBEXECDIR=${CMAKE_INSTALL_PREFIX}/libexec
-#CMAKE_ARGS+=          -DLIBEXEC_INSTALL_DIR=${CMAKE_INSTALL_PREFIX}/libexec
 
 UNLIMIT_RESOURCES+=    cputime
 
@@ -53,15 +54,11 @@
 # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1963
 CXXFLAGS+=             -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66
 
-## for GL_GLEXT_LEGACY with GL/gl.h error, GL_ARB_shader_objects is not defined.
-#BUILDLINK_TRANSFORM+= rm:-Wundef
-
 # avoid creating a .qt directory in the users home directory
 SCRIPTS_ENV+=          HOME=${WRKDIR}
 
 REPLACE_PERL+=         Source/WebKit2/Scripts/generate-forwarding-headers.pl
 
-#MAKE_ENV+=            QTDIR=${QTDIR}
 INSTALL_ENV+=          INSTALL_ROOT=${DESTDIR}
 INSTALLATION_DIRS+=    lib/pkgconfig
 
@@ -75,7 +72,7 @@
 
 BUILDLINK_TRANSFORM.SunOS+=    rm:-Wl,--gc-sections
 
-.if ${OPSYS} == "NetBSD" && !empty(MACHINE_ARCH:M*arm*)
+.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH:M*arm*}
 LDFLAGS+=      -Wl,--no-keep-memory
 .endif
 
@@ -85,9 +82,9 @@
 .endif
 
 # JavaScriptCore requires at least MIPS32.
-.if !empty(MACHINE_ARCH:Mmips64*)
+.if ${MACHINE_ARCH:Mmips64*}
 CFLAGS+=       -march=mips64
-.elif !empty(MACHINE_ARCH:Mmips*)
+.elif ${MACHINE_ARCH:Mmips*}
 CFLAGS+=       -march=mips32
 .endif
 
@@ -97,6 +94,10 @@
        ln -f -s ${QTDIR}/lib/pkgconfig/${i} ${i}
 .endfor
 
+# Not supported on Win and Mac.
+# See comment in Source/WebKit2/PlatformQt.cmake
+PLIST_VARS+=   npapi
+
 .include "../../databases/sqlite3/buildlink3.mk"
 .if ${OPSYS} == "Darwin" || ${OPSYS} == "Linux" || ${OPSYS} == "NetBSD"
 .include "../../devel/libexecinfo/buildlink3.mk"
@@ -110,9 +111,11 @@
 .include "../../multimedia/gst-plugins1-base/buildlink3.mk"
 .include "../../multimedia/gst-plugins1-bad/buildlink3.mk"
 .include "../../x11/libXcomposite/buildlink3.mk"
+PLIST.npapi=   yes
 .endif
 .include "../../x11/qt5-qtdeclarative/buildlink3.mk"
 .include "../../x11/qt5-qtlocation/buildlink3.mk"
+.include "../../x11/qt5-qtmultimedia/buildlink3.mk"
 .include "../../x11/qt5-qtsensors/buildlink3.mk"
 .include "../../x11/qt5-qtwebchannel/buildlink3.mk"
 PYTHON_FOR_BUILD_ONLY= tool
diff -r b3551385e832 -r da052ec418a7 x11/qt5-qtwebkit/PLIST
--- a/x11/qt5-qtwebkit/PLIST    Fri Dec 30 18:19:52 2022 +0000
+++ b/x11/qt5-qtwebkit/PLIST    Fri Dec 30 20:19:10 2022 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.7 2020/03/21 19:42:36 nia Exp $
+@comment $NetBSD: PLIST,v 1.8 2022/12/30 20:19:10 adam Exp $
 lib/pkgconfig/Qt5WebKit.pc
 lib/pkgconfig/Qt5WebKitWidgets.pc
 qt5/include/QtWebKit/5.212.0/QtWebKit/private/qhttpheader_p.h
@@ -89,34 +89,34 @@
 qt5/lib/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets-release.cmake
 qt5/lib/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets.cmake
 qt5/lib/libANGLESupport.a
-qt5/lib/libJavaScriptCore.${RUBY_DLEXT}
+qt5/lib/libJavaScriptCore.so
 qt5/lib/libJavaScriptCore.so.5
 qt5/lib/libJavaScriptCore.so.5.212.0
-qt5/lib/libQt5WebKit.${RUBY_DLEXT}
+qt5/lib/libQt5WebKit.so
 qt5/lib/libQt5WebKit.so.5
 qt5/lib/libQt5WebKit.so.5.212.0
-qt5/lib/libQt5WebKitWidgets.${RUBY_DLEXT}
+qt5/lib/libQt5WebKitWidgets.so
 qt5/lib/libQt5WebKitWidgets.so.5
 qt5/lib/libQt5WebKitWidgets.so.5.212.0
-qt5/lib/libWTF.${RUBY_DLEXT}
-qt5/lib/libWebCore.${RUBY_DLEXT}
+qt5/lib/libWTF.so
+qt5/lib/libWebCore.so
 qt5/lib/libWebCore.so.5
 qt5/lib/libWebCore.so.5.212.0
-qt5/lib/libWebKit2.${RUBY_DLEXT}
+qt5/lib/libWebKit2.so
 qt5/lib/libWebKit2.so.5
 qt5/lib/libWebKit2.so.5.212.0
 qt5/lib/pkgconfig/Qt5WebKit.pc
 qt5/lib/pkgconfig/Qt5WebKitWidgets.pc
 qt5/libexec/QtWebNetworkProcess
-qt5/libexec/QtWebPluginProcess
+${PLIST.npapi}qt5/libexec/QtWebPluginProcess
 qt5/libexec/QtWebProcess
 qt5/libexec/QtWebStorageProcess
 qt5/mkspecs/modules/qt_lib_webkit.pri
 qt5/mkspecs/modules/qt_lib_webkit_private.pri
 qt5/mkspecs/modules/qt_lib_webkitwidgets.pri
 qt5/mkspecs/modules/qt_lib_webkitwidgets_private.pri
-qt5/qml/QtWebKit/experimental/libqmlwebkitexperimentalplugin.${RUBY_DLEXT}
+qt5/qml/QtWebKit/experimental/libqmlwebkitexperimentalplugin.so
 qt5/qml/QtWebKit/experimental/qmldir
-qt5/qml/QtWebKit/libqmlwebkitplugin.${RUBY_DLEXT}
+qt5/qml/QtWebKit/libqmlwebkitplugin.so
 qt5/qml/QtWebKit/plugins.qmltypes
 qt5/qml/QtWebKit/qmldir
diff -r b3551385e832 -r da052ec418a7 x11/qt5-qtwebkit/distinfo
--- a/x11/qt5-qtwebkit/distinfo Fri Dec 30 18:19:52 2022 +0000
+++ b/x11/qt5-qtwebkit/distinfo Fri Dec 30 20:19:10 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.28 2022/04/25 02:45:44 markd Exp $
+$NetBSD: distinfo,v 1.29 2022/12/30 20:19:10 adam Exp $
 
 BLAKE2s (qtwebkit-5.212.0-alpha4.tar.xz) = 20858db08c7d297037d3ced34e441d4b657325c406b475e4e76dd367dc9c500c
 SHA512 (qtwebkit-5.212.0-alpha4.tar.xz) = 33f11270bd030599beff9c1983a6c5ff2d61f407cc8a6825f7f405d46f9184c720fc7f60c7359f08f828db96a2170092875066a0d5c0a21ff09bc48a2603fbf6
@@ -12,6 +12,7 @@
 SHA1 (patch-Source_JavaScriptCore_generate-bytecode-files) = b58ca94781fcf7b9f6a3eba715af2784e7a0acc0
 SHA1 (patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp) = 2b7dba0d0e87ed96c4d7de6ddb5833209cfe51b5
 SHA1 (patch-Source_JavaScriptCore_jit_ThunkGenerators.cpp) = f0ca56e4b4060c0a8d756289d7c25d1ead6b07be
+SHA1 (patch-Source_JavaScriptCore_jsc.cpp) = 796ce0232f1a833757b2e7ca5c910fac75f783ad
 SHA1 (patch-Source_JavaScriptCore_tools_CodeProfiling.cpp) = 94c139413eecb875bba98c7749bba24cfcc16632
 SHA1 (patch-Source_Qt5WebKitConfig.cmake.in) = 3a1346216b20853b73abf9b1756617d1e761cb94
 SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = 1e4b8cffbd7ec0a6130a0ec2112023bed5c0b78e
@@ -31,5 +32,8 @@
 SHA1 (patch-Source_WebCore_platform_text_icu_UTextProviderLatin1.cpp) = 29b414e1ae18a0786f31d80143f665d6d68bcbe3
 SHA1 (patch-Source_WebCore_platform_text_icu_UTextProviderUTF16.cpp) = b175e1973a2019d746fda174dfc5708a3ca57d9b
 SHA1 (patch-Source_WebKit2_Platform_unix_SharedMemoryUnix.cpp) = d18013d0e07d7ad7e9d84cb6ef2d418d9bba4c7e
+SHA1 (patch-Source_WebKit_qt_declarative_CMakeLists.txt) = bda5cb2751027aab161ae54f46b8f9103532fb13
+SHA1 (patch-Source_WebKit_qt_declarative_experimental_CMakeLists.txt) = b95ac623f36018e3f2cc55a2988e97ef3f713159
 SHA1 (patch-Source_cmake_OptionsCommon.cmake) = 8fb8d11c4aab36e913a560ac48acce930f074635
 SHA1 (patch-Source_cmake_OptionsQt.cmake) = 35cc2b9904897cd2f1d540b473ce2905d95a0143
+SHA1 (patch-Source_cmake_WebKitMacros.cmake) = 5498b5cccf392f5d3bc370b00a72b2aa5389492d
diff -r b3551385e832 -r da052ec418a7 x11/qt5-qtwebkit/patches/patch-Source_JavaScriptCore_jsc.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/qt5-qtwebkit/patches/patch-Source_JavaScriptCore_jsc.cpp      Fri Dec 30 20:19:10 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_JavaScriptCore_jsc.cpp,v 1.1 2022/12/30 20:19:10 adam Exp $
+
+Remove ambiguity on Darwin.
+
+--- Source/JavaScriptCore/jsc.cpp.orig 2022-12-30 08:36:58.000000000 +0000
++++ Source/JavaScriptCore/jsc.cpp
+@@ -189,7 +189,7 @@ private:
+ 
+ class ElementHandleOwner : public WeakHandleOwner {
+ public:
+-    bool isReachableFromOpaqueRoots(Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor) override
++    bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor) override
+     {
+         Element* element = jsCast<Element*>(handle.slot()->asCell());
+         return visitor.containsOpaqueRoot(element->root());
diff -r b3551385e832 -r da052ec418a7 x11/qt5-qtwebkit/patches/patch-Source_WebKit_qt_declarative_CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/qt5-qtwebkit/patches/patch-Source_WebKit_qt_declarative_CMakeLists.txt        Fri Dec 30 20:19:10 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WebKit_qt_declarative_CMakeLists.txt,v 1.1 2022/12/30 20:19:10 adam Exp $
+
+Link against WebKit2 library.
+
+--- Source/WebKit/qt/declarative/CMakeLists.txt.orig   2022-12-30 10:44:44.000000000 +0000
++++ Source/WebKit/qt/declarative/CMakeLists.txt
+@@ -23,7 +23,7 @@ include_directories(SYSTEM
+ 
+ add_library(qmlwebkitplugin MODULE plugin.cpp)
+ target_link_libraries(qmlwebkitplugin
+-    WebKit Qt5::Quick)
++    WebKit2 Qt5::Quick)
+ 
+ set(qmlwebkit_output_dir "${CMAKE_BINARY_DIR}/imports/QtWebKit")
+ set(qmlwebkit_install_dir "${QML_INSTALL_DIR}/QtWebKit")
diff -r b3551385e832 -r da052ec418a7 x11/qt5-qtwebkit/patches/patch-Source_WebKit_qt_declarative_experimental_CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/qt5-qtwebkit/patches/patch-Source_WebKit_qt_declarative_experimental_CMakeLists.txt   Fri Dec 30 20:19:10 2022 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-Source_WebKit_qt_declarative_experimental_CMakeLists.txt,v 1.1 2022/12/30 20:19:10 adam Exp $
+
+Link aganst WebKit2 library.
+
+--- Source/WebKit/qt/declarative/experimental/CMakeLists.txt.orig      2022-12-30 10:46:13.000000000 +0000
++++ Source/WebKit/qt/declarative/experimental/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ add_library(qmlwebkitexperimentalplugin MODULE plugin.cpp)
+ target_link_libraries(qmlwebkitexperimentalplugin
+-    WebKit Qt5::Quick)
++    WebKit2 Qt5::Quick)
+ 
+ set(qmlwebkitexperimental_output_dir "${CMAKE_BINARY_DIR}/imports/QtWebKit/experimental")
+ set(qmlwebkitexperimental_install_dir "${QML_INSTALL_DIR}/QtWebKit/experimental")
diff -r b3551385e832 -r da052ec418a7 x11/qt5-qtwebkit/patches/patch-Source_cmake_WebKitMacros.cmake
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/qt5-qtwebkit/patches/patch-Source_cmake_WebKitMacros.cmake    Fri Dec 30 20:19:10 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_cmake_WebKitMacros.cmake,v 1.1 2022/12/30 20:19:10 adam Exp $
+
+Don't build frameworks on Darwin.
+
+--- Source/cmake/WebKitMacros.cmake.orig       2020-03-04 17:16:37.000000000 +0000
++++ Source/cmake/WebKitMacros.cmake
+@@ -285,7 +285,7 @@ macro(WEBKIT_FRAMEWORK _target)
+         add_custom_command(TARGET ${_target} POST_BUILD COMMAND ${${_target}_POST_BUILD_COMMAND} VERBATIM)
+     endif ()
+ 
+-    if (APPLE AND NOT PORT STREQUAL "GTK" AND NOT ${${_target}_LIBRARY_TYPE} MATCHES STATIC)
++    if (FALSE AND NOT PORT STREQUAL "GTK" AND NOT ${${_target}_LIBRARY_TYPE} MATCHES STATIC)
+         set_target_properties(${_target} PROPERTIES FRAMEWORK TRUE)
+         if (${_target}_PUBLIC_HEADERS)
+             set_target_properties(${_target} PROPERTIES PUBLIC_HEADER "${${_target}_PUBLIC_HEADERS}")



Home | Main Index | Thread Index | Old Index