gnu: qtwebkit: Update to 5.212.0-alpha2.

* gnu/packages/patches/qtwebkit-pbutils-include.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register the patch.
* gnu/packages/qt.scm (qtwebkit): Update to 5.212.0-alpha2.
[source]: Use new upstream location. Add patch.
[build-system]: Switch to cmake-build-system.
[inputs]: Add glib, gst-plugins-base, qtlocation, qtsensors,
qtwebchannel.
[arguments]: Disable the tests. Add new configure flags. Remove all
custom phases.
This commit is contained in:
Andreas Enge 2018-07-22 11:38:58 +02:00 committed by Efraim Flashner
parent 92eb7aff41
commit 601cb1be2b
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
3 changed files with 33 additions and 81 deletions

View File

@ -1098,6 +1098,7 @@ dist_patch_DATA = \
%D%/packages/patches/qtscript-disable-tests.patch \ %D%/packages/patches/qtscript-disable-tests.patch \
%D%/packages/patches/quagga-reproducible-build.patch \ %D%/packages/patches/quagga-reproducible-build.patch \
%D%/packages/patches/quickswitch-fix-dmenu-check.patch \ %D%/packages/patches/quickswitch-fix-dmenu-check.patch \
%D%/packages/patches/qtwebkit-pbutils-include.patch \
%D%/packages/patches/rapicorn-isnan.patch \ %D%/packages/patches/rapicorn-isnan.patch \
%D%/packages/patches/raptor2-heap-overflow.patch \ %D%/packages/patches/raptor2-heap-overflow.patch \
%D%/packages/patches/ratpoison-shell.patch \ %D%/packages/patches/ratpoison-shell.patch \

View File

@ -0,0 +1,15 @@
Patch taken from Nix:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/qt-5/5.11/qtwebkit.patch
diff --git a/Source/WebKit2/PlatformQt.cmake b/Source/WebKit2/PlatformQt.cmake
--- a/Source/WebKit2/PlatformQt.cmake
+++ b/Source/WebKit2/PlatformQt.cmake
@@ -261,6 +261,7 @@
list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
${GLIB_INCLUDE_DIRS}
${GSTREAMER_INCLUDE_DIRS}
+ ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
${Qt5Quick_INCLUDE_DIRS}
${Qt5Quick_PRIVATE_INCLUDE_DIRS}
${SQLITE_INCLUDE_DIR}

View File

@ -2104,18 +2104,17 @@ different kinds of sliders, and much more.")
(define-public qtwebkit (define-public qtwebkit
(package (package
(name "qtwebkit") (name "qtwebkit")
(version "5.9.1") (version "5.212.0-alpha2")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://download.qt.io/official_releases/qt/" (uri (string-append "https://github.com/annulen/webkit/releases/download/"
(version-major+minor version) "/" version name "-" version "/" name "-" version ".tar.xz"))
"/submodules/" name "-opensource-src-"
version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"1ksjn1vjbfhdm4y4rg08ag4krk87ahp7qcdcpwll42l0rnz61998")))) "12lg7w00d8wsj672s1y5z5gm0xdcgs16nas0b5bgq4byavg03ygq"))
(build-system gnu-build-system) (patches (search-patches "qtwebkit-pbutils-include.patch"))))
(build-system cmake-build-system)
(native-inputs (native-inputs
`(("perl" ,perl) `(("perl" ,perl)
("python" ,python-2.7) ("python" ,python-2.7)
@ -2126,6 +2125,8 @@ different kinds of sliders, and much more.")
("pkg-config" ,pkg-config))) ("pkg-config" ,pkg-config)))
(inputs (inputs
`(("icu" ,icu4c) `(("icu" ,icu4c)
("glib" ,glib)
("gst-plugins-base" ,gst-plugins-base)
("libjpeg" ,libjpeg) ("libjpeg" ,libjpeg)
("libpng" ,libpng) ("libpng" ,libpng)
("libwebp" ,libwebp) ("libwebp" ,libwebp)
@ -2134,92 +2135,27 @@ different kinds of sliders, and much more.")
("libxrender" ,libxrender) ("libxrender" ,libxrender)
("qtbase" ,qtbase) ("qtbase" ,qtbase)
("qtdeclarative" ,qtdeclarative) ("qtdeclarative" ,qtdeclarative)
("qtlocation" ,qtlocation)
("qtmultimedia" ,qtmultimedia) ("qtmultimedia" ,qtmultimedia)
("qtsensors" ,qtsensors)
("qtwebchannel" ,qtwebchannel)
("libxml2" ,libxml2) ("libxml2" ,libxml2)
("libxslt" ,libxslt) ("libxslt" ,libxslt)
("libx11" ,libx11) ("libx11" ,libx11)
("libxcomposite" ,libxcomposite))) ("libxcomposite" ,libxcomposite)))
(arguments (arguments
`(#:phases `(#:tests? #f ; no apparent tests; it might be necessary to set
(modify-phases %standard-phases ; ENABLE_API_TESTS, see CMakeLists.txt
(add-before 'configure 'fix-qmlwebkit-plugins-rpath #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
(lambda _ "-DPORT=Qt"
(substitute* "Source/WebKit/qt/declarative/experimental/experimental.pri" "-DUSE_LIBHYPHEN=OFF"
(("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib") "-DUSE_SYSTEM_MALLOC=ON")))
"RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../../lib"))
(substitute* "Source/WebKit/qt/declarative/public.pri"
(("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
"RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../lib"))
#t))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(setenv "QMAKEPATH"
(string-append (getcwd) "/Tools/qmake:"
(getenv "QMAKEPATH")))
(system* "qmake"))))
;; prevent webkit from trying to install into the qtbase store directory,
;; and replace references to the build directory in linker options:
(add-before 'build 'patch-installpaths
(lambda* (#:key outputs inputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(qtbase (assoc-ref inputs "qtbase"))
(builddir (getcwd))
(linkbuild (string-append "-L" builddir))
(linkout (string-append "-L" out))
(makefiles
(map-in-order
(lambda (i)
(let* ((in (car i))
(mf (string-append (dirname in) "/"
(cdr i))))
;; by default, these Makefiles are
;; generated during install, but we need
;; to generate them now
(system* "qmake" in "-o" mf)
mf))
'(("Source/api.pri" . "Makefile.api")
("Source/widgetsapi.pri"
. "Makefile.widgetsapi")
("Source/WebKit2/WebProcess.pro"
. "Makefile.WebProcess")
("Source/WebKit2/PluginProcess.pro"
. "Makefile.PluginProcess")
("Source/WebKit/qt/declarative/public.pri"
. "Makefile.declarative.public")
("Source/WebKit/qt/declarative/experimental/experimental.pri"
. "Makefile.declarative.experimental")
("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
. "Makefile")))))
;; Order of qmake calls and substitutions matters here.
(system* "qmake" "-prl" "Source/widgetsapi.pri"
"-o" "Source/Makefile")
(substitute* (find-files "lib" "libQt5.*\\.prl")
((linkbuild) linkout))
(substitute* (find-files "lib"
"libQt5WebKit.*\\.la")
(("libdir='.*'")
(string-append "libdir='" out "/lib'"))
((linkbuild) linkout))
(substitute* (find-files "lib/pkgconfig"
"Qt5WebKit.*\\.pc")
(((string-append "prefix=" qtbase))
(string-append "prefix=" out))
((linkbuild) linkout))
;; Makefiles must be modified after .prl/.la/.pc
;; files, lest they get rebuilt:
(substitute* makefiles
(((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
out )
(((string-append "-Wl,-rpath," builddir))
(string-append "-Wl,-rpath," out)))))))))
(home-page "https://www.webkit.org") (home-page "https://www.webkit.org")
(synopsis "Web browser engine and classes to render and interact with web (synopsis "Web browser engine and classes to render and interact with web
content") content")
(description "QtWebKit provides a Web browser engine that makes it easy to (description "QtWebKit provides a Web browser engine that makes it easy to
embed content from the World Wide Web into your Qt application. At the same embed content from the World Wide Web into your Qt application. At the same
time Web content can be enhanced with native controls.") time Web content can be enhanced with native controls.")
(license license:lgpl2.1+))) (license license:lgpl2.1+)))
(define-public dotherside (define-public dotherside