summaryrefslogtreecommitdiff
path: root/x11-toolkits/como/Makefile
blob: 11d4189074b3b145bbdc306486a78e2004d7c8ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
PORTNAME=	como
DISTVERSIONPREFIX=	v
DISTVERSION=	0.2.0
CATEGORIES=	x11-toolkits

PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES+=	325e41b02b58.patch:-p1 # https://github.com/winft/como/pull/22
PATCHFILES+=	d250e3a81b91.patch:-p1 # https://github.com/winft/como/pull/22

MAINTAINER=	jbeich@FreeBSD.org
COMMENT=	Compositor Modules for Wayland and X11
WWW=		https://github.com/winft/como

LICENSE=	GPLv2+
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	evdev-proto>0:devel/evdev-proto
LIB_DEPENDS=	libepoxy.so:graphics/libepoxy \
		libwayland-server.so:graphics/wayland \
		libWraplandServer.so:graphics/wrapland \
		libwlroots.so:x11-toolkits/wlroots \
		libinput.so:x11/libinput \
		libxkbcommon.so:x11/libxkbcommon \
		libxcb-image.so:x11/xcb-util-image \
		libxcb-keysyms.so:x11/xcb-util-keysyms
RUN_DEPENDS=	evdev-proto>0:devel/evdev-proto
TEST_DEPENDS=	catch2>0:devel/catch2

USES=		cmake:testing gettext-tools kde:6 pkgconfig \
		python:build qt:6 shebangfix xorg
USE_GITHUB=	yes
USE_KDE=	auth colorscheme config configwidgets coreaddons \
		decoration ecm:build globalaccel i18n idletime kcmutils \
		kscreenlocker newstuff:build package service svg \
		widgetsaddons windowsystem
USE_LDCONFIG=	yes
USE_QT=		base declarative tools
USE_XORG=	x11 xcb
GH_ACCOUNT=	winft
SHEBANG_FILES=	plugins/effects/*.py
PLIST_SUB=	VERSION=${PORTVERSION}
LDFLAGS+=	-Wl,--as-needed # fontconfig/freetype, GL, ICE/SM/Xext/Xi, pixman

OPTIONS_DEFINE=	BREEZE DOCS QA11Y
OPTIONS_DEFAULT=BREEZE QA11Y

BREEZE_DESC=		Default window decoration plugin
BREEZE_USE=		KDE=breeze
BREEZE_CMAKE_BOOL_OFF=	CMAKE_DISABLE_FIND_PACKAGE_Breeze

DOCS_USE=		KDE=doctools:build
DOCS_CMAKE_BOOL_OFF=	CMAKE_DISABLE_FIND_PACKAGE_KF6DocTools

QA11Y_DESC=		Accessibility (focus tracking) for Zoom effect
QA11Y_LIB_DEPENDS=	libqaccessibilityclient-qt6.so:accessibility/libqaccessibilityclient@qt6
QA11Y_CMAKE_BOOL_OFF=	CMAKE_DISABLE_FIND_PACKAGE_QAccessibilityClient6

post-patch:
# Convert nodes from linprocfs(5) to procfs(5)
# XXX como lacks https://invent.kde.org/plasma/kwin/-/commit/1bc7afe8aaa9
	@${REINPLACE_CMD} -e '/proc/,+1s,/exe,/file,' \
		${WRKSRC}/${PORTNAME}/base/wayland/filtered_display.cpp \
		${WRKSRC}/${PORTNAME}/desktop/kde/service_utils.h
# Generic nodes are not supported by procfs(5)
	@${REINPLACE_CMD} -e '/mounts/s,/proc,${LINUXBASE}&,' \
		${WRKSRC}/${PORTNAME}/debug/perf/ftrace_impl.cpp

# XXX Drop after FreeBSD 13.2 EOL around 2024-07-01 (don't forget distinfo)
.if ${CXX} == c++ && exists(/usr/lib/libc++.so)
.if !exists(/usr/include/c++/v1/__ranges/as_rvalue_view.h) || make(makesum) || make(fetch)
USES+=		llvm:min=16,build,export
PATH:=		${LLVM_PREFIX}/bin:${PATH} # XXX _CMAKE_TOOLCHAIN_SUFFIX vs. devel/llvm*
CONFIGURE_ENV+=	CC="${CC}" CXX="${CXX}" CPP="${CPP}"

# XXX Move into separate port and standardize via USES
GH_TUPLE+=	llvm:llvm-project:llvmorg-16.0.1:libcxx
CXXFLAGS+=	-nostdinc++ -isystem${WRKDIR}/libcxx_prefix/include/c++/v1
# Don't link against new libc++ as it's not necessary
#LDFLAGS+=	-nostdlib++ -L${WRKDIR}/libcxx_prefix/lib -l:libc++.a -lcxxrt

pre-configure:	bundled-libcxx
bundled-libcxx:
	@${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} \
		-DLIBCXX_INCLUDE_BENCHMARKS:BOOL=OFF \
		-DCMAKE_INSTALL_PREFIX:PATH=${WRKDIR}/libcxx_prefix \
		-B ${WRKDIR}/libcxx_build -S ${WRKSRC_libcxx}/libcxx
	@${DO_MAKE_BUILD:NDESTDIR*} install -C ${WRKDIR}/libcxx_build
.endif
.endif # exists(/usr/lib/libc++.so)

.include <bsd.port.mk>