Subject: How to cross compile modular Xorg on NetBSD
To: None <>
From: Joerg Sonnenberger <>
List: tech-pkg
Date: 08/18/2007 02:44:44
Hi all,
let's pretend for a moment that you want to build modular Xorg packages
for a different platform on your shiny NetBSD system. What do you need?

(a) You have to have modular Xorg and the build tools used by it
installed in /usr/pkg (or whatever prefix you want to use for the
cross-compiled packages).

(b) You have run release for the desired platform. Remember
where you wrote the tools to and where the destdir is.

(c) You have to add the following options to your mk.conf:
DEPENDS_TARGET =	package-install

X11_TYPE = 		modular

CROSS_DESTDIR	 =	/where/ever/above/destdir/is
TOOLDIR =		/where/ever/above/tools/are

The first two activate DESTDIR support, which is required for the
cross-compile infrastructure. The third option tells it to use modular
Xorg. oThe other three options specify the correct path names and
activate cross compiling.

(c) Just run make package e.g. in meta-pkgs/modular-xorg-apps now.

That should be all that is needed. At the moment only NetBSD-current is
supported as target platform, for netbsd-4 a pullup is pending to add a
small change for the tools build.