Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 915795 | Differences between
and this patch

Collapse All | Expand All

(-)a/gui-wm/wayfire/wayfire-0.8.0.ebuild (-1 / +134 lines)
Line 0 Link Here
0
- 
1
# Copyright 2019-2023 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
3
4
EAPI=8
5
6
inherit meson toolchain-funcs
7
8
DESCRIPTION="compiz like 3D wayland compositor"
9
HOMEPAGE="https://github.com/WayfireWM/wayfire"
10
11
if [[ ${PV} == 9999 ]]; then
12
	inherit git-r3
13
	EGIT_REPO_URI="https://github.com/WayfireWM/${PN}.git"
14
else
15
	SRC_URI="https://github.com/WayfireWM/${PN}/releases/download/v${PV}/${P}.tar.xz"
16
	KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
17
fi
18
19
LICENSE="MIT"
20
SLOT="0"
21
IUSE="debug +gles +system-wfconfig +system-wlroots X"
22
23
DEPEND="
24
	dev-libs/libinput:=
25
	dev-libs/wayland
26
	gui-libs/gtk-layer-shell
27
	media-libs/glm
28
	media-libs/mesa:=[gles2,wayland,X?]
29
	media-libs/libglvnd[X?]
30
	media-libs/libjpeg-turbo:=
31
	media-libs/libpng:=
32
	media-libs/freetype:=[X?]
33
	x11-libs/libdrm
34
	x11-libs/gtk+:3=[wayland,X?]
35
	x11-libs/cairo[X?,svg(+)]
36
	x11-libs/libxkbcommon[X?]
37
	x11-libs/pango
38
	x11-libs/pixman
39
	X? (
40
		x11-base/xwayland
41
		x11-libs/libxcb
42
	)
43
"
44
45
if [[ ${PV} == 9999 ]] ; then
46
	DEPEND+="
47
		system-wfconfig? ( ~gui-libs/wf-config-9999:= )
48
		!system-wfconfig? ( !gui-libs/wf-config )
49
		system-wlroots? ( ~gui-libs/wlroots-9999:=[drm(+),libinput(+),x11-backend,X?] )
50
		!system-wlroots? ( !gui-libs/wlroots )
51
	"
52
else
53
	DEPEND+="
54
		system-wfconfig? (
55
			>=gui-libs/wf-config-0.8.0
56
		)
57
		!system-wfconfig? ( !gui-libs/wf-config )
58
		system-wlroots? (
59
			>=gui-libs/wlroots-0.16.0:0/16[drm(+),libinput(+),x11-backend,X?]
60
		)
61
		!system-wlroots? ( !gui-libs/wlroots )
62
	"
63
fi
64
65
RDEPEND="
66
	${DEPEND}
67
	x11-misc/xkeyboard-config
68
"
69
70
BDEPEND="
71
	dev-libs/wayland-protocols
72
	virtual/pkgconfig
73
"
74
75
if [[ ${PV} == 0.7.5 ]] ; then
76
	PATCHES=(
77
		"${FILESDIR}"/${PN}-0.7.5-gcc13.patch
78
	)
79
fi
80
81
src_configure() {
82
	# https://github.com/WayfireWM/wayfire/pull/1944
83
	sed -ie "s/'--short', 'HEAD'], check: true/'--short', 'HEAD'], check: false/" \
84
		"${WORKDIR}/${P}/meson.build"
85
	sed -ie "s/'--abbrev-ref', 'HEAD'], check: true/'--abbrev-ref', 'HEAD'], check: false/" \
86
		"${WORKDIR}/${P}/meson.build"
87
	#
88
	sed -e "s:@EPREFIX@:${EPREFIX}:" \
89
		"${FILESDIR}"/wayfire-session > "${T}"/wayfire-session || die
90
	sed -e "s:@EPREFIX@:${EPREFIX}:" \
91
		"${FILESDIR}"/wayfire-session.desktop > "${T}"/wayfire-session.desktop || die
92
93
	#
94
	sed -ie "s|install_dir: 'man'|install_dir: 'share/man'|" \
95
		"${WORKDIR}/${P}/man/meson.build"
96
97
	#
98
	local emesonargs=(
99
		$(meson_feature system-wfconfig use_system_wfconfig)
100
		$(meson_feature system-wlroots use_system_wlroots)
101
		$(meson_feature X xwayland)
102
		$(meson_use gles enable_gles32)
103
		$(usex debug --buildtype=debug "")
104
		$(usex debug -Db_sanitize=address,undefined "")
105
	)
106
107
	# Clang will fail to link without this
108
	tc-is-clang && emesonargs+=( $(usex debug -Db_lundef=false "") )
109
110
	meson_src_configure
111
}
112
113
src_install() {
114
	meson_src_install
115
	dobin "${T}"/wayfire-session
116
117
	insinto "/usr/share/wayland-sessions/"
118
	insopts -m644
119
	doins wayfire.desktop
120
	doins "${T}"/wayfire-session.desktop
121
122
	insinto "/usr/share/wayfire/"
123
	doins wayfire.ini
124
}
125
126
pkg_postinst() {
127
	if [ -z "${REPLACING_VERSIONS}" ]; then
128
		elog "Wayfire has been installed but the session cannot be used"
129
		elog "until you install a configuration file. The default config"
130
		elog "file is installed at \"/usr/share/wayfire/wayfire.ini\""
131
		elog "To install the file execute"
132
		elog "\$ cp /usr/share/wayfire/wayfire.ini ~/.config/wayfire.ini"
133
	fi
134
}

Return to bug 915795