spectrwm: update to 3.1.0, fix startup on musl
This commit is contained in:
parent
44adb7be69
commit
e03cf30e58
2 changed files with 39 additions and 18 deletions
29
srcpkgs/spectrwm/patches/musl.patch
Normal file
29
srcpkgs/spectrwm/patches/musl.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
--- spectrwm.c
|
||||
+++ spectrwm.c
|
||||
@@ -9186,7 +9186,7 @@ setconfvalue(const char *selector, const char *value, int flags)
|
||||
return (0);
|
||||
|
||||
bzero(s, sizeof s);
|
||||
- if (sscanf(value, "ws[%d]:%1023c", &ws_id, s) != 2)
|
||||
+ if (sscanf(value, "ws[%d]:%1023c", &ws_id, s) < 1 || !*s)
|
||||
errx(1, "invalid entry, should be 'ws[<idx>]:name'");
|
||||
ws_id--;
|
||||
if (ws_id < 0 || ws_id >= workspace_limit)
|
||||
@@ -9323,7 +9323,7 @@ setautorun(const char *selector, const char *value, int flags)
|
||||
return (0);
|
||||
|
||||
bzero(s, sizeof s);
|
||||
- if (sscanf(value, "ws[%d]:%1023c", &ws_id, s) != 2)
|
||||
+ if (sscanf(value, "ws[%d]:%1023c", &ws_id, s) < 1 || !*s)
|
||||
errx(1, "invalid autorun entry, should be 'ws[<idx>]:command'");
|
||||
ws_id--;
|
||||
if (ws_id < 0 || ws_id >= workspace_limit)
|
||||
@@ -9394,7 +9394,7 @@ setlayout(const char *selector, const char *value, int flags)
|
||||
|
||||
bzero(s, sizeof s);
|
||||
if (sscanf(value, "ws[%d]:%d:%d:%d:%d:%1023c",
|
||||
- &ws_id, &mg, &ma, &si, &ar, s) != 6)
|
||||
+ &ws_id, &mg, &ma, &si, &ar, s) < 5 || !*s)
|
||||
errx(1, "invalid layout entry, should be 'ws[<idx>]:"
|
||||
"<master_grow>:<master_add>:<stack_inc>:<always_raise>:"
|
||||
"<type>'");
|
|
@ -1,30 +1,22 @@
|
|||
# Template file for 'spectrwm'
|
||||
pkgname=spectrwm
|
||||
version=3.0.2
|
||||
version=3.1.0
|
||||
revision=1
|
||||
build_style=gnu-makefile
|
||||
make_build_args='-C linux'
|
||||
make_install_args="${make_build_args}"
|
||||
_distname=SPECTRWM_${version//./_}
|
||||
wrksrc="spectrwm-${_distname}"
|
||||
short_desc="A small dynamic tiling window manager for X11"
|
||||
maintainer="Jakub Skrzypnik <jot.skrzyp@gmail.com>"
|
||||
makedepends="libXt-devel libxcb-devel xcb-util-devel
|
||||
xcb-util-wm-devel xcb-util-keysyms-devel
|
||||
libXrandr-devel libXcursor-devel libXft-devel freetype-devel"
|
||||
makedepends="libXcursor-devel libXft-devel libXrandr-devel libXt-devel
|
||||
xcb-util-keysyms-devel xcb-util-wm-devel"
|
||||
hostmakedepends="pkg-config"
|
||||
license="ISC"
|
||||
homepage="http://spectrwm.org"
|
||||
distfiles="https://github.com/conformal/spectrwm/archive/${_distname}.tar.gz"
|
||||
checksum=82ce0280039de642c41684f3096abb0388926b60c37987ca1dbc53a0913cab18
|
||||
checksum=b7a5e24fe6d923aadab947d354ff44ad742b721daaf334584e8eea9e15649d9a
|
||||
|
||||
do_configure() {
|
||||
sed -i "s,-I/usr/include/freetype2,-I${XBPS_CROSS_BASE}/usr/include/freetype2,g" linux/Makefile
|
||||
}
|
||||
do_build() {
|
||||
cd linux
|
||||
make COLOR=0 CC=$CC LD=$LD CFLAGS="$CFLAGS -std=c99" PREFIX=/usr
|
||||
}
|
||||
do_install() {
|
||||
cd linux
|
||||
make PREFIX=/usr DESTDIR=${DESTDIR} COLOR=0 install
|
||||
cd ${wrksrc}
|
||||
sed -n '/\*\//q; /^\/\*/d; s/^ \* \?//p' spectrwm.c > LICENSE
|
||||
vlicense LICENSE
|
||||
post_install() {
|
||||
vlicense LICENSE.md
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue