summaryrefslogtreecommitdiff
path: root/gui-apps/wscreensaver/wscreensaver-9999.ebuild
blob: d7ea06207cb69428dd87650b997c938b49d02e20 (plain)
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
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit flag-o-matic git-r3 meson

DESCRIPTION="Xscreensaver screensavers ported to wayland"
HOMEPAGE="https://git.sr.ht/~mstoeckl/wscreensaver"

EGIT_REPO_URI="https://git.sr.ht/~mstoeckl/${PN}"

LICENSE="MIT"
SLOT="0"

RDEPEND="
	dev-libs/glib:2
	dev-libs/wayland
	media-libs/glu
	media-libs/libglvnd
	x11-libs/gdk-pixbuf:2
"
DEPEND="
	${RDEPEND}
	media-libs/libpng
"
BDEPEND="
	dev-util/intltool
	sys-devel/bc
	sys-devel/gettext
	virtual/pkgconfig
	x11-base/xorg-proto
"

PATCHES=(
	"${FILESDIR}"/xscreensaver-5.31-pragma.patch
	"${FILESDIR}"/xscreensaver-6.01-gentoo.patch
	"${FILESDIR}"/xscreensaver-5.45-gcc.patch
)

# see https://bugs.gentoo.org/898328
QA_CONFIG_IMPL_DECL_SKIP=( getspnam_shadow )

src_configure() {
	econf
	local S="$S"/wayland
	# Will write a patch later and send it to upstream.
	# For now accept it.
	if [[ $CC == clang* ]]; then
		append-cflags -Wno-error=incompatible-function-pointer-types
	fi
	meson_src_configure
}

src_compile() {
	emake
	local S="$S"/wayland
	meson_src_compile
}

src_install() {
	local filename
	local S="${WORKDIR}/wscreensaver-${PV}-build"
	insinto /usr/lib64/misc/"${PN}"
	for file in  "${S}"/*; do
		# exclude all files that have a contain a . e.g. have a file extension
		# or contain the word meson-
		filename=$(basename "${file}")
		if [[ "${filename}" != *.* && "${filename}" != *meson-*  ]]; then
			doins "${file}"
			fperms +x /usr/$(get_libdir)/misc/"${PN}"/"${filename}"
		fi
	done
}