aboutsummaryrefslogtreecommitdiffhomepage
path: root/contrib
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2021-10-11 08:02:05 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2021-10-11 08:02:05 +0300
commit6e67f5a682ff46d69888fec61b94bf45cec46721 (patch)
tree4d3bdae0e48a3d69e238c369f6b283975560546d /contrib
parent9b273f1664946543a6f3d8de5058450d412249a1 (diff)
downloadsciteco-6e67f5a682ff46d69888fec61b94bf45cec46721.tar.gz
upgraded to Scintilla 5.1.3 and Scinterm 3.1
* Previous Scintilla version was 3.6.4 and Scinterm was 1.7 (with lots of custom patches). All of the patches are now either irrelevant or have been merged upstream. * Since Scintilla 5 requires C++17, this increases the minimum GCC version at least to 5.0. We may actually require even newer versions. * I could not upgrade the scintilla-mirror (which was imported from Mercurial), so the old sciteco-dev branch was renamed to sciteco-dev-pre-v2.0.0, master was deleted and I reimported the entire Scintilla repo using git-remote-hg. This means that scintilla-mirror now contains two entirely separate trees. But it is still possible to clone old SciTECO repos. * The strategy/workflow of maintaining hotfix branches on scintilla-mirror has been changed. Instead of having one sciteco-dev branch that is rebased onto new Scintilla upstream releases and tagging SciTECO releases in scintilla-mirror (to keep the commits referenced), we now create a branch for every Scintilla version we are based on (eg. sciteco-rel-5-1-3). This branch is never rebased or deleted. Therefore, we are guaranteed to be able to clone arbitrary SciTECO repo commits - not only releases. Releases no longer have to be tagged in scintilla-mirror. On the downside, fixup commits may accumulate in these new branches. They can only be squashed once a new branch for a new Scintilla release is created (e.g. by cherry-picking followed by rebase). * Scinterm does no longer have to reside in the Scintilla subdirectory, so we added it as a regular submodule. There are no more recursive submodules. The Scinterm build system has not been improved at all, but we use a trick based on VPATH to build Scinterm in scintilla/bin/. * Scinterm is now in Git and we reference the upstream repo for the time being. We might mirror it and apply the same branching workflow as with Scintilla if necessary. The scinterm-mirror repository still exists but has not been touched. We will also have to rewrite its master branch as it was a non-reproducible Mercurial import. * Scinterm now also comes with patches for Scintilla which we simply applied on our sciteco-rel-5-1-3 branch. * Scintilla 5 outsourced its lexers into the Lexilla project. We added it as yet another submodule. * All submodules have been moved into contrib/. * The Scintilla API for setting lexers has consequently changed. We now have to call SCI_SETILEXER(0, CreateLexer(name)). As I did not want to introduce a separate command for setting lexers, <ES> has been extended to allow setting lexers by name with the SCI_SETILEXER message which effectively replaces SCI_SETLEXERLANGUAGE. * The lexer macros (SCLEX_...) no longer serve any purpose - they weren't used in the SciTECO standard library anyway - and have consequently been removed from symbols-scilexer.c. The style macros from SciLexer.h (SCE_...) are theoretically still useful - even though they are not used by our current color schemes - and have therefore been retained. They can be specified as wParam in <ES>. * <ES> no longer allows symbolic constants for lParam. This never made any sense since all supported symbols were always wParam. * Scinterm supports new native cursor modes. They are not used for the time being and the previous CARETSTYLE_BLOCK_AFTER caret style is configured by default. It makes no sense to enable native cursor modes now since the command line should have a native cursor but is not yet a Scintilla view. * The Scintilla upgrade performed much worse than before, so some optimizations will be necessary.
Diffstat (limited to 'contrib')
m---------contrib/lexilla0
m---------contrib/scinterm0
m---------contrib/scintilla0
-rw-r--r--contrib/scintilla.am73
4 files changed, 73 insertions, 0 deletions
diff --git a/contrib/lexilla b/contrib/lexilla
new file mode 160000
+Subproject 7d7426e4bf4aa9ffea4ecdde34aa9f751c1bdc0
diff --git a/contrib/scinterm b/contrib/scinterm
new file mode 160000
+Subproject c29125950e33f1dd02473888cdf9b6a1959442c
diff --git a/contrib/scintilla b/contrib/scintilla
new file mode 160000
+Subproject fab670c471c7eea28d43ebaeed14b3c886e2c6e
diff --git a/contrib/scintilla.am b/contrib/scintilla.am
new file mode 100644
index 0000000..cd14d4f
--- /dev/null
+++ b/contrib/scintilla.am
@@ -0,0 +1,73 @@
+# We use the existing Scintilla/Lexilla Makefile build system to
+# avoid redundancies and maintainance overhead.
+# These build systems produce static libraries (*.a).
+# This however has two diadvantages:
+# 1.) Out-of-tree builds are not straight forward and require
+# manually cloning the submodules into the build system.
+# `make distcheck` is consequently also broken.
+# 2.) We cannot add plain static libraries to libtool convenience
+# libraries using LIBADD.
+# Therefore, we cannot wrap Scintilla and Lexilla into a convenience
+# library.
+# That's why this file must instead be included everywhere where
+# scintilla.a and liblexilla.a are referenced and they must be added
+# to programs using LDADD.
+
+if INTERFACE_GTK
+MAKE_SCINTILLA = $(MAKE) -C @SCINTILLA_PATH@/gtk \
+ GTK3=yes CONFIGFLAGS='@LIBGTK_CFLAGS@' \
+ CXXFLAGS='@SCINTILLA_CXXFLAGS@'
+else
+# NOTE: The VPATH hack allows us to keep Scinterm separate from
+# the Scintilla repo and avoid using recursive submodules.
+#
+# FIXME: There is currently no way to override the standard optimization
+# flags of Scinterm, so we pass them in CURSES_FLAGS.
+MAKE_SCINTILLA = $(MAKE) -C @SCINTILLA_PATH@/bin -f @SCINTERM_PATH@/Makefile \
+ VPATH=@SCINTERM_PATH@ \
+ CURSES_FLAGS='@PDCURSES_CFLAGS@ @XCURSES_CFLAGS@ @NCURSES_CFLAGS@ @SCINTILLA_CXXFLAGS@'
+endif
+
+# Pass toolchain configuration to Scintilla.
+# This is what allows cross compilation
+MAKE_SCINTILLA += CC='@CC@' CXX='@CXX@' \
+ AR='@AR@' RANLIB='@RANLIB@'
+
+# Build as phony target - we do not know
+# scintilla.a's dependencies.
+# If it's up to date, the additional recursive
+# make call does not hurt.
+.PHONY: make-scintilla
+make-scintilla:
+ $(MAKE_SCINTILLA)
+
+# scintilla.a itself is not phony.
+# This avoids unnecessary relinking if it is
+# up to date.
+# Also note the ; which defines this recipe as
+# empty.
+@SCINTILLA_PATH@/bin/scintilla.a : make-scintilla;
+
+.PHONY: clean-local-scintilla
+clean-local-scintilla:
+ $(MAKE_SCINTILLA) clean
+
+MAKE_LEXILLA = $(MAKE) -C @LEXILLA_PATH@/src \
+ CXXFLAGS='@SCINTILLA_CXXFLAGS@' \
+ CC='@CC@' CXX='@CXX@' \
+ AR='@AR@' RANLIB='@RANLIB@'
+
+.PHONY: make-lexilla
+make-lexilla:
+ $(MAKE_LEXILLA)
+
+@LEXILLA_PATH@/bin/liblexilla.a : make-lexilla;
+
+.PHONY: clean-local-lexilla
+clean-local-lexilla:
+ $(MAKE_LEXILLA) clean
+
+# NOTE: using a separate `clean-local-scintilla`
+# target allows us to add more custom rules to the
+# including Automake file
+clean-local: clean-local-scintilla clean-local-lexilla