Subject: Re: mrtg without x11
To: netbsd-users@NetBSD.org <netbsd-users@NetBSD.org>
From: Christian Biere <christianbiere@gmx.de>
List: netbsd-users
Date: 01/26/2004 01:06:20
--Qbvjkv9qwOGw/5Fx
Content-Type: multipart/mixed; boundary="4bRzO86E/ozDv8r1"
Content-Disposition: inline


--4bRzO86E/ozDv8r1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Antoine Jacoutot wrote:
> Is there a way to build net/mrtg without X11 ?
> I've been trying to use different options (like USE_X11=3DNO) but none of=
 them
> worked :(

You also have to build graphics/gd without X11. I've patches which allow
to build graphics/gd and net/mrtg without X11. I've already set USE_X11=3DN=
O.
You have to delete patches/patch-aa from net/mtrg, too. Anyhow, something
includes x11-links. ATM, I can't see where to turn that off. The builds
however don't use anything from /usr/X11R6 if you use USE_X11=3DNO.
I can't guarantee, of course, that the compiled mrtg really works but
it compiles fine, there are no missing symbols and nothing is linked
against anything from /usr/X11R6.

--=20
Christian

--4bRzO86E/ozDv8r1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="gd.udif"
Content-Transfer-Encoding: quoted-printable

? make.log
Index: Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/graphics/gd/Makefile,v
retrieving revision 1.47
diff -u -r1.47 Makefile
--- Makefile	2004/01/09 14:25:51	1.47
+++ Makefile	2004/01/25 23:57:51
@@ -13,17 +13,22 @@
=20
 USE_BUILDLINK3=3D		YES
 USE_LIBTOOL=3D		YES
-USE_X11=3D		YES
+USE_X11=3D		NO
 GNU_CONFIGURE=3D		YES
 REPLACE_PERL=3D		bdftogd
 LIBTOOL_OVERRIDE=3D	${WRKSRC}/libtool
 LIBS+=3D			-lpthread
=20
 .include "../../devel/zlib/buildlink3.mk"
-.include "../../graphics/freetype2/buildlink3.mk"
 .include "../../graphics/jpeg/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
+
+.if !empty(USE_X11:M[Yy][Ee][Ss])
+.include "../../graphics/freetype2/buildlink3.mk"
 .include "../../graphics/xpm/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=3D	--without-freetype --without-x --without-xpm
+.endif
=20
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: buildlink2.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/graphics/gd/buildlink2.mk,v
retrieving revision 1.3
diff -u -r1.3 buildlink2.mk
--- buildlink2.mk	2003/06/23 09:53:10	1.3
+++ buildlink2.mk	2004/01/25 23:57:51
@@ -13,10 +13,13 @@
 BUILDLINK_FILES.gd+=3D	lib/libgd.*
=20
 .include "../../devel/zlib/buildlink2.mk"
-.include "../../graphics/freetype2/buildlink2.mk"
 .include "../../graphics/jpeg/buildlink2.mk"
 .include "../../graphics/png/buildlink2.mk"
+
+.if !empty(USE_X11:M[Yy][Ee][Ss])
+.include "../../graphics/freetype2/buildlink2.mk"
 .include "../../graphics/xpm/buildlink2.mk"
+.endif
=20
 BUILDLINK_TARGETS+=3D	gd-buildlink
=20
Index: buildlink3.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/graphics/gd/buildlink3.mk,v
retrieving revision 1.3
diff -u -r1.3 buildlink3.mk
--- buildlink3.mk	2004/01/05 11:05:45	1.3
+++ buildlink3.mk	2004/01/25 23:57:51
@@ -13,10 +13,12 @@
 BUILDLINK_PKGSRCDIR.gd?=3D	../../graphics/gd
=20
 .  include "../../devel/zlib/buildlink3.mk"
-.  include "../../graphics/freetype2/buildlink3.mk"
 .  include "../../graphics/jpeg/buildlink3.mk"
 .  include "../../graphics/png/buildlink3.mk"
-.  include "../../graphics/xpm/buildlink3.mk"
+.  if !empty(USE_X11:M[Yy][Ee][Ss])
+.    include "../../graphics/freetype2/buildlink3.mk"
+.    include "../../graphics/xpm/buildlink3.mk"
+.  endif  # USE_X11
 .endif	# GD_BUILDLINK3_MK
=20
 BUILDLINK_DEPTH:=3D	${BUILDLINK_DEPTH:S/+$//}

--4bRzO86E/ozDv8r1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mrtg.udif"
Content-Transfer-Encoding: quoted-printable

? make.log
Index: Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/net/mrtg/Makefile,v
retrieving revision 1.46
diff -u -r1.46 Makefile
--- Makefile	2003/12/17 14:22:48	1.46
+++ Makefile	2004/01/25 23:57:04
@@ -30,7 +30,7 @@
 USE_BUILDLINK2=3D	YES
 USE_PERL5=3D	YES
 PERL5_REQD=3D	5.6.1
-USE_X11=3D	YES
+USE_X11=3D	NO
 GNU_CONFIGURE=3D	YES
 BUILD_DEFS+=3D	USE_INET6
=20
@@ -87,7 +87,9 @@
 	  ${INSTALL_SCRIPT} ${WRKSRC}/bin/$$FILE ${PREFIX}/bin/mrtg$$FILE; \
 	done
=20
+.if !empty(USE_X11:M[Yy][Ee][Ss])
 .include "../../graphics/freetype-lib/buildlink2.mk"
+.endif
 .include "../../graphics/gd/buildlink2.mk"
 .include "../../net/p5-INET6/buildlink2.mk"
 .include "../../mk/bsd.pkg.mk"

--4bRzO86E/ozDv8r1--

--Qbvjkv9qwOGw/5Fx
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD8DBQFAFFn80KQix3oyIMcRAoidAKDOtXSpLJzr4G60iJUJSfGKjmceeQCguK9I
//Tzam9CmkQ4pVKgOuVWMg4=
=Cram
-----END PGP SIGNATURE-----

--Qbvjkv9qwOGw/5Fx--