diff --git a/srcpkgs/spectrwm/patches/musl.patch b/srcpkgs/spectrwm/patches/musl.patch new file mode 100644 index 0000000000..a33af30630 --- /dev/null +++ b/srcpkgs/spectrwm/patches/musl.patch @@ -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[]: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[]: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[]:" + "::::" + "'"); diff --git a/srcpkgs/spectrwm/template b/srcpkgs/spectrwm/template index 873e6ad0ca..9aa4cd2de5 100644 --- a/srcpkgs/spectrwm/template +++ b/srcpkgs/spectrwm/template @@ -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 " -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 }