i3status: update to 2.13.
* i3status switched to autoconf * pulseaudio is now optional Closes 13931
This commit is contained in:
parent
71314b8303
commit
beb8600e75
2 changed files with 119 additions and 15 deletions
95
srcpkgs/i3status/patches/pulseaudio-optional.patch
Normal file
95
srcpkgs/i3status/patches/pulseaudio-optional.patch
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
# reason: make pulseaudio optional
|
||||||
|
# upstream: yes (>2.13)
|
||||||
|
# ```
|
||||||
|
# cd i3status
|
||||||
|
# git diff --no-prefix 2.13..23da59920c -- configure.ac Makefile.am i3status.c src/print_volume.c
|
||||||
|
# ```
|
||||||
|
|
||||||
|
diff --git Makefile.am Makefile.am
|
||||||
|
index bb251f0..c2c1c0a 100644
|
||||||
|
--- Makefile.am
|
||||||
|
+++ Makefile.am
|
||||||
|
@@ -68,8 +68,11 @@ i3status_SOURCES = \
|
||||||
|
src/print_volume.c \
|
||||||
|
src/print_wireless_info.c \
|
||||||
|
src/print_file_contents.c \
|
||||||
|
- src/process_runs.c \
|
||||||
|
- src/pulse.c
|
||||||
|
+ src/process_runs.c
|
||||||
|
+
|
||||||
|
+if PULSE
|
||||||
|
+i3status_SOURCES += src/pulse.c
|
||||||
|
+endif
|
||||||
|
|
||||||
|
dist_sysconf_DATA = \
|
||||||
|
i3status.conf
|
||||||
|
diff --git configure.ac configure.ac
|
||||||
|
index cf9e430..11caa33 100644
|
||||||
|
--- configure.ac
|
||||||
|
+++ configure.ac
|
||||||
|
@@ -80,11 +80,24 @@ AC_CANONICAL_HOST
|
||||||
|
PKG_CHECK_MODULES([CONFUSE], [libconfuse])
|
||||||
|
PKG_CHECK_MODULES([YAJL], [yajl])
|
||||||
|
|
||||||
|
+AC_ARG_ENABLE(pulseaudio,
|
||||||
|
+ AS_HELP_STRING(
|
||||||
|
+ [--disable-pulseaudio],
|
||||||
|
+ [build without pulseaudio support]),
|
||||||
|
+ [ax_pulse=$enableval],
|
||||||
|
+ [ax_pulse=yes])
|
||||||
|
+AM_CONDITIONAL([PULSE], [test x$ax_pulse = xyes])
|
||||||
|
+AS_IF([test x"$ax_pulse" = x"yes"],
|
||||||
|
+ [PKG_CHECK_MODULES([PULSE], [libpulse])])
|
||||||
|
+pulse_def=0
|
||||||
|
+AS_IF([test x"$ax_pulse" = x"yes"],
|
||||||
|
+ [pulse_def=1])
|
||||||
|
+AC_DEFINE_UNQUOTED([HAS_PULSEAUDIO], [$pulse_def], [Build with pulseaudio])
|
||||||
|
+
|
||||||
|
case $host_os in
|
||||||
|
linux*)
|
||||||
|
PKG_CHECK_MODULES([NLGENL], [libnl-genl-3.0])
|
||||||
|
PKG_CHECK_MODULES([ALSA], [alsa])
|
||||||
|
- PKG_CHECK_MODULES([PULSE], [libpulse])
|
||||||
|
;;
|
||||||
|
netbsd*)
|
||||||
|
AC_SEARCH_LIBS([prop_string_create], [prop])
|
||||||
|
@@ -151,6 +164,7 @@ AS_HELP_STRING([is release version:], [${is_release}])
|
||||||
|
AS_HELP_STRING([enable debug flags:], [${ax_enable_debug}])
|
||||||
|
AS_HELP_STRING([code coverage:], [${CODE_COVERAGE_ENABLED}])
|
||||||
|
AS_HELP_STRING([enabled sanitizers:], [${ax_enabled_sanitizers}])
|
||||||
|
+AS_HELP_STRING([pulseaudio support:], [${ax_pulse}])
|
||||||
|
|
||||||
|
To compile, run:
|
||||||
|
|
||||||
|
diff --git i3status.c i3status.c
|
||||||
|
index 0898da3..1ab8400 100644
|
||||||
|
--- i3status.c
|
||||||
|
+++ i3status.c
|
||||||
|
@@ -565,7 +565,13 @@ int main(int argc, char *argv[]) {
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
case 'v':
|
||||||
|
- printf("i3status " VERSION " © 2008 Michael Stapelberg and contributors\n");
|
||||||
|
+ printf("i3status " VERSION " © 2008 Michael Stapelberg and contributors\n"
|
||||||
|
+#if HAS_PULSEAUDIO
|
||||||
|
+ "Built with pulseaudio support\n"
|
||||||
|
+#else
|
||||||
|
+ "Built without pulseaudio support\n"
|
||||||
|
+#endif
|
||||||
|
+ );
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
diff --git src/print_volume.c src/print_volume.c
|
||||||
|
index 91e8ce2..7364d47 100644
|
||||||
|
--- src/print_volume.c
|
||||||
|
+++ src/print_volume.c
|
||||||
|
@@ -86,7 +86,7 @@ void print_volume(yajl_gen json_gen, char *buffer, const char *fmt, const char *
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if !defined(__DragonFly__) && !defined(__OpenBSD__)
|
||||||
|
+#if HAS_PULSEAUDIO
|
||||||
|
/* Try PulseAudio first */
|
||||||
|
|
||||||
|
/* If the device name has the format "pulse[:N]" where N is the
|
|
@ -1,10 +1,12 @@
|
||||||
# Template file for 'i3status'
|
# Template file for 'i3status'
|
||||||
pkgname=i3status
|
pkgname=i3status
|
||||||
version=2.12
|
version=2.13
|
||||||
revision=1
|
revision=1
|
||||||
hostmakedepends="asciidoc pkg-config"
|
build_style=gnu-configure
|
||||||
|
configure_args="--disable-builddir $(vopt_if pulseaudio '' --disable-pulseaudio)"
|
||||||
|
hostmakedepends="automake asciidoc pkg-config xmlto"
|
||||||
makedepends="alsa-lib-devel confuse-devel libcap-devel libnl3-devel
|
makedepends="alsa-lib-devel confuse-devel libcap-devel libnl3-devel
|
||||||
pulseaudio-devel yajl-devel"
|
yajl-devel $(vopt_if pulseaudio pulseaudio-devel)"
|
||||||
depends="libcap-progs"
|
depends="libcap-progs"
|
||||||
short_desc="Status bar generator for i3bar, dzen2, xmobar or similar programs"
|
short_desc="Status bar generator for i3bar, dzen2, xmobar or similar programs"
|
||||||
maintainer="Lugubris <lugubris@disroot.org>"
|
maintainer="Lugubris <lugubris@disroot.org>"
|
||||||
|
@ -12,28 +14,35 @@ license="BSD-3-Clause"
|
||||||
homepage="https://www.i3wm.org/i3status/"
|
homepage="https://www.i3wm.org/i3status/"
|
||||||
#changelog="https://raw.githubusercontent.com/i3/i3status/master/CHANGELOG"
|
#changelog="https://raw.githubusercontent.com/i3/i3status/master/CHANGELOG"
|
||||||
distfiles="${homepage}/${pkgname}-${version}.tar.bz2"
|
distfiles="${homepage}/${pkgname}-${version}.tar.bz2"
|
||||||
checksum=6fc6881536043391ab4bed369d956f99d1088965d8bcebed18d1932de3ba791a
|
checksum=ce89c9ff8565f62e88299f1a611229afdfc356b4e97368a5f8c4f06ad2fa1466
|
||||||
conf_files="/etc/i3status.conf"
|
conf_files="/etc/i3status.conf"
|
||||||
|
|
||||||
|
build_options="pulseaudio"
|
||||||
|
build_options_default="pulseaudio"
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
*-musl) makedepends+=" libglob-devel";;
|
*-musl)
|
||||||
|
makedepends+=" libglob-devel"
|
||||||
|
export LIBS="${XBPS_CROSS_BASE}/usr/lib/libglob.a"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
do_build() {
|
post_patch() {
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
*-musl)
|
*-musl)
|
||||||
sed -i '/include/s,glob.h,libglob/glob.h,g' src/process_runs.c src/print_cpu_temperature.c i3status.c
|
vsed \
|
||||||
sed -i '/GLOB_TILDE/s/glob(/g_glob(/g' src/process_runs.c src/print_cpu_temperature.c i3status.c
|
-e '/include/s,glob.h,libglob/glob.h,g' \
|
||||||
sed -i 's/globfree(/g_globfree(/g' src/process_runs.c src/print_cpu_temperature.c i3status.c
|
-e '/GLOB_TILDE/s/glob(/g_glob(/g' \
|
||||||
export LIBS="$XBPS_CROSS_BASE/usr/lib/libglob.a"
|
-e 's/globfree(/g_globfree(/g' \
|
||||||
|
-i src/process_runs.c src/print_cpu_temperature.c i3status.c
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
make CC=$CC ${makejobs}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
pre_configure() {
|
||||||
make PREFIX=/usr DESTDIR=${DESTDIR} install
|
autoreconf -vfi
|
||||||
# detect dhcpcd.
|
}
|
||||||
sed -i -e "s#dhclient#dhcpcd#g" ${DESTDIR}/etc/i3status.conf
|
|
||||||
|
post_install() {
|
||||||
vlicense LICENSE
|
vlicense LICENSE
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue