summaryrefslogtreecommitdiff
path: root/audio/pwvucontrol/Makefile
blob: 6e22c2395e2995f658a02c62b7b2a042ba8dd764 (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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
PORTNAME=	pwvucontrol
DISTVERSION=	0.5.3
PORTREVISION=	1
CATEGORIES=	audio

MAINTAINER=	cashmere@autistici.org
COMMENT=	GTK4 volume control applet for PipeWire
WWW=		https://github.com/saivert/pwvucontrol

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/COPYING

BUILD_DEPENDS=	blueprint-compiler:devel/blueprint-compiler
LIB_DEPENDS=	libpipewire-0.3.so:multimedia/pipewire \
		libwireplumber-0.5.so:multimedia/wireplumber

USES=		cargo gettext gnome llvm localbase:ldflags meson pkgconfig
USE_GITHUB=	yes
GH_ACCOUNT=	saivert
# wireplumber crate is a git dependency (see post-patch): fetch the pinned
# commit and point Cargo.toml at it as a path dependency
GH_TUPLE=	saivert:wireplumber.rs:04fbbc6ea157cdd7061f6a5f2a6b22e102fccbcc:wireplumber/wireplumber.rs
USE_GNOME=	glib20 gtk40 libadwaita

CARGO_BUILD=	no
CARGO_INSTALL=	no
CARGO_TEST=	no
MAKE_ENV=	${CARGO_ENV}

CARGO_CRATES=	aho-corasick-1.1.4 \
		annotate-snippets-0.11.5 \
		anstyle-1.0.14 \
		anyhow-1.0.103 \
		autocfg-1.5.1 \
		bindgen-0.72.1 \
		bitflags-2.13.0 \
		bitmaps-3.2.1 \
		block-0.1.6 \
		cairo-rs-0.21.5 \
		cairo-sys-rs-0.21.5 \
		cc-1.2.66 \
		cexpr-0.6.0 \
		cfg-expr-0.15.8 \
		cfg-expr-0.20.8 \
		cfg-if-1.0.4 \
		cfg_aliases-0.2.1 \
		clang-sys-1.8.1 \
		convert_case-0.8.0 \
		cookie-factory-0.3.3 \
		either-1.16.0 \
		equivalent-1.0.2 \
		field-offset-0.3.6 \
		find-msvc-tools-0.1.9 \
		formatx-0.2.4 \
		futures-0.3.32 \
		futures-channel-0.3.32 \
		futures-core-0.3.32 \
		futures-executor-0.3.32 \
		futures-io-0.3.32 \
		futures-macro-0.3.32 \
		futures-sink-0.3.32 \
		futures-task-0.3.32 \
		futures-util-0.3.32 \
		gdk-pixbuf-0.21.5 \
		gdk-pixbuf-sys-0.21.5 \
		gdk4-0.10.3 \
		gdk4-sys-0.10.3 \
		gettext-rs-0.7.7 \
		gettext-sys-0.26.0 \
		gio-0.21.5 \
		gio-sys-0.21.5 \
		glib-0.21.5 \
		glib-macros-0.21.5 \
		glib-sys-0.21.5 \
		glob-0.3.3 \
		gobject-sys-0.21.5 \
		graphene-rs-0.21.5 \
		graphene-sys-0.21.5 \
		gsk4-0.10.3 \
		gsk4-sys-0.10.3 \
		gtk4-0.10.3 \
		gtk4-macros-0.10.3 \
		gtk4-sys-0.10.3 \
		hashbrown-0.17.1 \
		heck-0.5.0 \
		imbl-3.0.0 \
		imbl-sized-chunks-0.1.3 \
		indexmap-2.14.0 \
		itertools-0.13.0 \
		lazy_static-1.5.0 \
		libadwaita-0.8.1 \
		libadwaita-sys-0.8.1 \
		libc-0.2.186 \
		libloading-0.8.9 \
		libspa-0.9.2 \
		libspa-sys-0.9.2 \
		locale_config-0.3.0 \
		log-0.4.33 \
		malloc_buf-0.0.6 \
		memchr-2.8.3 \
		memoffset-0.9.1 \
		minimal-lexical-0.2.1 \
		nix-0.30.1 \
		nom-7.1.3 \
		nom-8.0.0 \
		objc-0.2.7 \
		objc-foundation-0.1.1 \
		objc_id-0.1.1 \
		once_cell-1.21.4 \
		pango-0.21.5 \
		pango-sys-0.21.5 \
		pin-project-lite-0.2.17 \
		pipewire-0.9.2 \
		pipewire-sys-0.9.2 \
		pkg-config-0.3.33 \
		proc-macro-crate-3.5.0 \
		proc-macro2-1.0.106 \
		quote-1.0.46 \
		rand_core-0.6.4 \
		rand_xoshiro-0.6.0 \
		regex-1.12.4 \
		regex-automata-0.4.14 \
		regex-syntax-0.8.11 \
		rustc-hash-2.1.3 \
		rustc_version-0.4.1 \
		semver-1.0.28 \
		serde-1.0.228 \
		serde_core-1.0.228 \
		serde_derive-1.0.228 \
		serde_spanned-0.6.9 \
		serde_spanned-1.1.1 \
		shlex-1.3.0 \
		shlex-2.0.1 \
		slab-0.4.12 \
		smallvec-1.15.2 \
		syn-2.0.118 \
		system-deps-6.2.2 \
		system-deps-7.0.8 \
		target-lexicon-0.12.16 \
		target-lexicon-0.13.5 \
		temp-dir-0.1.16 \
		thiserror-2.0.18 \
		thiserror-impl-2.0.18 \
		toml-0.8.23 \
		toml-1.1.2+spec-1.1.0 \
		toml_datetime-0.6.11 \
		toml_datetime-1.1.1+spec-1.1.0 \
		toml_edit-0.22.27 \
		toml_edit-0.25.12+spec-1.1.0 \
		toml_parser-1.1.2+spec-1.1.0 \
		toml_writer-1.1.1+spec-1.1.0 \
		unicode-ident-1.0.24 \
		unicode-segmentation-1.13.3 \
		unicode-width-0.2.2 \
		version-compare-0.2.1 \
		version_check-0.9.5 \
		winapi-0.3.9 \
		winapi-i686-pc-windows-gnu-0.4.0 \
		winapi-x86_64-pc-windows-gnu-0.4.0 \
		windows-link-0.2.1 \
		windows-sys-0.61.2 \
		winnow-0.7.15 \
		winnow-1.0.3

post-patch:
# clang-sys: use the llvm-config from devel/llvm (same fix as multimedia/helvum)
	@${REINPLACE_CMD} -e 's,"llvm-config,"${LLVM_CONFIG},' \
		${WRKSRC_crate_clang-sys}/build/common.rs \
		${WRKSRC_crate_clang-sys}/src/support.rs
# turn the wireplumber git dependency into a path dependency (GH_TUPLE above)
	@${REINPLACE_CMD} -e 's|^git = "https://github.com/saivert/wireplumber.rs.git"|path = "wireplumber.rs"|' \
		-e '/^branch = "wp-0.5-glib-0.21-pipewire-0.9"$$/d' ${WRKSRC}/Cargo.toml
	@${REINPLACE_CMD} -e '/^source = "git+https:\/\/github.com\/saivert\/wireplumber.rs.git/d' \
		${WRKSRC}/Cargo.lock
# do not override CARGO_HOME: the ports framework's vendor config lives there
	@${REINPLACE_CMD} -e "/'CARGO_HOME='/d" ${WRKSRC}/src/meson.build
# caches are rebuilt by pkg triggers on the target system, not staged
	@${REINPLACE_CMD} -e 's/: true,$$/: false,/' ${WRKSRC}/meson.build

.include <bsd.port.mk>