pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Add nedit-ng version 2020.1 to pkgsrc-wip



Module Name:	pkgsrc-wip
Committed By:	Niclas Rosenvik <nros%pkgsrc.org@localhost>
Pushed By:	nros
Date:		Sun Jan 23 23:20:18 2022 +0100
Changeset:	93b60e8003d3b6814b4ad3477cf7978e526ab2e2

Modified Files:
	Makefile
Added Files:
	nedit-ng/DESCR
	nedit-ng/Makefile
	nedit-ng/PLIST
	nedit-ng/TODO
	nedit-ng/distinfo
	nedit-ng/patches/patch-CMakeLists.txt
	nedit-ng/patches/patch-Interpreter_CMakeLists.txt
	nedit-ng/patches/patch-Interpreter_interpret.h
	nedit-ng/patches/patch-Util_CMakeLists.txt
	nedit-ng/patches/patch-cmake_Modules_DetectOS.cmake
	nedit-ng/patches/patch-src_CMakeLists.txt
	nedit-ng/patches/patch-src_TextArea.cpp
	nedit-ng/patches/patch-src_macro.cpp
	nedit-ng/patches/patch-src_userCmds.cpp

Log Message:
Add nedit-ng version 2020.1 to pkgsrc-wip

nedit-ng is a Qt port of the Nirvana Editor (NEdit) version 5.6. It is intended
to be a "drop in replacement" for nedit in every practical way, just as on
many systems `/usr/bin/vi` is now a symlink to `/usr/bin/vim`.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=93b60e8003d3b6814b4ad3477cf7978e526ab2e2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |   1 +
 nedit-ng/DESCR                                     |   3 +
 nedit-ng/Makefile                                  |  26 ++++
 nedit-ng/PLIST                                     |   4 +
 nedit-ng/TODO                                      |   1 +
 nedit-ng/distinfo                                  |  14 ++
 nedit-ng/patches/patch-CMakeLists.txt              |  28 ++++
 nedit-ng/patches/patch-Interpreter_CMakeLists.txt  |  15 +++
 nedit-ng/patches/patch-Interpreter_interpret.h     |  14 ++
 nedit-ng/patches/patch-Util_CMakeLists.txt         |  15 +++
 .../patches/patch-cmake_Modules_DetectOS.cmake     |  13 ++
 nedit-ng/patches/patch-src_CMakeLists.txt          |  15 +++
 nedit-ng/patches/patch-src_TextArea.cpp            |  14 ++
 nedit-ng/patches/patch-src_macro.cpp               | 150 +++++++++++++++++++++
 nedit-ng/patches/patch-src_userCmds.cpp            |  18 +++
 15 files changed, 331 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index c161ef3892..76efe33ce3 100644
--- a/Makefile
+++ b/Makefile
@@ -2563,6 +2563,7 @@ SUBDIR+=	neb-cd512
 SUBDIR+=	neb-hdtoolbox
 SUBDIR+=	necat
 SUBDIR+=	necpp-git
+SUBDIR+=	nedit-ng
 SUBDIR+=	nehe-opengl-tutorials
 SUBDIR+=	nemo
 SUBDIR+=	neomutt-git
diff --git a/nedit-ng/DESCR b/nedit-ng/DESCR
new file mode 100644
index 0000000000..66d821586f
--- /dev/null
+++ b/nedit-ng/DESCR
@@ -0,0 +1,3 @@
+nedit-ng is a Qt port of the Nirvana Editor (NEdit) version 5.6. It is intended
+to be a "drop in replacement" for nedit in every practical way, just as on
+many systems `/usr/bin/vi` is now a symlink to `/usr/bin/vim`.
diff --git a/nedit-ng/Makefile b/nedit-ng/Makefile
new file mode 100644
index 0000000000..14808648b1
--- /dev/null
+++ b/nedit-ng/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD$
+
+GITHUB_PROJECT=	nedit-ng
+GITHUB_TAG=	refs/tags/2020.1
+DISTNAME=	2020.1
+PKGNAME=	${GITHUB_PROJECT}-${DISTNAME}
+CATEGORIES=	editors
+MASTER_SITES=	${MASTER_SITE_GITHUB:=eteran/}
+DIST_SUBDIR=	${GITHUB_PROJECT}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/eteran/nedit-ng/
+COMMENT=	Remake of nedit using Qt
+LICENSE=	gnu-gpl-v2
+
+WRKSRC=		${WRKDIR}/${PKGNAME_NOREV}
+USE_CMAKE=	yes
+USE_LANGUAGES=	c++
+
+.include "../../devel/boost-headers/buildlink3.mk"
+.include "../../devel/c++gsl/buildlink3.mk"
+.include "../../textproc/yaml-cpp/buildlink3.mk"
+.include "../../x11/qt5-qtbase/buildlink3.mk"
+.include "../../x11/qt5-qttools/buildlink3.mk"
+.include "../../x11/qt5-qtx11extras/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/nedit-ng/PLIST b/nedit-ng/PLIST
new file mode 100644
index 0000000000..eeec8ba34d
--- /dev/null
+++ b/nedit-ng/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+bin/nc-ng
+bin/nedit-import
+bin/nedit-ng
diff --git a/nedit-ng/TODO b/nedit-ng/TODO
new file mode 100644
index 0000000000..84182abd5c
--- /dev/null
+++ b/nedit-ng/TODO
@@ -0,0 +1 @@
+Not sure if this is finished, but it runs.
diff --git a/nedit-ng/distinfo b/nedit-ng/distinfo
new file mode 100644
index 0000000000..38496a13f7
--- /dev/null
+++ b/nedit-ng/distinfo
@@ -0,0 +1,14 @@
+$NetBSD$
+
+BLAKE2s (nedit-ng/2020.1.tar.gz) = 51969204fab8aae5cc6ab1dd486d776a3c7e053f566a4e875e0926c64af68d26
+SHA512 (nedit-ng/2020.1.tar.gz) = 8fea2b669e07c92b800aac81de92d8971c60c4c9138c9822bdd5fdb42261bc6ff0dc2a1b3fb9e83243d8762845745dcd7909859a3b53aa469508f0d64aa2b92d
+Size (nedit-ng/2020.1.tar.gz) = 2719729 bytes
+SHA1 (patch-CMakeLists.txt) = 4115b5e2662f68569fa5c4e6cac94db011bb0aac
+SHA1 (patch-Interpreter_CMakeLists.txt) = f250257eab653d9755ef27ac93eb678fab30a402
+SHA1 (patch-Interpreter_interpret.h) = 79ab6d225d1bb377565a985cbd800b8cfa25316e
+SHA1 (patch-Util_CMakeLists.txt) = cb4fb33f70e35d1d9b1c338ce65bf30fc3f88cf4
+SHA1 (patch-cmake_Modules_DetectOS.cmake) = 9d473b80b09b631cc26522e2217dda98763ee8d9
+SHA1 (patch-src_CMakeLists.txt) = f5ad9ad837065583ec66d16d18fb63cb273860e0
+SHA1 (patch-src_TextArea.cpp) = 66b390710a5146df21323c3e6f34ff8b29504ac9
+SHA1 (patch-src_macro.cpp) = 57fde11ed47fc27d934f28ea6248bd577580fa78
+SHA1 (patch-src_userCmds.cpp) = 32441c405cea5ca4dd2da54f250a819c445b365a
diff --git a/nedit-ng/patches/patch-CMakeLists.txt b/nedit-ng/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..82ff4bddd9
--- /dev/null
+++ b/nedit-ng/patches/patch-CMakeLists.txt
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* use pkgsrc c++gsl and yaml-cpp
+
+--- CMakeLists.txt.orig	2020-02-05 05:36:17.000000000 +0000
++++ CMakeLists.txt
+@@ -71,6 +71,8 @@ elseif(TARGET_COMPILER_MSVC)
+ endif()
+ 
+ find_package(Boost 1.35 REQUIRED)
++find_package(yaml-cpp REQUIRED)
++find_package(Microsoft.GSL REQUIRED)
+ 
+ if(NOT CMAKE_BUILD_TYPE)
+     set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build." FORCE)
+@@ -100,12 +102,10 @@ endif()
+ 
+ add_subdirectory(Util)
+ add_subdirectory(src)
+-add_subdirectory(libs)
+ add_subdirectory(client)
+ add_subdirectory(Regex)
+ add_subdirectory(Settings)
+ add_subdirectory(Interpreter)
+-add_subdirectory(GSL EXCLUDE_FROM_ALL)
+ 
+ if(UNIX)
+     find_package(X11)
diff --git a/nedit-ng/patches/patch-Interpreter_CMakeLists.txt b/nedit-ng/patches/patch-Interpreter_CMakeLists.txt
new file mode 100644
index 0000000000..ab7ff0fafb
--- /dev/null
+++ b/nedit-ng/patches/patch-Interpreter_CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* use pkgsrc c++gsl
+
+--- Interpreter/CMakeLists.txt.orig	2020-02-05 05:36:17.000000000 +0000
++++ Interpreter/CMakeLists.txt
+@@ -33,7 +33,7 @@ target_link_libraries(Interpreter
+ PUBLIC
+ 	Qt5::Core
+ 	Util
+-	GSL
++	Microsoft.GSL::GSL
+ PRIVATE
+ 	Boost::boost
+ )
diff --git a/nedit-ng/patches/patch-Interpreter_interpret.h b/nedit-ng/patches/patch-Interpreter_interpret.h
new file mode 100644
index 0000000000..9c62d781ab
--- /dev/null
+++ b/nedit-ng/patches/patch-Interpreter_interpret.h
@@ -0,0 +1,14 @@
+$NetBSD$
+
+* fix compilation with c++gsl 3.1.0
+
+--- Interpreter/interpret.h.orig	2020-02-05 05:36:17.000000000 +0000
++++ Interpreter/interpret.h
+@@ -6,6 +6,7 @@
+ #include "Util/string_view.h"
+ 
+ #include <gsl/span>
++#include <gsl/gsl_util>
+ 
+ #include <deque>
+ #include <memory>
diff --git a/nedit-ng/patches/patch-Util_CMakeLists.txt b/nedit-ng/patches/patch-Util_CMakeLists.txt
new file mode 100644
index 0000000000..49565dfd40
--- /dev/null
+++ b/nedit-ng/patches/patch-Util_CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* use pkgsrc c++gsl
+
+--- Util/CMakeLists.txt.orig	2020-02-05 05:36:17.000000000 +0000
++++ Util/CMakeLists.txt
+@@ -40,7 +40,7 @@ target_include_directories(Util 
+ target_link_libraries(Util
+ PUBLIC
+ 	Regex
+-	GSL
++	Microsoft.GSL::GSL
+ 	Qt5::Core
+ 	Qt5::Network
+ 	Boost::boost
diff --git a/nedit-ng/patches/patch-cmake_Modules_DetectOS.cmake b/nedit-ng/patches/patch-cmake_Modules_DetectOS.cmake
new file mode 100644
index 0000000000..b0e2590d0f
--- /dev/null
+++ b/nedit-ng/patches/patch-cmake_Modules_DetectOS.cmake
@@ -0,0 +1,13 @@
+$NetBSD$
+
+* make compilation run on all pkgsrc platforms
+
+--- cmake/Modules/DetectOS.cmake.orig	2020-02-05 05:36:17.000000000 +0000
++++ cmake/Modules/DetectOS.cmake
+@@ -8,5 +8,5 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "FreeB
+ elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
+ 	set(TARGET_PLATFORM_MACOS 1)
+ else()
+-	message(FATAL_ERROR "Unsupported OS: ${CMAKE_SYSTEM_NAME}")
++	set(TARGET_PLATFORM_PKGSRC 1)
+ endif ()
diff --git a/nedit-ng/patches/patch-src_CMakeLists.txt b/nedit-ng/patches/patch-src_CMakeLists.txt
new file mode 100644
index 0000000000..e5facaa0e2
--- /dev/null
+++ b/nedit-ng/patches/patch-src_CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* use pkgsrc c++gsl
+
+--- src/CMakeLists.txt.orig	2020-02-05 05:36:17.000000000 +0000
++++ src/CMakeLists.txt
+@@ -274,7 +274,7 @@ PUBLIC
+ 	Regex
+ 	Settings
+ 	Interpreter
+-	GSL
++	Microsoft.GSL::GSL
+ 	Qt5::Widgets
+ 	Qt5::Network
+ 	Qt5::Xml
diff --git a/nedit-ng/patches/patch-src_TextArea.cpp b/nedit-ng/patches/patch-src_TextArea.cpp
new file mode 100644
index 0000000000..ccb27da390
--- /dev/null
+++ b/nedit-ng/patches/patch-src_TextArea.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+* Fix build breakage
+
+--- src/TextArea.cpp.orig	2020-02-05 05:36:17.000000000 +0000
++++ src/TextArea.cpp
+@@ -27,6 +27,7 @@
+ #include <QMimeData>
+ #include <QPaintEvent>
+ #include <QPainter>
++#include <QPainterPath>
+ #include <QPoint>
+ #include <QResizeEvent>
+ #include <QScrollBar>
diff --git a/nedit-ng/patches/patch-src_macro.cpp b/nedit-ng/patches/patch-src_macro.cpp
new file mode 100644
index 0000000000..8e8628f307
--- /dev/null
+++ b/nedit-ng/patches/patch-src_macro.cpp
@@ -0,0 +1,150 @@
+$NetBSD$
+
+* fix signedness warnings that are due to changes in latests gsl::span
+
+--- src/macro.cpp.orig	2020-02-05 05:36:17.000000000 +0000
++++ src/macro.cpp
+@@ -181,7 +181,7 @@ std::string MacroErrorCategory::message(
+ boost::optional<TextArea::EventFlags> flagsFromArguments(Arguments arguments, int firstFlag) {
+ 
+ 	TextArea::EventFlags f = TextArea::NoneFlag;
+-	for (int i = firstFlag; i < arguments.size(); ++i) {
++	for (std::size_t i = firstFlag; i < arguments.size(); ++i) {
+ 
+ 		const std::string s = to_string(arguments[i]);
+ 
+@@ -471,7 +471,7 @@ std::error_code readSearchArgs(Arguments
+ ** looking for keywords
+ */
+ Direction searchDirection(Arguments arguments, int index) {
+-	for (int i = index; i < arguments.size(); ++i) {
++	for (std::size_t i = index; i < arguments.size(); ++i) {
+ 		QString arg;
+ 		if (std::error_code ec = readArgument(arguments[i], &arg)) {
+ 			return Direction::Forward;
+@@ -494,7 +494,7 @@ Direction searchDirection(Arguments argu
+ ** looking for keywords
+ */
+ bool searchKeepDialogs(Arguments arguments, int index) {
+-	for (int i = index; i < arguments.size(); ++i) {
++	for (std::size_t i = index; i < arguments.size(); ++i) {
+ 		QString arg;
+ 		if (std::error_code ec = readArgument(arguments[i], &arg)) {
+ 			return Preferences::GetPrefKeepSearchDlogs();
+@@ -517,7 +517,7 @@ bool searchKeepDialogs(Arguments argumen
+ ** looking for keywords
+ */
+ WrapMode searchWrap(Arguments arguments, int index) {
+-	for (int i = index; i < arguments.size(); ++i) {
++	for (std::size_t i = index; i < arguments.size(); ++i) {
+ 		QString arg;
+ 		if (std::error_code ec = readArgument(arguments[i], &arg)) {
+ 			return Preferences::GetPrefSearchWraps();
+@@ -541,7 +541,7 @@ WrapMode searchWrap(Arguments arguments,
+ */
+ SearchType searchType(Arguments arguments, int index) {
+ 
+-	for (int i = index; i < arguments.size(); ++i) {
++	for (std::size_t i = index; i < arguments.size(); ++i) {
+ 		QString arg;
+ 
+ 		if (std::error_code ec = readArgument(arguments[i], &arg)) {
+@@ -1457,7 +1457,7 @@ std::error_code findIncrMS(DocumentWidge
+ 	auto win = MainWindow::fromDocument(document);
+ 	Q_ASSERT(win);
+ 
+-	int i;
++	std::size_t i;
+ 	bool continued = false;
+ 
+ 	QString arg;
+@@ -2247,7 +2247,7 @@ std::error_code replaceInStringMS(Docume
+ 	int64_t copyStart;
+ 	int64_t copyEnd;
+ 	bool force = false;
+-	int i;
++	std::size_t i;
+ 
+ 	// Validate arguments and convert to proper types
+ 	if (arguments.size() < 3 || arguments.size() > 5) {
+@@ -2389,7 +2389,7 @@ std::error_code tPrintMS(DocumentWidget 
+ 		return MacroErrorCode::TooFewArguments;
+ 	}
+ 
+-	for (int i = 0; i < arguments.size(); i++) {
++	for (std::size_t i = 0; i < arguments.size(); i++) {
+ 		if (std::error_code ec = readArgument(arguments[i], &string)) {
+ 			return ec;
+ 		}
+@@ -2470,7 +2470,7 @@ std::error_code dialogMS(DocumentWidget 
+ 	}
+ 
+ 	// check that all button labels can be read
+-	for (int i = 1; i < arguments.size(); i++) {
++	for (std::size_t i = 1; i < arguments.size(); i++) {
+ 		if (std::error_code ec = readArgument(arguments[i], &btnLabel)) {
+ 			return ec;
+ 		}
+@@ -2488,7 +2488,7 @@ std::error_code dialogMS(DocumentWidget 
+ 	if (arguments.size() == 1) {
+ 		prompt->addButton(QDialogButtonBox::Ok);
+ 	} else {
+-		for (int i = 1; i < arguments.size(); ++i) {
++		for (std::size_t i = 1; i < arguments.size(); ++i) {
+ 			if (std::error_code ec = readArgument(arguments[i], &btnLabel)) {
+ 				// NOTE(eteran): does not report
+ 			}
+@@ -2512,7 +2512,7 @@ std::error_code stringDialogMS(DocumentW
+ 
+ 	QString btnLabel;
+ 	QString message;
+-	long i;
++	unsigned long i;
+ 
+ 	/* Ignore the focused window passed as the function argument and put
+ 	   the dialog up over the window which is executing the macro */
+@@ -2554,7 +2554,7 @@ std::error_code stringDialogMS(DocumentW
+ 	if (arguments.size() == 1) {
+ 		prompt->addButton(QDialogButtonBox::Ok);
+ 	} else {
+-		for (int i = 1; i < arguments.size(); ++i) {
++		for (std::size_t i = 1; i < arguments.size(); ++i) {
+ 			if (std::error_code ec = readArgument(arguments[i], &btnLabel)) {
+ 				// NOTE(eteran): does not report
+ 			}
+@@ -2607,7 +2607,7 @@ std::error_code calltipMS(DocumentWidget
+ 	std::string txtArg;
+ 	bool anchored = false;
+ 	bool lookup   = true;
+-	int i;
++	std::size_t i;
+ 	int anchorPos;
+ 	auto mode      = Tags::SearchMode::None;
+ 	auto hAlign    = TipHAlignMode::Left;
+@@ -2894,7 +2894,7 @@ std::error_code listDialogMS(DocumentWid
+ 	QString btnLabel;
+ 	QString message;
+ 	QString text;
+-	long i;
++	unsigned long i;
+ 
+ 	/* Ignore the focused window passed as the function argument and put
+ 	   the dialog up over the window which is executing the macro */
+@@ -2946,7 +2946,7 @@ std::error_code listDialogMS(DocumentWid
+ 	if (arguments.size() == 2) {
+ 		prompt->addButton(QDialogButtonBox::Ok);
+ 	} else {
+-		for (int i = 2; i < arguments.size(); ++i) {
++		for (std::size_t i = 2; i < arguments.size(); ++i) {
+ 			if (std::error_code ec = readArgument(arguments[i], &btnLabel)) {
+ 				// NOTE(eteran): does not report
+ 			}
+@@ -2977,7 +2977,7 @@ std::error_code stringCompareMS(Document
+ 	QString rightStr;
+ 	QString argStr;
+ 	bool considerCase = true;
+-	int i;
++	std::size_t i;
+ 	int compareResult;
+ 
+ 	if (arguments.size() < 2) {
diff --git a/nedit-ng/patches/patch-src_userCmds.cpp b/nedit-ng/patches/patch-src_userCmds.cpp
new file mode 100644
index 0000000000..d039b4a2b2
--- /dev/null
+++ b/nedit-ng/patches/patch-src_userCmds.cpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Fix typo, fixes crash on NetBSD and possibly other platforms
+
+--- src/userCmds.cpp.orig	2022-01-23 20:53:11.898537636 +0000
++++ src/userCmds.cpp
+@@ -462,9 +462,9 @@ void loadShellMenuYaml(std::vector<MenuD
+ #elif defined(Q_OS_FREEBSD)
+ 			static QByteArray defaultMenu = loadResource(QLatin1String("DefaultShellMenuFreeBSD.yaml"));
+ #elif defined(Q_OS_UNIX)
+-			static QByteArray defaultMenu = loadResource(QLatin1String("DefaultShellUnix.yaml"));
++			static QByteArray defaultMenu = loadResource(QLatin1String("DefaultShellMenuUnix.yaml"));
+ #elif defined(Q_OS_WIN)
+-			static QByteArray defaultMenu = loadResource(QLatin1String("DefaultShellWindows.yaml"));
++			static QByteArray defaultMenu = loadResource(QLatin1String("DefaultShellMenuWindows.yaml"));
+ #endif
+ 			menu = YAML::LoadAll(defaultMenu.data());
+ 		}


Home | Main Index | Thread Index | Old Index