new package: scite

This commit is contained in:
Tee KOBAYASHI 2022-04-27 17:01:10 +09:00 committed by xtkoba
parent 3e8a663117
commit 08a741f5e1
4 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1,35 @@
TERMUX_PKG_HOMEPAGE=https://www.scintilla.org/SciTE.html
TERMUX_PKG_DESCRIPTION="A free source code editor"
# License: HPND
TERMUX_PKG_LICENSE="custom"
TERMUX_PKG_LICENSE_FILE="scite/License.txt"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=5.2.2
TERMUX_PKG_SRCURL=https://www.scintilla.org/scite${TERMUX_PKG_VERSION//./}.tgz
TERMUX_PKG_SHA256=ad33019fdcf001ed441e88169593c3efebe77542f10bbc3e5a20a34e196586e0
TERMUX_PKG_DEPENDS="atk, gdk-pixbuf, glib, gtk3, libc++, libcairo, pango"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_MAKE_ARGS="
CLANG=1
GTK3=1
NO_LUA=1
"
termux_extract_src_archive() {
local file="$TERMUX_PKG_CACHEDIR/$(basename "${TERMUX_PKG_SRCURL}")"
mkdir -p "$TERMUX_PKG_SRCDIR"
tar xf "$file" -C "$TERMUX_PKG_SRCDIR" --strip-components=0
}
termux_step_make() {
local d
for d in lexilla/src scintilla/gtk scite/gtk; do
make -j ${TERMUX_MAKE_PROCESSES} -C ${d} \
${TERMUX_PKG_EXTRA_MAKE_ARGS}
done
}
termux_step_make_install() {
make -j ${TERMUX_MAKE_PROCESSES} -C scite/gtk install \
${TERMUX_PKG_EXTRA_MAKE_ARGS}
}

View File

@ -0,0 +1,20 @@
--- a/lexilla/src/makefile
+++ b/lexilla/src/makefile
@@ -43,7 +43,7 @@
BASE_FLAGS += --std=c++17
ifdef CLANG
-CXX = clang++
+CXX ?= clang++
ifdef windir
# Clang on Win32 uses MSVC headers so will complain about strcpy without this
DEFINES += -D_CRT_SECURE_NO_DEPRECATE=1
@@ -78,7 +78,7 @@
vpath %.cxx ../src ../lexlib ../lexers
DEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG)
-BASE_FLAGS += $(if $(DEBUG),-g,-Os)
+BASE_FLAGS += $(if $(DEBUG),-g,)
INCLUDES = -I ../include -I $(SCINTILLA_INCLUDE) -I ../src -I ../lexlib
LDFLAGS += -shared

View File

@ -0,0 +1,30 @@
--- a/scintilla/gtk/makefile
+++ b/scintilla/gtk/makefile
@@ -16,8 +16,8 @@
WARNINGS = -Wpedantic -Wall
ifdef CLANG
-CXX = clang++
-CC = clang
+CXX ?= clang++
+CC ?= clang
WARNINGS += -Wno-deprecated-register
ifdef windir
# Turn off some warnings that occur when Clang is being used on Windows where it
@@ -35,7 +35,6 @@
# thread also need to create Position Independent Executable -> search online documentation
SANITIZE = address
#SANITIZE = undefined
-BASE_FLAGS += -fsanitize=$(SANITIZE)
endif
ARFLAGS = rc
RANLIB ?= ranlib
@@ -82,7 +81,7 @@
endif
DEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG)
-BASE_FLAGS += $(if $(DEBUG),-g,-Os)
+BASE_FLAGS += $(if $(DEBUG),-g,)
CXX_BASE_FLAGS =--std=c++17 $(BASE_FLAGS)
CXX_ALL_FLAGS =$(DEFINES) $(INCLUDES) $(CXX_BASE_FLAGS) $(CONFIG_FLAGS)

View File

@ -0,0 +1,23 @@
--- a/scite/gtk/makefile
+++ b/scite/gtk/makefile
@@ -19,9 +19,8 @@
# thread also need to create Position Independent Executable -> search online documentation
SANITIZE = address
#SANITIZE = undefined
-CXX = clang++
-CC = clang
-BASE_FLAGS += -fsanitize=$(SANITIZE)
+CXX ?= clang++
+CC ?= clang
WARNINGS += -Wno-deprecated-register
WARNINGS += -Wno-empty-body
else
@@ -70,7 +69,7 @@
DEFINES += -DPIXMAP_PATH=\"$(pixmapdir)\" -DSYSCONF_PATH=\"$(SYSCONF_PATH)\"
DEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG)
-BASE_FLAGS += $(if $(DEBUG),-g,-Os)
+BASE_FLAGS += $(if $(DEBUG),-g,)
ifndef NO_LUA
LUA_CORE_OBJS = lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \