Import editors/featherpad, a lightweight Qt5 plain-text editor.

ok kn@

FeatherPad is a lightweight Qt5 plain-text editor. It is independent of
any desktop environment and has:
  * Drag-and-drop support, including tab detachment and attachment
  * X11 virtual desktop awareness
  * Instant highlighting of found matches when searching
  * A docked window for text replacement
  * Support for showing line numbers and jumping to a specific line
  * Automatic detection of text encoding as far as possible and optional
    saving with encoding
  * Syntax highlighting for common programming languages
  * Ability to open URLs with appropriate applications
  * Session management
  * Side-pane mode
  * Auto-saving
  * Printing
  * Text zooming
This commit is contained in:
bcallah 2018-11-06 23:55:20 +00:00
parent 7fc711d6b5
commit 45d2a91e20
7 changed files with 158 additions and 0 deletions

View File

@ -0,0 +1,32 @@
# $OpenBSD: Makefile,v 1.1.1.1 2018/11/06 23:55:20 bcallah Exp $
COMMENT = lightweight Qt5 plain-text editor
PKGNAME = featherpad-${GH_TAGNAME:S/^V//}
CATEGORIES = editors x11
GH_ACCOUNT = tsujan
GH_PROJECT = FeatherPad
GH_TAGNAME = V0.9.1
MAINTAINER = Brian Callahan <bcallah@openbsd.org>
# GPLv3+
PERMIT_PACKAGE_CDROM = Yes
WANTLIB += ${COMPILER_LIBCXX} GL Qt5Core Qt5Gui Qt5Network Qt5PrintSupport
WANTLIB += Qt5Svg Qt5Widgets Qt5X11Extras X11 c m
MODULES = devel/qmake \
x11/qt5
LIB_DEPENDS = x11/qt5/qtsvg \
x11/qt5/qtx11extras
RUN_DEPENDS = devel/desktop-file-utils \
x11/gtk+3,-guic
NO_TEST = Yes
WRKDIST = ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME:S/^V//}
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (FeatherPad-V0.9.1.tar.gz) = yqcE5FCbzEYLERPqvUK5vn/Pi0lGgfyrp+uH7mIJNQo=
SIZE (FeatherPad-V0.9.1.tar.gz) = 590391

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-featherpad_singleton_cpp,v 1.1.1.1 2018/11/06 23:55:20 bcallah Exp $
Index: featherpad/singleton.cpp
--- featherpad/singleton.cpp.orig
+++ featherpad/singleton.cpp
@@ -24,7 +24,7 @@
#include <QCryptographicHash>
#ifdef HAS_X11
-#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD
+#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD || defined Q_OS_OPENBSD
#include <QX11Info>
#endif
#endif
@@ -41,7 +41,7 @@ FPsingleton::FPsingleton (int &argc, char **argv) : QA
{
#ifdef HAS_X11
// For now, the lack of x11 is seen as wayland.
-#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD
+#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD || defined Q_OS_OPENBSD
#if QT_VERSION < 0x050200
isX11_ = true;
#else

View File

@ -0,0 +1,50 @@
$OpenBSD: patch-featherpad_x11_cpp,v 1.1.1.1 2018/11/06 23:55:20 bcallah Exp $
Index: featherpad/x11.cpp
--- featherpad/x11.cpp.orig
+++ featherpad/x11.cpp
@@ -20,7 +20,7 @@
#include <QString>
#include "x11.h"
-#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD
+#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD || defined Q_OS_OPENBSD
#include <X11/Xatom.h>
#include <QX11Info>
#endif
@@ -37,7 +37,7 @@ long fromDesktop()
{
long res = -1;
-#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD
+#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD || defined Q_OS_OPENBSD
Display *disp = QX11Info::display();
if (!disp) return res;
@@ -72,7 +72,7 @@ long onWhichDesktop (Window window)
{
long res = -1;
-#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD
+#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD || defined Q_OS_OPENBSD
Display *disp = QX11Info::display();
if (!disp) return res;
@@ -107,7 +107,7 @@ long onWhichDesktop (Window window)
bool isWindowShaded (Window window)
{
-#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD
+#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD || defined Q_OS_OPENBSD
Display *disp = QX11Info::display();
if (!disp) return false;
@@ -142,7 +142,7 @@ bool isWindowShaded (Window window)
/*************************/
void unshadeWindow (Window window)
{
-#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD
+#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD || defined Q_OS_OPENBSD
Display *disp = QX11Info::display();
if (!disp) return;

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-featherpad_x11_h,v 1.1.1.1 2018/11/06 23:55:20 bcallah Exp $
Index: featherpad/x11.h
--- featherpad/x11.h.orig
+++ featherpad/x11.h
@@ -20,7 +20,7 @@
#ifndef X11_H
#define X11_H
-#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD
+#if defined Q_WS_X11 || defined Q_OS_LINUX || defined Q_OS_FREEBSD || defined Q_OS_OPENBSD
#include <X11/Xlib.h>
#endif

View File

@ -0,0 +1,16 @@
FeatherPad is a lightweight Qt5 plain-text editor. It is independent of
any desktop environment and has:
* Drag-and-drop support, including tab detachment and attachment
* X11 virtual desktop awareness
* Instant highlighting of found matches when searching
* A docked window for text replacement
* Support for showing line numbers and jumping to a specific line
* Automatic detection of text encoding as far as possible and optional
saving with encoding
* Syntax highlighting for common programming languages
* Ability to open URLs with appropriate applications
* Session management
* Side-pane mode
* Auto-saving
* Printing
* Text zooming

View File

@ -0,0 +1,21 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2018/11/06 23:55:20 bcallah Exp $
@bin bin/featherpad
@bin bin/fpad
share/applications/featherpad.desktop
share/featherpad/
share/featherpad/help
share/featherpad/translations/
share/featherpad/translations/featherpad_cy.qm
share/featherpad/translations/featherpad_da.qm
share/featherpad/translations/featherpad_de.qm
share/featherpad/translations/featherpad_eo.qm
share/featherpad/translations/featherpad_es.qm
share/featherpad/translations/featherpad_fr.qm
share/featherpad/translations/featherpad_lt.qm
share/featherpad/translations/featherpad_pl.qm
share/featherpad/translations/featherpad_ru.qm
share/featherpad/translations/featherpad_tr.qm
share/featherpad/translations/featherpad_zh_CN.qm
share/icons/hicolor/scalable/apps/featherpad.svg
@tag gtk-update-icon-cache %D/share/icons/hicolor
@tag update-desktop-database