Annotation of htdocs/docs/pkgsrc/devfaq.html, revision 1.136

1.115     sevan       1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
1.1       dsieger     2: <html>
                      3: <head>
                      4: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
1.5       rillig      5: <title>Chapter 22. Frequently Asked Questions</title>
1.24      spz         6: <link rel="stylesheet" type="text/css" href="/global.css">
1.1       dsieger     7: <meta name="generator" content="DocBook XSL Stylesheets VX.X.X">
1.13      rillig      8: <link rel="home" href="index.html" title="The pkgsrc guide">
1.1       dsieger     9: <link rel="up" href="developers-guide.html" title="Part II. The pkgsrc developer's guide">
1.5       rillig     10: <link rel="prev" href="submit.html" title="Chapter 21. Submitting and Committing">
                     11: <link rel="next" href="gnome.html" title="Chapter 23. GNOME packaging and porting">
1.1       dsieger    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">
1.5       rillig     16: <tr><th colspan="3" align="center">Chapter 22. Frequently Asked Questions</th></tr>
1.1       dsieger    17: <tr>
                     18: <td width="20%" align="left">
                     19: <a accesskey="p" href="submit.html">Prev</a> </td>
                     20: <th width="60%" align="center">Part II. The pkgsrc developer's guide</th>
                     21: <td width="20%" align="right"> <a accesskey="n" href="gnome.html">Next</a>
                     22: </td>
                     23: </tr>
                     24: </table>
                     25: <hr>
                     26: </div>
1.40      asau       27: <div class="chapter">
1.1       dsieger    28: <div class="titlepage"><div><div><h2 class="title">
1.5       rillig     29: <a name="devfaq"></a>Chapter 22. Frequently Asked Questions</h2></div></div></div>
1.1       dsieger    30: <p>This section contains the answers to questions that may
                     31:        arise when you are writing a package. If you don't find your
                     32:        question answered here, first have a look in the other chapters,
                     33:        and if you still don't have the answer, ask on the
                     34:        <code class="literal">pkgsrc-users</code> mailing list.</p>
1.40      asau       35: <div class="qandaset">
1.136   ! maya       36: <a name="idm81124816"></a><dl>
1.5       rillig     37: <dt>22.1. <a href="devfaq.html#devfaq.makeflags">What is the difference between
1.1       dsieger    38:        MAKEFLAGS, .MAKEFLAGS and
                     39:        MAKE_FLAGS?</a>
                     40: </dt>
1.5       rillig     41: <dt>22.2. <a href="devfaq.html#devfaq.make">What is the difference between
1.1       dsieger    42:        MAKE, GMAKE and
                     43:        MAKE_PROGRAM?</a>
                     44: </dt>
1.5       rillig     45: <dt>22.3. <a href="devfaq.html#devfaq.cc">What is the difference between
1.1       dsieger    46:        CC, PKG_CC and
                     47:        PKGSRC_COMPILER?</a>
                     48: </dt>
1.5       rillig     49: <dt>22.4. <a href="devfaq.html#devfaq.bl3flags">What is the difference between
1.1       dsieger    50:        BUILDLINK_LDFLAGS,
                     51:        BUILDLINK_LDADD and
                     52:        BUILDLINK_LIBS?</a>
                     53: </dt>
1.5       rillig     54: <dt>22.5. <a href="devfaq.html#devfaq.bl3prefix">Why does make show-var
1.1       dsieger    55:        VARNAME=BUILDLINK_PREFIX.foo
                     56:        say it's empty?</a>
                     57: </dt>
1.5       rillig     58: <dt>22.6. <a href="devfaq.html#devfaq.master_sites">What does
1.1       dsieger    59:        ${MASTER_SITE_SOURCEFORGE:=package/} mean? I
                     60:        don't understand the := inside
                     61:        it.</a>
                     62: </dt>
1.5       rillig     63: <dt>22.7. <a href="devfaq.html#devfaq.mailinglists">Which mailing lists are there for package
1.1       dsieger    64:        developers?</a>
                     65: </dt>
1.5       rillig     66: <dt>22.8. <a href="devfaq.html#devfaq.documentation">Where is the pkgsrc
1.1       dsieger    67:        documentation?</a>
                     68: </dt>
1.5       rillig     69: <dt>22.9. <a href="devfaq.html#devfaq.too-much-time">I have a little time to kill.  What shall I
1.1       dsieger    70: do?</a>
                     71: </dt>
                     72: </dl>
1.40      asau       73: <table border="0" style="width: 100%;">
                     74: <colgroup>
1.1       dsieger    75: <col align="left" width="1%">
1.22      wiz        76: <col>
1.40      asau       77: </colgroup>
1.1       dsieger    78: <tbody>
1.40      asau       79: <tr class="question">
1.1       dsieger    80: <td align="left" valign="top">
1.136   ! maya       81: <a name="devfaq.makeflags"></a><a name="idm81124432"></a><p><b>22.1.</b></p>
1.1       dsieger    82: </td>
                     83: <td align="left" valign="top"><p>What is the difference between
                     84:        <code class="varname">MAKEFLAGS</code>, <code class="varname">.MAKEFLAGS</code> and
                     85:        <code class="varname">MAKE_FLAGS</code>?</p></td>
                     86: </tr>
                     87: <tr class="answer">
                     88: <td align="left" valign="top"></td>
                     89: <td align="left" valign="top"><p><code class="varname">MAKEFLAGS</code> are the flags passed
1.132     leot       90:        to the pkgsrc-internal invocations of <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1.i386+NetBSD-7.1.2"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a>, while
1.1       dsieger    91:        <code class="varname">MAKE_FLAGS</code> are the flags that are passed to
                     92:        the <code class="varname">MAKE_PROGRAM</code> when building the
                     93:        package. [FIXME: What is .MAKEFLAGS for?]</p></td>
                     94: </tr>
1.40      asau       95: <tr class="question">
1.1       dsieger    96: <td align="left" valign="top">
1.136   ! maya       97: <a name="devfaq.make"></a><a name="idm81120336"></a><p><b>22.2.</b></p>
1.1       dsieger    98: </td>
                     99: <td align="left" valign="top"><p>What is the difference between
                    100:        <code class="varname">MAKE</code>, <code class="varname">GMAKE</code> and
                    101:        <code class="varname">MAKE_PROGRAM</code>?</p></td>
                    102: </tr>
                    103: <tr class="answer">
                    104: <td align="left" valign="top"></td>
                    105: <td align="left" valign="top"><p><code class="varname">MAKE</code> is the path to the
1.132     leot      106:        <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1.i386+NetBSD-7.1.2"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> program that is used in the pkgsrc
1.1       dsieger   107:        infrastructure. <code class="varname">GMAKE</code> is the path to GNU
                    108:        Make, but you need to say <code class="varname">USE_TOOLS+=gmake</code> to
                    109:        use that. <code class="varname">MAKE_PROGRAM</code> is the path to the
                    110:        Make program that is used for building the
                    111:        package.</p></td>
                    112: </tr>
1.40      asau      113: <tr class="question">
1.1       dsieger   114: <td align="left" valign="top">
1.136   ! maya      115: <a name="devfaq.cc"></a><a name="idm81115984"></a><p><b>22.3.</b></p>
1.1       dsieger   116: </td>
                    117: <td align="left" valign="top"><p>What is the difference between
                    118:        <code class="varname">CC</code>, <code class="varname">PKG_CC</code> and
                    119:        <code class="varname">PKGSRC_COMPILER</code>?</p></td>
                    120: </tr>
                    121: <tr class="answer">
                    122: <td align="left" valign="top"></td>
                    123: <td align="left" valign="top"><p><code class="varname">CC</code> is the path to the real C
                    124:        compiler, which can be configured by the pkgsrc user.
                    125:        <code class="varname">PKG_CC</code> is the path to the compiler wrapper.
                    126:        <code class="varname">PKGSRC_COMPILER</code> is <span class="emphasis"><em>not</em></span> a
                    127:        path to a compiler, but the type of compiler that should be
                    128:        used. See <code class="filename">mk/compiler.mk</code> for more
                    129:        information about the latter variable.</p></td>
                    130: </tr>
1.40      asau      131: <tr class="question">
1.1       dsieger   132: <td align="left" valign="top">
1.136   ! maya      133: <a name="devfaq.bl3flags"></a><a name="idm81111760"></a><p><b>22.4.</b></p>
1.1       dsieger   134: </td>
                    135: <td align="left" valign="top"><p>What is the difference between
                    136:        <code class="varname">BUILDLINK_LDFLAGS</code>,
                    137:        <code class="varname">BUILDLINK_LDADD</code> and
                    138:        <code class="varname">BUILDLINK_LIBS</code>?</p></td>
                    139: </tr>
                    140: <tr class="answer">
                    141: <td align="left" valign="top"></td>
                    142: <td align="left" valign="top"><p>[FIXME]</p></td>
                    143: </tr>
1.40      asau      144: <tr class="question">
1.1       dsieger   145: <td align="left" valign="top">
1.136   ! maya      146: <a name="devfaq.bl3prefix"></a><a name="idm81109584"></a><p><b>22.5.</b></p>
1.1       dsieger   147: </td>
1.8       hubertf   148: <td align="left" valign="top"><p>Why does <span class="command"><strong>make show-var
1.1       dsieger   149:        VARNAME=BUILDLINK_PREFIX.<em class="replaceable"><code>foo</code></em></strong></span>
                    150:        say it's empty?</p></td>
                    151: </tr>
                    152: <tr class="answer">
                    153: <td align="left" valign="top"></td>
                    154: <td align="left" valign="top"><p>For optimization reasons, some variables are only
1.22      wiz       155:        available in the <span class="quote">&#8220;<span class="quote">wrapper</span>&#8221;</span> phase and later. To
                    156:        <span class="quote">&#8220;<span class="quote">simulate</span>&#8221;</span> the wrapper phase, append
1.8       hubertf   157:        <span class="command"><strong>PKG_PHASE=wrapper</strong></span> to the above
1.1       dsieger   158:        command.</p></td>
                    159: </tr>
1.40      asau      160: <tr class="question">
1.1       dsieger   161: <td align="left" valign="top">
1.136   ! maya      162: <a name="devfaq.master_sites"></a><a name="idm81106512"></a><p><b>22.6.</b></p>
1.1       dsieger   163: </td>
                    164: <td align="left" valign="top"><p>What does
1.103     rillig    165:        <code class="code">${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I
                    166:        don't understand the <code class="code">:=</code> inside
1.1       dsieger   167:        it.</p></td>
                    168: </tr>
                    169: <tr class="answer">
                    170: <td align="left" valign="top"></td>
1.103     rillig    171: <td align="left" valign="top"><p>The <code class="code">:=</code> is not really an
                    172:        assignment operator, although it looks like it.
1.1       dsieger   173:        Instead, it is a degenerate form of
1.103     rillig    174:        <code class="code">${LIST:<em class="replaceable"><code>old_string</code></em>=<em class="replaceable"><code>new_string</code></em>}</code>,
1.132     leot      175:        which is documented in the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1.i386+NetBSD-7.1.2"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> man page and which is
1.103     rillig    176:        commonly used in the form <code class="code">${SRCS:.c=.o}</code>. In the
1.1       dsieger   177:        case of <code class="varname">MASTER_SITE_*</code>,
                    178:        <em class="replaceable"><code>old_string</code></em> is the empty string and
                    179:        <em class="replaceable"><code>new_string</code></em> is
1.103     rillig    180:        <code class="code">package/</code>. That's where the
                    181:        <code class="code">:</code> and the <code class="code">=</code> fall
1.1       dsieger   182:        together.</p></td>
                    183: </tr>
1.40      asau      184: <tr class="question">
1.1       dsieger   185: <td align="left" valign="top">
1.136   ! maya      186: <a name="devfaq.mailinglists"></a><a name="idm81099600"></a><p><b>22.7.</b></p>
1.1       dsieger   187: </td>
                    188: <td align="left" valign="top"><p>Which mailing lists are there for package
                    189:        developers?</p></td>
                    190: </tr>
                    191: <tr class="answer">
                    192: <td align="left" valign="top"></td>
1.40      asau      193: <td align="left" valign="top"><div class="variablelist"><dl class="variablelist">
1.8       hubertf   194: <dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#tech-pkg" target="_top">tech-pkg</a></span></dt>
1.1       dsieger   195: <dd><p>This is a list for technical discussions related
                    196:        to pkgsrc development, e.g. soliciting feedback for changes to
                    197:        pkgsrc infrastructure, proposed new features, questions related
                    198:        to porting pkgsrc to a new platform, advice for maintaining a
                    199:        package, patches that affect many packages, help requests moved
                    200:        from pkgsrc-users when an infrastructure bug is found,
                    201:        etc.</p></dd>
1.8       hubertf   202: <dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-bugs" target="_top">pkgsrc-bugs</a></span></dt>
1.1       dsieger   203: <dd><p>All bug reports in category "pkg" sent with
1.132     leot      204:        <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?send-pr+1.i386+NetBSD-7.1.2"><span class="citerefentry"><span class="refentrytitle">send-pr</span>(1)</span></a> appear here. Please do not report your bugs here
1.1       dsieger   205:        directly; use one of the other mailing
                    206:        lists.</p></dd>
                    207: </dl></div></td>
                    208: </tr>
1.40      asau      209: <tr class="question">
1.1       dsieger   210: <td align="left" valign="top">
1.136   ! maya      211: <a name="devfaq.documentation"></a><a name="idm81095760"></a><p><b>22.8.</b></p>
1.1       dsieger   212: </td>
                    213: <td align="left" valign="top"><p>Where is the pkgsrc
                    214:        documentation?</p></td>
                    215: </tr>
                    216: <tr class="answer">
                    217: <td align="left" valign="top"></td>
                    218: <td align="left" valign="top">
                    219: <p>There are many places where you can find
                    220:        documentation about pkgsrc:</p>
1.40      asau      221: <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
1.22      wiz       222: <li class="listitem"><p>The pkgsrc guide (this document) is a collection
1.1       dsieger   223:        of chapters that explain large parts of pkgsrc, but some
                    224:        chapters tend to be outdated. Which ones they are is hard to
                    225:        say.</p></li>
1.22      wiz       226: <li class="listitem"><p>On the mailing list archives (see <a class="ulink" href="http://mail-index.NetBSD.org/" target="_top">http://mail-index.NetBSD.org/</a>), you can find discussions
1.1       dsieger   227:        about certain features, announcements of new parts of the pkgsrc
                    228:        infrastructure and sometimes even announcements that a certain
                    229:        feature has been marked as obsolete. The benefit here is that
                    230:        each message has a date appended to it.</p></li>
1.22      wiz       231: <li class="listitem"><p>Many of the files in the
1.1       dsieger   232:        <code class="filename">mk/</code> directory start with a comment that
                    233:        describes the purpose of the file and how it can be used by the
                    234:        pkgsrc user and package authors. An easy way to find this
1.8       hubertf   235:        documentation is to run <span class="command"><strong>bmake
1.1       dsieger   236:        help</strong></span>.</p></li>
1.22      wiz       237: <li class="listitem"><p>The CVS log messages are a rich source of
1.1       dsieger   238:        information, but they tend to be highly abbreviated, especially
                    239:        for actions that occur often. Some contain a detailed
                    240:        description of what has changed, but they are geared towards the
                    241:        other pkgsrc developers, not towards an average pkgsrc user.
                    242:        They also only document <span class="emphasis"><em>changes</em></span>, so if you
                    243:        don't know what has been before, these messages may not be worth
                    244:        too much to you.</p></li>
1.22      wiz       245: <li class="listitem"><p>Some parts of pkgsrc are only <span class="quote">&#8220;<span class="quote">implicitly
                    246:        documented</span>&#8221;</span>, that is the documentation exists only in the
1.1       dsieger   247:        mind of the developer who wrote the code. To get this
1.8       hubertf   248:        information, use the <span class="command"><strong>cvs annotate</strong></span> command
1.1       dsieger   249:        to see who has written it and ask on the
                    250:        <code class="literal">tech-pkg</code> mailing list, so that others can
                    251:        find your questions later (see above). To be sure that the
                    252:        developer in charge reads the mail, you may CC him or
                    253:        her.</p></li>
                    254: </ul></div>
                    255: </td>
                    256: </tr>
1.40      asau      257: <tr class="question">
1.1       dsieger   258: <td align="left" valign="top">
1.136   ! maya      259: <a name="devfaq.too-much-time"></a><a name="idm81089232"></a><p><b>22.9.</b></p>
1.1       dsieger   260: </td>
                    261: <td align="left" valign="top"><p>I have a little time to kill.  What shall I
                    262: do?</p></td>
                    263: </tr>
                    264: <tr class="answer">
                    265: <td align="left" valign="top"></td>
                    266: <td align="left" valign="top">
                    267: <p>This is not really an FAQ yet, but here's the answer
                    268: anyway.</p>
1.40      asau      269: <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
1.22      wiz       270: <li class="listitem"><p>Run <span class="command"><strong>pkg_chk -N</strong></span> (from the
1.132     leot      271:     <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_chk/README.html" target="_top"><code class="filename">pkgtools/pkg_chk</code></a> package).  It
1.1       dsieger   272:     will tell you about newer versions of installed packages that are
                    273:     available, but not yet updated in pkgsrc.</p></li>
1.22      wiz       274: <li class="listitem"><p>Browse <code class="filename">pkgsrc/doc/TODO</code>
1.12      jmcneill  275:     &mdash; it contains a list of suggested new packages and a list of
1.1       dsieger   276:     cleanups and enhancements for pkgsrc that would be nice to
                    277:     have.</p></li>
1.22      wiz       278: <li class="listitem"><p>Review packages for which review was requested on
1.68      wiz       279:     the <a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#tech-pkg" target="_top">tech-pkg</a>
1.1       dsieger   280:     mailing list.</p></li>
                    281: </ul></div>
                    282: </td>
                    283: </tr>
                    284: </tbody>
                    285: </table>
                    286: </div>
                    287: </div>
                    288: <div class="navfooter">
                    289: <hr>
                    290: <table width="100%" summary="Navigation footer">
                    291: <tr>
                    292: <td width="40%" align="left">
                    293: <a accesskey="p" href="submit.html">Prev</a> </td>
                    294: <td width="20%" align="center"><a accesskey="u" href="developers-guide.html">Up</a></td>
                    295: <td width="40%" align="right"> <a accesskey="n" href="gnome.html">Next</a>
                    296: </td>
                    297: </tr>
                    298: <tr>
1.5       rillig    299: <td width="40%" align="left" valign="top">Chapter 21. Submitting and Committing </td>
1.1       dsieger   300: <td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
1.5       rillig    301: <td width="40%" align="right" valign="top"> Chapter 23. GNOME packaging and porting</td>
1.1       dsieger   302: </tr>
                    303: </table>
                    304: </div>
                    305: </body>
                    306: </html>

CVSweb <webmaster@jp.NetBSD.org>