From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: [PATCH 5/6] gnu: Add qtwebkit 5.5.1. Date: Wed, 14 Dec 2016 20:03:29 +0100 Message-ID: <20161214190330.30433-6-janneke@gnu.org> References: <20161214190330.30433-1-janneke@gnu.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHEq6-0002Jq-TU for guix-devel@gnu.org; Wed, 14 Dec 2016 14:03:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHEq5-0008OL-Qk for guix-devel@gnu.org; Wed, 14 Dec 2016 14:03:42 -0500 In-Reply-To: <20161214190330.30433-1-janneke@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * 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