aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorJason E. Hale <jhale@FreeBSD.org>2016-12-04 01:16:10 +0000
committerJason E. Hale <jhale@FreeBSD.org>2016-12-04 01:16:10 +0000
commit5de39ab5deef3a5cc91a6c27df9c9bae0fb5f3d4 (patch)
tree253dcb77796ffff210be23af6d6679a1aae5391b /editors
parent13e2fae3f00432ca6fb37847e19a706b34d0eca0 (diff)
downloadports-5de39ab5deef3a5cc91a6c27df9c9bae0fb5f3d4.tar.gz
ports-5de39ab5deef3a5cc91a6c27df9c9bae0fb5f3d4.zip
Notes
Diffstat (limited to 'editors')
-rw-r--r--editors/Makefile1
-rw-r--r--editors/focuswriter-qt4/Makefile13
-rw-r--r--editors/focuswriter/Makefile30
-rw-r--r--editors/focuswriter/distinfo6
-rw-r--r--editors/focuswriter/files/patch-QPrinter.diff83
-rw-r--r--editors/focuswriter/pkg-plist2
6 files changed, 105 insertions, 30 deletions
diff --git a/editors/Makefile b/editors/Makefile
index abad7c5ed8e8..733ed6fe42a8 100644
--- a/editors/Makefile
+++ b/editors/Makefile
@@ -55,7 +55,6 @@
SUBDIR += fileobj
SUBDIR += flim
SUBDIR += focuswriter
- SUBDIR += focuswriter-qt4
SUBDIR += fpc-ide
SUBDIR += fte
SUBDIR += fxite
diff --git a/editors/focuswriter-qt4/Makefile b/editors/focuswriter-qt4/Makefile
deleted file mode 100644
index 910b48cf83b9..000000000000
--- a/editors/focuswriter-qt4/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-# Created by: lightside <lightside@gmx.com>
-# $FreeBSD$
-
-PKGNAMESUFFIX= -qt4
-
-CONFLICTS_INSTALL= ${PORTNAME}-[0-9]*
-
-OPTIONS_EXCLUDE= QT5
-OPTIONS_SLAVE= QT4
-
-MASTERDIR= ${.CURDIR}/../focuswriter
-
-.include "${MASTERDIR}/Makefile"
diff --git a/editors/focuswriter/Makefile b/editors/focuswriter/Makefile
index 71a9361ff61b..a3f121704ea7 100644
--- a/editors/focuswriter/Makefile
+++ b/editors/focuswriter/Makefile
@@ -2,9 +2,8 @@
# $FreeBSD$
PORTNAME= focuswriter
-PORTVERSION= 1.5.7
+PORTVERSION= 1.6.2
DISTVERSIONPREFIX= v
-PORTREVISION= 1
CATEGORIES= editors
MAINTAINER= lightside@gmx.com
@@ -20,7 +19,10 @@ LIB_DEPENDS= libhunspell-1.5.so:textproc/hunspell
USE_GITHUB= yes
GH_ACCOUNT= gottcode
-USES= desktop-file-utils pkgconfig qmake
+USES= compiler:c++11-lib desktop-file-utils pkgconfig qmake
+USE_GL= gl
+USE_QT5= concurrent core gui multimedia network printsupport widgets \
+ buildtools_build linguisttools_build
INSTALLS_ICONS= yes
LIBS+= -lz
@@ -28,21 +30,23 @@ LIBS+= -lz
PORTDATA= *
PORTDOCS= CREDITS NEWS README
-OPTIONS_DEFINE= DOCS
-OPTIONS_DEFAULT= QT5
-OPTIONS_SINGLE= QT
-OPTIONS_SINGLE_QT= QT4 QT5
-QT_DESC= Qt toolkit
+OPTIONS_DEFINE= DOCS
-QT4_RUN_DEPENDS= ${LOCALBASE}/lib/libSDL2_mixer.so:audio/sdl2_mixer
-QT4_USE= QT4=corelib,gui,network,moc_build,rcc_build
-QT5_USE= QT5=concurrent,core,gui,multimedia,network,printsupport,widgets,buildtools_build
-QT5_USE+= GL=gl
+.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e '/PKGCONFIG/s/ zlib// ; \
/INSTALLS/s/man //' \
${WRKSRC}/focuswriter.pro
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000054
+ @${REINPLACE_CMD} -e 's/std::lround/lround/g' \
+ ${WRKSRC}/src/daily_progress_dialog.cpp \
+ ${WRKSRC}/src/scene_list.cpp \
+ ${WRKSRC}/src/theme_dialog.cpp \
+ ${WRKSRC}/src/fileformats/docx_reader.cpp \
+ ${WRKSRC}/src/fileformats/odt_reader.cpp \
+ ${WRKSRC}/src/fileformats/rtf_reader.cpp
+.endif
do-install-DOCS-on:
(cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDOCS}" ${STAGEDIR}${DOCSDIR})
@@ -51,4 +55,4 @@ post-install:
${INSTALL_MAN} ${WRKSRC}/resources/unix/focuswriter.1 \
${STAGEDIR}${PREFIX}/man/man1
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/editors/focuswriter/distinfo b/editors/focuswriter/distinfo
index 7526c6d8c5b3..15041735ba0e 100644
--- a/editors/focuswriter/distinfo
+++ b/editors/focuswriter/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1468697342
-SHA256 (gottcode-focuswriter-v1.5.7_GH0.tar.gz) = 83d3e093360dfb8855602cb5b65a4c5249ada511031c76bdcee73e3dd0b09250
-SIZE (gottcode-focuswriter-v1.5.7_GH0.tar.gz) = 5621646
+TIMESTAMP = 1480811966
+SHA256 (gottcode-focuswriter-v1.6.2_GH0.tar.gz) = dcc2c9fe081421c8fad9e7c653134f93659a28b0071e9925f9094c246520de3d
+SIZE (gottcode-focuswriter-v1.6.2_GH0.tar.gz) = 10326671
diff --git a/editors/focuswriter/files/patch-QPrinter.diff b/editors/focuswriter/files/patch-QPrinter.diff
new file mode 100644
index 000000000000..b00bbda3e924
--- /dev/null
+++ b/editors/focuswriter/files/patch-QPrinter.diff
@@ -0,0 +1,83 @@
+# Origin: https://github.com/gottcode/focuswriter/commit/e7311fb017782a0bbf017d0055f6f01b36233b89
+# Subject: FIXED: Possible delay on start when creating non-native printer.
+# Origin: https://github.com/gottcode/focuswriter/commit/1423754c4eae874857ce34613bddead8224ee887
+# Subject: FIXED: Memory leak from creating multiple printers.
+
+--- src/stack.cpp.orig 2016-10-13 09:37:59 UTC
++++ src/stack.cpp
+@@ -55,6 +55,7 @@
+ Stack::Stack(QWidget* parent) :
+ QWidget(parent),
+ m_symbols_dialog(0),
++ m_printer(0),
+ m_current_document(0),
+ m_footer_margin(0),
+ m_header_margin(0),
+@@ -78,17 +79,6 @@ Stack::Stack(QWidget* parent) :
+ m_find_dialog = new FindDialog(this);
+ connect(m_find_dialog, SIGNAL(findNextAvailable(bool)), this, SIGNAL(findNextAvailable(bool)));
+
+- m_printer = new QPrinter(QPrinter::HighResolution);
+-#if (QT_VERSION >= QT_VERSION_CHECK(5,3,0))
+- m_printer->setPageSize(QPageSize(QPageSize::Letter));
+- m_printer->setPageOrientation(QPageLayout::Portrait);
+- m_printer->setPageMargins(QMarginsF(1.0, 1.0, 1.0, 1.0), QPageLayout::Inch);
+-#else
+- m_printer->setPageSize(QPrinter::Letter);
+- m_printer->setOrientation(QPrinter::Portrait);
+- m_printer->setPageMargins(1.0, 1.0, 1.0, 1.0, QPrinter::Inch);
+-#endif
+-
+ connect(ActionManager::instance(), SIGNAL(insertText(QString)), this, SLOT(insertSymbol(QString)));
+
+ m_layout = new QGridLayout(this);
+@@ -397,6 +387,7 @@ void Stack::pasteUnformatted()
+
+ void Stack::pageSetup()
+ {
++ initPrinter();
+ QPageSetupDialog dialog(m_printer, this);
+ dialog.exec();
+ }
+@@ -405,6 +396,7 @@ void Stack::pageSetup()
+
+ void Stack::print()
+ {
++ initPrinter();
+ m_current_document->print(m_printer);
+ }
+
+@@ -835,3 +827,23 @@ void Stack::updateMenuIndexes()
+ }
+
+ //-----------------------------------------------------------------------------
++
++void Stack::initPrinter()
++{
++ if (m_printer) {
++ return;
++ }
++
++ m_printer = new QPrinter(QPrinter::HighResolution);
++#if (QT_VERSION >= QT_VERSION_CHECK(5,3,0))
++ m_printer->setPageSize(QPageSize(QPageSize::Letter));
++ m_printer->setPageOrientation(QPageLayout::Portrait);
++ m_printer->setPageMargins(QMarginsF(1.0, 1.0, 1.0, 1.0), QPageLayout::Inch);
++#else
++ m_printer->setPageSize(QPrinter::Letter);
++ m_printer->setOrientation(QPrinter::Portrait);
++ m_printer->setPageMargins(1.0, 1.0, 1.0, 1.0, QPrinter::Inch);
++#endif
++}
++
++//-----------------------------------------------------------------------------
+--- src/stack.h.orig 2016-10-13 09:37:59 UTC
++++ src/stack.h
+@@ -140,6 +140,7 @@ private:
+ #if (QT_VERSION < QT_VERSION_CHECK(5,6,0))
+ qreal devicePixelRatioF() const { return devicePixelRatio(); }
+ #endif
++ void initPrinter();
+
+ private:
+ AlertLayer* m_alerts;
diff --git a/editors/focuswriter/pkg-plist b/editors/focuswriter/pkg-plist
index 30d12c176abf..407dd5aef456 100644
--- a/editors/focuswriter/pkg-plist
+++ b/editors/focuswriter/pkg-plist
@@ -2,6 +2,7 @@ bin/focuswriter
man/man1/focuswriter.1.gz
share/appdata/focuswriter.appdata.xml
share/applications/focuswriter.desktop
+share/icons/hicolor/1024x1024/apps/focuswriter.png
share/icons/hicolor/128x128/apps/focuswriter.png
share/icons/hicolor/16x16/apps/focuswriter.png
share/icons/hicolor/22x22/apps/focuswriter.png
@@ -9,6 +10,7 @@ share/icons/hicolor/24x24/apps/focuswriter.png
share/icons/hicolor/256x256/apps/focuswriter.png
share/icons/hicolor/32x32/apps/focuswriter.png
share/icons/hicolor/48x48/apps/focuswriter.png
+share/icons/hicolor/512x512/apps/focuswriter.png
share/icons/hicolor/64x64/apps/focuswriter.png
share/icons/hicolor/scalable/apps/focuswriter.svg
share/pixmaps/focuswriter.xpm