X-Original-To: alpine-aports@lists.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from smtp.core-hosting.net (ns1.core-hosting.net [95.130.13.75]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 5742EDC01FE for ; Wed, 18 Mar 2015 08:06:40 +0000 (UTC) Received: from mail.core-hosting.net (unknown [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.core-hosting.net (Postfix) with ESMTPSA id 311BFAA1E7A for ; Wed, 18 Mar 2015 09:06:37 +0100 (CET) X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 18 Mar 2015 10:06:37 +0200 From: Olivier Mauras To: Subject: [alpine-aports] [PATCH] testing/spectrwm: Replaced %1023c by %1023s for musl compatibility Reply-To: Mail-Reply-To: Message-ID: X-Sender: olivier@mauras.ch User-Agent: Roundcube Webmail/0.7.2 From b97eed8bcedd707f5fa5ba87bc915826b41e11e6 Mon Sep 17 00:00:00 2001 From: Olivier Mauras Date: Wed, 18 Mar 2015 08:49:11 +0100 Subject: testing/spectrwm: Replaced %1023c by %1023s for musl compatibility diff --git a/testing/spectrwm/0001-musl-fix.patch b/testing/spectrwm/0001-musl-fix.patch new file mode 100644 index 0000000..3353af5 --- /dev/null +++ b/testing/spectrwm/0001-musl-fix.patch @@ -0,0 +1,43 @@ +From 213170ebcee0ad963c5671a012993df3204d992b Mon Sep 17 00:00:00 2001 +From: Olivier Mauras +Date: Wed, 18 Mar 2015 08:29:43 +0100 +Subject: [PATCH] Fix musl + +--- + spectrwm.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/spectrwm.c b/spectrwm.c +index b01ed60..cc16e87 100644 +--- a/spectrwm.c ++++ b/spectrwm.c +@@ -8244,7 +8244,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]:%1023s", &ws_id, s) != 2) + errx(1, "invalid entry, should be 'ws[]:name'"); + ws_id--; + if (ws_id < 0 || ws_id >= workspace_limit) +@@ -8365,7 +8365,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]:%1023s", &ws_id, s) != 2) + errx(1, "invalid autorun entry, should be 'ws[]:command'"); + ws_id--; + if (ws_id < 0 || ws_id >= workspace_limit) +@@ -8435,7 +8435,7 @@ setlayout(const char *selector, const char *value, int flags) + return (0); + + bzero(s, sizeof s); +- if (sscanf(value, "ws[%d]:%d:%d:%d:%d:%1023c", ++ if (sscanf(value, "ws[%d]:%d:%d:%d:%d:%1023s", + &ws_id, &mg, &ma, &si, &ar, s) != 6) + errx(1, "invalid layout entry, should be 'ws[]:" + "::::" +-- +2.2.1 + diff --git a/testing/spectrwm/APKBUILD b/testing/spectrwm/APKBUILD index e0e1769..a4a1632 100644 --- a/testing/spectrwm/APKBUILD +++ b/testing/spectrwm/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: pkgname=spectrwm pkgver=2.6.2 -pkgrel=0 +pkgrel=1 pkgdesc="A small dynamic tiling window manager for X11" url="https://opensource.conformal.com/wiki/spectrwm" arch="all" @@ -12,28 +12,40 @@ depends_dev="xorg-server-dev libxrandr-dev libxcursor-dev libxft-dev xcb-util-de makedepends="$depends_dev bsd-compat-headers" install="" subpackages="$pkgname-doc" -source="https://opensource.conformal.com/snapshots/$pkgname/$pkgname-$pkgver.tgz" +source="https://opensource.conformal.com/snapshots/$pkgname/$pkgname-$pkgver.tgz 0001-musl-fix.patch" _builddir=$srcdir/$pkgname-$pkgver prepare() { - cd "$_builddir/linux" - sed -i 's#^PREFIX.*#PREFIX ?= /usr#' Makefile + # Apply patches + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done + + # Fix $PREFIX + cd "$_builddir/linux" + sed -i 's#^PREFIX.*#PREFIX ?= /usr#' Makefile } build() { - cd "$_builddir/linux" - make + cd "$_builddir/linux" + make } package() { - cd "$_builddir/linux" - make DESTDIR="$pkgdir" install || return 1 - # Copy sample scripts and conf - mkdir "$pkgdir"/usr/share/$pkgname - cp ../*.sh "$pkgdir"/usr/share/$pkgname - cp ../*.conf "$pkgdir"/usr/share/$pkgname + cd "$_builddir/linux" + make DESTDIR="$pkgdir" install || return 1 + # Copy sample scripts and conf + mkdir "$pkgdir"/usr/share/$pkgname + cp ../*.sh "$pkgdir"/usr/share/$pkgname + cp ../*.conf "$pkgdir"/usr/share/$pkgname } -md5sums="eba7cba0c85706435657f744bf9086bc spectrwm-2.6.2.tgz" -sha256sums="eb9b33ee05b0625d59607f886d9ba7f0723bd863b503d66bdb592f5461c59459 spectrwm-2.6.2.tgz" -sha512sums="f1962df679ca07ca7d8c68a2d0b88331eda5c7cd35ecf1a5a63687984c1c67ef48fffb4e29d273fb1ccef9c9bb77a5ab12a09ef27b1d97abdc87dc20f38717f5 spectrwm-2.6.2.tgz" +md5sums="eba7cba0c85706435657f744bf9086bc spectrwm-2.6.2.tgz +4b909368b341f50ecabf50be032fe141 0001-musl-fix.patch" +sha256sums="eb9b33ee05b0625d59607f886d9ba7f0723bd863b503d66bdb592f5461c59459 spectrwm-2.6.2.tgz +4c6ccdc4cf99a982fba4763236c236d0aaf1e21f52dd3b4cfb73c888110d19bb 0001-musl-fix.patch" +sha512sums="f1962df679ca07ca7d8c68a2d0b88331eda5c7cd35ecf1a5a63687984c1c67ef48fffb4e29d273fb1ccef9c9bb77a5ab12a09ef27b1d97abdc87dc20f38717f5 spectrwm-2.6.2.tgz +316d1d0dd834077f33d48a6f07f9e06094490a0737041cd63fad12e9dbba78a72fd357f64196e496b99cb9b7df65bbc55075cfefb0b0afad841bd456a15e718c 0001-musl-fix.patch" -- cgit v0.10.1 --- Direct link if needed: http://git.mauras.ch/aports/patch/?id=b97eed8bcedd707f5fa5ba87bc915826b41e11e6 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---