61 lines
2.2 KiB
XML
61 lines
2.2 KiB
XML
<!-- $NetBSD: porting.xml,v 1.5 2014/05/09 06:52:15 obache Exp $ -->
|
|
|
|
<chapter id="porting"> <?dbhtml filename="porting.html"?>
|
|
<title>Porting pkgsrc</title>
|
|
|
|
<para>The pkgsrc system has already been ported to many
|
|
operating systems, hardware architectures and compilers. This
|
|
chapter explains the necessary steps to make pkgsrc even more
|
|
portable.</para>
|
|
|
|
<sect1 id="porting.opsys">
|
|
<title>Porting pkgsrc to a new operating system</title>
|
|
|
|
<para>To port pkgsrc to a new operating system (called
|
|
<literal>MyOS</literal> in this example), you need to touch the
|
|
following files:</para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry><term><filename>pkgtools/bootstrap-mk-files/files/mods/<replaceable>MyOS</replaceable>.sys.mk</filename></term>
|
|
<listitem><para>This file contains some basic definitions, for
|
|
example the name of the C
|
|
compiler.</para></listitem></varlistentry>
|
|
|
|
<varlistentry><term><filename>mk/bsd.prefs.mk</filename></term>
|
|
<listitem><para>Insert code that defines the variables
|
|
<varname>OPSYS</varname>, <varname>OS_VERSION</varname>,
|
|
<varname>LOWER_OS_VERSION</varname>,
|
|
<varname>LOWER_VENDOR</varname>,
|
|
<varname>MACHINE_ARCH</varname>, <varname>OBJECT_FMT</varname>,
|
|
<varname>APPEND_ELF</varname>, and the other variables that
|
|
appear in this file.</para></listitem></varlistentry>
|
|
|
|
<varlistentry><term><filename>mk/platform/<replaceable>MyOS</replaceable>.mk</filename></term>
|
|
<listitem><para>This file contains the platform-specific
|
|
definitions that are used by pkgsrc. Start by copying one of the
|
|
other files and edit it to your
|
|
needs.</para></listitem></varlistentry>
|
|
|
|
<varlistentry><term><filename>mk/tools/tools.<replaceable>MyOS</replaceable>.mk</filename></term>
|
|
<listitem><para>This file defines the paths to all the tools
|
|
that are needed by one or the other package in pkgsrc, as well
|
|
as by pkgsrc itself. Find out where these tools are on your
|
|
platform and add them.</para></listitem></varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
<para>Now, you should be able to build some basic packages, like
|
|
<filename role="pkg">lang/perl5</filename>, <filename
|
|
role="pkg">shells/bash</filename>.</para>
|
|
|
|
</sect1>
|
|
|
|
<sect1 id="porting.compiler">
|
|
<title>Adding support for a new compiler</title>
|
|
|
|
<para>TODO</para>
|
|
|
|
</sect1>
|
|
|
|
</chapter>
|