From 75041aa1e1651841073473399397bcbfc10b0134 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+orbitalquark@users.noreply.github.com> Date: Sun, 13 Sep 2020 00:11:18 -0400 Subject: Switch back to Scintilla default (4.x), Scinterm, and Scintillua. Scintilla LongTerm3 maintenance is ending with upcoming Scintilla 5. Textadept now requires a C++17 compiler. Also updated Docker image. --- src/Makefile | 79 +++++++++++++++++++++++++++++------------------------ src/scintilla.patch | 21 -------------- src/textadept.c | 3 ++ 3 files changed, 46 insertions(+), 57 deletions(-) (limited to 'src') diff --git a/src/Makefile b/src/Makefile index dacd6d54..1f7ff2ed 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,7 +3,7 @@ CC = gcc CFLAGS = -Os CXX = g++ -CXXFLAGS = -Os -std=c++11 +CXXFLAGS = -Os -std=c++17 MAKE = make ifeq (win, $(findstring win, $(MAKECMDGOALS))) # Cross-compile for Win32. @@ -38,9 +38,9 @@ else ifeq (osx, $(findstring osx, $(MAKECMDGOALS))) # Cross-compile for macOS. CC = cc CXX = c++ - CROSS = x86_64-apple-darwin14- + CROSS = x86_64-apple-darwin17- CFLAGS += -mdynamic-no-pic - CXXFLAGS += -mdynamic-no-pic -stdlib=libc++ + CXXFLAGS += -mdynamic-no-pic -stdlib=libc++ -Wno-register LUA_CFLAGS = -DLUA_USE_MACOSX LDFLAGS = -liconv ifeq (, $(findstring curses, $(MAKECMDGOALS))) @@ -107,7 +107,7 @@ WGET = wget -O $@ # Scintilla. -sci_flags = -pedantic $(plat_flag) -DSCI_LEXER -DLPEG_LEXER -DNDEBUG \ +sci_flags = -pedantic $(plat_flag) -DSCI_LEXER -DSCI_EMPTYCATALOGUE -DNDEBUG \ -Iscintilla/include -Iscintilla/src -Iscintilla/lexlib -Wall sci_objs = AutoComplete.o CallTip.o CaseConvert.o CaseFolder.o Catalogue.o \ @@ -175,8 +175,9 @@ $(sci_objs): %.o: scintilla/src/%.cxx $(CROSS)$(CXX) -c $(CXXFLAGS) $(sci_flags) $< -o $@ $(sci_lex_objs): %.o: scintilla/lexlib/%.cxx $(CROSS)$(CXX) -c $(CXXFLAGS) $(sci_flags) $< -o $@ -$(sci_lexer_objs): scintilla/lexers/LexLPeg.cxx - $(CROSS)$(CXX) -c $(CXXFLAGS) $(LUA_CFLAGS) $(sci_flags) $< -o $@ +$(sci_lexer_objs): LexLPeg.cxx + $(CROSS)$(CXX) -c $(CXXFLAGS) $(LUA_CFLAGS) $(sci_flags) -DNO_SCITE -DNO_DLL \ + $< -o $@ $(sci_gtk_objs): %.o: scintilla/gtk/%.cxx $(CROSS)$(CXX) -c $(CXXFLAGS) $(sci_flags) $(GTK_CFLAGS) $< -o $@ scintilla-marshal.o: scintilla/gtk/scintilla-marshal.c @@ -212,7 +213,7 @@ $(textadept_curses_objs): \ ta_flags += -Iscintilla/curses -Itermkey -Icdk $(CURSES_CFLAGS) loslib.o: LUA_CFLAGS += -DGTK $(GLIB_CFLAGS) gtdialog.o: gtdialog_flags += $(GTK_CFLAGS) -gtdialog-curses.o: gtdialog_flags += -Icdk $(CURSES_CFLAGS) +gtdialog-curses.o: gtdialog_flags += -I. -Icdk $(CURSES_CFLAGS) # Executables. @@ -305,7 +306,7 @@ osxapp_libs = libatk-1.0.0.dylib libcairo.2.dylib libexpat.1.dylib \ libpixman-1.0.dylib libpng16.16.dylib charset.alias \ gdk-pixbuf-2.0 gtk-2.0 -release-all: release win32-release osx-release modules-release +release-all: release win32-release osx-release #modules-release ifneq (, $(shell hg summary 2>/dev/null)) archive = hg archive -X ".hg*" $(1) @@ -316,12 +317,8 @@ endif $(basedir).linux: ; $(call archive,$@) release: $(basedir).linux make deps clean docs sign-deps - PKG_CONFIG_PATH=/opt/gtk64/lib/pkgconfig make -j4 CFLAGS="$(CFLAGS) -m64" \ - CXXFLAGS="$(CXXFLAGS) -m64 -static-libstdc++" - make -j4 CFLAGS="$(CFLAGS) -m64" \ - CXXFLAGS="$(CXXFLAGS) -m64 -static-libstdc++" \ - CURSES_CFLAGS=-I/opt/ncursesw64/include/ncursesw \ - CURSES_LIBS="-L/opt/ncursesw64/lib -lncursesw" curses + make -j4 CXXFLAGS="$(CXXFLAGS) -static-libstdc++" + make -j4 CXXFLAGS="$(CXXFLAGS) -static-libstdc++" curses cp -rL ../docs ../lexers ../textadept* $< && cp *.asc $