summaryrefslogtreecommitdiff
path: root/x11/foot
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2021-08-30 13:43:04 +0000
committerJan Beich <jbeich@FreeBSD.org>2021-08-30 17:31:16 +0000
commit501e1ed88f97d99d1e367812ae99fb4e352eeb3c (patch)
treeb027c976d0c263d4eb3565514bbce4795578800d /x11/foot
parentports-mgmt/poudriere: Bring in fix for distclean make.conf error (diff)
x11/foot: enable LTO by default
7% faster at least with default config under Sway. Inspired by: Arch Linux
Diffstat (limited to 'x11/foot')
-rw-r--r--x11/foot/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/x11/foot/Makefile b/x11/foot/Makefile
index 864946204c51..1dbbd33d5ce4 100644
--- a/x11/foot/Makefile
+++ b/x11/foot/Makefile
@@ -1,5 +1,6 @@
PORTNAME= foot
DISTVERSION= 1.9.0
+PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= https://codeberg.org/dnkl/${PORTNAME}/archive/${DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/
@@ -22,12 +23,20 @@ USES= compiler:c11 meson pkgconfig xorg
USE_XORG= pixman
WRKSRC= ${WRKDIR}/${PORTNAME}
-OPTIONS_DEFINE= DOCS NOTIFY UTF8PROC XDG
-OPTIONS_DEFAULT=NOTIFY UTF8PROC XDG
+OPTIONS_DEFINE= DOCS LTO NOTIFY UTF8PROC XDG
+OPTIONS_DEFAULT=LTO NOTIFY UTF8PROC XDG
+OPTIONS_EXCLUDE+= ${CC:T:Mgcc*:C/.+/LTO/} # undefined reference to `xstrdup'
+OPTIONS_EXCLUDE_powerpc64= ${"${/usr/bin/ld:L:tA}"==/usr/bin/ld.lld:?LTO:} # LLVM bug 47353
DOCS_BUILD_DEPENDS= scdoc:textproc/scdoc
DOCS_MESON_ENABLED= docs
+LTO_MESON_TRUE= b_lto
+.if exists(/usr/bin/ld.lld) && ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld
+# --plugin isn't supported by old GNU ld.bfd in base
+LTO_LDFLAGS= -fuse-ld=lld
+.endif
+
NOTIFY_RUN_DEPENDS= notify-send:devel/libnotify
UTF8PROC_DESC= Grapheme clustering using libutf8proc