Kei Kebreau <k...@openmailbox.org> writes:

> A component necessary for GNU Octave's GUI.
> How does it look?
Not sure how packaging Qt packages goes, but I've discovered that
GNU Octave's GUI only builds with Qt4 support. I've changed the patch to
adjust this. Should I leave the old patch as is and add a qt4 package
that inherits from it?

From 51da032547ed3e1c2b7825b35b1f39a5e922b44b Mon Sep 17 00:00:00 2001
From: Kei Kebreau <k...@openmailbox.org>
Date: Tue, 13 Sep 2016 10:34:59 -0400
Subject: [PATCH] gnu: Add qscintilla.

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

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index a482d75..159832a 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2015 Ludovic Courtès <l...@gnu.org>
 ;;; Copyright © 2015, 2016 Efraim Flashner <efr...@flashner.co.il>
 ;;; Copyright © 2016 ng0 <n...@we.make.ritual.n0.is>
+;;; Copyright © 2016 Kei Kebreau <k...@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1112,3 +1113,44 @@ contain over 620 classes.")
       "QtKeychain is a Qt library to store passwords and other secret data
 securely.  It will not store any data unencrypted unless explicitly 
requested.")
     (license license:bsd-3)))
+
+(define-public qscintilla
+  (package
+    (name "qscintilla")
+    (version "2.9.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append 
"mirror://sourceforge/QScintilla2/QScintilla-"
+                                  version "/QScintilla_gpl-" version 
".tar.gz"))
+              (sha256
+               (base32
+                "0znvdncpj64zcpbkyvj11dm8bdc3nfn5girggj33ammhfcyvkalq"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda _
+             (chdir "Qt4Qt5")
+             (zero? (system* "qmake" "qscintilla.pro"))))
+         (add-before 'install 'fix-Makefiles
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out    (assoc-ref outputs "out"))
+                   (qt (assoc-ref inputs "qt")))
+               (substitute* (find-files "." "Makefile")
+                 (((string-append "INSTALL_ROOT)" qt))
+                  (string-append "INSTALL_ROOT)" out)))))))))
+    (native-inputs
+     `(("python-pyqt" ,python-pyqt)
+       ("qt" ,qt-4))) ; for qmake
+    (home-page "https://www.riverbankcomputing.com/software/qscintilla/intro";)
+    (synopsis "Qt5 port of the Scintilla editing component")
+    (description
+     "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor 
control.
+As well as features found in standard text editing components, QScintilla
+includes features especially useful when editing and debugging source code.
+These include support for syntax styling, error indicators, code completion and
+call tips.")
+    (license (list license:bsd-2 ; Python/configure.py
+                   license:expat ; src/ and include/
+                   license:gpl3))))
-- 
2.10.0

Attachment: signature.asc
Description: PGP signature

Reply via email to