Skip to content

Commit

Permalink
i3: Fixing build, adding missing deps & i3status.
Browse files Browse the repository at this point in the history
  • Loading branch information
JillTyrell authored and rofl0r committed Feb 12, 2017
1 parent 31881c2 commit bbf0780
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 1 deletion.
78 changes: 78 additions & 0 deletions KEEP/i3status.patch
@@ -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;
16 changes: 15 additions & 1 deletion pkg/i3-wm
Expand Up @@ -7,15 +7,29 @@ sha512=1bb1044e8d86e78d3ccb79d49f0eb26665dcd05a348058a5e57138151d74f57d77830efc3
pkgver=2

[deps]
dmenu
i3status
libev
libyajl
libxcb
xcb-util-keysyms
xcb-util-cursor
xcb-util-wm
xcb-util-xrm
xkbcommon
pcre
libstartup-notification

[build]
CPPFLAGS="-DGLOB_TILDE=0" make -j $MAKE_THREADS
[ -n "$CROSS_COMPILE" ] && \
xconfflags="--host=$($CC -dumpmachine) \
--with-sysroot=$butch_root_dir"

CPPFLAGS="-D_GNU_SOURCE -DGLOB_TILDE=0" 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"
cd "$A"-pc-linux-gnu
CPPFLAGS="-DGLOB_TILDE=0" make V=1 -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
20 changes: 20 additions & 0 deletions pkg/i3status
@@ -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
21 changes: 21 additions & 0 deletions pkg/libconfuse
@@ -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
21 changes: 21 additions & 0 deletions pkg/libnl
@@ -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
24 changes: 24 additions & 0 deletions pkg/xcb-util-xrm
@@ -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
21 changes: 21 additions & 0 deletions pkg/xkbcommon
@@ -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

0 comments on commit bbf0780

Please sign in to comment.