forked from pikhq/sabotage
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i3: Fixing build, adding missing deps & i3status.
- Loading branch information
Showing
7 changed files
with
200 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -23,7 +23,6 @@ | ||
CFLAGS+=-Iinclude | ||
LIBS+=-lconfuse | ||
LIBS+=-lyajl | ||
-LIBS+=-lpulse | ||
LIBS+=-lm | ||
LIBS+=-lpthread | ||
|
||
@@ -79,10 +78,8 @@ | ||
OBJS:=$(sort $(wildcard src/*.c *.c)) | ||
OBJS:=$(OBJS:.c=.o) | ||
|
||
-ifeq ($(OS),OpenBSD) | ||
OBJS:=$(filter-out src/pulse.o, $(OBJS)) | ||
LIBS:=$(filter-out -lpulse, $(LIBS)) | ||
-endif | ||
|
||
src/%.o: src/%.c include/i3status.h | ||
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< | ||
Only in b: i3status | ||
--- a/src/print_volume.c | ||
+++ b/src/print_volume.c | ||
@@ -61,53 +61,6 @@ | ||
free(instance); | ||
} | ||
|
||
-#ifndef __OpenBSD__ | ||
- /* Try PulseAudio first */ | ||
- | ||
- /* If the device name has the format "pulse[:N]" where N is the | ||
- * index of the PulseAudio sink then force PulseAudio, optionally | ||
- * overriding the default sink */ | ||
- if (!strncasecmp(device, "pulse", strlen("pulse"))) { | ||
- uint32_t sink_idx = device[strlen("pulse")] == ':' ? (uint32_t)atoi(device + strlen("pulse:")) : DEFAULT_SINK_INDEX; | ||
- const char *sink_name = device[strlen("pulse")] == ':' && | ||
- !isdigit(device[strlen("pulse:")]) | ||
- ? device + strlen("pulse:") | ||
- : NULL; | ||
- int cvolume = pulse_initialize() ? volume_pulseaudio(sink_idx, sink_name) : 0; | ||
- int ivolume = DECOMPOSE_VOLUME(cvolume); | ||
- bool muted = DECOMPOSE_MUTED(cvolume); | ||
- if (muted) { | ||
- START_COLOR("color_degraded"); | ||
- pbval = 0; | ||
- } | ||
- /* negative result means error, stick to 0 */ | ||
- if (ivolume < 0) | ||
- ivolume = 0; | ||
- outwalk = apply_volume_format(muted ? fmt_muted : fmt, | ||
- outwalk, | ||
- ivolume); | ||
- goto out; | ||
- } else if (!strcasecmp(device, "default") && pulse_initialize()) { | ||
- /* no device specified or "default" set */ | ||
- int cvolume = volume_pulseaudio(DEFAULT_SINK_INDEX, NULL); | ||
- int ivolume = DECOMPOSE_VOLUME(cvolume); | ||
- bool muted = DECOMPOSE_MUTED(cvolume); | ||
- if (ivolume >= 0) { | ||
- if (muted) { | ||
- START_COLOR("color_degraded"); | ||
- pbval = 0; | ||
- } | ||
- outwalk = apply_volume_format(muted ? fmt_muted : fmt, | ||
- outwalk, | ||
- ivolume); | ||
- goto out; | ||
- } | ||
- /* negative result means error, fail PulseAudio attempt */ | ||
- } | ||
-/* If some other device was specified or PulseAudio is not detected, | ||
- * proceed to ALSA / OSS */ | ||
-#endif | ||
- | ||
#ifdef LINUX | ||
int err; | ||
snd_mixer_t *m; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[mirrors] | ||
https://i3wm.org/i3status/i3status-2.11.tar.bz2 | ||
|
||
[vars] | ||
filesize=54970 | ||
sha512=37d2549649178122fab7411a3c714ae041d9c726c140002ec6ccd1a4f2e28af618ca28af9aa3bc45d0cafda0b25dd438c9ed4c3739ddcc0511e19305657730f0 | ||
pkgver=1 | ||
|
||
[deps] | ||
libconfuse | ||
libnl | ||
libyajl | ||
libcap2 | ||
alsa-lib | ||
|
||
[build] | ||
patch -p1 < "$K"/i3status.patch | ||
dest="$butch_install_dir""$butch_prefix" | ||
CPPFLAGS="-DGLOB_TILDE=0" make | ||
PREFIX="$dest" make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[mirrors] | ||
https://github.com/martinh/libconfuse/releases/download/v3.0/confuse-3.0.tar.gz | ||
|
||
[vars] | ||
filesize=725452 | ||
sha512=0bcedd2c54767dc9c4cb9ccf20557d49fa6c5e33f78e01412ff3daa7dcd2b94c9368552c2533aabfc0ce9e65683ca37986540167f40d71e5adacf4485a683e05 | ||
pkgver=1 | ||
|
||
[build] | ||
[ -n "$CROSS_COMPILE" ] && \ | ||
xconfflags="--host=$($CC -dumpmachine) \ | ||
--with-sysroot=$butch_root_dir" | ||
|
||
CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \ | ||
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \ | ||
./configure -C --prefix="$butch_prefix" --disable-nls $xconfflags | ||
|
||
#[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir" | ||
|
||
make V=1 -j$MAKE_THREADS | ||
make DESTDIR="$butch_install_dir" install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[mirrors] | ||
https://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz | ||
|
||
[vars] | ||
filesize=832513 | ||
sha512=3f9649577e9282cf41d2d4894aaecb2d53b4a1c51f9e674a6fb73393e9482f9f45e6f0ffa5815e606f972916e369774bfd85141a96c0e3d9d4ead3adea796286 | ||
pkgver=1 | ||
|
||
[build] | ||
[ -n "$CROSS_COMPILE" ] && \ | ||
xconfflags="--host=$($CC -dumpmachine) \ | ||
--with-sysroot=$butch_root_dir" | ||
|
||
CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \ | ||
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \ | ||
./configure -C --prefix="$butch_prefix" --disable-nls $xconfflags | ||
|
||
#[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir" | ||
|
||
make V=1 -j$MAKE_THREADS | ||
make DESTDIR="$butch_install_dir" install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[mirrors] | ||
https://github.com/Airblader/xcb-util-xrm/releases/download/v1.2/xcb-util-xrm-1.2.tar.bz2 | ||
|
||
[vars] | ||
filesize=324708 | ||
sha512=c6031844d3a197b234cb1b22166c02fe8d03f8a8def836b8c974324a0b6b453889680011406c7940bd04fde1389c5a2ff508f84b080f811ca69cbdb0334994e8 | ||
pkgver=1 | ||
|
||
[deps] | ||
queue-h | ||
|
||
[build] | ||
[ -n "$CROSS_COMPILE" ] && \ | ||
xconfflags="--host=$($CC -dumpmachine) \ | ||
--with-sysroot=$butch_root_dir" | ||
|
||
CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \ | ||
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \ | ||
./configure -C --prefix="$butch_prefix" $xconfflags | ||
|
||
#[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir" | ||
|
||
make V=1 -j$MAKE_THREADS | ||
make DESTDIR="$butch_install_dir" install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[mirrors] | ||
http://xkbcommon.org/download/libxkbcommon-0.7.1.tar.xz | ||
|
||
[vars] | ||
filesize=622384 | ||
sha512=9f209214d5d7f9334cabb2cd7e0d9b9b0392c1fae06b60e92a03398875399fe48754b543389f78b8b06dd28a86dfd440720e534bae309ca8ef882eb874dce4e1 | ||
pkgver=1 | ||
|
||
[build] | ||
[ -n "$CROSS_COMPILE" ] && \ | ||
xconfflags="--host=$($CC -dumpmachine) \ | ||
--with-sysroot=$butch_root_dir" | ||
|
||
CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \ | ||
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \ | ||
./configure -C --prefix="$butch_prefix" --disable-nls $xconfflags | ||
|
||
#[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir" | ||
|
||
make V=1 -j$MAKE_THREADS | ||
make DESTDIR="$butch_install_dir" install |