monsterwm won't compile (something with cflags)

It usually does assuming tools like devel/autoconf etc are used properly and the source code is of such nature that it doesn't make assumptions about the system. Source code that depends on the internals of the operating system is very rarely portable to other systems though.
 
Try compiling with default settings, and see if it works. Then try adding more and more of your own settings to get to the root of the problem. Also, make sure your ports tree is up to date.

Usually, you shouldn't play with CFLAGS too much, since they're pretty well configured for each port. Any changes you make there will work for some packages but not for all in general, so you'd have to switch back and in some cases and recompile them again along with all dependencies, which makes it annoying in time.

There is also actually a pretty good reason, why you should keep stuff in /usr/local/ ... the thing is that /usr/ holds some parts of the base system. When you're upgrading your FreeBSD "world" and issue # make installworld, it may do some funny things to your installed packages there, but keeping things separate ensures your packages and their config files (yup ... /usr/local/etc/) remain intact throughout the whole procedure. Which is awesome (obviously!) :D
 
I realize this is over a year old, but for people who search for monsterwm FreeBSD this seems to be the first hit, so I'll add my own details.

In the Makefile, I changed paths to go to /usr/local/. The Makefile had the man directory in /usr/local/share/man, I changed that to /usr/local/man. (Are we supposed to put file tags on Linux files? )

I then changed
Code:
X11INC = -I/usr/X11R6/include
X11LIB = -L/usr/X11R6/lib -lX11
INCS = -I. -I/usr/include ${X11INC}
LIBS = -L/usr/lib -lc ${X11LIB}
to reference /usr/local
so that it read

Code:
X11INC = -I/usr/local/include
X11LIB = -L/usr/local/lib -lX11
INCS = -I. -I/usr/local/include ${X11INC}
LIBS = -L/usr/local/lib -lc ${X11LIB}

I then ran gmake and gmake install and all was good.

The advantage it has, at least for me, over x11-wm/dwm is that it has the moveresize commands built in. On FreeBSD, I haven't yet been able to get the moveresize patch to work. I'm not a coder, so while I suspect it's an easy fix, it's beyond my limited abilities.
 
Back
Top