[PATCH] make multimedia/mplayer work with -DWITHOUT_X11

Jeremie Le Hen jeremie at le-hen.org
Thu Oct 12 05:49:46 PDT 2006

>Submitter-Id:	current-users
>Originator:	Charlie &
>Confidential:	no 
>Synopsis:	[PATCH] make multimedia/mplayer work with -DWITHOUT_X11
>Severity:	non-critical
>Priority:	medium
>Category:	ports
>Class:		update
>Release:	FreeBSD 6.1-STABLE i386
System: FreeBSD obiwan 6.1-STABLE
	multimedia/mplayer port breaks when compiled with -DWITHOUT_X11.
	It breaks with:
	% font_load_ft.c:30:35: fontconfig/fontconfig.h: No such file or directory
	and number of error messages that undoubtfully result from the former.

	The problem is that mplayer is still compiled with fontconfig support,
	which stands in ${X11BASE}, but gcc is not instructed to look in
	${X11BASE}/include in the WITHOUT_X11 case.
	Just try to build multimedia/mplayer with -DWITHOUT_X11.
	I tried multiple ways to fix this.  Appending ":${X11BASE}/include"
	to the "--with-extraincdir" directive in CONFIGURE_ARGS doesn't
	anything to the problem (though I don't understand why).
	Nonetheless, adding CFLAGS+=-I${X11BASE}/include in the
	WITHOUT_X11 case works.

	However I am not sure why fontconfig is required when building
	without X11 support ; IMO this is harmless to disable fontconfig
	in this case, and that's what my patch does.

	If there are good reasons to keep compiling with fontconfig
	support, then I suggest either moving fontconfig to ${LOCALBASE}
	although it would conflict with its category (x11-fonts), or
	use the CFLAGS trick described above.

	At any rate, here is patch that disable fontconfig in the
	WITHOUT_X11 case:

Index: Makefile
RCS file: /home/ncvs/ports/multimedia/mplayer/Makefile,v
retrieving revision 1.144
diff -u -r1.144 Makefile
--- Makefile	6 Oct 2006 19:48:00 -0000	1.144
+++ Makefile	12 Oct 2006 12:47:46 -0000
@@ -242,7 +242,8 @@
+CONFIGURE_ARGS+=--disable-x11 \
+		--disable-fontconfig
 .if defined(WITH_LANG)

More information about the freebsd-ports mailing list