diff --git a/editors/focuswriter/Makefile b/editors/focuswriter/Makefile index f8bc11d3bb57..0b7fbf30ebe8 100644 --- a/editors/focuswriter/Makefile +++ b/editors/focuswriter/Makefile @@ -1,29 +1,33 @@ PORTNAME= focuswriter DISTVERSION= 1.8.2 +PORTREVISION= 1 CATEGORIES= editors MASTER_SITES= https://gottcode.org/${PORTNAME}/ MAINTAINER= eduardo@FreeBSD.org COMMENT= Simple, distraction-free writing environment WWW= https://gottcode.org/focuswriter/ LICENSE= GPLv3+ LGPL3+ LICENSE_COMB= multi LICENSE_FILE_GPLv3+ = ${WRKSRC}/COPYING LICENSE_FILE_LGPL3+ = ${WRKSRC}/resources/images/icons/oxygen/COPYING LIB_DEPENDS= libhunspell-1.7.so:textproc/hunspell USES= cmake compiler:c++17-lang desktop-file-utils gl iconv pkgconfig \ qt:6 tar:bz2 USE_GL= gl USE_QT= base multimedia tools:build -PORTDATA= * -PORTDOCS= CREDITS ChangeLog README -OPTIONS_DEFINE= DOCS +PORTDATA= * +PORTDOCS= CREDITS ChangeLog README +OPTIONS_DEFINE= DOCS LTO +OPTIONS_DEFAULT= LTO + +LTO_CMAKE_BOOL= ENABLE_LINK_TIME_OPTIMIZATION post-install-DOCS-on: cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDOCS}" ${STAGEDIR}${DOCSDIR} .include diff --git a/editors/focuswriter/files/patch-cmake_AddVersionCompileDefinition.cmake b/editors/focuswriter/files/patch-cmake_AddVersionCompileDefinition.cmake new file mode 100644 index 000000000000..37016448e711 --- /dev/null +++ b/editors/focuswriter/files/patch-cmake_AddVersionCompileDefinition.cmake @@ -0,0 +1,24 @@ +--- cmake/AddVersionCompileDefinition.cmake.orig 2022-09-01 14:29:17 UTC ++++ cmake/AddVersionCompileDefinition.cmake +@@ -3,9 +3,6 @@ function(add_version_compile_definition versionstr_fil + # SPDX-License-Identifier: GPL-3.0-or-later + + function(add_version_compile_definition versionstr_file versionstr_def) +- # Use project's VERSION by default +- set(versionstr ${PROJECT_VERSION}) +- + find_package(Git QUIET) + if(Git_FOUND) + # Find git repository +@@ -38,6 +35,11 @@ function(add_version_compile_definition versionstr_fil + ) + endif() + endif() ++ endif() ++ ++ # Fall back to project's VERSION ++ if ("${versionstr}" STREQUAL "") ++ set(versionstr ${PROJECT_VERSION}) + endif() + + # Pass version as compile definition to file