From 8d324a49e93b51daf2b756c7b749fd9be295824d Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 18 May 2016 15:15:28 +0300 Subject: [PATCH] gnu: Add qtbase. * gnu/packages/qt.scm (qtbase): New variable. --- gnu/packages/qt.scm | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 140 insertions(+), 2 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 097ec06..bdd298f 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013, 2014, 2015 Andreas Enge ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2015 Ludovic Courtès -;;; Copyright © 2015 Efraim Flashner +;;; Copyright © 2015, 2016 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,7 +20,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages qt) - #:use-module ((guix licenses) #:select (bsd-3 gpl2 gpl3 lgpl2.1 lgpl2.1+ x11-style)) + #:use-module ((guix licenses) #:select (bsd-3 gpl2 gpl3 lgpl2.1 lgpl2.1+ lgpl3 x11-style)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build utils) @@ -201,6 +201,144 @@ developers using C++ or QML, a CSS & JavaScript like language.") ;; Qt 5: assembler error; see . (supported-systems (delete "mips64el-linux" %supported-systems)))) +(define-public qtbase + (package + (name "qtbase") + (version "5.6.0") + (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 + "0ynnvcs5idivzldsq5ciqg9myg82b3l3906l4vjv54lyamf8mykf")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove one of the two bundled harfbuzz copies in addition + ;; to passing "-system-harfbuzz". + (delete-file-recursively "src/3rdparty/harfbuzz-ng") + ;; Remove the bundled sqlite copy in addition to + ;; passing "-system-sqlite". + (delete-file-recursively "src/3rdparty/sqlite"))))) + (build-system gnu-build-system) + (propagated-inputs + `(("mesa" ,mesa))) + (inputs + `(("alsa-lib" ,alsa-lib) + ("dbus" ,dbus) + ("cups" ,cups) + ("expat" ,expat) + ("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ("glib" ,glib) + ("harfbuzz" ,harfbuzz) + ("icu4c" ,icu4c) + ("libjpeg" ,libjpeg) + ("libmng" ,libmng) + ("libpci" ,pciutils) + ("libpng" ,libpng) + ("libx11" ,libx11) + ("libxcomposite" ,libxcomposite) + ("libxcursor" ,libxcursor) + ("libxfixes" ,libxfixes) + ("libxi" ,libxi) + ("libxinerama" ,libxinerama) + ("libxkbcommon" ,libxkbcommon) + ("libxml2" ,libxml2) + ("libxrandr" ,libxrandr) + ("libxrender" ,libxrender) + ("libxslt" ,libxslt) + ("libxtst" ,libxtst) + ("mtdev" ,mtdev) + ("mysql" ,mysql) + ("nss" ,nss) + ("openssl" ,openssl) + ("postgresql" ,postgresql) + ("pulseaudio" ,pulseaudio) + ("pcre" ,pcre) + ("sqlite" ,sqlite) + ("udev" ,eudev) + ("unixodbc" ,unixodbc) + ("xcb-util" ,xcb-util) + ("xcb-util-image" ,xcb-util-image) + ("xcb-util-keysyms" ,xcb-util-keysyms) + ("xcb-util-renderutil" ,xcb-util-renderutil) + ("xcb-util-wm" ,xcb-util-wm) + ("zlib" ,zlib))) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex) + ("gperf" ,gperf) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python-2) + ("ruby" ,ruby) + ("which" ,(@ (gnu packages base) which)))) + (arguments + `(;; FIXME: Disabling parallel building is a quick hack to avoid the + ;; failure described in + ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html + ;; A more structural fix is needed. + #:parallel-build? #f + #:phases + (modify-phases %standard-phases + (add-after 'configure 'patch-bin-sh + (lambda _ + (substitute* '("config.status" + "configure" + "mkspecs/features/qt_functions.prf" + "qmake/library/qmakebuiltins.cpp") + (("/bin/sh") (which "sh"))) + #t)) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "configure" + (("/bin/pwd") (which "pwd"))) + (substitute* "src/corelib/global/global.pri" + (("/bin/ls") (which "ls"))) + ;; do not pass "--enable-fast-install", which makes the + ;; configure process fail + (zero? (system* + "./configure" + "-verbose" + "-prefix" out + "-opensource" + "-confirm-license" + ;; Most "-system-..." are automatic, but some use + ;; the bundled copy by default. + "-system-sqlite" + "-system-harfbuzz" + ;; explicitly link with openssl instead of dlopening it + "-openssl-linked" + ;; explicitly link with dbus instead of dlopening it + "-dbus-linked" + ;; drop special machine instructions not supported + ;; on all instances of the target + ,@(if (string-prefix? "x86_64" + (or (%current-target-system) + (%current-system))) + '() + '("-no-sse2")) + "-no-sse3" + "-no-ssse3" + "-no-sse4.1" + "-no-sse4.2" + "-no-avx" + "-no-avx2" + "-no-mips_dsp" + "-no-mips_dspr2")))))))) + (home-page "https://www.qt.io/") + (synopsis "Cross-platform GUI library") + (description "Qt is a cross-platform application and UI framework for +developers using C++ or QML, a CSS & JavaScript like language.") + (license (list lgpl2.1 lgpl3)) + ;; Qt 5: assembler error; see . + (supported-systems (delete "mips64el-linux" %supported-systems)))) + (define-public qt-4 (package (inherit qt) (version "4.8.7") -- 2.7.4