aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Huber <johu@gentoo.org>2018-05-07 21:02:40 +0200
committerJohannes Huber <johu@gentoo.org>2018-05-07 21:02:40 +0200
commit6bbe4704251bbc5c17294d35d47177fb71b35874 (patch)
treed3053a0bcec31aef75ced836b594dc3c9358ea7f
parentBump portage version to 2.3.36 (diff)
downloadjohu-6bbe4704251bbc5c17294d35d47177fb71b35874.tar.gz
johu-6bbe4704251bbc5c17294d35d47177fb71b35874.tar.bz2
johu-6bbe4704251bbc5c17294d35d47177fb71b35874.zip
x11-wm/i3-gaps: New package
Initial import from oboeverlay. Bug: https://bugs.gentoo.org/654694 Package-Manager: Portage-2.3.36, Repoman-2.3.9 RepoMan-Options: --force
-rw-r--r--x11-wm/i3-gaps/Manifest1
-rw-r--r--x11-wm/i3-gaps/files/musl.patch73
-rw-r--r--x11-wm/i3-gaps/i3-gaps-4.15.ebuild77
3 files changed, 151 insertions, 0 deletions
diff --git a/x11-wm/i3-gaps/Manifest b/x11-wm/i3-gaps/Manifest
new file mode 100644
index 0000000..66b06cc
--- /dev/null
+++ b/x11-wm/i3-gaps/Manifest
@@ -0,0 +1 @@
+DIST i3-gaps-4.15.tar.gz 3965504 BLAKE2B 01b1620e604c954a55c6710129e29cd5e4506df7c30c899eed7c2fb8d77eae097bdfaa12cb91fb92520a33239e19675b8d20ef1eeff056961d8a64c82fdc7d69 SHA512 83a36a1db7099f8a9a6f9ad1c7434a187a75ccd8f6fd4e4442a912a3409b851fb8153d9c3e72d68dcfaedce8b6f0ad249e08226238c82873bc0691dbf94c7fda
diff --git a/x11-wm/i3-gaps/files/musl.patch b/x11-wm/i3-gaps/files/musl.patch
new file mode 100644
index 0000000..82ad619
--- /dev/null
+++ b/x11-wm/i3-gaps/files/musl.patch
@@ -0,0 +1,73 @@
+diff -urp i3-4.11/i3bar/src/main.c i3-4.11.new/i3bar/src/main.c
+--- i3-4.11/i3bar/src/main.c 2015-09-30 07:55:10.000000000 +0100
++++ i3-4.11.new/i3bar/src/main.c 2016-02-08 20:03:41.777392482 +0000
+@@ -45,14 +45,20 @@ void debuglog(char *fmt, ...) {
+ *
+ */
+ char *expand_path(char *path) {
+- static glob_t globbuf;
+- if (glob(path, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf) < 0) {
+- ELOG("glob() failed\n");
+- exit(EXIT_FAILURE);
++ char *home, *expanded;
++
++ if (strncmp(path, "~/", 2) == 0) {
++ home = getenv("HOME");
++ if (home != NULL) {
++ /* new length: sum - 1 (omit '~') + 1 (for '\0') */
++ expanded = scalloc(strlen(home)+strlen(path), 1);
++ strcpy(expanded, home);
++ strcat(expanded, path+1);
++ return expanded;
++ }
+ }
+- char *result = sstrdup(globbuf.gl_pathc > 0 ? globbuf.gl_pathv[0] : path);
+- globfree(&globbuf);
+- return result;
++
++ return sstrdup(path);
+ }
+
+ void print_usage(char *elf_name) {
+diff -urp i3-4.11/libi3/resolve_tilde.c i3-4.11.new/libi3/resolve_tilde.c
+--- i3-4.11/libi3/resolve_tilde.c 2015-09-30 07:55:10.000000000 +0100
++++ i3-4.11.new/libi3/resolve_tilde.c 2016-02-08 20:03:47.849230953 +0000
+@@ -19,27 +19,18 @@
+ *
+ */
+ char *resolve_tilde(const char *path) {
+- static glob_t globbuf;
+- char *head, *tail, *result;
++ char *home, *expanded;
+
+- tail = strchr(path, '/');
+- head = sstrndup(path, tail ? (size_t)(tail - path) : strlen(path));
+-
+- int res = glob(head, GLOB_TILDE, NULL, &globbuf);
+- 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) {
+- err(EXIT_FAILURE, "glob() failed");
+- } else {
+- head = globbuf.gl_pathv[0];
+- result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1, 1);
+- strncpy(result, head, strlen(head));
+- if (tail)
+- strncat(result, tail, strlen(tail));
++ if (strncmp(path, "~/", 2) == 0) {
++ home = getenv("HOME");
++ if (home != NULL) {
++ /* new length: sum - 1 (omit '~') + 1 (for '\0') */
++ expanded = scalloc(strlen(home)+strlen(path), 1);
++ strcpy(expanded, home);
++ strcat(expanded, path+1);
++ return expanded;
++ }
+ }
+- globfree(&globbuf);
+
+- return result;
++ return sstrdup(path);
+ }
diff --git a/x11-wm/i3-gaps/i3-gaps-4.15.ebuild b/x11-wm/i3-gaps/i3-gaps-4.15.ebuild
new file mode 100644
index 0000000..1e7f0bf
--- /dev/null
+++ b/x11-wm/i3-gaps/i3-gaps-4.15.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="i3 with more features"
+HOMEPAGE="https://github.com/Airblader/i3"
+SRC_URI="https://github.com/Airblader/i3/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE=""
+
+S=${WORKDIR}/i3-${PV}
+
+CDEPEND="dev-libs/libev
+ dev-libs/libpcre
+ >=dev-libs/yajl-2.0.3
+ x11-libs/libxcb[xkb]
+ x11-libs/libxkbcommon[X]
+ x11-libs/startup-notification
+ x11-libs/xcb-util
+ x11-libs/xcb-util-cursor
+ x11-libs/xcb-util-keysyms
+ x11-libs/xcb-util-wm
+ x11-libs/xcb-util-xrm
+ >=x11-libs/cairo-1.14.4[X,xcb]
+ >=x11-libs/pango-1.30.0[X]"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ dev-lang/perl
+ dev-perl/AnyEvent-I3
+ dev-perl/JSON-XS
+ !x11-wm/i3"
+
+DOCS=( RELEASE-NOTES-${PV} )
+PATCHES[0]="${FILESDIR}/musl.patch"
+
+src_prepare() {
+ default
+ sed -e '/AC_PATH_PROG(\[PATH_ASCIIDOC/d' -i configure.ac || die
+ eautoreconf
+ cat <<- EOF > "${T}"/i3wm
+ #!/bin/sh
+ exec /usr/bin/i3
+ EOF
+}
+
+src_configure() {
+ local myeconfargs=( --enable-debug=no --disable-sanitizers ) # otherwise injects -O0 -g
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake -C "${CBUILD}"
+}
+
+src_install() {
+ emake -C "${CBUILD}" DESTDIR="${D}" install
+ einstalldocs
+
+ exeinto /etc/X11/Sessions
+ doexe "${T}"/i3wm
+}
+
+pkg_postinst() {
+ einfo "There are several packages that you may find useful with ${PN} and"
+ einfo "their usage is suggested by the upstream maintainers, namely:"
+ einfo " x11-misc/dmenu"
+ einfo " x11-misc/i3status"
+ einfo " x11-misc/i3lock"
+ einfo "Please refer to their description for additional info."
+}