Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jan 2005 18:49:47 +0100
From:      Jeremie Le Hen <jeremie@le-hen.org>
To:        Oliver Lehmann <lehmann@ans-netz.de>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: WITHOUT_X11 knob for mplayer
Message-ID:  <20050118174947.GX36629@obiwan.tataz.chchile.org>
In-Reply-To: <20050118171958.0f3e4a65.lehmann@ans-netz.de>
References:  <20050118085557.GP36629@obiwan.tataz.chchile.org> <20050118171958.0f3e4a65.lehmann@ans-netz.de>

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

--imjhCm/Pyz7Rq5F2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

> I didn't tried it, but consider this case:
> 
> I have the whole X stuff installed on my system, but still want to compile
> mplayer without X. Will it use my installed X libraries then, or will it
> compile w/o linking against any X11 libraries? What I'm missing is sth.
> like
> 
> CONFIGURE_ARGS+=	--disable-all-the-x11-stuff---really
> 
> It it won't use my X11 libs by defining WITHOUT_X11 even if I have them
> installed everything is fine...

For the moment, mplayer will indeed link against Xlib if the latter is
present even if the WITHOUT_X11 switch is used.

I had already looked mplayer's `./configure --help' output when I first
wrote this patch, but I had never seen such a knob.  After receiving your
e-mail, I opened the ./configure file and read it a bit, and there is
simply a "--disable-x11" which should be used here.  Thus mplayer won't
be linked against Xlib even it's present, as you proposed.

The updated patch is attached.  I'm going to add a small version to my
patch in order to help Thomas E. Zander in choosing which patch to
integrate.  Let's say this is patch #2.

Sorry for the patch flood.

Thanks.
Regards,

http://jeremie.le-hen.org/~tataz/patches/FreeBSD/mplayer.WITHOUT_X11.v2.patch
-- 
Jeremie Le Hen
jeremie@le-hen.org

--imjhCm/Pyz7Rq5F2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mplayer.WITHOUT_X11.v2.patch"

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/multimedia/mplayer/Makefile,v
retrieving revision 1.110
diff -u -r1.110 Makefile
--- Makefile	13 Jan 2005 19:04:06 -0000	1.110
+++ Makefile	18 Jan 2005 17:30:09 -0000
@@ -38,6 +38,11 @@
 # the default is to build mplayer with mencoder. If you're sure that you
 # don't want to encode or recode any media file, then define this.
 #
+# WITHOUT_X11
+# default: undefined
+# the default is to build mplayer with X11 support.  If you don't want to
+# install any X11 environnement, this one is for you.
+#
 # WITH_GTK1|WITH_GTK2
 # default: autodetect GTK1
 # if you want mplayer to have gui abilities, you can use this knob to define
@@ -269,15 +274,12 @@
 USE_BZIP2=	yes
 USE_GMAKE=	yes
 USE_ICONV=	yes
-USE_XLIB=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
 		PTHREAD_LIBS=${PTHREAD_LIBS} \
 		TMPDIR="${WRKSRC}"
 CONFIGURE_ARGS=	--with-extralibdir=${LOCALBASE}/lib \
 		--with-extraincdir=${LOCALBASE}/include \
-		--with-x11libdir=${X11BASE}/lib \
-		--with-x11incdir=${X11BASE}/include \
 		--enable-png \
 		--enable-menu \
 		--disable-libfame \
@@ -285,6 +287,17 @@
 		--disable-tv-v4l \
 		--disable-tremor
 
+.if defined(WITHOUT_X11)
+WITHOUT_GUI=	yes
+BUILD_DEPENDS+=	imake:${X_IMAKE_PORT}
+CONFIGURE_ARGS+=--disable-x11
+.else
+USE_XLIB=	yes
+CONFIGURE_ARGS+=--with-x11libdir=${X11BASE}/lib \
+		--with-x11incdir=${X11BASE}/include
+.endif
+
+
 .if defined(WITH_LANG)
 CONFIGURE_ARGS+=--language=${WITH_LANG}
 .endif

--imjhCm/Pyz7Rq5F2--



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