Annotation of htdocs/docs/pkgsrc/porting.html, revision 1.1

1.1     ! dsieger     1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
        !             2: <html>
        !             3: <head>
        !             4: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        !             5: <title>Chapter 25. Porting pkgsrc</title>
        !             6: <link rel="stylesheet" href="/NetBSD.css" type="text/css">
        !             7: <meta name="generator" content="DocBook XSL Stylesheets VX.X.X">
        !             8: <link rel="start" href="index.html" title="The pkgsrc guide">
        !             9: <link rel="up" href="infrastructure.html" title="Part III. The pkgsrc infrastructure internals">
        !            10: <link rel="prev" href="regression.html" title="Chapter 24. Regression tests">
        !            11: <link rel="next" href="examples.html" title="Appendix A. A simple example package: bison">
        !            12: </head>
        !            13: <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
        !            14: <div class="navheader">
        !            15: <table width="100%" summary="Navigation header">
        !            16: <tr><th colspan="3" align="center">Chapter 25. Porting pkgsrc</th></tr>
        !            17: <tr>
        !            18: <td width="20%" align="left">
        !            19: <a accesskey="p" href="regression.html">Prev</a> </td>
        !            20: <th width="60%" align="center">Part III. The pkgsrc infrastructure internals</th>
        !            21: <td width="20%" align="right"> <a accesskey="n" href="examples.html">Next</a>
        !            22: </td>
        !            23: </tr>
        !            24: </table>
        !            25: <hr>
        !            26: </div>
        !            27: <div class="chapter" lang="en">
        !            28: <div class="titlepage"><div><div><h2 class="title">
        !            29: <a name="porting"></a>Chapter 25. Porting pkgsrc</h2></div></div></div>
        !            30: <div class="toc">
        !            31: <p><b>Table of Contents</b></p>
        !            32: <dl>
        !            33: <dt><span class="sect1"><a href="porting.html#porting.opsys">25.1. Porting pkgsrc to a new operating system</a></span></dt>
        !            34: <dt><span class="sect1"><a href="porting.html#porting.compiler">25.2. Adding support for a new compiler</a></span></dt>
        !            35: </dl>
        !            36: </div>
        !            37: <p>The pkgsrc system has already been ported to many
        !            38:        operating systems, hardware architectures and compilers. This
        !            39:        chapter explains the necessary steps to make pkgsrc even more
        !            40:        portable.</p>
        !            41: <div class="sect1" lang="en">
        !            42: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
        !            43: <a name="porting.opsys"></a>25.1. Porting pkgsrc to a new operating system</h2></div></div></div>
        !            44: <p>To port pkgsrc to a new operating system (called
        !            45:        <code class="literal">MyOS</code> in this example), you need to touch the
        !            46:        following files:</p>
        !            47: <div class="variablelist"><dl>
        !            48: <dt><span class="term"><code class="filename">pkgtools/bootstrap-mk-files/files/mods/<em class="replaceable"><code>MyOS</code></em>.sys.mk</code></span></dt>
        !            49: <dd><p>This file contains some basic definitions, for
        !            50:        example the name of the C
        !            51:        compiler.</p></dd>
        !            52: <dt><span class="term"><code class="filename">mk/bsd.prefs.mk</code></span></dt>
        !            53: <dd><p>Insert code that defines the variables
        !            54:        <code class="varname">OPSYS</code>, <code class="varname">OS_VERSION</code>,
        !            55:        <code class="varname">LOWER_OS_VERSION</code>,
        !            56:        <code class="varname">LOWER_VENDOR</code>,
        !            57:        <code class="varname">MACHINE_ARCH</code>, <code class="varname">OBJECT_FMT</code>,
        !            58:        <code class="varname">APPEND_ELF</code>, and the other variables that
        !            59:        appear in this file.</p></dd>
        !            60: <dt><span class="term"><code class="filename">mk/platform/<em class="replaceable"><code>MyOS</code></em>.mk</code></span></dt>
        !            61: <dd><p>This file contains the platform-specific
        !            62:        definitions that are used by pkgsrc. Start by copying one of the
        !            63:        other files and edit it to your
        !            64:        needs.</p></dd>
        !            65: <dt><span class="term"><code class="filename">mk/platform/<em class="replaceable"><code>MyOS</code></em>.pkg.dist</code></span></dt>
        !            66: <dd><p>This file contains a list of directories,
        !            67:        together with their permission bits and ownership. These
        !            68:        directories will be created automatically with every package
        !            69:        that explicitly sets <code class="varname">USE_MTREE</code>. This feature will
        !            70:        be removed.</p></dd>
        !            71: <dt><span class="term"><code class="filename">mk/platform/<em class="replaceable"><code>MyOS</code></em>.x11.dist</code></span></dt>
        !            72: <dd><p>Just copy one of the pre-existing x11.dist files
        !            73:        to your
        !            74:        <code class="filename"><em class="replaceable"><code>MyOS</code></em>.x11.dist</code>.</p></dd>
        !            75: <dt><span class="term"><code class="filename">mk/tools/bootstrap.mk</code></span></dt>
        !            76: <dd><p>On some operating systems, the tools that are
        !            77:        provided with the base system are not good enough for pkgsrc.
        !            78:        For example, there are many versions of <a href="http://netbsd.gw.com/cgi-bin/man-cgi?sed+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">sed</span>(1)</span></a> that have a
        !            79:        narrow limit on the line length they can process. Therefore
        !            80:        pkgsrc brings its own tools, which can be enabled
        !            81:        here.</p></dd>
        !            82: <dt><span class="term"><code class="filename">mk/tools/tools.<em class="replaceable"><code>MyOS</code></em>.mk</code></span></dt>
        !            83: <dd><p>This file defines the paths to all the tools
        !            84:        that are needed by one or the other package in pkgsrc, as well
        !            85:        as by pkgsrc itself. Find out where these tools are on your
        !            86:        platform and add them.</p></dd>
        !            87: </dl></div>
        !            88: <p>Now, you should be able to build some basic packages, like
        !            89:        <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/lang/perl5/README.html" target="_top"><code class="filename">lang/perl5</code></a>, <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/shells/bash/README.html" target="_top"><code class="filename">shells/bash</code></a>.</p>
        !            90: </div>
        !            91: <div class="sect1" lang="en">
        !            92: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
        !            93: <a name="porting.compiler"></a>25.2. Adding support for a new compiler</h2></div></div></div>
        !            94: <p>TODO</p>
        !            95: </div>
        !            96: </div>
        !            97: <div class="navfooter">
        !            98: <hr>
        !            99: <table width="100%" summary="Navigation footer">
        !           100: <tr>
        !           101: <td width="40%" align="left">
        !           102: <a accesskey="p" href="regression.html">Prev</a> </td>
        !           103: <td width="20%" align="center"><a accesskey="u" href="infrastructure.html">Up</a></td>
        !           104: <td width="40%" align="right"> <a accesskey="n" href="examples.html">Next</a>
        !           105: </td>
        !           106: </tr>
        !           107: <tr>
        !           108: <td width="40%" align="left" valign="top">Chapter 24. Regression tests </td>
        !           109: <td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
        !           110: <td width="40%" align="right" valign="top"> Appendix A. A simple example package: bison</td>
        !           111: </tr>
        !           112: </table>
        !           113: </div>
        !           114: </body>
        !           115: </html>

CVSweb <webmaster@jp.NetBSD.org>