mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2024-11-26 02:15:20 +01:00
nongnu: Add qtwebengine.
* nongnu/packages/qt.scm (qtwebengine): New variable.
This commit is contained in:
parent
b5b5562269
commit
f40e2f2549
1 changed files with 202 additions and 0 deletions
202
nongnu/packages/qt.scm
Normal file
202
nongnu/packages/qt.scm
Normal file
|
@ -0,0 +1,202 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
|
||||
;;; Copyright © 2019 Michael Rosset <mike.rosset@gmail.com>
|
||||
;;;
|
||||
;;; This file is not part of GNU Guix.
|
||||
;;;
|
||||
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
||||
;;; under the terms of the GNU General Public License as published by
|
||||
;;; the Free Software Foundation; either version 3 of the License, or (at
|
||||
;;; your option) any later version.
|
||||
;;;
|
||||
;;; GNU Guix is distributed in the hope that it will be useful, but
|
||||
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;;; GNU General Public License for more details.
|
||||
;;;
|
||||
;;; You should have received a copy of the GNU General Public License
|
||||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (nongnu packages qt)
|
||||
#:use-module (gnu packages bison)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages cups)
|
||||
#:use-module (gnu packages flex)
|
||||
#:use-module (gnu packages fontutils)
|
||||
#:use-module (gnu packages ghostscript)
|
||||
#:use-module (gnu packages gl)
|
||||
#:use-module (gnu packages glib)
|
||||
#:use-module (gnu packages gnupg)
|
||||
#:use-module (gnu packages gperf)
|
||||
#:use-module (gnu packages gtk)
|
||||
#:use-module (gnu packages icu4c)
|
||||
#:use-module (gnu packages image)
|
||||
#:use-module (gnu packages libevent)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu packages ninja)
|
||||
#:use-module (gnu packages nss)
|
||||
#:use-module (gnu packages pciutils)
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages protobuf)
|
||||
#:use-module (gnu packages pulseaudio)
|
||||
#:use-module (gnu packages python)
|
||||
#:use-module (gnu packages qt)
|
||||
#:use-module (gnu packages regex)
|
||||
#:use-module (gnu packages ruby)
|
||||
#:use-module (gnu packages serialization)
|
||||
#:use-module (gnu packages telephony)
|
||||
#:use-module (gnu packages video)
|
||||
#:use-module (gnu packages xdisorg)
|
||||
#:use-module (gnu packages xiph)
|
||||
#:use-module (gnu packages xml)
|
||||
#:use-module (gnu packages xorg)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix packages))
|
||||
|
||||
(define-public qtwebengine
|
||||
(package
|
||||
(name "qtwebengine")
|
||||
(version (package-version qtbase))
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri
|
||||
(string-append "https://download.qt.io/official_releases/qt/"
|
||||
(substring version 0 4)
|
||||
"/" version "/submodules/"
|
||||
(string-append name "-everywhere-src-" version)
|
||||
".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1zmqsdais85cdfh2jh8h4a5jcamp1mzdk3vgqm6xnldqf6nrxd2v"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("bison" ,bison)
|
||||
("flex" ,flex)
|
||||
("gperf" ,gperf)
|
||||
("ninja" ,ninja)
|
||||
("perl" ,perl)
|
||||
("pkg-config" ,pkg-config)
|
||||
("python-2" ,python-2)
|
||||
("ruby" ,ruby)
|
||||
))
|
||||
(inputs
|
||||
`(("alsa-lib" ,alsa-lib)
|
||||
("atk" ,atk)
|
||||
("cups-minimal" ,cups-minimal)
|
||||
("dbus" ,dbus)
|
||||
("ffmpeg" ,ffmpeg)
|
||||
("fontconfig" ,fontconfig)
|
||||
("harbuzz" ,harfbuzz)
|
||||
("icu4c" ,icu4c)
|
||||
("jsoncpp" ,jsoncpp)
|
||||
("lcms" ,lcms)
|
||||
("libcap" ,libcap)
|
||||
("libevent" ,libevent)
|
||||
("libgcrypt" ,libgcrypt)
|
||||
("libjpeg" ,libjpeg-turbo)
|
||||
;; libsrtp not found by qmake. seems to not have config.tests?
|
||||
("libsrtp" ,libsrtp)
|
||||
;; FIXME: error: ?struct vpx_svc_ref_frame_config? has no member named ?frame_flags?
|
||||
;; ("libvpx" ,libvpx)
|
||||
("libwebp" ,libwebp)
|
||||
("libx11" ,libx11)
|
||||
("libxcb" ,libxcb)
|
||||
("libxcomposite" ,libxcomposite)
|
||||
("libxcursor" ,libxcursor)
|
||||
("libxi" ,libxi)
|
||||
("libxkbcommon" ,libxkbcommon)
|
||||
;; libxml not found due to icu not enabled in libxml?
|
||||
("libxml2" ,libxml2)
|
||||
("libxrandr" ,libxrandr)
|
||||
("libxrender" ,libxrender)
|
||||
("libxslt" ,libxslt)
|
||||
("libxtst" ,libxtst)
|
||||
("mesa" ,mesa)
|
||||
("minizip" ,minizip)
|
||||
("nss" ,nss)
|
||||
("opus" ,opus)
|
||||
("pciutils" ,pciutils)
|
||||
("protobuf" ,protobuf)
|
||||
("pulseaudio" ,pulseaudio)
|
||||
("qtbase" ,qtbase)
|
||||
("qtdeclarative" ,qtdeclarative)
|
||||
("qtmultimedia" ,qtmultimedia)
|
||||
("qtwebchannel" ,qtwebchannel)
|
||||
("re2" ,re2)
|
||||
("snappy" ,snappy)
|
||||
("udev" ,eudev)
|
||||
("xcb-util" ,xcb-util)))
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'configure 'configure-qmake
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(qtbase (assoc-ref inputs "qtbase"))
|
||||
(tmpdir (string-append (getenv "TMPDIR")))
|
||||
(qmake (string-append tmpdir "/qmake"))
|
||||
(qt.conf (string-append tmpdir "/qt.conf")))
|
||||
;; Use qmake with a customized qt.conf to override install
|
||||
;; paths to $out.
|
||||
(symlink (which "qmake") qmake)
|
||||
(setenv "CC" "gcc")
|
||||
(setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
|
||||
(with-output-to-file qt.conf
|
||||
(lambda ()
|
||||
(format #t "[Paths]
|
||||
Prefix=~a
|
||||
ArchData=lib/qt5
|
||||
Data=share/qt5
|
||||
Documentation=share/doc/qt5
|
||||
Headers=include/qt5
|
||||
Libraries=lib
|
||||
LibraryExecutables=lib/qt5/libexec
|
||||
Binaries=bin
|
||||
Tests=tests
|
||||
Plugins=lib/qt5/plugins
|
||||
Imports=lib/qt5/imports
|
||||
Qml2Imports=lib/qt5/qml
|
||||
Translations=share/qt5/translations
|
||||
Settings=etc/xdg
|
||||
Examples=share/doc/qt5/examples
|
||||
HostPrefix=~a
|
||||
HostData=lib/qt5
|
||||
HostBinaries=bin
|
||||
HostLibraries=lib
|
||||
|
||||
[EffectiveSourcePaths]
|
||||
HostPrefix=~a
|
||||
HostData=lib/qt5
|
||||
" out out qtbase)))
|
||||
#t)))
|
||||
(replace 'configure
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
;; Valid QT_BUILD_PARTS variables are:
|
||||
;; libs tools tests examples demos docs translations
|
||||
(invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
|
||||
"--webengine-printing-and-pdf=no"
|
||||
"--webengine-ffmpeg=system"
|
||||
"--webengine-icu=system"
|
||||
"--webengine-pepper-plugins=no")))
|
||||
(add-before 'check 'set-display
|
||||
(lambda _
|
||||
;; make Qt render "offscreen", required for tests
|
||||
(setenv "QT_QPA_PLATFORM" "offscreen")
|
||||
#t))
|
||||
(add-after 'install-binaries 'install-qt.conf
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(tmpdir (string-append (getenv "TMPDIR")))
|
||||
(in.conf (string-append tmpdir "/qt.conf"))
|
||||
(out.conf (string-append out "/lib/qt5/libexec/qt.conf")))
|
||||
(copy-file in.conf out.conf))
|
||||
#t)))))
|
||||
(home-page "https://www.qt.io")
|
||||
(synopsis "Qt WebEngine Module")
|
||||
(description "Qt5WebEngine provides support for web
|
||||
applications using the Chromium browser project.")
|
||||
(license
|
||||
(package-license qt))))
|
Loading…
Reference in a new issue