summary refs log tree commit diff
path: root/gnu/packages/qt.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/qt.scm')
-rw-r--r--gnu/packages/qt.scm88
1 files changed, 81 insertions, 7 deletions
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index c9ac750cc5..c312efa1f9 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
+;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
 ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
@@ -15,6 +15,7 @@
 ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
 ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -206,7 +207,7 @@ system, and the core design of Django is reused in Grantlee.")
        ("postgresql" ,postgresql)
        ("pulseaudio" ,pulseaudio)
        ("pcre2" ,pcre2)
-       ("sqlite" ,sqlite-with-column-metadata)
+       ("sqlite" ,sqlite)
        ("udev" ,eudev)
        ("unixodbc" ,unixodbc)
        ("wayland" ,wayland)
@@ -223,7 +224,7 @@ system, and the core design of Django is reused in Grantlee.")
      `(;; XXX: The JavaScriptCore engine does not build with the C++11 standard.
        ;; We could build it with -std=gnu++98, but then we'll get in trouble with
        ;; ICU later.  Just keep using GCC 5 for now.
-       ("gcc" ,gcc-5)
+       ("gcc@5" ,gcc-5)
        ("bison" ,bison)
        ("flex" ,flex)
        ("gperf" ,gperf)
@@ -240,6 +241,17 @@ system, and the core design of Django is reused in Grantlee.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-after 'set-paths 'hide-default-gcc
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gcc (assoc-ref inputs "gcc")))
+               ;; Remove the default GCC from CPLUS_INCLUDE_PATH to prevent
+               ;; conflicts with the GCC 5 input.
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (delete (string-append gcc "/include/c++")
+                                (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
+                        ":"))
+               #t)))
          (replace
           'configure
           (lambda* (#:key outputs #:allow-other-keys)
@@ -352,6 +364,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                "0pb68d30clksdhgy8n6rrs838bb3qcsfq4pv463yy2nr4p5kk2di"))
              ;; Use TZDIR to avoid depending on package "tzdata".
              (patches (search-patches "qtbase-use-TZDIR.patch"
+                                      "qtbase-moc-ignore-gcc-macro.patch"
                                       "qtbase-QTBUG-81715.patch"))
              (modules '((guix build utils)))
              (snippet
@@ -381,7 +394,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
        ("harfbuzz" ,harfbuzz)
        ("icu4c" ,icu4c)
        ("libinput" ,libinput-minimal)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libmng" ,libmng)
        ("libpng" ,libpng)
        ("libx11" ,libx11)
@@ -404,7 +417,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
        ("pcre2" ,pcre2)
        ("postgresql" ,postgresql)
        ("pulseaudio" ,pulseaudio)
-       ("sqlite" ,sqlite-with-column-metadata)
+       ("sqlite" ,sqlite)
        ("unixodbc" ,unixodbc)
        ("xcb-util" ,xcb-util)
        ("xcb-util-image" ,xcb-util-image)
@@ -1798,6 +1811,23 @@ message.")))
      (substitute-keyword-arguments (package-arguments qtsvg)
        ((#:phases phases)
         `(modify-phases ,phases
+           (add-after 'unpack 'fix-build-with-newer-re2
+             (lambda _
+               ;; Adjust for API change in re2, taken from
+               ;; https://chromium-review.googlesource.com/c/chromium/src/+/2145261
+               (substitute* "src/3rdparty/chromium/components/autofill/core\
+/browser/address_rewriter.cc"
+               (("options\\.set_utf8\\(true\\)")
+                "options.set_encoding(RE2::Options::EncodingUTF8)"))
+               #t))
+           (add-after 'unpack 'patch-ninja-version-check
+             (lambda _
+               ;; The build system assumes the system Ninja is too old because
+               ;; it only checks for versions 1.7 through 1.9.  We have 1.10.
+               (substitute* "configure.pri"
+                 (("1\\.\\[7-9\\]\\.\\*")
+                  "1.([7-9]|1[0-9]).*"))
+               #t))
            (add-before 'configure 'substitute-source
              (lambda* (#:key inputs outputs #:allow-other-keys)
                (let ((out (assoc-ref outputs "out"))
@@ -2396,10 +2426,10 @@ different kinds of sliders, and much more.")
      `(("icu" ,icu4c)
        ("glib" ,glib)
        ("gst-plugins-base" ,gst-plugins-base)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libpng" ,libpng)
        ("libwebp" ,libwebp)
-       ("sqlite" ,sqlite-with-column-metadata)
+       ("sqlite" ,sqlite)
        ("fontconfig" ,fontconfig)
        ("libxrender" ,libxrender)
        ("qtbase" ,qtbase)
@@ -2669,3 +2699,47 @@ generate Python bindings for your C or C++ code.")
     (description
      "Contains lupdate, rcc and uic tools for PySide2")
     (license license:gpl2)))
+
+(define-public libqglviewer
+  (package
+    (name "libqglviewer")
+    (version "2.7.2")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "http://libqglviewer.com/src/libQGLViewer-"
+                              version ".tar.gz"))
+              (sha256
+               (base32
+                "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f                      ; no check target
+       #:make-flags
+       (list (string-append "PREFIX="
+                            (assoc-ref %outputs "out")))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key make-flags #:allow-other-keys)
+             (apply invoke (cons "qmake" make-flags)))))))
+    (native-inputs
+     `(("qtbase" ,qtbase)
+       ("qttools" ,qttools)))
+    (inputs
+     `(("glu" ,glu)))
+    (home-page "http://libqglviewer.com")
+    (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
+    (description
+     "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
+of OpenGL 3D viewers.
+
+It provides some of the typical 3D viewer functionalities, such as the
+possibility to move the camera using the mouse, which lacks in most of the
+other APIs.  Other features include mouse manipulated frames, interpolated
+keyFrames, object selection, stereo display, screenshot saving and much more.
+It can be used by OpenGL beginners as well as to create complex applications,
+being fully customizable and easy to extend.")
+    ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
+    ;; be used.
+    (license (list license:gpl2 license:gpl3))))