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