[gentoo-commits] proj/musl:master commit in: x11-misc/i3status/, x11-misc/i3status/files/

2021-04-13 Thread Dave Hughes
commit: 416341f5200b1bd5db907a5727e947c3fcb72dd6
Author: Dave Hughes  gmail  com>
AuthorDate: Tue Apr 13 13:00:04 2021 +
Commit: Dave Hughes  gmail  com>
CommitDate: Tue Apr 13 13:00:04 2021 +
URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=416341f5

x11-misc/i3status: remove from overlay

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Dave Hughes  gmail.com>

 x11-misc/i3status/Manifest |  1 -
 .../i3status/files/i3status-2.11-pulseaudio.patch  | 42 ---
 .../i3status/files/i3status-2.12-glob_tilde.patch  | 59 --
 x11-misc/i3status/i3status-2.12.ebuild | 46 -
 x11-misc/i3status/metadata.xml | 19 ---
 5 files changed, 167 deletions(-)

diff --git a/x11-misc/i3status/Manifest b/x11-misc/i3status/Manifest
deleted file mode 100644
index 0b1283c..000
--- a/x11-misc/i3status/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST i3status-2.12.tar.bz2 57162 BLAKE2B 
d3225581b628640bfb6084b390a135562c2ce052078cf014a63e106c83beb14b38270eee28d01898d478a9593ce542684252e420ffe37d07f392509ac9b2a749
 SHA512 
687a880a65cb8df46f5e9d2256b59724ba3424c502e9a0fb3ca71b070875df5f4008ee501c554bc716f2d728a5cf813a36d22d7377d42c3c46b14381d385bab3

diff --git a/x11-misc/i3status/files/i3status-2.11-pulseaudio.patch 
b/x11-misc/i3status/files/i3status-2.11-pulseaudio.patch
deleted file mode 100644
index 2447f16..000
--- a/x11-misc/i3status/files/i3status-2.11-pulseaudio.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 3084ae7..7ea1964 100644
 a/Makefile
-+++ b/Makefile
-@@ -58,6 +57,10 @@ ifeq ($(OS),NetBSD)
- LIBS+=-lprop
- endif
- 
-+ifeq ($(OS),OpenBSD)
-+LIBS+=-lpthread
-+endif
-+
- # This probably applies for any pkgsrc based system
- ifneq (, $(filter $(OS), NetBSD DragonFly))
- CFLAGS+=-I/usr/pkg/include/
-@@ -79,9 +82,12 @@ CFLAGS += -idirafter yajl-fallback
- OBJS:=$(sort $(wildcard src/*.c *.c))
- OBJS:=$(OBJS:.c=.o)
- 
--ifeq ($(OS),OpenBSD)
-+PULSE ?= 1
-+ifeq ($(PULSE),0)
- OBJS:=$(filter-out src/pulse.o, $(OBJS))
- LIBS:=$(filter-out -lpulse, $(LIBS))
-+else
-+CPPFLAGS+=-DPULSE
- endif
- 
- src/%.o: src/%.c include/i3status.h
-diff --git a/src/print_volume.c b/src/print_volume.c
-index 51e84f3..9e015c0 100644
 a/src/print_volume.c
-+++ b/src/print_volume.c
-@@ -61,7 +61,7 @@ void print_volume(yajl_gen json_gen, char *buffer, const 
char *fmt, const char *
- free(instance);
- }
- 
--#ifndef __OpenBSD__
-+#if !defined(__OpenBSD__) && defined(PULSE)
- /* Try PulseAudio first */
- 
- /* If the device name has the format "pulse[:N]" where N is the

diff --git a/x11-misc/i3status/files/i3status-2.12-glob_tilde.patch 
b/x11-misc/i3status/files/i3status-2.12-glob_tilde.patch
deleted file mode 100644
index b1f2ba6..000
--- a/x11-misc/i3status/files/i3status-2.12-glob_tilde.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-diff --git i/i3status.c w/i3status.c
-index 5088c96..3c18214 100644
 i/i3status.c
-+++ w/i3status.c
-@@ -210,29 +210,19 @@ static int valid_color(const char *value) {
-  *
-  */
- static char *resolve_tilde(const char *path) {
--static glob_t globbuf;
--char *head, *tail, *result = NULL;
--
--tail = strchr(path, '/');
--head = strndup(path, tail ? (size_t)(tail - path) : strlen(path));
--
--int res = glob(head, GLOB_TILDE, NULL, );
--free(head);
--/* no match, or many wildcard matches are bad */
--if (res == GLOB_NOMATCH || globbuf.gl_pathc != 1)
--result = sstrdup(path);
--else if (res != 0) {
--die("glob() failed");
--} else {
--head = globbuf.gl_pathv[0];
--result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1);
--strncpy(result, head, strlen(head));
--if (tail)
--strncat(result, tail, strlen(tail));
-+char *home, *result = NULL;
-+
-+if (strncmp(path, "~/", 2) == 0) {
-+home = getenv("HOME");
-+if (home != NULL) {
-+result = scalloc(strlen(home) + strlen(path));
-+strcpy(result, home);
-+strcat(result, path+1);
-+return result;
-+}
- }
--globfree();
- 
--return result;
-+return sstrdup(path);
- }
- 
- static char *get_config_path(void) {
-diff --git i/include/i3status.h w/include/i3status.h
-index 9ac471d..27ecae4 100644
 i/include/i3status.h
-+++ w/include/i3status.h
-@@ -236,4 +236,9 @@ extern cfg_t *cfg, *cfg_general, *cfg_section;
- extern void **cur_instance;
- 
- extern pthread_t main_thread;
-+
-+#ifndef GLOB_TILDE
-+#define GLOB_TILDE 0
-+#endif
-+
- #endif

diff --git a/x11-misc/i3status/i3status-2.12.ebuild 
b/x11-misc/i3status/i3status-2.12.ebuild
deleted file mode 100644
index 2d8020a..000
--- a/x11-misc/i3status/i3status-2.12.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-

[gentoo-commits] proj/musl:master commit in: x11-misc/i3status/, x11-misc/i3status/files/

2019-01-11 Thread Anthony G. Basile
commit: d8ac254024baa255a225d915ce28b48dbd339985
Author: Luis Ressel  aixah  de>
AuthorDate: Thu Jan 10 16:54:46 2019 +
Commit: Anthony G. Basile  gentoo  org>
CommitDate: Fri Jan 11 15:09:35 2019 +
URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=d8ac2540

Patch i3status to remove uses of GLOB_TILDE

* Reimplement resolve_tilde(). The new impl isn't quite equivalent, but
  since this function is only used internally, I don't see why using
  glob() would be neccessary.
* Define GLOB_TILDE=0 to fix the other two sites which use it. They
  process user-provided paths and only use GLOB_TILDE for convenience,
  so it can be disabled.

Signed-off-by: Anthony G. Basile  gentoo.org>

 .../i3status/files/i3status-2.12-glob_tilde.patch  | 59 ++
 x11-misc/i3status/i3status-2.12.ebuild |  2 +-
 2 files changed, 60 insertions(+), 1 deletion(-)

diff --git a/x11-misc/i3status/files/i3status-2.12-glob_tilde.patch 
b/x11-misc/i3status/files/i3status-2.12-glob_tilde.patch
new file mode 100644
index 000..b1f2ba6
--- /dev/null
+++ b/x11-misc/i3status/files/i3status-2.12-glob_tilde.patch
@@ -0,0 +1,59 @@
+diff --git i/i3status.c w/i3status.c
+index 5088c96..3c18214 100644
+--- i/i3status.c
 w/i3status.c
+@@ -210,29 +210,19 @@ static int valid_color(const char *value) {
+  *
+  */
+ static char *resolve_tilde(const char *path) {
+-static glob_t globbuf;
+-char *head, *tail, *result = NULL;
+-
+-tail = strchr(path, '/');
+-head = strndup(path, tail ? (size_t)(tail - path) : strlen(path));
+-
+-int res = glob(head, GLOB_TILDE, NULL, );
+-free(head);
+-/* no match, or many wildcard matches are bad */
+-if (res == GLOB_NOMATCH || globbuf.gl_pathc != 1)
+-result = sstrdup(path);
+-else if (res != 0) {
+-die("glob() failed");
+-} else {
+-head = globbuf.gl_pathv[0];
+-result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1);
+-strncpy(result, head, strlen(head));
+-if (tail)
+-strncat(result, tail, strlen(tail));
++char *home, *result = NULL;
++
++if (strncmp(path, "~/", 2) == 0) {
++home = getenv("HOME");
++if (home != NULL) {
++result = scalloc(strlen(home) + strlen(path));
++strcpy(result, home);
++strcat(result, path+1);
++return result;
++}
+ }
+-globfree();
+ 
+-return result;
++return sstrdup(path);
+ }
+ 
+ static char *get_config_path(void) {
+diff --git i/include/i3status.h w/include/i3status.h
+index 9ac471d..27ecae4 100644
+--- i/include/i3status.h
 w/include/i3status.h
+@@ -236,4 +236,9 @@ extern cfg_t *cfg, *cfg_general, *cfg_section;
+ extern void **cur_instance;
+ 
+ extern pthread_t main_thread;
++
++#ifndef GLOB_TILDE
++#define GLOB_TILDE 0
++#endif
++
+ #endif

diff --git a/x11-misc/i3status/i3status-2.12.ebuild 
b/x11-misc/i3status/i3status-2.12.ebuild
index 81f9ba7..2d8020a 100644
--- a/x11-misc/i3status/i3status-2.12.ebuild
+++ b/x11-misc/i3status/i3status-2.12.ebuild
@@ -24,7 +24,7 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
-PATCHES=( "${FILESDIR}"/${PN}-2.11-pulseaudio.patch )
+PATCHES=( "${FILESDIR}"/${PN}-2.11-pulseaudio.patch 
"${FILESDIR}"/${PN}-2.12-glob_tilde.patch )
 
 src_prepare() {
default