unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#59238] [PATCH 0/4] Add qt-creator (and supporting packages)
@ 2022-11-13  5:33 Maxim Cournoyer
  2022-11-13  5:37 ` [bug#59238] [PATCH 1/4] gnu: Add qttranslations Maxim Cournoyer
  0 siblings, 1 reply; 6+ messages in thread
From: Maxim Cournoyer @ 2022-11-13  5:33 UTC (permalink / raw)
  To: 59238; +Cc: Maxim Cournoyer

Hi Guix,

This adds qt-creator.  It seems to work, but more feedback would be welcome.
It depends on clang-15, added in #59237.

Thanks!

Maxim Cournoyer (4):
  gnu: Add qttranslations.
  gnu: Add clazy.
  gnu: qttools: Add clang-15 as input.
  gnu: Add qt-creator.

 gnu/packages/qt.scm | 159 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 157 insertions(+), 2 deletions(-)

-- 
2.38.1





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#59238] [PATCH 1/4] gnu: Add qttranslations.
  2022-11-13  5:33 [bug#59238] [PATCH 0/4] Add qt-creator (and supporting packages) Maxim Cournoyer
@ 2022-11-13  5:37 ` Maxim Cournoyer
  2022-11-13  5:37   ` [bug#59238] [PATCH 2/4] gnu: Add clazy Maxim Cournoyer
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Maxim Cournoyer @ 2022-11-13  5:37 UTC (permalink / raw)
  To: 59238; +Cc: Maxim Cournoyer

* gnu/packages/qt.scm (qttranslations): New variable.
---
 gnu/packages/qt.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 8ad9dd4cc0..d126c2b09a 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1814,6 +1814,27 @@ (define-public qttools
     ;; LICENSES/Qt-GPL-exception-1.0.txt).
     (license (list license:gpl3))))
 
+(define-public qttranslations
+  (package
+    (name "qttranslations")
+    (version "6.3.1")
+    (source (origin
+              (method url-fetch)
+              (uri (qt-urls name version))
+              (sha256
+               (base32
+                "15yvvxw1vngnjlly6cady05ljamg01qiaqn2vh0xkph855gdbgfp"))))
+    (build-system cmake-build-system)
+    (arguments (list #:tests? #f))
+    (native-inputs (list qtbase qttools))
+    (home-page (package-home-page qtbase))
+    (synopsis "Qt translation catalogs")
+    (description "This package contains the translations for Qt contributed by
+the Qt community.")
+    ;; GPL 3 only with Qt GPL exception 1.0 (see:
+    ;; LICENSES/Qt-GPL-exception-1.0.txt).
+    (license (list license:gpl3))))
+
 (define-public qtscript
   (package (inherit qtsvg-5)
     (name "qtscript")
-- 
2.38.1





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#59238] [PATCH 2/4] gnu: Add clazy.
  2022-11-13  5:37 ` [bug#59238] [PATCH 1/4] gnu: Add qttranslations Maxim Cournoyer
@ 2022-11-13  5:37   ` Maxim Cournoyer
  2022-11-13  5:37   ` [bug#59238] [PATCH 3/4] gnu: qttools: Add clang-15 as input Maxim Cournoyer
  2022-11-13  5:37   ` [bug#59238] [PATCH 4/4] gnu: Add qt-creator Maxim Cournoyer
  2 siblings, 0 replies; 6+ messages in thread
From: Maxim Cournoyer @ 2022-11-13  5:37 UTC (permalink / raw)
  To: 59238; +Cc: Maxim Cournoyer

* gnu/packages/qt.scm (clazy): New variable.
---
 gnu/packages/qt.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index d126c2b09a..408fe35d0a 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -4324,6 +4324,30 @@ (define-public kdsoap
 web server.")
     (license (list license:gpl2 license:gpl3))))
 
+(define-public clazy
+  (package
+    (name "clazy")
+    (version "1.11")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/KDE/clazy")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1y0n1jknq566z1rifkgdm1yqb0mw564lp51jidfz7q9w91spijci"))))
+    (build-system cmake-build-system)
+    (native-inputs (list python))
+    (inputs (list clang llvm))
+    (home-page "https://github.com/KDE/clazy/")
+    (synopsis "Qt-oriented static code analyzer")
+    (description "clazy is a compiler plugin which allows @command{clang} to
+understand Qt semantics.  It can emit more than 50 Qt related compiler
+warnings, ranging from unneeded memory allocations to misusage of API,
+including @i{fix-its} for automatic refactoring.")
+    (license license:lgpl2.0+)))
+
 ;;;
 ;;; Avoid adding new packages to the end of this file. To reduce the chances
 ;;; of a merge conflict, place them above by existing packages with similar
-- 
2.38.1





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#59238] [PATCH 3/4] gnu: qttools: Add clang-15 as input.
  2022-11-13  5:37 ` [bug#59238] [PATCH 1/4] gnu: Add qttranslations Maxim Cournoyer
  2022-11-13  5:37   ` [bug#59238] [PATCH 2/4] gnu: Add clazy Maxim Cournoyer
@ 2022-11-13  5:37   ` Maxim Cournoyer
  2022-11-13  5:37   ` [bug#59238] [PATCH 4/4] gnu: Add qt-creator Maxim Cournoyer
  2 siblings, 0 replies; 6+ messages in thread
From: Maxim Cournoyer @ 2022-11-13  5:37 UTC (permalink / raw)
  To: 59238; +Cc: Maxim Cournoyer

* gnu/packages/qt.scm (qttools) [inputs]: Add clang-15, so that the qdoc
command can be built.
[phases] {sanity-check}: New phase, to guard against a problem that proved
difficult to isolate.
---
 gnu/packages/qt.scm | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 408fe35d0a..7ae02e2a63 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1802,9 +1802,22 @@ (define-public qttools
      (list
       ;; The build system attempts to fetch online resources and fails when
       ;; building the test suite.
-      #:configure-flags #~(list "-DQT_BUILD_TESTS=OFF")))
+      #:configure-flags #~(list "-DQT_BUILD_TESTS=OFF")
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'install 'sanity-check
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       ;; This validation exists to validate that the dynamic
+                       ;; library for Clang works as intended; there was
+                       ;; originally problems due to left-overs patching the
+                       ;; value of BUILD_SHARED_LIBS in CLANG-FROM-LLVM that
+                       ;; would cause the following error: "CommandLine Error:
+                       ;; Option 'filter' registered more than once!"
+                       (invoke/quiet (search-input-file outputs "bin/qdoc")
+                                     "--help"))))))
     (native-inputs (list perl qtdeclarative vulkan-headers))
-    (inputs (list libxkbcommon mesa qtbase))
+    ;; Use clang-15, which is built using as a single shared library, which is
+    ;; what the build system of qttools expects.
+    (inputs (list clang-15 libxkbcommon mesa qtbase))
     (home-page (package-home-page qtbase))
     (synopsis "Qt Tools and Designer modules")
     (description "The Qt Tools module provides a set of applications to browse
-- 
2.38.1





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#59238] [PATCH 4/4] gnu: Add qt-creator.
  2022-11-13  5:37 ` [bug#59238] [PATCH 1/4] gnu: Add qttranslations Maxim Cournoyer
  2022-11-13  5:37   ` [bug#59238] [PATCH 2/4] gnu: Add clazy Maxim Cournoyer
  2022-11-13  5:37   ` [bug#59238] [PATCH 3/4] gnu: qttools: Add clang-15 as input Maxim Cournoyer
@ 2022-11-13  5:37   ` Maxim Cournoyer
  2022-11-24 20:06     ` bug#59238: [PATCH 0/4] Add qt-creator (and supporting packages) Maxim Cournoyer
  2 siblings, 1 reply; 6+ messages in thread
From: Maxim Cournoyer @ 2022-11-13  5:37 UTC (permalink / raw)
  To: 59238; +Cc: Maxim Cournoyer

* gnu/packages/qt.scm (qt-creator): New variable.
---
 gnu/packages/qt.scm | 97 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 97 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 7ae02e2a63..2adbc12ea7 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -59,17 +59,21 @@ (define-module (gnu packages qt)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages cpp)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages elf)
   #:use-module (gnu packages enchant)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gdb)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
@@ -4361,6 +4365,99 @@ (define-public clazy
 including @i{fix-its} for automatic refactoring.")
     (license license:lgpl2.0+)))
 
+(define-public qt-creator
+  (package
+    (name "qt-creator")
+    (version "8.0.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://download.qt.io/official_releases/qtcreator/"
+                    (version-major+minor version) "/" version
+                    "/qt-creator-opensource-src-" version ".tar.gz"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          (for-each
+                           delete-file-recursively
+                           ;; Remove bundled libraries, where supported.
+                           ;; TODO: package and unbundle litehtml
+                           '("src/libs/3rdparty/yaml-cpp"
+                             "src/shared/qbs/src/shared/qtscript/src/3rdparty"
+                             "tests/unit/unittest/3rdparty"
+                             ;; Marketplace recommends nonfree extensions;
+                             ;; remove it.
+                             "src/plugins/marketplace"))
+                          (substitute* "src/plugins/CMakeLists.txt"
+                            (("add_subdirectory\\(marketplace).*") ""))
+                          (substitute* "src/plugins/plugins.qbs"
+                            ((".*marketplace/marketplace.qbs.*") ""))))
+              (sha256
+               (base32
+                "04q1xbff3k5dfk5bdll4fih0sx7sz0hclpnhwn181r7yysfppbba"))))
+    (build-system qt-build-system)
+    (arguments
+     (list
+      #:qtbase qtbase
+      ;; The test suite fails to build (see:
+      ;; https://bugreports.qt.io/browse/QTCREATORBUG-28434).
+      #:tests? #f
+      #:configure-flags
+      #~(list "-DWITH_DOCS=ON"
+              "-DBUILD_DEVELOPER_DOCS=ON"
+              ;; Extend the RUNPATH with lib/qtcreator, which contains
+              ;; multiple shared objects.
+              (string-append "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath="
+                             #$output "/lib/qtcreator"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'build-doc
+            (lambda _
+              (invoke "cmake" "--build" "." "--target=docs" "-v")))
+          (add-after 'build-doc 'install-doc
+            (lambda _
+              (invoke "cmake" "--install" "." "--prefix" #$output
+                      "--component=qch_docs")
+              (invoke "cmake" "--install" "." "--prefix" #$output
+                      "--component=html_docs")))
+          (add-after 'qt-wrap 'wrap-bin
+            ;; Make a few well-integrated tools readily available.
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (wrap-program (search-input-file outputs "bin/qtcreator")
+                `("PATH" suffix ,(map (lambda (c)
+                                        (dirname (search-input-file inputs c)))
+                                      '("bin/clang-tidy"
+                                        "bin/clazy-standalone"
+                                        "bin/gdb"
+                                        "bin/valgrind")))))))))
+    (native-inputs
+     (list pkg-config
+           python
+           qttools
+           qttranslations
+           vulkan-headers
+           xvfb-run))
+    (inputs
+     (list clang
+           clazy
+           elfutils
+           gdb
+           libxkbcommon
+           llvm
+           qt5compat
+           qtdeclarative
+           qtshadertools
+           qtsvg
+           yaml-cpp
+           valgrind
+           vulkan-loader
+           `(,zstd "lib")))
+    (home-page "https://www.qt.io/")
+    (synopsis "Integrated development environment (IDE) for Qt")
+    (description "Qt Creator is an IDE tailored to the needs of Qt developers.
+It includes features such as an advanced code editor, a visual debugger and a
+@acronym{GUI, Graphical User Interface} designer.")
+    (license license:gpl3+)))           ;with the Qt Company GPL Exception 1.0
+
 ;;;
 ;;; Avoid adding new packages to the end of this file. To reduce the chances
 ;;; of a merge conflict, place them above by existing packages with similar
-- 
2.38.1





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#59238: [PATCH 0/4] Add qt-creator (and supporting packages)
  2022-11-13  5:37   ` [bug#59238] [PATCH 4/4] gnu: Add qt-creator Maxim Cournoyer
@ 2022-11-24 20:06     ` Maxim Cournoyer
  0 siblings, 0 replies; 6+ messages in thread
From: Maxim Cournoyer @ 2022-11-24 20:06 UTC (permalink / raw)
  To: 59238-done

Hello,

I just pushed this series, along changes to qt-creator to update it to
9.0.0 (released today!) and with its test suite enabled.

Enjoy!

Closing.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-24 20:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-13  5:33 [bug#59238] [PATCH 0/4] Add qt-creator (and supporting packages) Maxim Cournoyer
2022-11-13  5:37 ` [bug#59238] [PATCH 1/4] gnu: Add qttranslations Maxim Cournoyer
2022-11-13  5:37   ` [bug#59238] [PATCH 2/4] gnu: Add clazy Maxim Cournoyer
2022-11-13  5:37   ` [bug#59238] [PATCH 3/4] gnu: qttools: Add clang-15 as input Maxim Cournoyer
2022-11-13  5:37   ` [bug#59238] [PATCH 4/4] gnu: Add qt-creator Maxim Cournoyer
2022-11-24 20:06     ` bug#59238: [PATCH 0/4] Add qt-creator (and supporting packages) Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).