Date: Thu, 2 Sep 2021 09:50:34 GMT From: Alexey Dokuchaev <danfe@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: ea698cc7edbb - main - editors/textadept: enable optional terminal ncurses-based version. Message-ID: <202109020950.1829oYTt083279@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=ea698cc7edbbb92e5f02648ccd73a94968cfaf6f commit ea698cc7edbbb92e5f02648ccd73a94968cfaf6f Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2021-09-02 09:49:26 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2021-09-02 09:49:30 +0000 editors/textadept: enable optional terminal ncurses-based version. --- editors/textadept/Makefile | 37 ++++++++++++++++++++++++++++-- editors/textadept/distinfo | 6 +++++ editors/textadept/files/patch-src_Makefile | 25 +++++++++++++++----- editors/textadept/pkg-plist | 2 ++ 4 files changed, 62 insertions(+), 8 deletions(-) diff --git a/editors/textadept/Makefile b/editors/textadept/Makefile index 92da4da66cb4..a036fffcfb90 100644 --- a/editors/textadept/Makefile +++ b/editors/textadept/Makefile @@ -30,23 +30,29 @@ GH_TAGNAME= scintillua_${SCILUA_VER}:scilua v${LFS_VER}:lfs \ SCI_VER= 446 SCILUA_VER= 4.4.5-2 +SCINTERM_HASH= 6a77415 LUA_VER= 5.3.5 LPEG_VER= 1.0.2 LFS_VER= 1_8_0 GTD_HASH= 6458754 +CDK_VER= 5.0-20200923 +TERMKEY_VER= 0.20 BUILD_WRKSRC= ${WRKSRC}/src INSTALL_WRKSRC= ${BUILD_WRKSRC} +MAKE_ARGS= TA_TARGETS="${_TARGETS}" -OPTIONS_DEFINE= DOCS +OPTIONS_DEFINE= DOCS NCURSES OPTIONS_SINGLE= UI OPTIONS_SINGLE_UI= GTK2 GTK3 -OPTIONS_DEFAULT= GTK2 +OPTIONS_DEFAULT= GTK2 NCURSES +OPTIONS_SUB= yes UI_DESC= GTK version GTK2_USE= GNOME=gtk20 GTK3_USE= GNOME=gtk30 GTK3_MAKE_ARGS= GTK3=yes +_TARGETS= gtk # HTML files require patched https://keplerproject.github.io/luadoc/ to # build, which is also seemingly deprecated upstream, so just grab them @@ -54,6 +60,14 @@ GTK3_MAKE_ARGS= GTK3=yes DOCS_MASTER_SITES= https://github.com/orbitalquark/${PORTNAME}/releases/download/${PORTNAME}_${PORTVERSION}/:docs DOCS_DISTFILES= ${PORTNAME}_${PORTVERSION}.linux.tgz:docs +NCURSES_MASTER_SITES= https://invisible-mirror.net/archives/cdk/:cdk \ + http://www.leonerd.org.uk/code/libtermkey/:tk +NCURSES_DISTFILES= cdk-${CDK_VER}.tgz:cdk \ + libtermkey-${TERMKEY_VER}.tar.gz:tk +NCURSES_GH_PROJECT= scinterm:scitrm +NCURSES_GH_TAGNAME= ${SCINTERM_HASH}:scitrm +NCURSES_VARS= _TARGETS+=curses + post-patch: ${LN} -s ${WRKDIR}/scintilla ${BUILD_WRKSRC} ${PATCH} -d ${BUILD_WRKSRC}/scintilla -N -p1 < \ @@ -74,6 +88,25 @@ post-patch: ${REINPLACE_CMD} -e '/static volatile/s|volatile||g' \ ${BUILD_WRKSRC}/scintilla/gtk/ScintillaGTKAccessible.cxx +post-patch-NCURSES-on: + @${MKDIR} ${BUILD_WRKSRC}/scintilla/curses + ${LN} -s ${WRKSRC_scitrm}/*.cxx ${WRKSRC_scitrm}/*.h \ + ${BUILD_WRKSRC}/scintilla/curses + @${MKDIR} ${BUILD_WRKSRC}/cdk + ${LN} -s ${WRKDIR}/cdk-${CDK_VER}/include/*.h \ + ${WRKDIR}/cdk-${CDK_VER}/*.c ${BUILD_WRKSRC}/cdk +.for ext in h c + cd ${BUILD_WRKSRC}/cdk && ${SH} \ + ${WRKDIR}/cdk-${CDK_VER}/gen-scale.sh SLIDER Slider \ + Int int gen-slider.${ext} > slider.${ext} +.endfor + ${PATCH} -d ${BUILD_WRKSRC}/cdk -N -p1 < ${BUILD_WRKSRC}/cdk.patch + @${MKDIR} ${BUILD_WRKSRC}/termkey + ${LN} -s ${WRKDIR}/libtermkey-${TERMKEY_VER}/*.[ch] \ + ${BUILD_WRKSRC}/termkey + ${PATCH} -d ${BUILD_WRKSRC}/termkey -N -p1 < \ + ${BUILD_WRKSRC}/termkey.patch + post-install-DOCS-on: ${INSTALL_DATA} \ ${WRKDIR}/${PORTNAME}_${PORTVERSION}.linux/docs/*.html \ diff --git a/editors/textadept/distinfo b/editors/textadept/distinfo index b18d44d3d72e..dec3ed5a3eed 100644 --- a/editors/textadept/distinfo +++ b/editors/textadept/distinfo @@ -7,6 +7,10 @@ SHA256 (lpeg-1.0.2.tar.gz) = 48d66576051b6c78388faad09b70493093264588fcd0f258dda SIZE (lpeg-1.0.2.tar.gz) = 71840 SHA256 (textadept_11.1.linux.tgz) = 6b7fa0bc8c3490fa3ee28897735b995f0999f1cdeb93033f51d0c27add706fbe SIZE (textadept_11.1.linux.tgz) = 4672969 +SHA256 (cdk-5.0-20200923.tgz) = 007f5de880cb2eebd8556df7e4cd8673d5e64c9970147eee6923a814c29faaed +SIZE (cdk-5.0-20200923.tgz) = 545093 +SHA256 (libtermkey-0.20.tar.gz) = 6c0d87c94ab9915e76ecd313baec08dedf3bd56de83743d9aa923a081935d2f5 +SIZE (libtermkey-0.20.tar.gz) = 45167 SHA256 (orbitalquark-textadept-textadept_11.1_GH0.tar.gz) = 87d67975b22952344e1bdcb330301b88cdfe8242e7710526cd344ab252499c2a SIZE (orbitalquark-textadept-textadept_11.1_GH0.tar.gz) = 2448453 SHA256 (keplerproject-luafilesystem-v1_8_0_GH0.tar.gz) = 16d17c788b8093f2047325343f5e9b74cccb1ea96001e45914a58bbae8932495 @@ -15,3 +19,5 @@ SHA256 (orbitalquark-scintillua-scintillua_4.4.5-2_GH0.tar.gz) = 8d891c982c2cbfc SIZE (orbitalquark-scintillua-scintillua_4.4.5-2_GH0.tar.gz) = 227796 SHA256 (orbitalquark-gtdialog-6458754_GH0.tar.gz) = a43b015281e43a6b9f7c96df009b6df037ab00896348e11a980a557b1d886b17 SIZE (orbitalquark-gtdialog-6458754_GH0.tar.gz) = 331729 +SHA256 (orbitalquark-scinterm-6a77415_GH0.tar.gz) = 5f0e0972068eb52f94fca97a453107ed5d691b31f75e0b2c4437d1443d84a0cb +SIZE (orbitalquark-scinterm-6a77415_GH0.tar.gz) = 89513 diff --git a/editors/textadept/files/patch-src_Makefile b/editors/textadept/files/patch-src_Makefile index 97a8d81a485e..193d435781eb 100644 --- a/editors/textadept/files/patch-src_Makefile +++ b/editors/textadept/files/patch-src_Makefile @@ -1,7 +1,7 @@ ---- src/Makefile.orig 2020-08-01 05:21:40 UTC +--- src/Makefile.orig 2021-01-29 18:38:35 UTC +++ src/Makefile @@ -1,10 +1,9 @@ - # Copyright 2007-2020 Mitchell mitchell.att.foicica.com. See LICENSE. + # Copyright 2007-2021 Mitchell. See LICENSE. -CC = gcc -CFLAGS = -Os @@ -15,7 +15,7 @@ ifeq (win, $(findstring win, $(MAKECMDGOALS))) # Cross-compile for Win32. CROSS = i686-w64-mingw32- -@@ -60,20 +59,21 @@ else ifeq (osx, $(findstring osx, $(MAKECMDGOALS))) +@@ -62,20 +61,21 @@ else ifeq (osx, $(findstring osx, $(MAKECMDGOALS))) else # Build for Linux/BSD. LUA_CFLAGS = -DLUA_USE_LINUX @@ -43,7 +43,7 @@ desktop_files := $(wildcard *.desktop) ifeq (, $(findstring curses, $(MAKECMDGOALS))) plat_flag = -DGTK -@@ -101,7 +101,7 @@ else +@@ -103,7 +103,7 @@ else endif version = $(shell grep -m 1 _RELEASE ../core/init.lua | cut -d ' ' -f4- | \ tr ' ' '_' | tr -d "'") @@ -52,12 +52,25 @@ # Scintilla. -@@ -236,20 +236,21 @@ textadept-curses.exe: $(sci_objs) $(sci_lex_objs) LexL +@@ -164,7 +164,11 @@ endif + + # Build. + +-all: textadept ++all: ++ for tgt in $(TA_TARGETS) ; do $(MAKE) $$tgt ; \ ++ find . -type f -name \*.o -delete ; done ++ ++gtk: textadept + curses: textadept-curses + win32: textadept.exe + win32-curses: textadept-curses.exe +@@ -239,20 +243,21 @@ textadept-curses.exe: $(sci_objs) $(sci_lex_objs) LexL # Install/uninstall. -install: $(install_targets) | ../core ../docs ../init.lua ../lexers ../LICENSE \ -+install: $(install_targets) | ../core ../docs ../init.lua ../lexers \ ++install: $(wildcard ../textadept*) | ../core ../docs ../init.lua ../lexers \ ../modules ../themes install -d $(DESTDIR)$(bin_dir) $(DESTDIR)$(data_dir) install $^ $(DESTDIR)$(data_dir) diff --git a/editors/textadept/pkg-plist b/editors/textadept/pkg-plist index 02a84ebb61b7..6e1bfb5fe33d 100644 --- a/editors/textadept/pkg-plist +++ b/editors/textadept/pkg-plist @@ -1,4 +1,5 @@ bin/textadept +%%NCURSES%%bin/textadept-curses share/applications/textadept-curses.desktop share/applications/textadept.desktop %%PORTDOCS%%%%DOCSDIR%%/_layouts/default.html @@ -267,6 +268,7 @@ share/pixmaps/textadept.svg %%DATADIR%%/modules/textadept/session.lua %%DATADIR%%/modules/textadept/snippets.lua %%DATADIR%%/textadept +%%NCURSES%%%%DATADIR%%/textadept-curses %%DATADIR%%/themes/dark.lua %%DATADIR%%/themes/light.lua %%DATADIR%%/themes/term.lua
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109020950.1829oYTt083279>