summaryrefslogtreecommitdiff
path: root/x11-wm/musca
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /x11-wm/musca
reinit the tree, so we can have metadata
Diffstat (limited to 'x11-wm/musca')
-rw-r--r--x11-wm/musca/Manifest12
-rw-r--r--x11-wm/musca/files/musca-0.9.24-make.patch23
-rw-r--r--x11-wm/musca/files/musca-0.9.24_p20100226-dmenu-4.4.patch44
-rw-r--r--x11-wm/musca/files/musca-0.9.24_p20100226-fix-cycle.patch11
-rw-r--r--x11-wm/musca/files/musca-0.9.24_p20100226-fix-pad.patch21
-rw-r--r--x11-wm/musca/files/musca-0.9.24_p20100226-null.patch151
-rw-r--r--x11-wm/musca/files/musca.xsession2
-rw-r--r--x11-wm/musca/metadata.xml15
-rw-r--r--x11-wm/musca/musca-0.9.24_p20100226-r3.ebuild64
-rw-r--r--x11-wm/musca/musca-0.9.24_p20100226-r4.ebuild65
10 files changed, 408 insertions, 0 deletions
diff --git a/x11-wm/musca/Manifest b/x11-wm/musca/Manifest
new file mode 100644
index 000000000000..2b44c7ec263a
--- /dev/null
+++ b/x11-wm/musca/Manifest
@@ -0,0 +1,12 @@
+AUX musca-0.9.24-make.patch 711 SHA256 114b44eb6cc3584fb079faadc85d3ebf170d6c1f790a6f55c78ce7f95583cadb SHA512 e31f4eb6b79e4137e366943c804aeaf7d571f005cf81332611126b94a82a3dd93651631670f7d0b6620e8f41047250c0c2c1955e86d9d48193ba3acd99e1c54c WHIRLPOOL 5f66c25a6a0309bf002223bf79097de6bc2b545b853cbee0a66f3a62d394a43e8a8002179245b56d3d51e22dbd283dc702ba64e3fe4e05ef14569bec61f200d9
+AUX musca-0.9.24_p20100226-dmenu-4.4.patch 1421 SHA256 d88c845edaa58a73bc4d2c331bfbd15cbbb0db50df6ab74e351eb35d92e77e6d SHA512 9aee1756cd0ff7094a26aa3ab0e2440728b973a72234c3532f733afc57763678cfcfb6a07ec2ae386f2b70d2313d62437cf889d561bbf321f96fe979181541b3 WHIRLPOOL 00682b04df0db076ac022dc2f18fb1d7dd9f7af6abfc195642815c3b298459de4c386e7442d56b9c056b0dc8359a0e208cb4aa359bccc1402245d71bddf4da42
+AUX musca-0.9.24_p20100226-fix-cycle.patch 408 SHA256 4683118c5149c1a299de55778a9e6c9891c9b68834bc02575f0366bde0322319 SHA512 873f3907bcc31aa29e8af92ec5a20996e6efa5e879eb2d1b6f5bccc562d3816b83475f650f07b7834e9392b32f15644b298056a03a570c6f768224d3bd5f4449 WHIRLPOOL 8ac8525633ac221159490cb6f838359f6f80b831fcbd70ed6e318ebbe6180d2569c99e1b87307d7be753d83a037b837d3bb8d6508ec20e9894d6ab5718f79cf3
+AUX musca-0.9.24_p20100226-fix-pad.patch 818 SHA256 79389a349c3ef4ea9d1041f2988f0955d994ce45f373b8e0f3e0ab28c3b64425 SHA512 9552c301a2f228fc4147bfc27ab28bd0d17c7cd308f20ff432c37a041b91fd62a166eca2085c36693249ac6d19225717c898c13e7ed176adb9000c37cd8bd0e5 WHIRLPOOL 7717f29deab12f83293fe77262a6e262d6005def7b5968c6ce1c6853ff077abcd4a154140f9282c7579a02f943470e6c88ada047b787bc9ce856b10ded9175f8
+AUX musca-0.9.24_p20100226-null.patch 4271 SHA256 426d5646ac1ac294c24426cb070957285e1f96d1d2b1479a43a6e0d4b4e0e9d0 SHA512 76bf5d67eee6a5045d1781b818333ef36bac87276bb6050b794502abc4aa77a930092f62ec07622ee18f6bb270924ec40813ee70d25ea8e5d3cf1458a39569a5 WHIRLPOOL cfa0efd4f44c8233306453ca803c79953e2f8fcad56f19c87d15666789fd798c5fd4153f07681adcc95a45cc835417949de7847b35487a64da253a72e0d79f90
+AUX musca.xsession 16 SHA256 b9497cce444e83c33c62c124cb73fa3a7ee5b2ab24a9679b3c6d89a5957a9c47 SHA512 f276046ab82ceeaebf5307ea9050d55767a55cbd1913854ef0f73bdf162d2d751537ad604fc2a99d8d9c9b89426b609f127451c7a3f6b36868c74842d28a8622 WHIRLPOOL a646ec627cd03b627ba7ed6814b72ade83f28f3c3835841a9e041304efc07d3fd8d5c8661bc0640809ba72d07cdfa69c504a96df99c5912a9b19153d029a3b18
+DIST musca-0.9.24_p20100226.tgz 81490 SHA256 63167c76fa5ea9381685d209e12b795001d8d0d183b22a6578f255b56ca87676 SHA512 9030931dbc332fce144edc6bea907d86aab1eef6b1384958a7889b533af5065a2f20b7233ea063648fff0eb468c2083a310e38586c2c4d83848c773fb1984f45 WHIRLPOOL 79b45f6c48fc1e263baddc4fa14dce737824b02ed4a0ccd2199d4ac968aae4044e0487f9350278c8e5674d14f7241bd676c4ab96cdec7f0a6f0c2b7b6f246829
+EBUILD musca-0.9.24_p20100226-r3.ebuild 1180 SHA256 67b81bdff7f27943561f1d9ec2854953e219720214d1803983011a0c7a9211d8 SHA512 bca766ac4931ad5d81ca212b44c69f85a318a175a303340b8e3116790bda7cae9600aa1108081b3c128c34b8d99aa6d7f0ad6a7120ee80c86dfcc990853bc2e1 WHIRLPOOL d4bd1eaa0bac7248b905af23e30a29d53c5e4badafaf271b4bed23c6ecf3bf93371586bbe0eab4c83cf1b96eedc1e3f18e21a788e30d4ce7fdaeae56cac2e393
+EBUILD musca-0.9.24_p20100226-r4.ebuild 1291 SHA256 1b5de98feb00073f305db2f13797cbb0b3d6356ca3232d2f0bce123f7cb55b96 SHA512 8ce1a6797954ed85d34408f002d78a257915b3c6eae4a5c2465135cda8f0ddbf17c6043ae65fb77f2840872e16be051d9c33b5176a2c49fc01299fafbb9bf45a WHIRLPOOL 4747342c0b93df88f734703d71b17c55626ab2eb001f829b88074352b4efdda0a1e3a766653e606688d17e073aa1bbd8f5ee3026e080d953b9deb3ee1e79343d
+MISC ChangeLog 2520 SHA256 df6d2d9e76fdffad93ca6bb6c6f06228106983557c0e8d37818edafce32e24e5 SHA512 eb1467eb47c5daf9f8bd5c206284edd68283c0756b0de55f2123a9d5dc6f4cce714244f3078a21cd11cf082cb7a21c6dc5cac3cd69997bc8fbab559fdbe5287c WHIRLPOOL 2b67f26e1eb8d9a1fba155ceae61979eceb13e773924bcd28da5388af655a13fbdce882985e8717914cda94add393c486a36d5e86d524ba87f15654a3bb95260
+MISC ChangeLog-2015 3990 SHA256 e65b0be323d410dc7180e3621cf6b0765198c72f53589e5fcf856b77a9e21f0a SHA512 dda1a444b67ce5377ea9255cde01a62f8df712f49c76faa03e014ff36ec3100d867a084444e23775c9c8737a979383dff1654e61c83bdc73e490163970e9396e WHIRLPOOL 5385627721ed374c066420c9b3b29704dd807169d3d3a07cd0108a5de33134c73eec4223e4f0888a7165c395c0da78602c970d705d2293e7262ac617b912a7e0
+MISC metadata.xml 486 SHA256 7e45534994d115d0181c18215c5aad73878d08c642b68e7242fa49d8af082d65 SHA512 098a06d7dff066cf54e909923066078fc8347f7402846a66c26bae0e5df4752cd5a44dec6457e977b2060be5f3068e16ad5147e151ea1b4cac23b4e9e20c136a WHIRLPOOL 4e188f1223c9d324a47f23f30ec93256c9d8bbc4ebe83e0c4b74256642cae22afcc699a98355982e058c9853ab016c32b2a72e5c3a4a21a81338ed3c455fab0d
diff --git a/x11-wm/musca/files/musca-0.9.24-make.patch b/x11-wm/musca/files/musca-0.9.24-make.patch
new file mode 100644
index 000000000000..0f28c5653c7b
--- /dev/null
+++ b/x11-wm/musca/files/musca-0.9.24-make.patch
@@ -0,0 +1,23 @@
+--- a/Makefile 2009-11-03 03:20:21.000000000 +0100
++++ b/Makefile 2009-12-27 19:12:02.461539607 +0100
+@@ -1,9 +1,12 @@
+-CFLAGS?=-Wall -g
++CFLAGS ?= -Wall -g
++INCLUDES = $(shell pkg-config --cflags x11)
++LIBS = $(shell pkg-config --libs x11) -lm
++BIN_DIST = musca apis xlisten
+
+-all:
+- $(CC) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lc -lm -lX11 -o musca musca.c
+- $(CC) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lc -lm -lX11 -o apis apis.c
+- $(CC) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lc -lm -lX11 -o xlisten xlisten.c
++all: $(BIN_DIST)
++
++$(BIN_DIST):
++ $(CC) $(CFLAGS) $(INCLUDES) $@.c -o $@ $(LDFLAGS) $(LIBS)
+
+ clean:
+- rm -f musca apis
++ rm -f $(BIN_DIST)
++
++.PHONY: all clean
diff --git a/x11-wm/musca/files/musca-0.9.24_p20100226-dmenu-4.4.patch b/x11-wm/musca/files/musca-0.9.24_p20100226-dmenu-4.4.patch
new file mode 100644
index 000000000000..ce6bc45de73e
--- /dev/null
+++ b/x11-wm/musca/files/musca-0.9.24_p20100226-dmenu-4.4.patch
@@ -0,0 +1,44 @@
+https://bugs.archlinux.org/task/25232
+https://bugs.launchpad.net/musca/+bug/816890
+
+--- a/musca.c
++++ b/musca.c
+@@ -2162,8 +2162,16 @@ void launch(char *cmd)
+ }
+ void menu(char *cmd, char *after)
+ {
++ // we keep original behaviour by sorting
+ char *tmp = allocate(strlen(cmd)+strlen(after)+BLOCK);
+- sprintf(tmp, "%s | %s | %s", cmd, settings[ms_dmenu].s, after);
++ sprintf(tmp, "%s | sort | dmenu %s | %s", cmd, settings[ms_dmenu].s, after);
++ printf("%s\n", tmp);
++ launch(tmp); free(tmp);
++}
++void menufix(char *cmd, char*after)
++{
++ char *tmp = allocate(strlen(cmd)+strlen(after)+BLOCK);
++ sprintf(tmp, "%s %s | %s",cmd, settings[ms_dmenu].s, after);
+ printf("%s\n", tmp);
+ launch(tmp); free(tmp);
+ }
+@@ -2631,7 +2639,7 @@ char* com_command(char *cmd, regmatch_t *subs)
+ }
+ char* com_shell(char *cmd, regmatch_t *subs)
+ {
+- menu("dmenu_path", settings[ms_run_shell_command].s);
++ menufix("dmenu_run", settings[ms_run_shell_command].s);
+ return NULL;
+ }
+ char* com_alias(char *cmd, regmatch_t *subs)
+diff --git a/musca_proto.h b/musca_proto.h
+index dc14d75..e25c1ea 100644
+--- a/musca_proto.h
++++ b/musca_proto.h
+@@ -145,6 +145,7 @@ void head_focus(head *h);
+ void head_next();
+ void launch(char *cmd);
+ void menu(char *cmd, char *after);
++void menufix(char *cmd, char *after);
+ void menu_wrapper(char *cmd, char *after);
+ void shutdown();
+ dcell parse_size(char *cmd, regmatch_t *subs, ucell index, ucell limit);
diff --git a/x11-wm/musca/files/musca-0.9.24_p20100226-fix-cycle.patch b/x11-wm/musca/files/musca-0.9.24_p20100226-fix-cycle.patch
new file mode 100644
index 000000000000..6765ebcdcf7d
--- /dev/null
+++ b/x11-wm/musca/files/musca-0.9.24_p20100226-fix-cycle.patch
@@ -0,0 +1,11 @@
+--- a/musca.c
++++ b/musca.c
+@@ -3202,7 +3202,7 @@ void mapnotify(XEvent *ev)
+ handle_map(ws);
+ head *h = head_by_root(ws->attr.root);
+ if (is_netwmstate(ws->state, NetWMStateFullscreen))
+- stack_push(h->fullscreen, (void*)ws);
++ stack_push(h->fullscreen, (void*)ws->w);
+ else
+ if (ws->attr.override_redirect || is_netwmstate(ws->state, NetWMStateAbove))
+ stack_push(h->above, (void*)ws->w);
diff --git a/x11-wm/musca/files/musca-0.9.24_p20100226-fix-pad.patch b/x11-wm/musca/files/musca-0.9.24_p20100226-fix-pad.patch
new file mode 100644
index 000000000000..23bd9283467a
--- /dev/null
+++ b/x11-wm/musca/files/musca-0.9.24_p20100226-fix-pad.patch
@@ -0,0 +1,21 @@
+--- a/musca.c
++++ b/musca.c
+@@ -1985,7 +1985,8 @@ void group_other()
+ // resize frames to match changes in the screen border padding
+ void group_resize(group *ta, int l, int r, int t, int b)
+ {
+- frame *f = ta->frames; int i;
++ frame *f = ta->frames; int i, j;
++ client *c = ta->clients;
+ int sw = ta->head->screen->width;
+ int sh = ta->head->screen->height;
+ if (l < ta->l) { frames_fill_gap(ta, l, ta->t, ta->l - l, sh - ta->b, FRAMES_ALL); ta->l = l; }
+@@ -1998,6 +1999,8 @@ void group_resize(group *ta, int l, int r, int t, int b)
+ else if (b > ta->b) { frames_make_gap(ta, ta->l, sh - b, sw - ta->l - ta->r, b - ta->b); ta->b = b; }
+ FOR_RING (NEXT, f, ta->frames, i)
+ frame_update(f);
++ FOR_RING (NEXT, c, ta->clients, j)
++ client_configure(c,NULL);
+ }
+ group* group_by_name(head *h, char *name)
+ {
diff --git a/x11-wm/musca/files/musca-0.9.24_p20100226-null.patch b/x11-wm/musca/files/musca-0.9.24_p20100226-null.patch
new file mode 100644
index 000000000000..6efb77ff0b35
--- /dev/null
+++ b/x11-wm/musca/files/musca-0.9.24_p20100226-null.patch
@@ -0,0 +1,151 @@
+https://bugs.launchpad.net/musca/+bug/1236500
+
+
+--- a/musca.c
++++ b/musca.c
+@@ -421,7 +421,7 @@
+ if (s->depth)
+ {
+ int *indexes = allocate(sizeof(int) * s->depth);
+- int count = 0, i; Window *w;
++ int count = 0, i; Window *w = NULL;
+ FOR_STACK (w, s, Window*, i)
+ {
+ note("%d", i);
+@@ -1673,7 +1673,6 @@
+ frame *f = t->frames;
+ frame **group = NULL;
+ int i = 0, x, y, w, h;
+- ubyte changes = 0;
+ if (direction == HORIZONTAL)
+ {
+ if (f->x + f->w >= t->head->screen->width - t->r)
+@@ -1684,7 +1683,6 @@
+ group = frame_siblings(f, LEFT);
+ if (frame_siblings_growable(group, LEFT, size))
+ {
+- changes = 1;
+ x = f->x - size; w = size; y = f->y; h = 0;
+ for (i = 0; group[i]; i++)
+ y = MIN(y, group[i]->y), h += group[i]->h;
+@@ -1702,7 +1700,6 @@
+ group = frame_siblings(f, RIGHT);
+ if (frame_siblings_growable(group, RIGHT, size))
+ {
+- changes = 1;
+ x = f->x + f->w; w = size; y = f->y; h = 0;
+ for (i = 0; group[i]; i++)
+ y = MIN(y, group[i]->y), h += group[i]->h;
+@@ -1725,7 +1722,6 @@
+ group = frame_siblings(f, TOP);
+ if (frame_siblings_growable(group, TOP, size))
+ {
+- changes = 1;
+ y = f->y - size; h = size; x = f->x; w = 0;
+ for (i = 0; group[i]; i++)
+ x = MIN(x, group[i]->x), w += group[i]->w;
+@@ -1743,7 +1739,6 @@
+ group = frame_siblings(f, BOTTOM);
+ if (frame_siblings_growable(group, BOTTOM, size))
+ {
+- changes = 1;
+ y = f->y + f->h; h = size; x = f->x; w = 0;
+ for (i = 0; group[i]; i++)
+ x = MIN(x, group[i]->x), w += group[i]->w;
+@@ -2205,11 +2200,9 @@
+ char* com_frame_split(char *cmd, regmatch_t *subs)
+ {
+ group *g = heads->groups; frame *f = g->frames;
+- int sw = heads->screen->width - g->l - g->r,
+- sh = heads->screen->height - g->t - g->b;
+ char *mode = regsubstr(cmd, subs, 1);
+- ucell fs = f->h, ss = sh; ubyte dir = VERTICAL;
+- if (*mode == 'h') { fs = f->w; ss = sw; dir = HORIZONTAL; }
++ ucell fs = f->h; ubyte dir = VERTICAL;
++ if (*mode == 'h') { fs = f->w; dir = HORIZONTAL; }
+ dcell size = parse_size(cmd, subs, 2, fs);
+ frame_split(dir, size / fs);
+ free(mode);
+@@ -2630,7 +2623,7 @@
+ }
+ char* com_command(char *cmd, regmatch_t *subs)
+ {
+- int i; alias *a; autostr s; str_create(&s);
++ int i; alias *a = NULL; autostr s; str_create(&s);
+ str_print(&s, strlen(command_hints)+NOTE, "%s \n", command_hints);
+ FOR_STACK (a, aliases, alias*, i) str_print(&s, NOTE, "%s \n", a->name);
+ menu_wrapper(s.pad, settings[ms_run_musca_command].s);
+@@ -2747,7 +2740,7 @@
+ char* show_aliases()
+ {
+ autostr s; str_create(&s);
+- alias *a; int i;
++ alias *a = NULL; int i;
+ FOR_STACK (a, aliases, alias*, i)
+ str_print(&s, strlen(a->name)+strlen(a->command)+10, "alias %s %s\n",
+ a->name, a->command);
+@@ -2849,7 +2842,7 @@
+ }
+ char* com_place(char *cmd, regmatch_t *subs)
+ {
+- placement *p; int i;
++ placement *p = NULL; int i;
+ char *class = regsubstr(cmd, subs, 1);
+ ubyte flag = parse_flag(cmd, subs, 2, 0);
+ char *group = regsubstr(cmd, subs, 3);
+@@ -3441,7 +3434,7 @@
+ autostr s; str_create(&s);
+ for (;;)
+ {
+- char c = getchar();
++ int c = getchar();
+ if (c == EOF) break;
+ str_push(&s, c);
+ }
+@@ -3530,7 +3523,7 @@
+ }
+ void grab_stuff()
+ {
+- int i, j, k; head *h; binding *b; ucell *m;
++ int i, j, k; head *h; binding *b; ucell *m = NULL;
+ refresh_bindings();
+ ungrab_stuff();
+ ucell modifiers[] = { 0, LockMask, NumlockMask, LockMask|NumlockMask };
+@@ -3550,7 +3543,7 @@
+ {
+ int i;
+ command_hash = hash_create();
+- command *c; autostr str; str_create(&str);
++ command *c = NULL; autostr str; str_create(&str);
+ FOR_ARRAY (c, commands, command, i)
+ {
+ char *keys = c->keys;
+@@ -3566,7 +3559,7 @@
+ strtrim(command_hints);
+ // compile setting regex
+ setting_hash = hash_create();
+- setting *s;
++ setting *s = NULL;
+ FOR_ARRAY (s, settings, setting, i)
+ hash_set(setting_hash, s->name, s);
+ // compile modmask regex
+@@ -3597,7 +3590,7 @@
+ }
+ void setup_bindings()
+ {
+- int i; keymap *k;
++ int i; keymap *k = NULL;
+ // prepare key bindings
+ bindings = stack_create();
+ FOR_ARRAY (k, keymaps, keymap, i)
+--- a/tools.c
++++ b/tools.c
+@@ -227,7 +227,7 @@
+ ucell ptr = 0;
+ for (;;)
+ {
+- byte c = fgetc(src);
++ int c = fgetc(src);
+ if (c == EOF)
+ break;
+
diff --git a/x11-wm/musca/files/musca.xsession b/x11-wm/musca/files/musca.xsession
new file mode 100644
index 000000000000..41e90a7ceb3e
--- /dev/null
+++ b/x11-wm/musca/files/musca.xsession
@@ -0,0 +1,2 @@
+#!/bin/sh
+musca
diff --git a/x11-wm/musca/metadata.xml b/x11-wm/musca/metadata.xml
new file mode 100644
index 000000000000..4b518dbe6410
--- /dev/null
+++ b/x11-wm/musca/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+ <use>
+ <flag name="apis">Optionally install the experimental `apis' window manager</flag>
+ <flag name="xlisten">Optionally install the xlisten utility</flag>
+ </use>
+ <upstream>
+ <remote-id type="launchpad">musca</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/x11-wm/musca/musca-0.9.24_p20100226-r3.ebuild b/x11-wm/musca/musca-0.9.24_p20100226-r3.ebuild
new file mode 100644
index 000000000000..df917b3ed563
--- /dev/null
+++ b/x11-wm/musca/musca-0.9.24_p20100226-r3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils savedconfig toolchain-funcs
+
+DESCRIPTION="A simple dynamic window manager, with features nicked from ratpoison and dwm"
+HOMEPAGE="https://launchpad.net/musca"
+SRC_URI="mirror://gentoo/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="apis xlisten"
+
+COMMON="x11-libs/libX11"
+DEPEND="${COMMON}
+ sys-apps/sed"
+RDEPEND="
+ ${COMMON}
+ >=x11-misc/dmenu-4.4
+ apis? ( x11-misc/xbindkeys )
+"
+
+src_prepare() {
+ restore_config config.h
+
+ sed -i config.h \
+ -e 's:"sort | dmenu -i -b":"-i -b":g' \
+ -e 's:sed.*exec.*-i::g' \
+ || die
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.24-make.patch \
+ "${FILESDIR}"/${PN}-0.9.24_p20100226-dmenu-4.4.patch \
+ "${FILESDIR}"/${PN}-0.9.24_p20100226-null.patch
+
+ local i
+ for i in apis xlisten; do
+ if ! use ${i}; then
+ sed -e "s|${i}||g" -i Makefile || die
+ fi
+ done
+
+ tc-export CC
+}
+
+src_install() {
+ dobin musca
+
+ local i
+ for i in xlisten apis; do
+ if use ${i}; then
+ dobin ${i}
+ fi
+ done
+ doman musca.1
+
+ exeinto /etc/X11/Sessions
+ newexe "${FILESDIR}"/${PN}.xsession musca
+
+ save_config config.h
+}
diff --git a/x11-wm/musca/musca-0.9.24_p20100226-r4.ebuild b/x11-wm/musca/musca-0.9.24_p20100226-r4.ebuild
new file mode 100644
index 000000000000..129899ded8d0
--- /dev/null
+++ b/x11-wm/musca/musca-0.9.24_p20100226-r4.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils savedconfig toolchain-funcs
+
+DESCRIPTION="A simple dynamic window manager, with features nicked from ratpoison and dwm"
+HOMEPAGE="https://launchpad.net/musca"
+SRC_URI="mirror://gentoo/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="apis xlisten"
+
+COMMON="x11-libs/libX11"
+DEPEND="${COMMON}
+ sys-apps/sed"
+RDEPEND="
+ ${COMMON}
+ >=x11-misc/dmenu-4.4
+ apis? ( x11-misc/xbindkeys )
+"
+
+src_prepare() {
+ restore_config config.h
+
+ sed -i config.h \
+ -e 's:"sort | dmenu -i -b":"-i -b":g' \
+ -e 's:sed.*exec.*-i::g' \
+ || die
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.24-make.patch \
+ "${FILESDIR}"/${PN}-0.9.24_p20100226-dmenu-4.4.patch \
+ "${FILESDIR}"/${PN}-0.9.24_p20100226-null.patch \
+ "${FILESDIR}"/${PN}-0.9.24_p20100226-fix-cycle.patch \
+ "${FILESDIR}"/${PN}-0.9.24_p20100226-fix-pad.patch
+
+ local i
+ for i in apis xlisten; do
+ if ! use ${i}; then
+ sed -e "s|${i}||g" -i Makefile || die
+ fi
+ done
+
+ tc-export CC
+}
+
+src_install() {
+ dobin musca
+
+ local i
+ for i in xlisten apis; do
+ if use ${i}; then
+ dobin ${i}
+ fi
+ done
+ doman musca.1
+
+ exeinto /etc/X11/Sessions
+ newexe "${FILESDIR}"/${PN}.xsession musca
+
+ save_config config.h
+}