Message ID | cu7ftobb9fm.fsf@systemreboot.net |
---|---|
State | Accepted |
Headers | show |
Series | [bug#36043] Add Geany | expand |
Context | Check | Description |
---|---|---|
cbaines/applying patch | fail | Apply failed |
Hello, Arun Isaac <arunisaac@systemreboot.net> writes: >> I actually packaged scintilla > The scintilla package is not producing a shared library > (libscintilla.so). That is why you were not able to link it to geany. It > took a bit of substitute* surgery of the makefiles, but I managed to get > this working. Please see my attached patches. Thank you for keeping the ball rolling! > Ideally, we should get scintilla and geany upstreams to support > unbundling. Could you raise these issues upstream? I have bad news: see https://sourceforge.net/p/scintilla/feature-requests/555/ It may not be worth to unbundle Scintilla, then. Guix has no proper way to use inputs' static libraries in a package? > The scintilla license is the ISC license. See > https://directory.fsf.org/wiki/License:ISC This doesn't look right. See https://www.scintilla.org/License.txt This is not ISC. > The headers should be installed in /include, not in > /include/scintilla. The libraries should be installed in /lib, not in > /lib/scintilla. Hmm I think I made the same mistake in nauty… because I saw another packages doing it too. So there are at least 2 other packages in the code base doing the same. > The changes specified in the comments above are also included in the > attached patches. Please feel free to refine my patches as required. Since then, Scintilla team released 4.1.7. WDYT? Regards,
> I have bad news: see > > https://sourceforge.net/p/scintilla/feature-requests/555/ > > It may not be worth to unbundle Scintilla, then. This isn't particularly bad news. In that thread, Scintilla has agreed to allow an optional shared library build for people (like us) who really want it. But, the issue has been closed because it has been many years and no one has volunteered a patch. I think we should go ahead with our unbundled shared library Scintilla package. We could also contribute our work upstream to Scintilla and they seem willing to accept it. > Guix has no proper way to use inputs' static libraries in a package? We could make the static library scintilla package a native-input of geany and add a phase copying the static library to the appropriate path before building. Normally, static libraries embedded by upstream in the source make it harder to update. If Guix controls the embedding, this problem would admittedly cease to exist. But, I think we should still prefer the shared library approach because shared libraries are more efficient on disk and memory usage. >> The scintilla license is the ISC license. See >> https://directory.fsf.org/wiki/License:ISC > > This doesn't look right. See https://www.scintilla.org/License.txt > This is not ISC. The wording of both these licenses are so similar that I would consider them to be effectively the same. But, I am not a lawyer, and I can't claim to know too much about copyright. Should we raise this question with guix-devel? >> The headers should be installed in /include, not in >> /include/scintilla. The libraries should be installed in /lib, not in >> /lib/scintilla. > > Hmm I think I made the same mistake in nauty… because I saw another > packages doing it too. So there are at least 2 other packages in the > code base doing the same. Note that some packages like gsl put the headers in /include/gsl because they are meant to be included, say as #include <gsl/gsl_vector.h> and not as #include <gsl_vector.h> So, the include headers install location is dependent on the package's conventions. As for nauty, their documentation specifies including as #include <nauty.h> So, the headers should be installed to /include. > Since then, Scintilla team released 4.1.7. Ok. Let's update our Scintilla package to 4.1.7. Shouldn't be a problem.
Hello, Arun Isaac <arunisaac@systemreboot.net> writes: > This isn't particularly bad news. In that thread, Scintilla has agreed > to allow an optional shared library build for people (like us) who > really want it. But, the issue has been closed because it has been many > years and no one has volunteered a patch. Scintilla has agreed to allow an optional shared library if there is also zero maintenance on their side (even when their ABI breaks). Since this would eventually require maintenance, the submitter dropped their request. > I think we should go ahead with our unbundled shared library Scintilla > package. We could also contribute our work upstream to Scintilla and > they seem willing to accept it. OTOH, using the static library is possibly (I failed at that, too) straightforward, in the sense that we would not patch Scintilla. It is worth considering this, too. In any case, I do not volunteer to contribute our work upstream as it is still above my pay grade. > The wording of both these licenses are so similar that I would consider > them to be effectively the same. But, I am not a lawyer, and I can't > claim to know too much about copyright. Should we raise this question > with guix-devel? Scintilla's license has one more clause, but we can ask Guix devel. > Note that some packages like gsl put the headers in /include/gsl because > they are meant to be included, say as > > #include <gsl/gsl_vector.h> > > and not as > > #include <gsl_vector.h> > > So, the include headers install location is dependent on the package's > conventions. > > As for nauty, their documentation specifies including as > > #include <nauty.h> > > So, the headers should be installed to /include. OK. And what about the lib/, i.e., when should it be "/lib/name" instead of "/lib/" > Ok. Let's update our Scintilla package to 4.1.7. Shouldn't be a problem. Indeed. Let's first sort out the issues around license (I'm going to ask Guix devel about it) and bundling first. Regards,
>> I think we should go ahead with our unbundled shared library Scintilla >> package. We could also contribute our work upstream to Scintilla and >> they seem willing to accept it. > > OTOH, using the static library is possibly (I failed at that, too) > straightforward, in the sense that we would not patch Scintilla. It is > worth considering this, too. I would prefer the shared library because it is more efficient on memory/disk usage and it seems cleaner and more modular. However, scintilla is a small library and is not used by too many packages, therefore the advantages are small. Meanwhile, patching scintilla to build a shared library is messy and using the static library would indeed be easier. But, if we are using the static library, why should we unbundle at all? I don't know if Guix has a clear policy on these matters. I think we should consult guix-devel and ask for others' opinions. > In any case, I do not volunteer to contribute our work upstream as it is > still above my pay grade. No problem, I understand. > Scintilla's license has one more clause, but we can ask Guix devel. I guess we should use the hpnd license now, as discussed in guix-devel. > And what about the lib/, i.e., when should it be "/lib/name" instead > of "/lib/" I don't have as good an answer for this. A quick look at my ~/.guix-profile/lib shows almost all packages having their shared libraries in /lib, not in /lib/name. And, just including scintilla in geany's inputs and passing '-lscintilla' in geany_LDFLAGS was enough for the linker to find libscintilla.so correctly. So, I assumed I had done it right. :-P
Hi, Just a friendly ping. Can we finish this package one way or the other -- with or without a bundled scintilla? Perhaps you can just leave a TODO comment for someone to pick up on later. I'm just worried it's taking too long for this relatively simple package. Thanks, Arun.
From 738e1b31ad695e54e1ab5fca199679003c2a9129 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou <mail@nicolasgoaziou.fr> Date: Sat, 1 Jun 2019 23:37:24 +0200 Subject: [PATCH 2/2] gnu: Add geany. * gnu/packages/text-editors.scm (geany): New variable. --- gnu/packages/text-editors.scm | 68 +++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm index 16f867184d..c143c06e3b 100644 --- a/gnu/packages/text-editors.scm +++ b/gnu/packages/text-editors.scm @@ -35,6 +35,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages assembly) + #:use-module (gnu packages autotools) #:use-module (gnu packages boost) #:use-module (gnu packages documentation) #:use-module (gnu packages gcc) @@ -46,6 +47,7 @@ #:use-module (gnu packages ncurses) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages regex) #:use-module (gnu packages ruby) @@ -452,3 +454,69 @@ open than with many editors: Scintilla lets you use proportional fonts, bold and italics, multiple foreground and background colours, and multiple fonts.") (license license:isc))) + +(define-public geany + (package + (name "geany") + (version "1.35") + (source (origin + (method url-fetch) + (uri (string-append "https://download.geany.org/" + "geany-" version ".tar.bz2")) + (sha256 + (base32 + "179xfnvhcxsv54v2mlrhykqv2j7klniln5sffvqqpjmdvwyivvim")) + (modules '((guix build utils))) + (snippet '(begin + (delete-file-recursively "scintilla") + #t)))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("doxygen" ,doxygen) + ("glib" ,glib "bin") + ("intltool" ,intltool) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config) + ("python-docutils" ,python-docutils))) ;for rst2html + (inputs + `(("gtk+" ,gtk+) + ("scintilla" ,scintilla))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'use-scintilla-shared-library + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "configure.ac" + (("scintilla/Makefile") "") + (("scintilla/include/Makefile") "")) + (substitute* "Makefile.am" + (("scintilla ") "")) + (substitute* "src/Makefile.am" + (("\\$\\(top_builddir\\)/scintilla/libscintilla.la") "") + (("geany_LDFLAGS =" all) (string-append all " -lscintilla"))) + (substitute* "doc/Makefile.am" + (("\\$\\(INSTALL_DATA\\) \\$\\(top_srcdir\\)/scintilla/License.txt \\$\\(DOCDIR\\)/ScintillaLicense.txt") "")) + (for-each delete-file (list "autogen.sh" "configure" "Makefile.in")) + #t))))) + (home-page "https://www.geany.org") + (synopsis "Fast and lightweight IDE") + (description "Geany is a small and fast Integrated Development +Environment (IDE) that only has a few dependencies on other packages and is as +independent as possible from special desktop environments like KDE or GNOME. + +The basic features of Geany are: +@itemize +@item syntax highlighting +@item code completion +@item auto completion of often constructed constructs like if, for and while +@item auto completion of XML and HTML tags +@item call tips +@item folding +@item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal +@item symbol lists +@item embedded terminal emulation +@item extensibility through plugins +@end itemize") + (license (list license:gpl2+)))) -- 2.22.0