mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 22:52:59 -04:00
gui-apps/swaync: Added '+man' USE flag
Closes: https://bugs.gentoo.org/show_bug.cgi?id=836832 Signed-off-by: Jonas Frei <freijon@pm.me>
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
--- swaync/meson.build 2022-04-03 18:03:10.000000000 +0200
|
||||
+++ swaync/meson.build 2022-04-05 21:21:03.543535988 +0200
|
||||
@@ -89,33 +89,34 @@
|
||||
endif
|
||||
|
||||
# Man pages
|
||||
-man_pages = get_option('man-pages')
|
||||
-scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: man_pages)
|
||||
-if scdoc.found()
|
||||
- scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
|
||||
+if get_option('man-pages')
|
||||
+ scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: true)
|
||||
+ if scdoc.found()
|
||||
+ scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
|
||||
|
||||
- mandir = get_option('mandir')
|
||||
- man_files = [
|
||||
- 'swaync.1.scd',
|
||||
- 'swaync.5.scd',
|
||||
- 'swaync-client.1.scd',
|
||||
- ]
|
||||
+ mandir = get_option('mandir')
|
||||
+ man_files = [
|
||||
+ 'swaync.1.scd',
|
||||
+ 'swaync.5.scd',
|
||||
+ 'swaync-client.1.scd',
|
||||
+ ]
|
||||
|
||||
- foreach filename : man_files
|
||||
- topic = filename.split('.')[-3].split('/')[-1]
|
||||
- section = filename.split('.')[-2]
|
||||
- output = '@0@.@1@'.format(topic, section)
|
||||
- message(mandir, section, '@0@/man@1@'.format(mandir, section))
|
||||
+ foreach filename : man_files
|
||||
+ topic = filename.split('.')[-3].split('/')[-1]
|
||||
+ section = filename.split('.')[-2]
|
||||
+ output = '@0@.@1@'.format(topic, section)
|
||||
+ message(mandir, section, '@0@/man@1@'.format(mandir, section))
|
||||
|
||||
- custom_target(
|
||||
- output,
|
||||
- input: join_paths('man', filename),
|
||||
- output: output,
|
||||
- command: scdoc_prog,
|
||||
- install: true,
|
||||
- feed: true,
|
||||
- capture: true,
|
||||
- install_dir: '@0@/man@1@'.format(mandir, section)
|
||||
- )
|
||||
- endforeach
|
||||
+ custom_target(
|
||||
+ output,
|
||||
+ input: join_paths('man', filename),
|
||||
+ output: output,
|
||||
+ command: scdoc_prog,
|
||||
+ install: true,
|
||||
+ feed: true,
|
||||
+ capture: true,
|
||||
+ install_dir: '@0@/man@1@'.format(mandir, section)
|
||||
+ )
|
||||
+ endforeach
|
||||
+ endif
|
||||
endif
|
||||
@@ -10,6 +10,7 @@
|
||||
<bugs-to>https://github.com/ErikReider/SwayNotificationCenter/issues</bugs-to>
|
||||
</upstream>
|
||||
<use>
|
||||
<flag name="man">Build and install man pages</flag>
|
||||
<flag name="scripting">Enable notification scripting</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
||||
@@ -14,7 +14,10 @@ S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="scripting"
|
||||
IUSE="+man scripting"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-dont-force-build-manpages.patch"
|
||||
)
|
||||
|
||||
DEPEND="
|
||||
dev-libs/glib:2
|
||||
@@ -29,7 +32,10 @@ DEPEND="
|
||||
x11-libs/gtk+:3
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="$(vala_depend)"
|
||||
BDEPEND="
|
||||
$(vala_depend)
|
||||
man? ( app-text/scdoc )
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
@@ -38,6 +44,7 @@ src_prepare() {
|
||||
|
||||
src_configure() {
|
||||
local emesonargs=(
|
||||
$(meson_use man man-pages)
|
||||
$(meson_use scripting)
|
||||
)
|
||||
meson_src_configure
|
||||
Reference in New Issue
Block a user