Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Oct 2006 14:50:40 +0200 (CEST)
From:      Jeremie Le Hen <jeremie@le-hen.org>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        riggs@rrr.de, jeremie@le-hen.org, flz@FreeBSD.org, freebsd-ports@FreeBSD.org
Subject:   [PATCH] make multimedia/mplayer work with -DWITHOUT_X11
Message-ID:  <20061012125040.DA7E6405D@obiwan.tataz.chchile.org>

next in thread | raw e-mail | index | archive | help

>Submitter-Id:	current-users
>Originator:	Charlie &
>Organization:	
>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
>Environment:
System: FreeBSD obiwan 6.1-STABLE
>Description:
	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.
>How-To-Repeat:
	Just try to build multimedia/mplayer with -DWITHOUT_X11.
>Fix:
	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 @@
 		--with-x11incdir=${X11BASE}/include
 .else
 WITHOUT_GUI=	yes
-CONFIGURE_ARGS+=--disable-x11
+CONFIGURE_ARGS+=--disable-x11 \
+		--disable-fontconfig
 .endif
 
 .if defined(WITH_LANG)




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