i3status: use libglob to make GLOB_TILDE work as expected with musl.
This commit is contained in:
parent
281d715d28
commit
db6b13d7b2
@ -1,13 +0,0 @@
|
||||
--- include/i3status.h.orig
|
||||
+++ include/i3status.h
|
||||
@@ -11,6 +11,10 @@
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
+#ifndef GLOB_TILDE
|
||||
+#define GLOB_TILDE 0
|
||||
+#endif
|
||||
+
|
||||
#define BEGINS_WITH(haystack, needle) (strncmp(haystack, needle, strlen(needle)) == 0)
|
||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Template file for 'i3status'
|
||||
pkgname=i3status
|
||||
version=2.9
|
||||
revision=2
|
||||
revision=3
|
||||
hostmakedepends="asciidoc pkg-config"
|
||||
makedepends="yajl-devel confuse-devel wireless_tools-devel alsa-lib-devel libcap-devel"
|
||||
depends="libcap-progs"
|
||||
@ -13,7 +13,19 @@ homepage="http://www.i3wm.org/i3status/"
|
||||
distfiles="${homepage}/${pkgname}-${version}.tar.bz2"
|
||||
checksum=42eb09500c625fcac9a7125a29e7bf532ca4b8540942418ee3253aa15e5e9de3
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) makedepends+=" libglob-devel";;
|
||||
esac
|
||||
|
||||
do_build() {
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl)
|
||||
sed -i '/include/s,glob.h,libglob/glob.h,g' src/process_runs.c i3status.c
|
||||
sed -i '/GLOB_TILDE/s/glob(/g_glob(/g' src/process_runs.c i3status.c
|
||||
sed -i 's/globfree(/g_globfree(/g' src/process_runs.c i3status.c
|
||||
export LIBS="$XBPS_CROSS_BASE/usr/lib/libglob.a"
|
||||
;;
|
||||
esac
|
||||
make CC=$CC ${makejobs}
|
||||
}
|
||||
do_install() {
|
||||
|
Loading…
Reference in New Issue
Block a user