[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/6] gnu: Add qtwebkit 5.5.1.
From: |
Jan Nieuwenhuizen |
Subject: |
[PATCH 5/6] gnu: Add qtwebkit 5.5.1. |
Date: |
Wed, 14 Dec 2016 20:03:29 +0100 |
* gnu/packages/qt.scm (qtwebkit55): New variable.
---
gnu/packages/qt.scm | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 431aa18..4de6337 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1387,3 +1387,101 @@ time Web content can be enhanced with native controls.")
(inputs
`(("mesa" ,mesa)
("qtbase" ,qtbase55)))))
+
+(define-public qtwebkit55
+ (package
+ (inherit qtwebkit)
+ (name "qtwebkit")
+ (version "5.5.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://download.qt.io/official_releases/qt/"
+ (version-major+minor version)
+ "/" version
+ "/submodules/" name "-opensource-src-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "0sbdglcf57lmgbcybimvvbpqikn3blb1pxvd71sdhsiypnfkyn3p"))))
+ (inputs
+ `(("icu" ,icu4c)
+ ("libjpeg" ,libjpeg)
+ ("libpng" ,libpng)
+ ("libwebp" ,libwebp)
+ ("sqlite" ,sqlite)
+ ("fontconfig" ,fontconfig)
+ ("libxrender", libxrender)
+ ("qtbase" ,qtbase55)
+ ("qtdeclarative" ,qtdeclarative55)
+ ("libxml2" ,libxml2)
+ ("libxslt" ,libxslt)
+ ("libx11" ,libx11)
+ ("libxcomposite" ,libxcomposite)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (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))
+ (((string-append "-Wl,-rpath," qtbase "/lib") all)
+ (string-append all " -Wl,-rpath," out "/lib
")))))))))))
--
2.10.2
- Phantomjs with minimal old qt5.5 dependencies, Jan Nieuwenhuizen, 2016/12/14
- [PATCH 1/6] gnu: Add qtbase 5.5.1., Jan Nieuwenhuizen, 2016/12/14
- [PATCH 3/6] gnu: Add qtxmlpatterns 5.5.1., Jan Nieuwenhuizen, 2016/12/14
- [PATCH 2/6] gnu: Add qtsvg 5.5.1., Jan Nieuwenhuizen, 2016/12/14
- [PATCH 5/6] gnu: Add qtwebkit 5.5.1.,
Jan Nieuwenhuizen <=
- [PATCH 4/6] gnu: Add qtdeclarative 5.5.1., Jan Nieuwenhuizen, 2016/12/14
- [PATCH 6/6] gnu: Add phantomjs., Jan Nieuwenhuizen, 2016/12/14