aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuno Teixeira <eduardo@FreeBSD.org>2022-09-16 12:03:12 +0000
committerNuno Teixeira <eduardo@FreeBSD.org>2022-09-16 12:37:20 +0000
commitc4f9e628de90729f36ff6f8d7c70da329fed081c (patch)
treefdc95d5ed5969786b4fea9e4d05aa8d65937d391
parente61571fb7d1cbb3076a2ecc65004d31575024ee5 (diff)
downloadports-c4f9e628de90729f36ff6f8d7c70da329fed081c.tar.gz
ports-c4f9e628de90729f36ff6f8d7c70da329fed081c.zip
editors/focuswriter: Port improvements
- Add LTO option - Fix version not showing up in command line and About dialog - Bump PORTREVISION
-rw-r--r--editors/focuswriter/Makefile10
-rw-r--r--editors/focuswriter/files/patch-cmake_AddVersionCompileDefinition.cmake24
2 files changed, 31 insertions, 3 deletions
diff --git a/editors/focuswriter/Makefile b/editors/focuswriter/Makefile
index f8bc11d3bb57..0b7fbf30ebe8 100644
--- a/editors/focuswriter/Makefile
+++ b/editors/focuswriter/Makefile
@@ -1,5 +1,6 @@
PORTNAME= focuswriter
DISTVERSION= 1.8.2
+PORTREVISION= 1
CATEGORIES= editors
MASTER_SITES= https://gottcode.org/${PORTNAME}/
@@ -19,9 +20,12 @@ USES= cmake compiler:c++17-lang desktop-file-utils gl iconv pkgconfig \
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}
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