diff mbox series

[bug#36043] Add Geany

Message ID 87ef3yqw9o.fsf@nicolasgoaziou.fr
State Accepted
Headers show
Series [bug#36043] Add Geany | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Nicolas Goaziou June 12, 2019, 10:22 p.m. UTC
Hello,

Arun Isaac <arunisaac@systemreboot.net> writes:

> Do post your scintilla patch to this bug report and add a link to it in
> the TODO comment. Perhaps it will be useful to someone working on it in
> the future.

I actually packaged scintilla, but I failed unbundling it from Geany.
I attach the three patches I put up so far.

Since there is nothing more left in this bug report, I don't think it is
worthwhile to link to it.

> You are missing an import of (gnu packages python-xyz) for
> python-docutils. Other than that your patch LGTM! :-)

Oh! Fixed. Thank you.

WDYT?
diff mbox series

Patch

From 04d9e080967cab864cd76565e9697bda73eff781 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Thu, 13 Jun 2019 00:13:27 +0200
Subject: [PATCH 3/3] gnu: Add scintilla.

* gnu/packages/text-editors.scm (scintilla): New variable.
---
 gnu/packages/text-editors.scm | 55 +++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 383257f36d..a7efce5830 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -392,6 +392,61 @@  various text editors which allow this file format to be read and used by those
 editors.")
     (license license:bsd-2)))
 
+(define-public scintilla
+  (package
+    (name "scintilla")
+    (version "4.1.5")
+    (source (origin
+              (method url-fetch)
+              (uri (let ((v (apply string-append (string-split version #\.))))
+                     (string-append
+                      "https://www.scintilla.org/scintilla" v ".tgz")))
+              (sha256
+               (base32
+                "1c24hfrl0wzb8674bjjql5105nlp6h31gj7axjaf7akkf8yisyab"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ;require un-packaged Pyside
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ;no configure script
+         (add-before 'build 'expand-C++-include-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Make <gcc>/include/c++/ext/string_conversions.h find
+             ;; <stdlib.h>.
+             (let* ((path "CPLUS_INCLUDE_PATH")
+                    (gcc  (assoc-ref inputs "gcc"))
+                    (c++  (string-append gcc "/include/c++")))
+               (setenv path (string-append c++ ":" (getenv path))))
+             #t))
+         (replace 'build
+           (lambda _ (invoke "make" "GTK3=1" "CC=gcc" "-Cgtk")))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (string-append out "/lib/scintilla"))
+                    (include (string-append out "/include/scintilla")))
+               (install-file "bin/scintilla.a" lib)
+               (for-each (lambda (f) (install-file f include))
+                         (find-files "include/" "."))
+               #t))))))
+    (native-inputs
+     `(("gcc" ,gcc-7)                   ;require GCC 7.1+
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("gtk+" ,gtk+)))
+    (home-page "https://www.scintilla.org/")
+    (synopsis "Code editor for GTK+")
+    (description "Scintilla is a source code editing component for
+GTK+.  It has the usual features found in text editing components, as
+well as some that are especially useful for editing and debugging
+source code; these include support for syntax styling, error
+indicators, code completion and call tips.  Styling choices are more
+open than with many editors: Scintilla lets you use proportional
+fonts, bold and italics, multiple foreground and background colours,
+and multiple fonts.")
+    (license license:scintilla)))
+
 (define-public geany
   (package
     (name "geany")
-- 
2.22.0