--- focuswriter.orig/Makefile 2016-07-18 19:06:16 UTC +++ focuswriter/Makefile @@ -2,7 +2,7 @@ # $FreeBSD: head/editors/focuswriter/Makefile 418731 2016-07-18 19:06:16Z pawel $ PORTNAME= focuswriter -PORTVERSION= 1.5.7 +PORTVERSION= 1.6.2 DISTVERSIONPREFIX= v CATEGORIES= editors @@ -19,7 +19,10 @@ 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 @@ -27,21 +30,23 @@ 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 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}) @@ -50,4 +55,4 @@ ${INSTALL_MAN} ${WRKSRC}/resources/unix/focuswriter.1 \ ${STAGEDIR}${PREFIX}/man/man1 -.include +.include --- focuswriter.orig/distinfo 2016-07-18 19:06:16 UTC +++ 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 = 1476351479 +SHA256 (gottcode-focuswriter-v1.6.2_GH0.tar.gz) = dcc2c9fe081421c8fad9e7c653134f93659a28b0071e9925f9094c246520de3d +SIZE (gottcode-focuswriter-v1.6.2_GH0.tar.gz) = 10326671 --- focuswriter.orig/files/patch-QPrinter.diff 1970-01-01 00:00:00 UTC +++ focuswriter/files/patch-QPrinter.diff @@ -0,0 +1,92 @@ +# Run QPrinter initialization on first usage. +# This removes possible delay on application start for non-native printer(s). + +--- 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); +@@ -129,7 +119,8 @@ Stack::~Stack() + { + m_theme_renderer->wait(); + +- delete m_printer; ++ if (m_printer) ++ delete m_printer; + } + + //----------------------------------------------------------------------------- +@@ -380,6 +371,24 @@ void Stack::increaseIndent() + + //----------------------------------------------------------------------------- + ++void Stack::initPrinter() ++{ ++ if (!m_printer) { ++ 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 ++ } ++} ++ ++//----------------------------------------------------------------------------- ++ + void Stack::paste() + { + m_current_document->text()->paste(); +@@ -397,6 +406,7 @@ void Stack::pasteUnformatted() + + void Stack::pageSetup() + { ++ initPrinter(); + QPageSetupDialog dialog(m_printer, this); + dialog.exec(); + } +@@ -405,6 +415,7 @@ void Stack::pageSetup() + + void Stack::print() + { ++ initPrinter(); + m_current_document->print(m_printer); + } + +--- src/stack.h.orig 2016-10-13 09:37:59 UTC ++++ src/stack.h +@@ -91,6 +91,7 @@ public slots: + void findNext(); + void findPrevious(); + void increaseIndent(); ++ void initPrinter(); + void paste(); + void pasteUnformatted(); + void pageSetup(); --- focuswriter.orig/pkg-plist 2016-07-14 16:34:41 UTC +++ focuswriter/pkg-plist @@ -2,6 +2,7 @@ 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/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