Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Mar 2019 12:45:58 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r494595 - in head: . x11-wm x11-wm/musca x11-wm/musca/files
Message-ID:  <201903041245.x24CjwLM081140@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Mon Mar  4 12:45:57 2019
New Revision: 494595
URL: https://svnweb.freebsd.org/changeset/ports/494595

Log:
  - Resuccrect `x11-wm/musca' and provide new distfile home
  - Reword COMMENT and port description, update WWW: line
  - Adopt several patches from Gentoo Linux, including the
    Makefile (now requires USES+=pkgconfig)
  - Define LICENSE (GPLv3), unmute the installation command
  
  References:
    https://bugs.archlinux.org/task/25232
    https://bugs.launchpad.net/musca/+bug/816890
    https://bugs.launchpad.net/musca/+bug/1236500

Added:
  head/x11-wm/musca/
     - copied from r418056, head/x11-wm/musca/
  head/x11-wm/musca/files/
  head/x11-wm/musca/files/patch-Makefile   (contents, props changed)
  head/x11-wm/musca/files/patch-musca.c   (contents, props changed)
  head/x11-wm/musca/files/patch-musca__proto.h   (contents, props changed)
  head/x11-wm/musca/files/patch-tools.c   (contents, props changed)
Modified:
  head/MOVED
  head/x11-wm/Makefile
  head/x11-wm/musca/Makefile
  head/x11-wm/musca/pkg-descr

Modified: head/MOVED
==============================================================================
--- head/MOVED	Mon Mar  4 12:22:42 2019	(r494594)
+++ head/MOVED	Mon Mar  4 12:45:57 2019	(r494595)
@@ -8465,7 +8465,6 @@ audio/mangler||2016-07-04|Has expired: Broken for more
 audio/hawkvoice||2016-07-04|Has expired: Broken for more than 6 months
 x11-wm/e-module-mpdule||2016-07-04|Has expired: Broken for more than 6 months
 x11-wm/e-module-tclock||2016-07-04|Has expired: Broken for more than 6 months
-x11-wm/musca||2016-07-04|Has expired: Broken for more than 6 months
 x11-wm/e-module-places||2016-07-04|Has expired: Broken for more than 6 months
 x11-wm/e-module-forecasts||2016-07-04|Has expired: Broken for more than 6 months
 x11-wm/e-module-net||2016-07-04|Has expired: Broken for more than 6 months

Modified: head/x11-wm/Makefile
==============================================================================
--- head/x11-wm/Makefile	Mon Mar  4 12:22:42 2019	(r494594)
+++ head/x11-wm/Makefile	Mon Mar  4 12:45:57 2019	(r494595)
@@ -83,6 +83,7 @@
     SUBDIR += mcwm
     SUBDIR += metacity
     SUBDIR += muffin
+    SUBDIR += musca
     SUBDIR += mutter
     SUBDIR += nickleby
     SUBDIR += obapps

Modified: head/x11-wm/musca/Makefile
==============================================================================
--- head/x11-wm/musca/Makefile	Mon Jul  4 20:44:22 2016	(r418056)
+++ head/x11-wm/musca/Makefile	Mon Mar  4 12:45:57 2019	(r494595)
@@ -4,22 +4,17 @@
 PORTNAME=	musca
 PORTVERSION=	0.9.24
 CATEGORIES=	x11-wm
-MASTER_SITES=	http://aerosuidae.net/ \
-		http://mirror.mcx2.org/
-EXTRACT_SUFX=	.tgz
+MASTER_SITES=	http://freebsd.nsu.ru/distfiles/ # NETBSD (pkgsrc)
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	Simple window manager for X, with features from ratpoison and dwm
+COMMENT=	Simple dynamic window manager with tiling and stacking modes
 
-BROKEN=		unfetchable
-DEPRECATED=	Broken for more than 6 months
-EXPIRATION_DATE=	2016-07-04
+LICENSE=	GPLv3
 
 RUN_DEPENDS=	dmenu:x11/dmenu
 
+USES=		pkgconfig tar:tgz
 USE_XORG=	x11
-MAKE_ARGS=	CFLAGS="-I${LOCALBASE}/include \
-		-L${LOCALBASE}/lib"
 
 PLIST_FILES=	bin/musca \
 		man/man1/musca.1.gz
@@ -35,7 +30,7 @@ post-extract:
 .endif
 
 do-install:
-	@${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
+	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
 	${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1
 
 .include <bsd.port.mk>

Added: head/x11-wm/musca/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/musca/files/patch-Makefile	Mon Mar  4 12:45:57 2019	(r494595)
@@ -0,0 +1,22 @@
+--- Makefile.orig	2009-11-03 02:20:21 UTC
++++ Makefile
+@@ -1,9 +1,13 @@
+-CFLAGS?=-Wall -g
++CFLAGS ?= -Wall -g
++INCLUDES != pkg-config --cflags x11
++LIBS != pkg-config --libs x11
++LIBS += -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)

Added: head/x11-wm/musca/files/patch-musca.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/musca/files/patch-musca.c	Mon Mar  4 12:45:57 2019	(r494595)
@@ -0,0 +1,137 @@
+--- musca.c.orig	2019-03-04 12:29:07 UTC
++++ musca.c
+@@ -421,7 +421,7 @@ int sanity_stack(stack *s, Window *tree, ucell num)
+ 	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 @@ ubyte frame_grow(ubyte direction, ubyte adapt, ucell s
+ 	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 @@ ubyte frame_grow(ubyte direction, ubyte adapt, ucell s
+ 				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 @@ ubyte frame_grow(ubyte direction, ubyte adapt, ucell s
+ 			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 @@ ubyte frame_grow(ubyte direction, ubyte adapt, ucell s
+ 				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 @@ ubyte frame_grow(ubyte direction, ubyte adapt, ucell s
+ 			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;
+@@ -2208,11 +2203,9 @@ dcell parse_size(char *cmd, regmatch_t *subs, ucell in
+ 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);
+@@ -2633,7 +2626,7 @@ char* com_switch(char *cmd, regmatch_t *subs)
+ }
+ 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);
+@@ -2750,7 +2743,7 @@ char* show_windows()
+ 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);
+@@ -2852,7 +2845,7 @@ char* com_client(char *cmd, regmatch_t *subs)
+ }
+ 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);
+@@ -3444,7 +3437,7 @@ ubyte insert_command(char* cmd)
+ 		autostr s; str_create(&s);
+ 		for (;;)
+ 		{
+-			char c = getchar();
++			int c = getchar();
+ 			if (c == EOF) break;
+ 			str_push(&s, c);
+ 		}
+@@ -3533,7 +3526,7 @@ void ungrab_stuff()
+ }
+ 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 };
+@@ -3553,7 +3546,7 @@ void setup_regex()
+ {
+ 	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;
+@@ -3569,7 +3562,7 @@ void setup_regex()
+ 	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
+@@ -3600,7 +3593,7 @@ void setup_numlock()
+ }
+ void setup_bindings()
+ {
+-	int i; keymap *k;
++	int i; keymap *k = NULL;
+ 	// prepare key bindings
+ 	bindings = stack_create();
+ 	FOR_ARRAY (k, keymaps, keymap, i)

Added: head/x11-wm/musca/files/patch-musca__proto.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/musca/files/patch-musca__proto.h	Mon Mar  4 12:45:57 2019	(r494595)
@@ -0,0 +1,10 @@
+--- musca_proto.h.orig	2009-11-03 02:20:21 UTC
++++ 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);

Added: head/x11-wm/musca/files/patch-tools.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/musca/files/patch-tools.c	Mon Mar  4 12:45:57 2019	(r494595)
@@ -0,0 +1,11 @@
+--- tools.c.orig	2009-11-03 02:20:21 UTC
++++ tools.c
+@@ -227,7 +227,7 @@ ucell suck(FILE *src, byte *pad, ucell len, byte stop)
+ 	ucell ptr = 0;
+ 	for (;;)
+ 	{
+-		byte c = fgetc(src);
++		int c = fgetc(src);
+ 		if (c == EOF)
+ 			break;
+ 

Modified: head/x11-wm/musca/pkg-descr
==============================================================================
--- head/x11-wm/musca/pkg-descr	Mon Jul  4 20:44:22 2016	(r418056)
+++ head/x11-wm/musca/pkg-descr	Mon Mar  4 12:45:57 2019	(r494595)
@@ -1,6 +1,11 @@
-A simple dynamic window manager for X, with features nicked from
-ratpoison and dwm. Musca's code is actually written from scratch,
-but a lot of useful stuff was gleaned from reading the source code
-of those two excellent projects.
+Musca is a simple window manager for X11 allowing both tiling and stacking
+modes.  It's similar to ratpoison but more friendly to the mouse and using
+a simpler keyboard navigation.  There are no built in status bars, panels,
+or window decorations save for thin window borders to indicate focus.
 
-WWW: http://aerosuidae.net/musca.html
+Window navigation can be mouse click to focus or entirely keyboard driven.
+Window tiling is manual but simple, and there are no restrictions on how
+you divide up the screen.  It uses dwm's dmenu utility for launching apps
+and running various built in commands not mapped to hot keys.
+
+WWW: https://launchpad.net/musca



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903041245.x24CjwLM081140>