Mon Aug 8 01:56:37 2022 UTC ()
doc/pkgsrc.*: regen


(gutteridge)
diff -r1.342 -r1.343 pkgsrc/doc/pkgsrc.html
diff -r1.340 -r1.341 pkgsrc/doc/pkgsrc.txt

cvs diff -r1.342 -r1.343 pkgsrc/doc/pkgsrc.html (switch to unified diff)

--- pkgsrc/doc/pkgsrc.html 2022/07/23 06:51:09 1.342
+++ pkgsrc/doc/pkgsrc.html 2022/08/08 01:56:37 1.343
@@ -3169,2031 +3169,2044 @@ anymore, you can remove that file and ru @@ -3169,2031 +3169,2044 @@ anymore, you can remove that file and ru
3169<dt><span class="sect1"><a href="#build.prefix">13.2. Program location</a></span></dt> 3169<dt><span class="sect1"><a href="#build.prefix">13.2. Program location</a></span></dt>
3170<dt><span class="sect1"><a href="#build.builddirs">13.3. Directories used during the build process</a></span></dt> 3170<dt><span class="sect1"><a href="#build.builddirs">13.3. Directories used during the build process</a></span></dt>
3171<dt><span class="sect1"><a href="#build.running">13.4. Running a phase</a></span></dt> 3171<dt><span class="sect1"><a href="#build.running">13.4. Running a phase</a></span></dt>
3172<dt><span class="sect1"><a href="#build.fetch">13.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt> 3172<dt><span class="sect1"><a href="#build.fetch">13.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
3173<dd><dl> 3173<dd><dl>
3174<dt><span class="sect2"><a href="#build.fetch.what">13.5.1. What to fetch and where to get it from</a></span></dt> 3174<dt><span class="sect2"><a href="#build.fetch.what">13.5.1. What to fetch and where to get it from</a></span></dt>
3175<dt><span class="sect2"><a href="#build.fetch.how">13.5.2. How are the files fetched?</a></span></dt> 3175<dt><span class="sect2"><a href="#build.fetch.how">13.5.2. How are the files fetched?</a></span></dt>
3176</dl></dd> 3176</dl></dd>
3177<dt><span class="sect1"><a href="#build.checksum">13.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt> 3177<dt><span class="sect1"><a href="#build.checksum">13.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
3178<dt><span class="sect1"><a href="#build.extract">13.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt> 3178<dt><span class="sect1"><a href="#build.extract">13.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
3179<dt><span class="sect1"><a href="#build.patch">13.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt> 3179<dt><span class="sect1"><a href="#build.patch">13.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
3180<dt><span class="sect1"><a href="#build.tools">13.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt> 3180<dt><span class="sect1"><a href="#build.tools">13.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
3181<dt><span class="sect1"><a href="#build.wrapper">13.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt> 3181<dt><span class="sect1"><a href="#build.wrapper">13.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
3182<dt><span class="sect1"><a href="#build.configure">13.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt> 3182<dt><span class="sect1"><a href="#build.configure">13.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
3183<dt><span class="sect1"><a href="#build.build">13.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt> 3183<dt><span class="sect1"><a href="#build.build">13.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
3184<dt><span class="sect1"><a href="#build.test">13.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt> 3184<dt><span class="sect1"><a href="#build.test">13.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
3185<dt><span class="sect1"><a href="#build.install">13.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt> 3185<dt><span class="sect1"><a href="#build.install">13.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
3186<dt><span class="sect1"><a href="#build.package">13.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt> 3186<dt><span class="sect1"><a href="#build.package">13.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
3187<dt><span class="sect1"><a href="#build.clean">13.16. Cleaning up</a></span></dt> 3187<dt><span class="sect1"><a href="#build.clean">13.16. Cleaning up</a></span></dt>
3188<dt><span class="sect1"><a href="#build.helpful-targets">13.17. Other helpful targets</a></span></dt> 3188<dt><span class="sect1"><a href="#build.helpful-targets">13.17. Other helpful targets</a></span></dt>
3189</dl></dd> 3189</dl></dd>
3190<dt><span class="chapter"><a href="#creating">14. Creating a new pkgsrc package from scratch</a></span></dt> 3190<dt><span class="chapter"><a href="#creating">14. Creating a new pkgsrc package from scratch</a></span></dt>
3191<dd><dl> 3191<dd><dl>
3192<dt><span class="sect1"><a href="#creating.common">14.1. Common types of packages</a></span></dt> 3192<dt><span class="sect1"><a href="#creating.common">14.1. Common types of packages</a></span></dt>
3193<dd><dl> 3193<dd><dl>
3194<dt><span class="sect2"><a href="#creating.python-module">14.1.1. Python modules and programs</a></span></dt> 3194<dt><span class="sect2"><a href="#creating.python-module">14.1.1. Python modules and programs</a></span></dt>
3195<dt><span class="sect2"><a href="#creating.R-package">14.1.2. R packages</a></span></dt> 3195<dt><span class="sect2"><a href="#creating.R-package">14.1.2. R packages</a></span></dt>
3196<dt><span class="sect2"><a href="#creating.TeX-package">14.1.3. TeXlive packages</a></span></dt> 3196<dt><span class="sect2"><a href="#creating.TeX-package">14.1.3. TeXlive packages</a></span></dt>
3197</dl></dd> 3197</dl></dd>
3198<dt><span class="sect1"><a href="#creating.examples">14.2. Examples</a></span></dt> 3198<dt><span class="sect1"><a href="#creating.examples">14.2. Examples</a></span></dt>
3199<dd><dl><dt><span class="sect2"><a href="#creating.nvu">14.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd> 3199<dd><dl><dt><span class="sect2"><a href="#creating.nvu">14.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd>
3200</dl></dd> 3200</dl></dd>
3201<dt><span class="chapter"><a href="#makefile">15. Programming in <code class="filename">Makefile</code>s</a></span></dt> 3201<dt><span class="chapter"><a href="#makefile">15. Programming in <code class="filename">Makefile</code>s</a></span></dt>
3202<dd><dl> 3202<dd><dl>
3203<dt><span class="sect1"><a href="#makefile.style">15.1. Caveats</a></span></dt> 3203<dt><span class="sect1"><a href="#makefile.style">15.1. Caveats</a></span></dt>
3204<dt><span class="sect1"><a href="#makefile.variables">15.2. <code class="filename">Makefile</code> variables</a></span></dt> 3204<dt><span class="sect1"><a href="#makefile.variables">15.2. <code class="filename">Makefile</code> variables</a></span></dt>
3205<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">15.2.1. Naming conventions</a></span></dt></dl></dd> 3205<dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">15.2.1. Naming conventions</a></span></dt></dl></dd>
3206<dt><span class="sect1"><a href="#makefile.code">15.3. Code snippets</a></span></dt> 3206<dt><span class="sect1"><a href="#makefile.code">15.3. Code snippets</a></span></dt>
3207<dd><dl> 3207<dd><dl>
3208<dt><span class="sect2"><a href="#adding-to-list">15.3.1. Adding things to a list</a></span></dt> 3208<dt><span class="sect2"><a href="#adding-to-list">15.3.1. Adding things to a list</a></span></dt>
3209<dt><span class="sect2"><a href="#echo-literal">15.3.2. Echoing a string exactly as-is</a></span></dt> 3209<dt><span class="sect2"><a href="#echo-literal">15.3.2. Echoing a string exactly as-is</a></span></dt>
3210<dt><span class="sect2"><a href="#cflags-gnu-configure">15.3.3. Passing <code class="varname">CFLAGS</code> to GNU configure scripts</a></span></dt> 3210<dt><span class="sect2"><a href="#cflags-gnu-configure">15.3.3. Passing <code class="varname">CFLAGS</code> to GNU configure scripts</a></span></dt>
3211<dt><span class="sect2"><a href="#empty-variables">15.3.4. Handling possibly empty variables</a></span></dt> 3211<dt><span class="sect2"><a href="#empty-variables">15.3.4. Handling possibly empty variables</a></span></dt>
3212</dl></dd> 3212</dl></dd>
3213</dl></dd> 3213</dl></dd>
3214<dt><span class="chapter"><a href="#options">16. Options handling</a></span></dt> 3214<dt><span class="chapter"><a href="#options">16. Options handling</a></span></dt>
3215<dd><dl> 3215<dd><dl>
3216<dt><span class="sect1"><a href="#global-default-options">16.1. Global default options</a></span></dt> 3216<dt><span class="sect1"><a href="#global-default-options">16.1. Global default options</a></span></dt>
3217<dt><span class="sect1"><a href="#converting-to-options">16.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt> 3217<dt><span class="sect1"><a href="#converting-to-options">16.2. Converting packages to use <code class="filename">bsd.options.mk</code></a></span></dt>
3218<dt><span class="sect1"><a href="#option-names">16.3. Option Names</a></span></dt> 3218<dt><span class="sect1"><a href="#option-names">16.3. Option Names</a></span></dt>
3219<dt><span class="sect1"><a href="#option-build">16.4. Determining the options of dependencies</a></span></dt> 3219<dt><span class="sect1"><a href="#option-build">16.4. Determining the options of dependencies</a></span></dt>
3220</dl></dd> 3220</dl></dd>
3221<dt><span class="chapter"><a href="#tools">17. Tools needed for building or running</a></span></dt> 3221<dt><span class="chapter"><a href="#tools">17. Tools needed for building or running</a></span></dt>
3222<dd><dl> 3222<dd><dl>
3223<dt><span class="sect1"><a href="#pkgsrc-tools">17.1. Tools for pkgsrc builds</a></span></dt> 3223<dt><span class="sect1"><a href="#pkgsrc-tools">17.1. Tools for pkgsrc builds</a></span></dt>
3224<dt><span class="sect1"><a href="#package-tools">17.2. Tools needed by packages</a></span></dt> 3224<dt><span class="sect1"><a href="#package-tools">17.2. Tools needed by packages</a></span></dt>
3225<dt><span class="sect1"><a href="#platform-tools">17.3. Tools provided by platforms</a></span></dt> 3225<dt><span class="sect1"><a href="#platform-tools">17.3. Tools provided by platforms</a></span></dt>
3226</dl></dd> 3226</dl></dd>
3227<dt><span class="chapter"><a href="#buildlink">18. Buildlink methodology</a></span></dt> 3227<dt><span class="chapter"><a href="#buildlink">18. Buildlink methodology</a></span></dt>
3228<dd><dl> 3228<dd><dl>
3229<dt><span class="sect1"><a href="#converting-to-buildlink3">18.1. Converting packages to use buildlink3</a></span></dt> 3229<dt><span class="sect1"><a href="#converting-to-buildlink3">18.1. Converting packages to use buildlink3</a></span></dt>
3230<dt><span class="sect1"><a href="#creating-buildlink3.mk">18.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt> 3230<dt><span class="sect1"><a href="#creating-buildlink3.mk">18.2. Writing <code class="filename">buildlink3.mk</code> files</a></span></dt>
3231<dd><dl> 3231<dd><dl>
3232<dt><span class="sect2"><a href="#anatomy-of-bl3">18.2.1. Anatomy of a buildlink3.mk file</a></span></dt> 3232<dt><span class="sect2"><a href="#anatomy-of-bl3">18.2.1. Anatomy of a buildlink3.mk file</a></span></dt>
3233<dt><span class="sect2"><a href="#updating-buildlink-depends">18.2.2. Updating 3233<dt><span class="sect2"><a href="#updating-buildlink-depends">18.2.2. Updating
3234 <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> 3234 <code class="varname">BUILDLINK_API_DEPENDS.<em class="replaceable"><code>pkg</code></em></code>
3235 and 3235 and
3236 <code class="varname">BUILDLINK_ABI_DEPENDS.<em class="replaceable"><code>pkg</code></em></code> 3236 <code class="varname">BUILDLINK_ABI_DEPENDS.<em class="replaceable"><code>pkg</code></em></code>
3237 in <code class="filename">buildlink3.mk</code> files</a></span></dt> 3237 in <code class="filename">buildlink3.mk</code> files</a></span></dt>
3238</dl></dd> 3238</dl></dd>
3239<dt><span class="sect1"><a href="#writing-builtin.mk">18.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt> 3239<dt><span class="sect1"><a href="#writing-builtin.mk">18.3. Writing <code class="filename">builtin.mk</code> files</a></span></dt>
3240<dd><dl> 3240<dd><dl>
3241<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">18.3.1. Anatomy of a <code class="filename">builtin.mk</code> file</a></span></dt> 3241<dt><span class="sect2"><a href="#anatomy-of-builtin.mk">18.3.1. Anatomy of a <code class="filename">builtin.mk</code> file</a></span></dt>
3242<dt><span class="sect2"><a href="#native-or-pkgsrc-preference">18.3.2. Global preferences for native or pkgsrc software</a></span></dt> 3242<dt><span class="sect2"><a href="#native-or-pkgsrc-preference">18.3.2. Global preferences for native or pkgsrc software</a></span></dt>
3243</dl></dd> 3243</dl></dd>
3244</dl></dd> 3244</dl></dd>
3245<dt><span class="chapter"><a href="#plist">19. PLIST issues</a></span></dt> 3245<dt><span class="chapter"><a href="#plist">19. PLIST issues</a></span></dt>
3246<dd><dl> 3246<dd><dl>
3247<dt><span class="sect1"><a href="#rcs-id">19.1. RCS ID</a></span></dt> 3247<dt><span class="sect1"><a href="#rcs-id">19.1. RCS ID</a></span></dt>
3248<dt><span class="sect1"><a href="#automatic-plist-generation">19.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt> 3248<dt><span class="sect1"><a href="#automatic-plist-generation">19.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt>
3249<dt><span class="sect1"><a href="#print-PLIST">19.3. Tweaking output of <span class="command"><strong>make print-PLIST</strong></span></a></span></dt> 3249<dt><span class="sect1"><a href="#print-PLIST">19.3. Tweaking output of <span class="command"><strong>make print-PLIST</strong></span></a></span></dt>
3250<dt><span class="sect1"><a href="#plist.misc">19.4. Variable substitution in PLIST</a></span></dt> 3250<dt><span class="sect1"><a href="#plist.misc">19.4. Variable substitution in PLIST</a></span></dt>
3251<dt><span class="sect1"><a href="#manpage-compression">19.5. Man page compression</a></span></dt> 3251<dt><span class="sect1"><a href="#manpage-compression">19.5. Man page compression</a></span></dt>
3252<dt><span class="sect1"><a href="#using-PLIST_SRC">19.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt> 3252<dt><span class="sect1"><a href="#using-PLIST_SRC">19.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt>
3253<dt><span class="sect1"><a href="#platform-specific-plist">19.7. Platform-specific and differing PLISTs</a></span></dt> 3253<dt><span class="sect1"><a href="#platform-specific-plist">19.7. Platform-specific and differing PLISTs</a></span></dt>
3254<dt><span class="sect1"><a href="#build-plist">19.8. Build-specific PLISTs</a></span></dt> 3254<dt><span class="sect1"><a href="#build-plist">19.8. Build-specific PLISTs</a></span></dt>
3255<dt><span class="sect1"><a href="#faq.common-dirs">19.9. Sharing directories between packages</a></span></dt> 3255<dt><span class="sect1"><a href="#faq.common-dirs">19.9. Sharing directories between packages</a></span></dt>
3256</dl></dd> 3256</dl></dd>
3257<dt><span class="chapter"><a href="#pkginstall">20. The pkginstall framework</a></span></dt> 3257<dt><span class="chapter"><a href="#pkginstall">20. The pkginstall framework</a></span></dt>
3258<dd><dl> 3258<dd><dl>
3259<dt><span class="sect1"><a href="#files-and-dirs-outside-prefix">20.1. Files and directories outside the installation prefix</a></span></dt> 3259<dt><span class="sect1"><a href="#files-and-dirs-outside-prefix">20.1. Files and directories outside the installation prefix</a></span></dt>
3260<dd><dl> 3260<dd><dl>
3261<dt><span class="sect2"><a href="#dirs-outside-prefix">20.1.1. Directory manipulation</a></span></dt> 3261<dt><span class="sect2"><a href="#dirs-outside-prefix">20.1.1. Directory manipulation</a></span></dt>
3262<dt><span class="sect2"><a href="#files-outside-prefix">20.1.2. File manipulation</a></span></dt> 3262<dt><span class="sect2"><a href="#files-outside-prefix">20.1.2. File manipulation</a></span></dt>
3263</dl></dd> 3263</dl></dd>
3264<dt><span class="sect1"><a href="#conf-files">20.2. Configuration files</a></span></dt> 3264<dt><span class="sect1"><a href="#conf-files">20.2. Configuration files</a></span></dt>
3265<dd><dl> 3265<dd><dl>
3266<dt><span class="sect2"><a href="#conf-files-sysconfdir">20.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt> 3266<dt><span class="sect2"><a href="#conf-files-sysconfdir">20.2.1. How <code class="varname">PKG_SYSCONFDIR</code> is set</a></span></dt>
3267<dt><span class="sect2"><a href="#conf-files-configure">20.2.2. Telling the software where configuration files are</a></span></dt> 3267<dt><span class="sect2"><a href="#conf-files-configure">20.2.2. Telling the software where configuration files are</a></span></dt>
3268<dt><span class="sect2"><a href="#conf-files-patching">20.2.3. Patching installations</a></span></dt> 3268<dt><span class="sect2"><a href="#conf-files-patching">20.2.3. Patching installations</a></span></dt>
3269<dt><span class="sect2"><a href="#conf-files-disable">20.2.4. Disabling handling of configuration files</a></span></dt> 3269<dt><span class="sect2"><a href="#conf-files-disable">20.2.4. Disabling handling of configuration files</a></span></dt>
3270</dl></dd> 3270</dl></dd>
3271<dt><span class="sect1"><a href="#rcd-scripts">20.3. System startup scripts</a></span></dt> 3271<dt><span class="sect1"><a href="#rcd-scripts">20.3. System startup scripts</a></span></dt>
3272<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">20.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd> 3272<dd><dl><dt><span class="sect2"><a href="#rcd-scripts-disable">20.3.1. Disabling handling of system startup scripts</a></span></dt></dl></dd>
3273<dt><span class="sect1"><a href="#users-and-groups">20.4. System users and groups</a></span></dt> 3273<dt><span class="sect1"><a href="#users-and-groups">20.4. System users and groups</a></span></dt>
3274<dt><span class="sect1"><a href="#shells">20.5. System shells</a></span></dt> 3274<dt><span class="sect1"><a href="#shells">20.5. System shells</a></span></dt>
3275<dd><dl><dt><span class="sect2"><a href="#shells-disable">20.5.1. Disabling shell registration</a></span></dt></dl></dd> 3275<dd><dl><dt><span class="sect2"><a href="#shells-disable">20.5.1. Disabling shell registration</a></span></dt></dl></dd>
3276<dt><span class="sect1"><a href="#fonts">20.6. Fonts</a></span></dt> 3276<dt><span class="sect1"><a href="#fonts">20.6. Fonts</a></span></dt>
3277<dd><dl><dt><span class="sect2"><a href="#fonts-disable">20.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd> 3277<dd><dl><dt><span class="sect2"><a href="#fonts-disable">20.6.1. Disabling automatic update of the fonts databases</a></span></dt></dl></dd>
3278</dl></dd> 3278</dl></dd>
3279<dt><span class="chapter"><a href="#fixes">21. Making your package work</a></span></dt> 3279<dt><span class="chapter"><a href="#fixes">21. Making your package work</a></span></dt>
3280<dd><dl> 3280<dd><dl>
3281<dt><span class="sect1"><a href="#general-operation">21.1. General operation</a></span></dt> 3281<dt><span class="sect1"><a href="#general-operation">21.1. General operation</a></span></dt>
3282<dd><dl> 3282<dd><dl>
3283<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">21.1.1. How to pull in user-settable variables from <code class="filename">mk.conf</code></a></span></dt> 3283<dt><span class="sect2"><a href="#pulling-vars-from-etc-mk.conf">21.1.1. How to pull in user-settable variables from <code class="filename">mk.conf</code></a></span></dt>
3284<dt><span class="sect2"><a href="#user-interaction">21.1.2. User interaction</a></span></dt> 3284<dt><span class="sect2"><a href="#user-interaction">21.1.2. User interaction</a></span></dt>
3285<dt><span class="sect2"><a href="#handling-licenses">21.1.3. Handling licenses</a></span></dt> 3285<dt><span class="sect2"><a href="#handling-licenses">21.1.3. Handling licenses</a></span></dt>
3286<dt><span class="sect2"><a href="#restricted-packages">21.1.4. Restricted packages</a></span></dt> 3286<dt><span class="sect2"><a href="#restricted-packages">21.1.4. Restricted packages</a></span></dt>
3287<dt><span class="sect2"><a href="#dependencies">21.1.5. Handling dependencies</a></span></dt> 3287<dt><span class="sect2"><a href="#dependencies">21.1.5. Handling dependencies</a></span></dt>
3288<dt><span class="sect2"><a href="#conflicts">21.1.6. Handling conflicts with other packages</a></span></dt> 3288<dt><span class="sect2"><a href="#conflicts">21.1.6. Handling conflicts with other packages</a></span></dt>
3289<dt><span class="sect2"><a href="#not-building-packages">21.1.7. Packages that cannot or should not be built</a></span></dt> 3289<dt><span class="sect2"><a href="#not-building-packages">21.1.7. Packages that cannot or should not be built</a></span></dt>
3290<dt><span class="sect2"><a href="#undeletable-packages">21.1.8. Packages which should not be deleted, once installed</a></span></dt> 3290<dt><span class="sect2"><a href="#undeletable-packages">21.1.8. Packages which should not be deleted, once installed</a></span></dt>
3291<dt><span class="sect2"><a href="#security-handling">21.1.9. Handling packages with security problems</a></span></dt> 3291<dt><span class="sect2"><a href="#security-handling">21.1.9. Handling packages with security problems</a></span></dt>
3292<dt><span class="sect2"><a href="#bumping-pkgrevision">21.1.10. How to handle incrementing versions when fixing an existing package</a></span></dt> 3292<dt><span class="sect2"><a href="#bumping-pkgrevision">21.1.10. How to handle incrementing versions when fixing an existing package</a></span></dt>
3293<dt><span class="sect2"><a href="#fixes.subst">21.1.11. Substituting variable text in the package files (the SUBST framework)</a></span></dt> 3293<dt><span class="sect2"><a href="#fixes.subst">21.1.11. Substituting variable text in the package files (the SUBST framework)</a></span></dt>
3294</dl></dd> 3294</dl></dd>
3295<dt><span class="sect1"><a href="#fixes.fetch">21.2. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt> 3295<dt><span class="sect1"><a href="#fixes.fetch">21.2. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
3296<dd><dl> 3296<dd><dl>
3297<dt><span class="sect2"><a href="#no-plain-download">21.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt> 3297<dt><span class="sect2"><a href="#no-plain-download">21.2.1. Packages whose distfiles aren't available for plain downloading</a></span></dt>
3298<dt><span class="sect2"><a href="#modified-distfiles-same-name">21.2.2. How to handle modified distfiles with the 'old' name</a></span></dt> 3298<dt><span class="sect2"><a href="#modified-distfiles-same-name">21.2.2. How to handle modified distfiles with the 'old' name</a></span></dt>
3299<dt><span class="sect2"><a href="#build.fetch.github">21.2.3. Packages hosted on github.com</a></span></dt> 3299<dt><span class="sect2"><a href="#build.fetch.github">21.2.3. Packages hosted on github.com</a></span></dt>
3300</dl></dd> 3300</dl></dd>
3301<dt><span class="sect1"><a href="#fixes.configure">21.3. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt> 3301<dt><span class="sect1"><a href="#fixes.configure">21.3. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
3302<dd><dl> 3302<dd><dl>
3303<dt><span class="sect2"><a href="#fixes.libtool">21.3.1. Shared libraries - libtool</a></span></dt> 3303<dt><span class="sect2"><a href="#fixes.libtool">21.3.1. Shared libraries - libtool</a></span></dt>
3304<dt><span class="sect2"><a href="#using-libtool">21.3.2. Using libtool on GNU packages that already support libtool</a></span></dt> 3304<dt><span class="sect2"><a href="#using-libtool">21.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
3305<dt><span class="sect2"><a href="#autoconf-automake">21.3.3. GNU Autoconf/Automake</a></span></dt> 3305<dt><span class="sect2"><a href="#autoconf-automake">21.3.3. GNU Autoconf/Automake</a></span></dt>
3306<dt><span class="sect2"><a href="#meson">21.3.4. Meson / ninja</a></span></dt> 3306<dt><span class="sect2"><a href="#meson">21.3.4. Meson / ninja</a></span></dt>
3307</dl></dd> 3307</dl></dd>
3308<dt><span class="sect1"><a href="#programming-languages">21.4. Programming languages</a></span></dt> 3308<dt><span class="sect1"><a href="#programming-languages">21.4. Programming languages</a></span></dt>
3309<dd><dl> 3309<dd><dl>
3310<dt><span class="sect2"><a href="#basic-programming-languages">21.4.1. C, C++, and Fortran</a></span></dt> 3310<dt><span class="sect2"><a href="#basic-programming-languages">21.4.1. C, C++, and Fortran</a></span></dt>
3311<dt><span class="sect2"><a href="#java-programming-language">21.4.2. Java</a></span></dt> 3311<dt><span class="sect2"><a href="#java-programming-language">21.4.2. Java</a></span></dt>
3312<dt><span class="sect2"><a href="#go-programming-language">21.4.3. Go</a></span></dt> 3312<dt><span class="sect2"><a href="#go-programming-language">21.4.3. Go</a></span></dt>
3313<dt><span class="sect2"><a href="#rust-programming-language">21.4.4. Rust</a></span></dt> 3313<dt><span class="sect2"><a href="#rust-programming-language">21.4.4. Rust</a></span></dt>
3314<dt><span class="sect2"><a href="#perl-scripts">21.4.5. Packages containing Perl scripts</a></span></dt> 3314<dt><span class="sect2"><a href="#perl-scripts">21.4.5. Packages containing Perl scripts</a></span></dt>
3315<dt><span class="sect2"><a href="#shell-scripts">21.4.6. Packages containing shell scripts</a></span></dt> 3315<dt><span class="sect2"><a href="#shell-scripts">21.4.6. Packages containing shell scripts</a></span></dt>
3316<dt><span class="sect2"><a href="#other-programming-languages">21.4.7. Other programming languages</a></span></dt> 3316<dt><span class="sect2"><a href="#other-programming-languages">21.4.7. Other programming languages</a></span></dt>
3317</dl></dd> 3317</dl></dd>
3318<dt><span class="sect1"><a href="#fixes.build">21.5. The <span class="emphasis"><em>build</em></span> phase</a></span></dt> 3318<dt><span class="sect1"><a href="#fixes.build">21.5. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
3319<dd><dl> 3319<dd><dl>
3320<dt><span class="sect2"><a href="#fixes.build.cpp">21.5.1. Compiling C and C++ code conditionally</a></span></dt> 3320<dt><span class="sect2"><a href="#fixes.build.cpp">21.5.1. Compiling C and C++ code conditionally</a></span></dt>
3321<dt><span class="sect2"><a href="#compiler-bugs">21.5.2. How to handle compiler bugs</a></span></dt> 3321<dt><span class="sect2"><a href="#compiler-bugs">21.5.2. How to handle compiler bugs</a></span></dt>
3322<dt><span class="sect2"><a href="#fixes.build.header">21.5.3. No such file or directory</a></span></dt> 3322<dt><span class="sect2"><a href="#fixes.build.header">21.5.3. No such file or directory</a></span></dt>
3323<dt><span class="sect2"><a href="#undefined-reference">21.5.4. Undefined reference to <span class="quote">&#8220;<span class="quote">...</span>&#8221;</span></a></span></dt> 3323<dt><span class="sect2"><a href="#undefined-reference">21.5.4. Undefined reference to <span class="quote">&#8220;<span class="quote">...</span>&#8221;</span></a></span></dt>
3324<dt><span class="sect2"><a href="#out-of-memory">21.5.5. Running out of memory</a></span></dt> 3324<dt><span class="sect2"><a href="#out-of-memory">21.5.5. Running out of memory</a></span></dt>
3325</dl></dd> 3325</dl></dd>
3326<dt><span class="sect1"><a href="#fixes.install">21.6. The <span class="emphasis"><em>install</em></span> phase</a></span></dt> 3326<dt><span class="sect1"><a href="#fixes.install">21.6. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
3327<dd><dl> 3327<dd><dl>
3328<dt><span class="sect2"><a href="#install-scripts">21.6.1. Creating needed directories</a></span></dt> 3328<dt><span class="sect2"><a href="#install-scripts">21.6.1. Creating needed directories</a></span></dt>
3329<dt><span class="sect2"><a href="#where-to-install-documentation">21.6.2. Where to install documentation</a></span></dt> 3329<dt><span class="sect2"><a href="#where-to-install-documentation">21.6.2. Where to install documentation</a></span></dt>
3330<dt><span class="sect2"><a href="#installing-score-files">21.6.3. Installing highscore files</a></span></dt> 3330<dt><span class="sect2"><a href="#installing-score-files">21.6.3. Installing highscore files</a></span></dt>
3331<dt><span class="sect2"><a href="#destdir-support">21.6.4. Adding DESTDIR support to packages</a></span></dt> 3331<dt><span class="sect2"><a href="#destdir-support">21.6.4. Adding DESTDIR support to packages</a></span></dt>
3332<dt><span class="sect2"><a href="#hardcoded-paths">21.6.5. Packages with hardcoded paths to other interpreters</a></span></dt> 3332<dt><span class="sect2"><a href="#hardcoded-paths">21.6.5. Packages with hardcoded paths to other interpreters</a></span></dt>
3333<dt><span class="sect2"><a href="#perl-modules">21.6.6. Packages installing Perl modules</a></span></dt> 3333<dt><span class="sect2"><a href="#perl-modules">21.6.6. Packages installing Perl modules</a></span></dt>
3334<dt><span class="sect2"><a href="#faq.info-files">21.6.7. Packages installing info files</a></span></dt> 3334<dt><span class="sect2"><a href="#faq.info-files">21.6.7. Packages installing info files</a></span></dt>
3335<dt><span class="sect2"><a href="#manpages">21.6.8. Packages installing man pages</a></span></dt> 3335<dt><span class="sect2"><a href="#manpages">21.6.8. Packages installing man pages</a></span></dt>
3336<dt><span class="sect2"><a href="#x11-fonts">21.6.9. Packages installing X11 fonts</a></span></dt> 3336<dt><span class="sect2"><a href="#x11-fonts">21.6.9. Packages installing X11 fonts</a></span></dt>
3337<dt><span class="sect2"><a href="#sgml-xml-data">21.6.10. Packages installing SGML or XML data</a></span></dt> 3337<dt><span class="sect2"><a href="#sgml-xml-data">21.6.10. Packages installing SGML or XML data</a></span></dt>
3338<dt><span class="sect2"><a href="#mime-database">21.6.11. Packages installing extensions to the MIME database</a></span></dt> 3338<dt><span class="sect2"><a href="#mime-database">21.6.11. Packages installing extensions to the MIME database</a></span></dt>
3339<dt><span class="sect2"><a href="#intltool">21.6.12. Packages using intltool</a></span></dt> 3339<dt><span class="sect2"><a href="#intltool">21.6.12. Packages using intltool</a></span></dt>
3340<dt><span class="sect2"><a href="#startup-scripts">21.6.13. Packages installing startup scripts</a></span></dt> 3340<dt><span class="sect2"><a href="#startup-scripts">21.6.13. Packages installing startup scripts</a></span></dt>
3341<dt><span class="sect2"><a href="#tex-packages">21.6.14. Packages installing TeX modules</a></span></dt> 3341<dt><span class="sect2"><a href="#tex-packages">21.6.14. Packages installing TeX modules</a></span></dt>
3342<dt><span class="sect2"><a href="#emulation-packages">21.6.15. Packages supporting running binaries in 3342<dt><span class="sect2"><a href="#emulation-packages">21.6.15. Packages supporting running binaries in
3343 emulation</a></span></dt> 3343 emulation</a></span></dt>
3344<dt><span class="sect2"><a href="#hicolor-theme">21.6.16. Packages installing hicolor icons</a></span></dt> 3344<dt><span class="sect2"><a href="#hicolor-theme">21.6.16. Packages installing hicolor icons</a></span></dt>
3345<dt><span class="sect2"><a href="#desktop-files">21.6.17. Packages installing desktop files</a></span></dt> 3345<dt><span class="sect2"><a href="#desktop-files">21.6.17. Packages installing desktop files</a></span></dt>
3346</dl></dd> 3346</dl></dd>
3347<dt><span class="sect1"><a href="#punting">21.7. Marking packages as having problems</a></span></dt> 3347<dt><span class="sect1"><a href="#punting">21.7. Marking packages as having problems</a></span></dt>
3348</dl></dd> 3348</dl></dd>
3349<dt><span class="chapter"><a href="#gnome">22. GNOME packaging and porting</a></span></dt> 3349<dt><span class="chapter"><a href="#gnome">22. GNOME packaging and porting</a></span></dt>
3350<dd><dl> 3350<dd><dl>
3351<dt><span class="sect1"><a href="#meta-packages">22.1. Meta packages</a></span></dt> 3351<dt><span class="sect1"><a href="#meta-packages">22.1. Meta packages</a></span></dt>
3352<dt><span class="sect1"><a href="#new-package">22.2. Packaging a GNOME application</a></span></dt> 3352<dt><span class="sect1"><a href="#new-package">22.2. Packaging a GNOME application</a></span></dt>
3353<dt><span class="sect1"><a href="#full-update">22.3. Updating GNOME to a newer version</a></span></dt> 3353<dt><span class="sect1"><a href="#full-update">22.3. Updating GNOME to a newer version</a></span></dt>
3354<dt><span class="sect1"><a href="#patching">22.4. Patching guidelines</a></span></dt> 3354<dt><span class="sect1"><a href="#patching">22.4. Patching guidelines</a></span></dt>
3355</dl></dd> 3355</dl></dd>
3356<dt><span class="chapter"><a href="#submit">23. Submitting and Committing</a></span></dt> 3356<dt><span class="chapter"><a href="#submit">23. Submitting and Committing</a></span></dt>
3357<dd><dl> 3357<dd><dl>
3358<dt><span class="sect1"><a href="#submitting-binary-packages">23.1. Submitting binary packages</a></span></dt> 3358<dt><span class="sect1"><a href="#submitting-binary-packages">23.1. Submitting binary packages</a></span></dt>
3359<dt><span class="sect1"><a href="#submitting-your-package">23.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt> 3359<dt><span class="sect1"><a href="#submitting-your-package">23.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
3360<dt><span class="sect1"><a href="#general-notes-for-changes">23.3. General notes when adding, updating, or removing packages</a></span></dt> 3360<dt><span class="sect1"><a href="#general-notes-for-changes">23.3. General notes when adding, updating, or removing packages</a></span></dt>
3361<dt><span class="sect1"><a href="#commit-messages">23.4. Commit Messages</a></span></dt> 3361<dt><span class="sect1"><a href="#commit-messages">23.4. Commit Messages</a></span></dt>
3362<dt><span class="sect1"><a href="#committing-importing">23.5. Committing: Adding a package to CVS</a></span></dt> 3362<dt><span class="sect1"><a href="#committing-importing">23.5. Committing: Adding a package to CVS</a></span></dt>
3363<dt><span class="sect1"><a href="#updating-package">23.6. Updating a package to a newer version</a></span></dt> 3363<dt><span class="sect1"><a href="#updating-package">23.6. Updating a package to a newer version</a></span></dt>
3364<dt><span class="sect1"><a href="#renaming-package">23.7. Renaming a package in pkgsrc</a></span></dt> 3364<dt><span class="sect1"><a href="#renaming-package">23.7. Renaming a package in pkgsrc</a></span></dt>
3365<dt><span class="sect1"><a href="#moving-package">23.8. Moving a package in pkgsrc</a></span></dt> 3365<dt><span class="sect1"><a href="#moving-package">23.8. Moving a package in pkgsrc</a></span></dt>
3366</dl></dd> 3366</dl></dd>
3367<dt><span class="chapter"><a href="#devfaq">24. Frequently Asked Questions</a></span></dt> 3367<dt><span class="chapter"><a href="#devfaq">24. Frequently Asked Questions</a></span></dt>
3368</dl> 3368</dl>
3369</div> 3369</div>
3370</div> 3370</div>
3371<div class="chapter"> 3371<div class="chapter">
3372<div class="titlepage"><div><div><h2 class="title"> 3372<div class="titlepage"><div><div><h2 class="title">
3373<a name="help-devel"></a>Chapter 11. Getting help</h2></div></div></div> 3373<a name="help-devel"></a>Chapter 11. Getting help</h2></div></div></div>
3374<p> 3374<p>
3375 To get help when developing pkgsrc, the definitive source is this 3375 To get help when developing pkgsrc, the definitive source is this
3376 document, the pkgsrc guide. If you don't find anything here, 3376 document, the pkgsrc guide. If you don't find anything here,
3377 there are alternatives: 3377 there are alternatives:
3378</p> 3378</p>
3379<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 3379<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
3380<li class="listitem"> 3380<li class="listitem">
3381<p> 3381<p>
3382 The built-in pkgsrc help, which is available after bootstrapping 3382 The built-in pkgsrc help, which is available after bootstrapping
3383 pkgsrc. Run <span class="command"><strong>bmake help topic=&#8230;</strong></span> to get 3383 pkgsrc. Run <span class="command"><strong>bmake help topic=&#8230;</strong></span> to get
3384 help for any topic, such as a variable name like 3384 help for any topic, such as a variable name like
3385 <code class="varname">BUILD_DEFS</code>, a make target like 3385 <code class="varname">BUILD_DEFS</code>, a make target like
3386 <span class="command"><strong>do-build</strong></span>, a missing C or C++ function like 3386 <span class="command"><strong>do-build</strong></span>, a missing C or C++ function like
3387 <span class="command"><strong>strcasecmp</strong></span> or any other topic.</p> 3387 <span class="command"><strong>strcasecmp</strong></span> or any other topic.</p>
3388<p>The available help topics are listed in <a class="xref" href="#help-topics" title="Appendix E. Help topics">Appendix E, <i>Help topics</i></a>.</p> 3388<p>The available help topics are listed in <a class="xref" href="#help-topics" title="Appendix E. Help topics">Appendix E, <i>Help topics</i></a>.</p>
3389</li> 3389</li>
3390<li class="listitem"><p> 3390<li class="listitem"><p>
3391 To see the value of a single variable, run <span class="command"><strong>bmake 3391 To see the value of a single variable, run <span class="command"><strong>bmake
3392 show-var VARNAME=<em class="replaceable"><code>X</code></em></strong></span>. 3392 show-var VARNAME=<em class="replaceable"><code>X</code></em></strong></span>.
3393</p></li> 3393</p></li>
3394<li class="listitem"><p> 3394<li class="listitem"><p>
3395 To see the values of the most common variables, run 3395 To see the values of the most common variables, run
3396 <span class="command"><strong>bmake show-all</strong></span>. These variables are grouped by 3396 <span class="command"><strong>bmake show-all</strong></span>. These variables are grouped by
3397 topic. To see the variables for a single topic, run 3397 topic. To see the variables for a single topic, run
3398 <span class="command"><strong>bmake 3398 <span class="command"><strong>bmake
3399 show-all-<em class="replaceable"><code>topic</code></em></strong></span>, for example 3399 show-all-<em class="replaceable"><code>topic</code></em></strong></span>, for example
3400 <span class="command"><strong>bmake show-all-fetch</strong></span>. 3400 <span class="command"><strong>bmake show-all-fetch</strong></span>.
3401</p></li> 3401</p></li>
3402<li class="listitem"><p> 3402<li class="listitem"><p>
3403 The tech-pkg mailing list, to which 3403 The tech-pkg mailing list, to which
3404 <a class="ulink" href="https://www.NetBSD.org/mailinglists/#tech-pkg" target="_top">you 3404 <a class="ulink" href="https://www.NetBSD.org/mailinglists/#tech-pkg" target="_top">you
3405 can subscribe</a> and then <a class="ulink" href="mailto:tech-pkg@NetBSD.org" target="_top">ask your 3405 can subscribe</a> and then <a class="ulink" href="mailto:tech-pkg@NetBSD.org" target="_top">ask your
3406 questions</a>.</p></li> 3406 questions</a>.</p></li>
3407<li class="listitem"><p>The #pkgsrc IRC channel, which is accessible 3407<li class="listitem"><p>The #pkgsrc IRC channel, which is accessible
3408 <a class="ulink" href="https://webchat.freenode.net/" target="_top">via a web browser</a> 3408 <a class="ulink" href="https://webchat.freenode.net/" target="_top">via a web browser</a>
3409 or by using a specialized chat program such as 3409 or by using a specialized chat program such as
3410 <a class="ulink" href="http://xchat.org/" target="_top">XChat</a>. 3410 <a class="ulink" href="http://xchat.org/" target="_top">XChat</a>.
3411 Pick any user name and join the channel #pkgsrc.</p></li> 3411 Pick any user name and join the channel #pkgsrc.</p></li>
3412</ul></div> 3412</ul></div>
3413</div> 3413</div>
3414<div class="chapter"> 3414<div class="chapter">
3415<div class="titlepage"><div><div><h2 class="title"> 3415<div class="titlepage"><div><div><h2 class="title">
3416<a name="components"></a>Chapter 12. Package components - files, directories and contents</h2></div></div></div> 3416<a name="components"></a>Chapter 12. Package components - files, directories and contents</h2></div></div></div>
3417<div class="toc"> 3417<div class="toc">
3418<p><b>Table of Contents</b></p> 3418<p><b>Table of Contents</b></p>
3419<dl class="toc"> 3419<dl class="toc">
3420<dt><span class="sect1"><a href="#components.Makefile">12.1. <code class="filename">Makefile</code></a></span></dt> 3420<dt><span class="sect1"><a href="#components.Makefile">12.1. <code class="filename">Makefile</code></a></span></dt>
3421<dt><span class="sect1"><a href="#components.distinfo">12.2. <code class="filename">distinfo</code></a></span></dt> 3421<dt><span class="sect1"><a href="#components.distinfo">12.2. <code class="filename">distinfo</code></a></span></dt>
3422<dt><span class="sect1"><a href="#components.patches">12.3. <code class="filename">patches/*</code></a></span></dt> 3422<dt><span class="sect1"><a href="#components.patches">12.3. <code class="filename">patches/*</code></a></span></dt>
3423<dd><dl> 3423<dd><dl>
3424<dt><span class="sect2"><a href="#components.patch.structure">12.3.1. Structure of a single patch file</a></span></dt> 3424<dt><span class="sect2"><a href="#components.patch.structure">12.3.1. Structure of a single patch file</a></span></dt>
3425<dt><span class="sect2"><a href="#components.patches.caveats">12.3.2. Creating patch files</a></span></dt> 3425<dt><span class="sect2"><a href="#components.patches.caveats">12.3.2. Creating patch files</a></span></dt>
3426<dt><span class="sect2"><a href="#components.patches.sources">12.3.3. Sources where the patch files come from</a></span></dt> 3426<dt><span class="sect2"><a href="#components.patches.sources">12.3.3. Sources where the patch files come from</a></span></dt>
3427<dt><span class="sect2"><a href="#components.patches.guidelines">12.3.4. Patching guidelines</a></span></dt> 3427<dt><span class="sect2"><a href="#components.patches.guidelines">12.3.4. Patching guidelines</a></span></dt>
3428<dt><span class="sect2"><a href="#components.patches.feedback">12.3.5. Feedback to the author</a></span></dt> 3428<dt><span class="sect2"><a href="#components.patches.feedback">12.3.5. Feedback to the author</a></span></dt>
3429</dl></dd> 3429</dl></dd>
3430<dt><span class="sect1"><a href="#other-mandatory-files">12.4. Other mandatory files</a></span></dt> 3430<dt><span class="sect1"><a href="#other-mandatory-files">12.4. Other mandatory files</a></span></dt>
3431<dt><span class="sect1"><a href="#components.optional">12.5. Optional files</a></span></dt> 3431<dt><span class="sect1"><a href="#components.optional">12.5. Optional files</a></span></dt>
3432<dd><dl> 3432<dd><dl>
3433<dt><span class="sect2"><a href="#components.optional.bin">12.5.1. Files affecting the binary package</a></span></dt> 3433<dt><span class="sect2"><a href="#components.optional.bin">12.5.1. Files affecting the binary package</a></span></dt>
3434<dt><span class="sect2"><a href="#components.optional.build">12.5.2. Files affecting the build process</a></span></dt> 3434<dt><span class="sect2"><a href="#components.optional.build">12.5.2. Files affecting the build process</a></span></dt>
3435<dt><span class="sect2"><a href="#components.optional.none">12.5.3. Files affecting nothing at all</a></span></dt> 3435<dt><span class="sect2"><a href="#components.optional.none">12.5.3. Files affecting nothing at all</a></span></dt>
3436</dl></dd> 3436</dl></dd>
3437<dt><span class="sect1"><a href="#work-dir">12.6. <code class="filename">work*</code></a></span></dt> 3437<dt><span class="sect1"><a href="#work-dir">12.6. <code class="filename">work*</code></a></span></dt>
3438<dt><span class="sect1"><a href="#files-dir">12.7. <code class="filename">files/*</code></a></span></dt> 3438<dt><span class="sect1"><a href="#files-dir">12.7. <code class="filename">files/*</code></a></span></dt>
3439</dl> 3439</dl>
3440</div> 3440</div>
3441<p>Whenever you're preparing a package, there are a number of 3441<p>Whenever you're preparing a package, there are a number of
3442files involved which are described in the following 3442files involved which are described in the following
3443sections.</p> 3443sections.</p>
3444<div class="sect1"> 3444<div class="sect1">
3445<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3445<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3446<a name="components.Makefile"></a>12.1. <code class="filename">Makefile</code> 3446<a name="components.Makefile"></a>12.1. <code class="filename">Makefile</code>
3447</h2></div></div></div> 3447</h2></div></div></div>
3448<p>Building, installation and creation of a binary package are all 3448<p>Building, installation and creation of a binary package are all
3449 controlled by the package's <code class="filename">Makefile</code>. 3449 controlled by the package's <code class="filename">Makefile</code>.
3450 The <code class="filename">Makefile</code> describes various things about 3450 The <code class="filename">Makefile</code> describes various things about
3451 a package, for example from where to get it, how to configure, 3451 a package, for example from where to get it, how to configure,
3452 build, and install it.</p> 3452 build, and install it.</p>
3453<p>A package <code class="filename">Makefile</code> contains several 3453<p>A package <code class="filename">Makefile</code> contains several
3454 sections that describe the package.</p> 3454 sections that describe the package.</p>
3455<p>In the first section there are the following variables, which 3455<p>In the first section there are the following variables, which
3456 should appear exactly in the order given here. The order and 3456 should appear exactly in the order given here. The order and
3457 grouping of the variables is mostly historical and has no further 3457 grouping of the variables is mostly historical and has no further
3458 meaning.</p> 3458 meaning.</p>
3459<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 3459<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
3460<li class="listitem"><p><code class="varname">DISTNAME</code> is the basename of the 3460<li class="listitem"><p><code class="varname">DISTNAME</code> is the basename of the
3461 distribution file to be downloaded from the package's 3461 distribution file to be downloaded from the package's
3462 website.</p></li> 3462 website.</p></li>
3463<li class="listitem"><p><code class="varname">PKGNAME</code> is the name of the 3463<li class="listitem"><p><code class="varname">PKGNAME</code> is the name of the
3464 package, as used by pkgsrc. You need to provide it if 3464 package, as used by pkgsrc. You need to provide it if
3465 <code class="varname">DISTNAME</code> (which is the default) is not a good 3465 <code class="varname">DISTNAME</code> (which is the default) is not a good
3466 name for the package in pkgsrc or <code class="varname">DISTNAME</code> is not 3466 name for the package in pkgsrc or <code class="varname">DISTNAME</code> is not
3467 provided (no distribution file is required). Usually it is the pkgsrc 3467 provided (no distribution file is required). Usually it is the pkgsrc
3468 directory name together with the version number. It must match the 3468 directory name together with the version number. It must match the
3469 regular expression 3469 regular expression
3470 <code class="varname">^[A-Za-z0-9][A-Za-z0-9-_.+]*$</code>, that is, it 3470 <code class="varname">^[A-Za-z0-9][A-Za-z0-9-_.+]*$</code>, that is, it
3471 starts with a letter or digit, and contains only letters, digits, 3471 starts with a letter or digit, and contains only letters, digits,
3472 dashes, underscores, dots and plus signs. 3472 dashes, underscores, dots and plus signs.
3473 New packages should have entirely lower-case names, with the exception 3473 New packages should have entirely lower-case names, with the exception
3474 of some that must follow pre-existing conventions 3474 of some that must follow pre-existing conventions
3475 (e.g. R packages begin with <code class="varname">R-</code>). 3475 (e.g. R packages begin with <code class="varname">R-</code>).
3476 You can use the <code class="code">:tl</code> variable modifier to lower-case 3476 You can use the <code class="code">:tl</code> variable modifier to lower-case
3477 the package name.</p></li> 3477 the package name.</p></li>
3478<li class="listitem"> 3478<li class="listitem">
3479<p><code class="varname">CATEGORIES</code> is a list of categories 3479<p><code class="varname">CATEGORIES</code> is a list of categories
3480 which the package fits in. You can choose any of the top-level 3480 which the package fits in. You can choose any of the top-level
3481 directories of pkgsrc for it.</p> 3481 directories of pkgsrc for it.</p>
3482<p>Currently the following values are available for 3482<p>Currently the following values are available for
3483 <code class="varname">CATEGORIES</code>. If more than 3483 <code class="varname">CATEGORIES</code>. If more than
3484 one is used, they need to be separated by spaces:</p> 3484 one is used, they need to be separated by spaces:</p>
3485<pre class="programlisting"> 3485<pre class="programlisting">
3486archivers cross geography meta-pkgs security 3486archivers cross geography meta-pkgs security
3487audio databases graphics misc shells 3487audio databases graphics misc shells
3488benchmarks devel ham multimedia sysutils 3488benchmarks devel ham multimedia sysutils
3489biology editors inputmethod net textproc 3489biology editors inputmethod net textproc
3490cad emulators lang news time 3490cad emulators lang news time
3491chat finance mail parallel wm 3491chat finance mail parallel wm
3492comms fonts math pkgtools www 3492comms fonts math pkgtools www
3493converters games mbone print x11 3493converters games mbone print x11
3494</pre> 3494</pre>
3495</li> 3495</li>
3496<li class="listitem"><p><code class="varname">MASTER_SITES</code>, 3496<li class="listitem"><p><code class="varname">MASTER_SITES</code>,
3497 <code class="varname">DYNAMIC_MASTER_SITES</code>, 3497 <code class="varname">DYNAMIC_MASTER_SITES</code>,
3498 <code class="varname">DIST_SUBDIR</code>, <code class="varname">EXTRACT_SUFX</code> 3498 <code class="varname">DIST_SUBDIR</code>, <code class="varname">EXTRACT_SUFX</code>
3499 and <code class="varname">DISTFILES</code> are discussed in detail in 3499 and <code class="varname">DISTFILES</code> are discussed in detail in
3500 <a class="xref" href="#build.fetch" title="13.5. The fetch phase">Section 13.5, &#8220;The <span class="emphasis"><em>fetch</em></span> phase&#8221;</a>.</p></li> 3500 <a class="xref" href="#build.fetch" title="13.5. The fetch phase">Section 13.5, &#8220;The <span class="emphasis"><em>fetch</em></span> phase&#8221;</a>.</p></li>
3501</ul></div> 3501</ul></div>
3502<p>The second section contains information about separately 3502<p>The second section contains information about separately
3503 downloaded patches, if any. 3503 downloaded patches, if any.
3504 </p> 3504 </p>
3505<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 3505<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
3506<li class="listitem"><p><code class="varname">PATCHFILES</code>: 3506<li class="listitem"><p><code class="varname">PATCHFILES</code>:
3507 Name(s) of additional files that contain distribution patches. 3507 Name(s) of additional files that contain distribution patches.
3508 There is no default. pkgsrc will look for them at 3508 There is no default. pkgsrc will look for them at
3509 <code class="varname">PATCH_SITES</code>. 3509 <code class="varname">PATCH_SITES</code>.
3510 They will automatically be uncompressed before patching if 3510 They will automatically be uncompressed before patching if
3511 the names end with <code class="filename">.gz</code> or 3511 the names end with <code class="filename">.gz</code> or
3512 <code class="filename">.Z</code>.</p></li> 3512 <code class="filename">.Z</code>.</p></li>
3513<li class="listitem"><p><code class="varname">PATCH_SITES</code>: 3513<li class="listitem"><p><code class="varname">PATCH_SITES</code>:
3514 Primary location(s) for distribution patch files (see 3514 Primary location(s) for distribution patch files (see
3515 <code class="varname">PATCHFILES</code> above) if not found locally.</p></li> 3515 <code class="varname">PATCHFILES</code> above) if not found locally.</p></li>
3516<li class="listitem"><p><code class="varname">PATCH_DIST_STRIP</code>: 3516<li class="listitem"><p><code class="varname">PATCH_DIST_STRIP</code>:
3517 an argument to <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/patch.1"><span class="citerefentry"><span class="refentrytitle">patch</span>(1)</span></a> that sets the pathname strip count to 3517 an argument to <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/patch.1"><span class="citerefentry"><span class="refentrytitle">patch</span>(1)</span></a> that sets the pathname strip count to
3518 help find the correct files to patch. It defaults to 3518 help find the correct files to patch. It defaults to
3519 <span class="command"><strong>-p0</strong></span>.</p></li> 3519 <span class="command"><strong>-p0</strong></span>.</p></li>
3520</ul></div> 3520</ul></div>
3521<p>The third section contains the following variables. 3521<p>The third section contains the following variables.
3522 </p> 3522 </p>
3523<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 3523<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
3524<li class="listitem"><p><code class="varname">MAINTAINER</code> is the email 3524<li class="listitem"><p><code class="varname">MAINTAINER</code> is the email
3525 address of the person who feels responsible for this package, 3525 address of the person who feels responsible for this package,
3526 and who is most likely to look at problems or questions regarding 3526 and who is most likely to look at problems or questions regarding
3527 this package which have been reported with <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/send-pr.1"><span class="citerefentry"><span class="refentrytitle">send-pr</span>(1)</span></a>. 3527 this package which have been reported with <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/send-pr.1"><span class="citerefentry"><span class="refentrytitle">send-pr</span>(1)</span></a>.
3528 Other developers may contact the <code class="varname">MAINTAINER</code> 3528 Other developers may contact the <code class="varname">MAINTAINER</code>
3529 before making changes to the package, but are not required to 3529 before making changes to the package, but are not required to
3530 do so. When packaging a new program, set <code class="varname">MAINTAINER</code> 3530 do so. When packaging a new program, set <code class="varname">MAINTAINER</code>
3531 to yourself. If you really can't maintain the package for future 3531 to yourself. If you really can't maintain the package for future
3532 updates, set it to 3532 updates, set it to
3533 <code class="email">&lt;<a class="email" href="mailto:pkgsrc-users@NetBSD.org">pkgsrc-users@NetBSD.org</a>&gt;</code>.</p></li> 3533 <code class="email">&lt;<a class="email" href="mailto:pkgsrc-users@NetBSD.org">pkgsrc-users@NetBSD.org</a>&gt;</code>.</p></li>
3534<li class="listitem"><p><code class="varname">OWNER</code> should be used instead 3534<li class="listitem"><p><code class="varname">OWNER</code> should be used instead
3535 of <code class="varname">MAINTAINER</code> when you do not want other 3535 of <code class="varname">MAINTAINER</code> when you do not want other
3536 developers to update or change the package without contacting 3536 developers to update or change the package without contacting
3537 you first. A package Makefile should contain one of 3537 you first. A package Makefile should contain one of
3538 <code class="varname">MAINTAINER</code> or <code class="varname">OWNER</code>, but 3538 <code class="varname">MAINTAINER</code> or <code class="varname">OWNER</code>, but
3539 not both. </p></li> 3539 not both. </p></li>
3540<li class="listitem"><p><code class="varname">HOMEPAGE</code> is a URL where users can 3540<li class="listitem"><p><code class="varname">HOMEPAGE</code> is a URL where users can
3541 find more information about the package.</p></li> 3541 find more information about the package.</p></li>
3542<li class="listitem"><p><code class="varname">COMMENT</code> is a one-line 3542<li class="listitem"><p><code class="varname">COMMENT</code> is a one-line
3543 description of the package (should not include the package 3543 description of the package (should not include the package
3544 name).</p></li> 3544 name).</p></li>
3545<li class="listitem"><p><code class="varname">LICENSE</code> indicates the license(s) 3545<li class="listitem"><p><code class="varname">LICENSE</code> indicates the license(s)
3546 applicable for the package. See <a class="xref" href="#handling-licenses" title="21.1.3. Handling licenses">Section 21.1.3, &#8220;Handling licenses&#8221;</a> for further details.</p></li> 3546 applicable for the package. See <a class="xref" href="#handling-licenses" title="21.1.3. Handling licenses">Section 21.1.3, &#8220;Handling licenses&#8221;</a> for further details.</p></li>
3547</ul></div> 3547</ul></div>
3548<p>Other variables that affect the build: 3548<p>Other variables that affect the build:
3549 </p> 3549 </p>
3550<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> 3550<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
3551<p><code class="varname">WRKSRC</code>: The directory where the 3551<p><code class="varname">WRKSRC</code>: The directory where the
3552 interesting distribution files of the package are found. The 3552 interesting distribution files of the package are found. The
3553 default is <code class="filename">${WRKDIR}/${DISTNAME}</code>, which 3553 default is <code class="filename">${WRKDIR}/${DISTNAME}</code>, which
3554 works for most packages.</p> 3554 works for most packages.</p>
3555<p>If a package doesn't create a subdirectory for itself 3555<p>If a package doesn't create a subdirectory for itself
3556 (most GNU software does, for instance), but extracts itself in 3556 (most GNU software does, for instance), but extracts itself in
3557 the current directory, you should set 3557 the current directory, you should set
3558 <code class="varname">WRKSRC=${WRKDIR}</code>.</p> 3558 <code class="varname">WRKSRC=${WRKDIR}</code>.</p>
3559<p>If a package doesn't create a subdirectory with the 3559<p>If a package doesn't create a subdirectory with the
3560 name of <code class="varname">DISTNAME</code> but some different name, 3560 name of <code class="varname">DISTNAME</code> but some different name,
3561 set <code class="varname">WRKSRC</code> to point to the proper name in 3561 set <code class="varname">WRKSRC</code> to point to the proper name in
3562 <code class="filename">${WRKDIR}</code>, for example 3562 <code class="filename">${WRKDIR}</code>, for example
3563 <code class="varname">WRKSRC=${WRKDIR}/${DISTNAME}/unix</code>. See 3563 <code class="varname">WRKSRC=${WRKDIR}/${DISTNAME}/unix</code>. See
3564 <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/lang/tcl/index.html" target="_top"><code class="filename">lang/tcl</code></a> and <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/x11/tk/index.html" target="_top"><code class="filename">x11/tk</code></a> for other examples.</p> 3564 <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/lang/tcl/index.html" target="_top"><code class="filename">lang/tcl</code></a> and <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/x11/tk/index.html" target="_top"><code class="filename">x11/tk</code></a> for other examples.</p>
3565<p>The name of the working directory created by pkgsrc is 3565<p>The name of the working directory created by pkgsrc is
3566 taken from the <code class="varname">WRKDIR_BASENAME</code> 3566 taken from the <code class="varname">WRKDIR_BASENAME</code>
3567 variable. By default, its value is 3567 variable. By default, its value is
3568 <code class="filename">work</code>. If you want to use the same 3568 <code class="filename">work</code>. If you want to use the same
3569 pkgsrc tree for building different kinds of binary packages, 3569 pkgsrc tree for building different kinds of binary packages,
3570 you can change the variable according to your needs. Two 3570 you can change the variable according to your needs. Two
3571 other variables handle common cases of setting 3571 other variables handle common cases of setting
3572 <code class="varname">WRKDIR_BASENAME</code> individually. If 3572 <code class="varname">WRKDIR_BASENAME</code> individually. If
3573 <code class="varname">OBJHOSTNAME</code> is defined in 3573 <code class="varname">OBJHOSTNAME</code> is defined in
3574 <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, the first component of 3574 <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, the first component of
3575 the host's name is attached to the directory name. If 3575 the host's name is attached to the directory name. If
3576 <code class="varname">OBJMACHINE</code> is defined, the platform name 3576 <code class="varname">OBJMACHINE</code> is defined, the platform name
3577 is attached, which might look like 3577 is attached, which might look like
3578 <code class="filename">work.i386</code> or 3578 <code class="filename">work.i386</code> or
3579 <code class="filename">work.sparc</code>.</p> 3579 <code class="filename">work.sparc</code>.</p>
3580</li></ul></div> 3580</li></ul></div>
3581<p>Please pay attention to the following gotchas:</p> 3581<p>Please pay attention to the following gotchas:</p>
3582<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 3582<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
3583<li class="listitem"><p>Add <code class="varname">MANCOMPRESSED</code> if man pages are 3583<li class="listitem"><p>Add <code class="varname">MANCOMPRESSED</code> if man pages are
3584 installed in compressed form by the package. For packages using 3584 installed in compressed form by the package. For packages using
3585 BSD-style makefiles which honor MANZ, there is 3585 BSD-style makefiles which honor MANZ, there is
3586 <code class="varname">MANCOMPRESSED_IF_MANZ</code>.</p></li> 3586 <code class="varname">MANCOMPRESSED_IF_MANZ</code>.</p></li>
3587<li class="listitem"><p>Replace <code class="filename">/usr/local</code> with 3587<li class="listitem"><p>Replace <code class="filename">/usr/local</code> with
3588 <span class="quote">&#8220;<span class="quote">${PREFIX}</span>&#8221;</span> in all files (see patches, 3588 <span class="quote">&#8220;<span class="quote">${PREFIX}</span>&#8221;</span> in all files (see patches,
3589 below).</p></li> 3589 below).</p></li>
3590<li class="listitem"><p>If the package installs any info files, see <a class="xref" href="#faq.info-files" title="21.6.7. Packages installing info files">Section 21.6.7, &#8220;Packages installing info files&#8221;</a>.</p></li> 3590<li class="listitem"><p>If the package installs any info files, see <a class="xref" href="#faq.info-files" title="21.6.7. Packages installing info files">Section 21.6.7, &#8220;Packages installing info files&#8221;</a>.</p></li>
3591</ul></div> 3591</ul></div>
3592</div> 3592</div>
3593<div class="sect1"> 3593<div class="sect1">
3594<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3594<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3595<a name="components.distinfo"></a>12.2. <code class="filename">distinfo</code> 3595<a name="components.distinfo"></a>12.2. <code class="filename">distinfo</code>
3596</h2></div></div></div> 3596</h2></div></div></div>
3597<p>The <code class="filename">distinfo</code> file contains the message 3597<p>The <code class="filename">distinfo</code> file contains the message
3598 digest, or checksum, of each distfile needed for the package. This 3598 digest, or checksum, of each distfile needed for the package. This
3599 ensures that the distfiles retrieved from the Internet have not been 3599 ensures that the distfiles retrieved from the Internet have not been
3600 corrupted during transfer or altered by a malign force to introduce 3600 corrupted during transfer or altered by a malign force to introduce
3601 a security hole. To provide maximum security, all distfiles are 3601 a security hole. To provide maximum security, all distfiles are
3602 protected using three different message digest algorithms (SHA1, 3602 protected using three different message digest algorithms (SHA1,
3603 RMD160, SHA512), as well as the file size.</p> 3603 RMD160, SHA512), as well as the file size.</p>
3604<p>The <code class="filename">distinfo</code> file also contains the 3604<p>The <code class="filename">distinfo</code> file also contains the
3605 checksums for all the patches found in the 3605 checksums for all the patches found in the
3606 <code class="filename">patches</code> directory (see <a class="xref" href="#components.patches" title="12.3. patches/*">Section 12.3, &#8220;<code class="filename">patches/*</code>&#8221;</a>). These checksums ensure that patches 3606 <code class="filename">patches</code> directory (see <a class="xref" href="#components.patches" title="12.3. patches/*">Section 12.3, &#8220;<code class="filename">patches/*</code>&#8221;</a>). These checksums ensure that patches
3607 are only applied intentionally and that they don't accidentally change, 3607 are only applied intentionally and that they don't accidentally change,
3608 e.g. when merging different changes together. They also make sure that 3608 e.g. when merging different changes together. They also make sure that
3609 new patches are actually added to CVS and old ones are removed. 3609 new patches are actually added to CVS and old ones are removed.
3610 Too see whether the patches and the <code class="filename">distinfo</code> file 3610 Too see whether the patches and the <code class="filename">distinfo</code> file
3611 match, run <span class="command"><strong>pkglint</strong></span> after changing the patches.</p> 3611 match, run <span class="command"><strong>pkglint</strong></span> after changing the patches.</p>
3612<p>To regenerate the <code class="filename">distinfo</code> file, use the 3612<p>To regenerate the <code class="filename">distinfo</code> file, use the
3613 <span class="command"><strong>make distinfo</strong></span> command.</p> 3613 <span class="command"><strong>make distinfo</strong></span> command.</p>
3614<p>Some packages have different sets of distfiles depending on 3614<p>Some packages have different sets of distfiles depending on
3615 the platform, for example <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/lang/openjdk8/index.html" target="_top"><code class="filename">lang/openjdk8</code></a>. These are kept in the same 3615 the platform, for example <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/lang/openjdk8/index.html" target="_top"><code class="filename">lang/openjdk8</code></a>. These are kept in the same
3616 <code class="filename">distinfo</code> file and care should be taken when 3616 <code class="filename">distinfo</code> file and care should be taken when
3617 upgrading such a package to ensure distfile information is not 3617 upgrading such a package to ensure distfile information is not
3618 lost.</p> 3618 lost.</p>
3619</div> 3619</div>
3620<div class="sect1"> 3620<div class="sect1">
3621<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3621<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3622<a name="components.patches"></a>12.3. <code class="filename">patches/*</code> 3622<a name="components.patches"></a>12.3. <code class="filename">patches/*</code>
3623</h2></div></div></div> 3623</h2></div></div></div>
3624<p>Some packages don't work out-of-the box on the various 3624<p>Some packages don't work out-of-the box on the various
3625 platforms that are supported by pkgsrc. These packages need 3625 platforms that are supported by pkgsrc. These packages need
3626 to be patched to make them work. The patch files can be 3626 to be patched to make them work. The patch files can be
3627 found in the <code class="filename">patches/</code> directory.</p> 3627 found in the <code class="filename">patches/</code> directory.</p>
3628<p>In the <span class="emphasis"><em>patch</em></span> phase, these patches are 3628<p>In the <span class="emphasis"><em>patch</em></span> phase, these patches are
3629 applied to the files in <code class="varname">WRKSRC</code> directory after 3629 applied to the files in <code class="varname">WRKSRC</code> directory after
3630 extracting them, in alphabetic order.</p> 3630 extracting them, in alphabetic order.</p>
3631<div class="sect2"> 3631<div class="sect2">
3632<div class="titlepage"><div><div><h3 class="title"> 3632<div class="titlepage"><div><div><h3 class="title">
3633<a name="components.patch.structure"></a>12.3.1. Structure of a single patch file</h3></div></div></div> 3633<a name="components.patch.structure"></a>12.3.1. Structure of a single patch file</h3></div></div></div>
3634<p>The <code class="filename">patch-*</code> files should be in 3634<p>The <code class="filename">patch-*</code> files should be in
3635 <span class="command"><strong>diff -bu</strong></span> format, and apply without a fuzz to avoid 3635 <span class="command"><strong>diff -bu</strong></span> format, and apply without a fuzz to avoid
3636 problems. (To force patches to apply with fuzz you can set 3636 problems. (To force patches to apply with fuzz you can set
3637 <code class="varname">PATCH_FUZZ_FACTOR=-F2</code>). Furthermore, each patch 3637 <code class="varname">PATCH_FUZZ_FACTOR=-F2</code>). Furthermore, each patch
3638 should contain only changes for a single file, and no file should be 3638 should contain only changes for a single file, and no file should be
3639 patched by more than one patch file. This helps to keep future 3639 patched by more than one patch file. This helps to keep future
3640 modifications simple.</p> 3640 modifications simple.</p>
3641<p>Each patch file is structured as follows: In the first line, 3641<p>Each patch file is structured as follows: In the first line,
3642 there is the RCS Id of the patch itself. The second line should be 3642 there is the RCS Id of the patch itself. The second line should be
3643 empty for aesthetic reasons. After that, there should be a comment for 3643 empty for aesthetic reasons. After that, there should be a comment for
3644 each change that the patch does. There are a number of standard 3644 each change that the patch does. There are a number of standard
3645 cases:</p> 3645 cases:</p>
3646<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 3646<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
3647<li class="listitem"><p>Patches for commonly known vulnerabilities should 3647<li class="listitem"><p>Patches for commonly known vulnerabilities should
3648 mention the vulnerability ID (CAN, CVE).</p></li> 3648 mention the vulnerability ID (CAN, CVE).</p></li>
3649<li class="listitem"><p>Patches that change source code should mention the 3649<li class="listitem"><p>Patches that change source code should mention the
3650 platform and other environment (for example, the compiler) that the 3650 platform and other environment (for example, the compiler) that the
3651 patch is needed for.</p></li> 3651 patch is needed for.</p></li>
3652</ul></div> 3652</ul></div>
3653<p>The patch should be commented so that any 3653<p>The patch should be commented so that any
3654 developer who knows the code of the application can make some use of 3654 developer who knows the code of the application can make some use of
3655 the patch. Special care should be taken for the upstream developers, 3655 the patch. Special care should be taken for the upstream developers,
3656 since we generally want that they accept our patches, so we have less 3656 since we generally want that they accept our patches, so we have less
3657 work in the future.</p> 3657 work in the future.</p>
3658</div> 3658</div>
3659<div class="sect2"> 3659<div class="sect2">
3660<div class="titlepage"><div><div><h3 class="title"> 3660<div class="titlepage"><div><div><h3 class="title">
3661<a name="components.patches.caveats"></a>12.3.2. Creating patch files</h3></div></div></div> 3661<a name="components.patches.caveats"></a>12.3.2. Creating patch files</h3></div></div></div>
3662<p>One important thing to mention is to pay attention that no RCS 3662<p>One important thing to mention is to pay attention that no RCS
3663 IDs get stored in the patch files, as these will cause problems when 3663 IDs get stored in the patch files, as these will cause problems when
3664 later checked into the NetBSD CVS tree. Use the 3664 later checked into the NetBSD CVS tree. Use the
3665 <span class="command"><strong>pkgdiff</strong></span> command from the <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdiff/index.html" target="_top"><code class="filename">pkgtools/pkgdiff</code></a> package to avoid these 3665 <span class="command"><strong>pkgdiff</strong></span> command from the <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdiff/index.html" target="_top"><code class="filename">pkgtools/pkgdiff</code></a> package to avoid these
3666 problems.</p> 3666 problems.</p>
3667<p>For even more automation, we recommend using 3667<p>For even more automation, we recommend using
3668 <span class="command"><strong>mkpatches</strong></span> from the same package to make a 3668 <span class="command"><strong>mkpatches</strong></span> from the same package to make a
3669 whole set of patches. You just have to back up files before you 3669 whole set of patches. You just have to back up files before you
3670 edit them to <code class="filename">filename.orig</code>, e.g., with 3670 edit them to <code class="filename">filename.orig</code>, e.g., with
3671 <span class="command"><strong>cp -p filename filename.orig</strong></span> or, easier, by 3671 <span class="command"><strong>cp -p filename filename.orig</strong></span> or, easier, by
3672 using <span class="command"><strong>pkgvi</strong></span> again from the same package. If 3672 using <span class="command"><strong>pkgvi</strong></span> again from the same package. If
3673 you upgrade a package this way, you can easily compare the new 3673 you upgrade a package this way, you can easily compare the new
3674 set of patches with the previously existing one with 3674 set of patches with the previously existing one with
3675 <span class="command"><strong>patchdiff</strong></span>. The files in <code class="filename">patches</code> 3675 <span class="command"><strong>patchdiff</strong></span>. The files in <code class="filename">patches</code>
3676 are replaced by new files, so carefully check if you want to take all 3676 are replaced by new files, so carefully check if you want to take all
3677 the changes.</p> 3677 the changes.</p>
3678<p>When you have finished a package, remember to generate 3678<p>When you have finished a package, remember to generate
3679 the checksums for the patch files by using the <span class="command"><strong>make 3679 the checksums for the patch files by using the <span class="command"><strong>make
3680 makepatchsum</strong></span> command, see <a class="xref" href="#components.distinfo" title="12.2. distinfo">Section 12.2, &#8220;<code class="filename">distinfo</code>&#8221;</a>.</p> 3680 makepatchsum</strong></span> command, see <a class="xref" href="#components.distinfo" title="12.2. distinfo">Section 12.2, &#8220;<code class="filename">distinfo</code>&#8221;</a>.</p>
3681<p>When adding a patch that corrects a problem in the 3681<p>When adding a patch that corrects a problem in the
3682 distfile (rather than e.g. enforcing pkgsrc's view of where 3682 distfile (rather than e.g. enforcing pkgsrc's view of where
3683 man pages should go), send the patch as a bug report to the 3683 man pages should go), send the patch as a bug report to the
3684 maintainer. This benefits non-pkgsrc users of the package, 3684 maintainer. This benefits non-pkgsrc users of the package,
3685 and usually makes it possible to remove the patch in future 3685 and usually makes it possible to remove the patch in future
3686 version.</p> 3686 version.</p>
3687<p>The file names of the patch files are usually of the form 3687<p>The file names of the patch files are usually of the form
3688 <code class="filename">patch-<em class="replaceable"><code>path_to_file__with__underscores.c</code></em></code>. 3688 <code class="filename">patch-<em class="replaceable"><code>path_to_file__with__underscores.c</code></em></code>.
3689 Many packages still use the previous convention 3689 Many packages still use the previous convention
3690 <code class="filename">patch-<em class="replaceable"><code>[a-z][a-z]</code></em></code>, 3690 <code class="filename">patch-<em class="replaceable"><code>[a-z][a-z]</code></em></code>,
3691 but new patches should be of the form containing the filename. 3691 but new patches should be of the form containing the filename.
3692 <span class="command"><strong>mkpatches</strong></span> included in <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdiff/index.html" target="_top"><code class="filename">pkgtools/pkgdiff</code></a> takes care of the name 3692 <span class="command"><strong>mkpatches</strong></span> included in <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdiff/index.html" target="_top"><code class="filename">pkgtools/pkgdiff</code></a> takes care of the name
3693 automatically.</p> 3693 automatically.</p>
3694<p>When updating pre-existing patch files, if a file uses the old 3694<p>When updating pre-existing patch files, if a file uses the old
3695 <code class="filename">patch-<em class="replaceable"><code>[a-z][a-z]</code></em></code> 3695 <code class="filename">patch-<em class="replaceable"><code>[a-z][a-z]</code></em></code>
3696 convention, it's best not to change it to the new form, as that will 3696 convention, it's best not to change it to the new form, as that will
3697 just cause churn that makes it harder to track changes to patching 3697 just cause churn that makes it harder to track changes to patching
3698 over time. Similarly, if a patch now applies at different line offsets, 3698 over time. Similarly, if a patch now applies at different line offsets,
3699 but still applies cleanly as-is, there's no need to update it, as that 3699 but still applies cleanly as-is, there's no need to update it, as that
3700 also unnecessarily complicates the patch history.</p> 3700 also unnecessarily complicates the patch history.</p>
3701</div> 3701</div>
3702<div class="sect2"> 3702<div class="sect2">
3703<div class="titlepage"><div><div><h3 class="title"> 3703<div class="titlepage"><div><div><h3 class="title">
3704<a name="components.patches.sources"></a>12.3.3. Sources where the patch files come from</h3></div></div></div> 3704<a name="components.patches.sources"></a>12.3.3. Sources where the patch files come from</h3></div></div></div>
3705<p>If you want to share patches between multiple packages 3705<p>If you want to share patches between multiple packages
3706 in pkgsrc, e.g. because they use the same distfiles, set 3706 in pkgsrc, e.g. because they use the same distfiles, set
3707 <code class="varname">PATCHDIR</code> to the path where the patch files 3707 <code class="varname">PATCHDIR</code> to the path where the patch files
3708 can be found, e.g.:</p> 3708 can be found, e.g.:</p>
3709<pre class="programlisting"> 3709<pre class="programlisting">
3710PATCHDIR= ../../editors/xemacs/patches 3710PATCHDIR= ../../editors/xemacs/patches
3711</pre> 3711</pre>
3712<p>Patch files that are distributed by the author or other 3712<p>Patch files that are distributed by the author or other
3713 maintainers can be listed in 3713 maintainers can be listed in
3714 <code class="varname">PATCHFILES</code>.</p> 3714 <code class="varname">PATCHFILES</code>.</p>
3715<p>If it is desired to store any patches that should not be 3715<p>If it is desired to store any patches that should not be
3716 committed into pkgsrc, they can be kept outside the pkgsrc 3716 committed into pkgsrc, they can be kept outside the pkgsrc
3717 tree in the <code class="filename">$LOCALPATCHES</code> directory. The 3717 tree in the <code class="filename">$LOCALPATCHES</code> directory. The
3718 directory tree there is expected to have the same 3718 directory tree there is expected to have the same
3719 <span class="quote">&#8220;<span class="quote">category/package</span>&#8221;</span> structure as pkgsrc, and 3719 <span class="quote">&#8220;<span class="quote">category/package</span>&#8221;</span> structure as pkgsrc, and
3720 patches are expected to be stored inside these dirs (also 3720 patches are expected to be stored inside these dirs (also
3721 known as <code class="filename">$LOCALPATCHES/$PKGPATH</code>). For 3721 known as <code class="filename">$LOCALPATCHES/$PKGPATH</code>). For
3722 example, if you want to keep a private patch for 3722 example, if you want to keep a private patch for
3723 <code class="filename">pkgsrc/graphics/png</code>, keep it in 3723 <code class="filename">pkgsrc/graphics/png</code>, keep it in
3724 <code class="filename">$LOCALPATCHES/graphics/png/mypatch</code>. All 3724 <code class="filename">$LOCALPATCHES/graphics/png/mypatch</code>. All
3725 files in the named directory are expected to be patch files, 3725 files in the named directory are expected to be patch files,
3726 and <span class="emphasis"><em>they are applied after pkgsrc patches are 3726 and <span class="emphasis"><em>they are applied after pkgsrc patches are
3727 applied</em></span>.</p> 3727 applied</em></span>.</p>
3728</div> 3728</div>
3729<div class="sect2"> 3729<div class="sect2">
3730<div class="titlepage"><div><div><h3 class="title"> 3730<div class="titlepage"><div><div><h3 class="title">
3731<a name="components.patches.guidelines"></a>12.3.4. Patching guidelines</h3></div></div></div> 3731<a name="components.patches.guidelines"></a>12.3.4. Patching guidelines</h3></div></div></div>
3732<p>When fixing a portability issue in the code do not use 3732<p>When fixing a portability issue in the code do not use
3733 preprocessor magic to check for the current operating system nor 3733 preprocessor magic to check for the current operating system nor
3734 platform. Doing so hurts portability to other platforms because 3734 platform. Doing so hurts portability to other platforms because
3735 the OS-specific details are not abstracted appropriately.</p> 3735 the OS-specific details are not abstracted appropriately.</p>
3736<p>The general rule to follow is: instead of checking for the 3736<p>The general rule to follow is: instead of checking for the
3737 operating system the application is being built on, check for the 3737 operating system the application is being built on, check for the
3738 specific <span class="emphasis"><em>features</em></span> you need. For example, 3738 specific <span class="emphasis"><em>features</em></span> you need. For example,
3739 instead of assuming that kqueue is available under NetBSD and 3739 instead of assuming that kqueue is available under NetBSD and
3740 using the <code class="varname">__NetBSD__</code> macro to conditionalize 3740 using the <code class="varname">__NetBSD__</code> macro to conditionalize
3741 kqueue support, add a check that detects kqueue itself &mdash; 3741 kqueue support, add a check that detects kqueue itself &mdash;
3742 yes, this generally involves patching the 3742 yes, this generally involves patching the
3743 <span class="command"><strong>configure</strong></span> script. There is absolutely nothing 3743 <span class="command"><strong>configure</strong></span> script. There is absolutely nothing
3744 that prevents some OSes from adopting interfaces from other OSes 3744 that prevents some OSes from adopting interfaces from other OSes
3745 (e.g. Linux implementing kqueue), something that the above checks 3745 (e.g. Linux implementing kqueue), something that the above checks
3746 cannot take into account.</p> 3746 cannot take into account.</p>
3747<p>Of course, checking for features generally involves more 3747<p>Of course, checking for features generally involves more
3748 work on the developer's side, but the resulting changes are 3748 work on the developer's side, but the resulting changes are
3749 cleaner and there are chances they will work on many other 3749 cleaner and there are chances they will work on many other
3750 platforms. Not to mention that there are higher chances of being 3750 platforms. Not to mention that there are higher chances of being
3751 later integrated into the mainstream sources. Remember: 3751 later integrated into the mainstream sources. Remember:
3752 <span class="emphasis"><em>It doesn't work unless it is right!</em></span></p> 3752 <span class="emphasis"><em>It doesn't work unless it is right!</em></span></p>
3753<p>Some typical examples:</p> 3753<p>Some typical examples:</p>
3754<div class="table"> 3754<div class="table">
3755<a name="patch-examples"></a><p class="title"><b>Table 12.1. Patching examples</b></p> 3755<a name="patch-examples"></a><p class="title"><b>Table 12.1. Patching examples</b></p>
3756<div class="table-contents"><table class="table" summary="Patching examples" border="1"> 3756<div class="table-contents"><table class="table" summary="Patching examples" border="1">
3757<colgroup> 3757<colgroup>
3758<col> 3758<col>
3759<col> 3759<col>
3760<col> 3760<col>
3761</colgroup> 3761</colgroup>
3762<thead><tr> 3762<thead><tr>
3763<th>Where</th> 3763<th>Where</th>
3764<th>Incorrect</th> 3764<th>Incorrect</th>
3765<th>Correct</th> 3765<th>Correct</th>
3766</tr></thead> 3766</tr></thead>
3767<tbody> 3767<tbody>
3768<tr> 3768<tr>
3769<td>configure script</td> 3769<td>configure script</td>
3770<td> 3770<td>
3771<pre class="programlisting"> 3771<pre class="programlisting">
3772case ${target_os} in 3772case ${target_os} in
3773netbsd*) have_kvm=yes ;; 3773netbsd*) have_kvm=yes ;;
3774*) have_kvm=no ;; 3774*) have_kvm=no ;;
3775esac 3775esac
3776</pre> 3776</pre>
3777 </td> 3777 </td>
3778<td> 3778<td>
3779<pre class="programlisting"> 3779<pre class="programlisting">
3780AC_CHECK_LIB(kvm, kvm_open, have_kvm=yes, have_kvm=no) 3780AC_CHECK_LIB(kvm, kvm_open, have_kvm=yes, have_kvm=no)
3781</pre> 3781</pre>
3782 </td> 3782 </td>
3783</tr> 3783</tr>
3784<tr> 3784<tr>
3785<td>C source file</td> 3785<td>C source file</td>
3786<td> 3786<td>
3787<pre class="programlisting"> 3787<pre class="programlisting">
3788#if defined(__NetBSD__) 3788#if defined(__NetBSD__)
3789# include &lt;sys/event.h&gt; 3789# include &lt;sys/event.h&gt;
3790#endif 3790#endif
3791</pre> 3791</pre>
3792 </td> 3792 </td>
3793<td> 3793<td>
3794<pre class="programlisting"> 3794<pre class="programlisting">
3795#if defined(HAVE_SYS_EVENT_H) 3795#if defined(HAVE_SYS_EVENT_H)
3796# include &lt;sys/event.h&gt; 3796# include &lt;sys/event.h&gt;
3797#endif 3797#endif
3798</pre> 3798</pre>
3799 </td> 3799 </td>
3800</tr> 3800</tr>
3801<tr> 3801<tr>
3802<td>C source file</td> 3802<td>C source file</td>
3803<td> 3803<td>
3804<pre class="programlisting"> 3804<pre class="programlisting">
3805int 3805int
3806monitor_file(...) 3806monitor_file(...)
3807{ 3807{
3808#if defined(__NetBSD__) 3808#if defined(__NetBSD__)
3809 int fd = kqueue(); 3809 int fd = kqueue();
3810 ... 3810 ...
3811#else 3811#else
3812 ... 3812 ...
3813#endif 3813#endif
3814} 3814}
3815</pre> 3815</pre>
3816 </td> 3816 </td>
3817<td> 3817<td>
3818<pre class="programlisting"> 3818<pre class="programlisting">
3819int 3819int
3820monitor_file(...) 3820monitor_file(...)
3821{ 3821{
3822#if defined(HAVE_KQUEUE) 3822#if defined(HAVE_KQUEUE)
3823 int fd = kqueue(); 3823 int fd = kqueue();
3824 ... 3824 ...
3825#else 3825#else
3826 ... 3826 ...
3827#endif 3827#endif
3828} 3828}
3829</pre> 3829</pre>
3830 </td> 3830 </td>
3831</tr> 3831</tr>
3832</tbody> 3832</tbody>
3833</table></div> 3833</table></div>
3834</div> 3834</div>
3835<br class="table-break"> 3835<br class="table-break">
3836</div> 3836</div>
3837<div class="sect2"> 3837<div class="sect2">
3838<div class="titlepage"><div><div><h3 class="title"> 3838<div class="titlepage"><div><div><h3 class="title">
3839<a name="components.patches.feedback"></a>12.3.5. Feedback to the author</h3></div></div></div> 3839<a name="components.patches.feedback"></a>12.3.5. Feedback to the author</h3></div></div></div>
3840<p>Always, always, <span class="strong"><strong>always</strong></span> 3840<p>Always, always, <span class="strong"><strong>always</strong></span>
3841 feed back any <span class="emphasis"><em>portability fixes</em></span> or 3841 feed back any <span class="emphasis"><em>portability fixes</em></span> or
3842 improvements you do to a package to the mainstream developers. 3842 improvements you do to a package to the mainstream developers.
3843 This is the only way to get their attention on portability issues 3843 This is the only way to get their attention on portability issues
3844 and to ensure that future versions can be built out-of-the box on 3844 and to ensure that future versions can be built out-of-the box on
3845 NetBSD. Furthermore, any user that gets newer distfiles will get 3845 NetBSD. Furthermore, any user that gets newer distfiles will get
3846 the fixes straight from the packaged code.</p> 3846 the fixes straight from the packaged code.</p>
3847<p>This generally involves cleaning up the patches 3847<p>This generally involves cleaning up the patches
3848 (because sometimes the patches that are 3848 (because sometimes the patches that are
3849 added to pkgsrc are quick hacks), filing bug reports in the 3849 added to pkgsrc are quick hacks), filing bug reports in the
3850 appropriate trackers for the projects and working with the 3850 appropriate trackers for the projects and working with the
3851 mainstream authors to accept your changes. It is 3851 mainstream authors to accept your changes. It is
3852 <span class="emphasis"><em>extremely important</em></span> that you do it so that 3852 <span class="emphasis"><em>extremely important</em></span> that you do it so that
3853 the packages in pkgsrc are kept simple and thus further changes 3853 the packages in pkgsrc are kept simple and thus further changes
3854 can be done without much hassle.</p> 3854 can be done without much hassle.</p>
3855<p>When you have done this, please add a URL to the upstream 3855<p>When you have done this, please add a URL to the upstream
3856 bug report to the patch comment.</p> 3856 bug report to the patch comment.</p>
3857<p>Support the idea of free software!</p> 3857<p>Support the idea of free software!</p>
3858</div> 3858</div>
3859</div> 3859</div>
3860<div class="sect1"> 3860<div class="sect1">
3861<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3861<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3862<a name="other-mandatory-files"></a>12.4. Other mandatory files</h2></div></div></div> 3862<a name="other-mandatory-files"></a>12.4. Other mandatory files</h2></div></div></div>
3863<div class="variablelist"><dl class="variablelist"> 3863<div class="variablelist"><dl class="variablelist">
3864<dt><span class="term"><code class="filename">DESCR</code></span></dt> 3864<dt><span class="term"><code class="filename">DESCR</code></span></dt>
3865<dd><p>A multi-line description of the piece of software. This should include 3865<dd><p>A multi-line description of the piece of software. This should include
3866 any credits where they are due. Please bear in mind that others do not 3866 any credits where they are due. Please bear in mind that others do not
3867 share your sense of humour (or spelling idiosyncrasies), and that others 3867 share your sense of humour (or spelling idiosyncrasies), and that others
3868 will read everything that you write here.</p></dd> 3868 will read everything that you write here.</p></dd>
3869<dt><span class="term"><code class="filename">PLIST</code></span></dt> 3869<dt><span class="term"><code class="filename">PLIST</code></span></dt>
3870<dd><p>This file governs the files that are installed on your 3870<dd><p>This file governs the files that are installed on your
3871 system: all the binaries, manual pages, etc. There are other 3871 system: all the binaries, manual pages, etc. There are other
3872 directives which may be entered in this file, to control the 3872 directives which may be entered in this file, to control the
3873 creation and deletion of directories, and the location of 3873 creation and deletion of directories, and the location of
3874 inserted files. See <a class="xref" href="#plist" title="Chapter 19. PLIST issues">Chapter 19, <i>PLIST issues</i></a> for more 3874 inserted files. See <a class="xref" href="#plist" title="Chapter 19. PLIST issues">Chapter 19, <i>PLIST issues</i></a> for more
3875 information.</p></dd> 3875 information.</p></dd>
3876</dl></div> 3876</dl></div>
3877</div> 3877</div>
3878<div class="sect1"> 3878<div class="sect1">
3879<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3879<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3880<a name="components.optional"></a>12.5. Optional files</h2></div></div></div> 3880<a name="components.optional"></a>12.5. Optional files</h2></div></div></div>
3881<div class="sect2"> 3881<div class="sect2">
3882<div class="titlepage"><div><div><h3 class="title"> 3882<div class="titlepage"><div><div><h3 class="title">
3883<a name="components.optional.bin"></a>12.5.1. Files affecting the binary package</h3></div></div></div> 3883<a name="components.optional.bin"></a>12.5.1. Files affecting the binary package</h3></div></div></div>
3884<div class="variablelist"><dl class="variablelist"> 3884<div class="variablelist"><dl class="variablelist">
3885<dt><span class="term"><code class="filename">INSTALL</code></span></dt> 3885<dt><span class="term"><code class="filename">INSTALL</code></span></dt>
3886<dd> 3886<dd>
3887<p>This shell script is invoked twice by <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_add.1"><span class="citerefentry"><span class="refentrytitle">pkg_add</span>(1)</span></a>. 3887<p>This shell script is invoked twice by <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_add.1"><span class="citerefentry"><span class="refentrytitle">pkg_add</span>(1)</span></a>.
3888 First time after package extraction and before files are 3888 First time after package extraction and before files are
3889 moved in place, the second time after the files to install 3889 moved in place, the second time after the files to install
3890 are moved in place. This can be used to do any custom 3890 are moved in place. This can be used to do any custom
3891 procedures not possible with @exec commands in 3891 procedures not possible with @exec commands in
3892 <code class="filename">PLIST</code>. See <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_add.1"><span class="citerefentry"><span class="refentrytitle">pkg_add</span>(1)</span></a> and 3892 <code class="filename">PLIST</code>. See <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_add.1"><span class="citerefentry"><span class="refentrytitle">pkg_add</span>(1)</span></a> and
3893 <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_create.1"><span class="citerefentry"><span class="refentrytitle">pkg_create</span>(1)</span></a> for more information. See also <a class="xref" href="#files-and-dirs-outside-prefix" title="20.1. Files and directories outside the installation prefix">Section 20.1, &#8220;Files and directories outside the installation prefix&#8221;</a>. 3893 <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_create.1"><span class="citerefentry"><span class="refentrytitle">pkg_create</span>(1)</span></a> for more information. See also <a class="xref" href="#files-and-dirs-outside-prefix" title="20.1. Files and directories outside the installation prefix">Section 20.1, &#8220;Files and directories outside the installation prefix&#8221;</a>.
3894 Please note that you can modify variables in it easily by using 3894 Please note that you can modify variables in it easily by using
3895 <code class="varname">FILES_SUBST</code> in the package's 3895 <code class="varname">FILES_SUBST</code> in the package's
3896 <code class="filename">Makefile</code>:</p> 3896 <code class="filename">Makefile</code>:</p>
3897<pre class="programlisting"> 3897<pre class="programlisting">
3898FILES_SUBST+= SOMEVAR="somevalue" 3898FILES_SUBST+= SOMEVAR="somevalue"
3899</pre> 3899</pre>
3900<p>replaces "@SOMEVAR@" with <span class="quote">&#8220;<span class="quote">somevalue</span>&#8221;</span> in the 3900<p>replaces "@SOMEVAR@" with <span class="quote">&#8220;<span class="quote">somevalue</span>&#8221;</span> in the
3901 <code class="filename">INSTALL</code>. By default, substitution is 3901 <code class="filename">INSTALL</code>. By default, substitution is
3902 performed for <code class="varname">PREFIX</code>, 3902 performed for <code class="varname">PREFIX</code>,
3903 <code class="varname">LOCALBASE</code>, <code class="varname">X11BASE</code>, 3903 <code class="varname">LOCALBASE</code>, <code class="varname">X11BASE</code>,
3904 <code class="varname">VARBASE</code>, and a few others, type 3904 <code class="varname">VARBASE</code>, and a few others, type
3905 <span class="command"><strong>make help topic=FILES_SUBST</strong></span> for a 3905 <span class="command"><strong>make help topic=FILES_SUBST</strong></span> for a
3906 complete list.</p> 3906 complete list.</p>
3907</dd> 3907</dd>
3908<dt><span class="term"><code class="filename">DEINSTALL</code></span></dt> 3908<dt><span class="term"><code class="filename">DEINSTALL</code></span></dt>
3909<dd><p>This script is executed before and after any files are removed. It is 3909<dd><p>This script is executed before and after any files are removed. It is
3910 this script's responsibility to clean up any additional messy details 3910 this script's responsibility to clean up any additional messy details
3911 around the package's installation, since all pkg_delete knows is how to 3911 around the package's installation, since all pkg_delete knows is how to
3912 delete the files created in the original distribution. 3912 delete the files created in the original distribution.
3913 See <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_delete.1"><span class="citerefentry"><span class="refentrytitle">pkg_delete</span>(1)</span></a> 3913 See <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_delete.1"><span class="citerefentry"><span class="refentrytitle">pkg_delete</span>(1)</span></a>
3914 and <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_create.1"><span class="citerefentry"><span class="refentrytitle">pkg_create</span>(1)</span></a> for more information. 3914 and <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_create.1"><span class="citerefentry"><span class="refentrytitle">pkg_create</span>(1)</span></a> for more information.
3915 The same methods to replace variables can be used as for 3915 The same methods to replace variables can be used as for
3916 the <code class="filename">INSTALL</code> file.</p></dd> 3916 the <code class="filename">INSTALL</code> file.</p></dd>
3917<dt><span class="term"><code class="filename">MESSAGE</code></span></dt> 3917<dt><span class="term"><code class="filename">MESSAGE</code></span></dt>
3918<dd> 3918<dd>
3919<p>This file is displayed after installation of the package. 3919<p>This file is displayed after installation of the package.
3920 While this was used often in the past, it has two 3920 While this was used often in the past, it has two
3921 problems: the display will be missed if many packages are 3921 problems: the display will be missed if many packages are
3922 intalled at once, and the person installing the package 3922 intalled at once, and the person installing the package
3923 and the one using or configuring it may be different. It 3923 and the one using or configuring it may be different. It
3924 should therefore be used only in exceptional circumstances 3924 should therefore be used only in exceptional circumstances
3925 where lasting negative consequences would result from 3925 where lasting negative consequences would result from
3926 someone not reading it.</p> 3926 someone not reading it.</p>
3927<p>MESSAGE should not be used for:</p> 3927<p>MESSAGE should not be used for:</p>
3928<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 3928<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
3929<li class="listitem"><p>exhortations to read the documentation</p></li> 3929<li class="listitem"><p>exhortations to read the documentation</p></li>
3930<li class="listitem"><p>reminders to install rc.d files and set variables</p></li> 3930<li class="listitem"><p>reminders to install rc.d files and set variables</p></li>
3931<li class="listitem"><p>anything that should be explained in the 3931<li class="listitem"><p>anything that should be explained in the
3932 installation/configuration documentation that should 3932 installation/configuration documentation that should
3933 come with the package</p></li> 3933 come with the package</p></li>
3934</ul></div> 3934</ul></div>
3935<p>If the documentation provided by upstream needs 3935<p>If the documentation provided by upstream needs
3936 enhancing, create e.g. files/README.pkgsrc and install it 3936 enhancing, create e.g. files/README.pkgsrc and install it
3937 in the package's documentation directory. 3937 in the package's documentation directory.
3938 </p> 3938 </p>
3939<p>Note that MESSAGE is shown for all operating 3939<p>Note that MESSAGE is shown for all operating
3940 systems and all init systems. If a MESSAGE is necessary, 3940 systems and all init systems. If a MESSAGE is necessary,
3941 it should be narrowed to only those operating systems and 3941 it should be narrowed to only those operating systems and
3942 init systems to which it applies.</p> 3942 init systems to which it applies.</p>
3943<p>Note that you can modify variables in it easily by using 3943<p>Note that you can modify variables in it easily by using
3944 <code class="varname">MESSAGE_SUBST</code> in the package's 3944 <code class="varname">MESSAGE_SUBST</code> in the package's
3945 <code class="filename">Makefile</code>:</p> 3945 <code class="filename">Makefile</code>:</p>
3946<pre class="programlisting"> 3946<pre class="programlisting">
3947MESSAGE_SUBST+= SOMEVAR="somevalue" 3947MESSAGE_SUBST+= SOMEVAR="somevalue"
3948</pre> 3948</pre>
3949<p>replaces "${SOMEVAR}" with <span class="quote">&#8220;<span class="quote">somevalue</span>&#8221;</span> in 3949<p>replaces "${SOMEVAR}" with <span class="quote">&#8220;<span class="quote">somevalue</span>&#8221;</span> in
3950 <code class="filename">MESSAGE</code>. By default, substitution is 3950 <code class="filename">MESSAGE</code>. By default, substitution is
3951 performed for <code class="varname">PKGNAME</code>, 3951 performed for <code class="varname">PKGNAME</code>,
3952 <code class="varname">PKGBASE</code>, <code class="varname">PREFIX</code>, 3952 <code class="varname">PKGBASE</code>, <code class="varname">PREFIX</code>,
3953 <code class="varname">LOCALBASE</code>, <code class="varname">X11BASE</code>, 3953 <code class="varname">LOCALBASE</code>, <code class="varname">X11BASE</code>,
3954 <code class="varname">PKG_SYSCONFDIR</code>, 3954 <code class="varname">PKG_SYSCONFDIR</code>,
3955 <code class="varname">ROOT_GROUP</code>, and 3955 <code class="varname">ROOT_GROUP</code>, and
3956 <code class="varname">ROOT_USER</code>.</p> 3956 <code class="varname">ROOT_USER</code>.</p>
3957<p>You can display a different or additional files by 3957<p>You can display a different or additional files by
3958 setting the <code class="varname">MESSAGE_SRC</code> variable. Its 3958 setting the <code class="varname">MESSAGE_SRC</code> variable. Its
3959 default is <code class="filename">MESSAGE</code>, if the file 3959 default is <code class="filename">MESSAGE</code>, if the file
3960 exists.</p> 3960 exists.</p>
3961</dd> 3961</dd>
3962<dt><span class="term"><code class="filename">ALTERNATIVES</code></span></dt> 3962<dt><span class="term"><code class="filename">ALTERNATIVES</code></span></dt>
3963<dd> 3963<dd>
3964<p>This file is used by the alternatives framework. 3964<p>This file is used by the alternatives framework.
3965 It creates, configures, and destroys generic wrappers used to 3965 It creates, configures, and destroys generic wrappers used to
3966 run programs with similar interfaces. 3966 run programs with similar interfaces.
3967 See pkg_alternatives(8) from pkgtools/pkg_alternatives 3967 See pkg_alternatives(8) from pkgtools/pkg_alternatives
3968 for more information.</p> 3968 for more information.</p>
3969<p>Each line of the file contains two filenames, first 3969<p>Each line of the file contains two filenames, first
3970 the wrapper and then the alternative provided by the package. 3970 the wrapper and then the alternative provided by the package.
3971 Both paths are relative to <code class="varname">PREFIX</code>.</p> 3971 Both paths are relative to <code class="varname">PREFIX</code>.</p>
3972</dd> 3972</dd>
3973</dl></div> 3973</dl></div>
3974</div> 3974</div>
3975<div class="sect2"> 3975<div class="sect2">
3976<div class="titlepage"><div><div><h3 class="title"> 3976<div class="titlepage"><div><div><h3 class="title">
3977<a name="components.optional.build"></a>12.5.2. Files affecting the build process</h3></div></div></div> 3977<a name="components.optional.build"></a>12.5.2. Files affecting the build process</h3></div></div></div>
3978<div class="variablelist"><dl class="variablelist"> 3978<div class="variablelist"><dl class="variablelist">
3979<dt><span class="term"><code class="filename">Makefile.common</code></span></dt> 3979<dt><span class="term"><code class="filename">Makefile.common</code></span></dt>
3980<dd><p>This file contains arbitrary things that could 3980<dd><p>This file contains arbitrary things that could
3981 also go into a <code class="filename">Makefile</code>, but its purpose is 3981 also go into a <code class="filename">Makefile</code>, but its purpose is
3982 to be used by more than one package. This file should only be 3982 to be used by more than one package. This file should only be
3983 used when the packages that will use the file are known in 3983 used when the packages that will use the file are known in
3984 advance. For other purposes it is often better to write a 3984 advance. For other purposes it is often better to write a
3985 <code class="filename">*.mk</code> file and give it a good name that 3985 <code class="filename">*.mk</code> file and give it a good name that
3986 describes what it does.</p></dd> 3986 describes what it does.</p></dd>
3987<dt><span class="term"><code class="filename">buildlink3.mk</code></span></dt> 3987<dt><span class="term"><code class="filename">buildlink3.mk</code></span></dt>
3988<dd><p>This file contains the dependency information 3988<dd><p>This file contains the dependency information
3989 for the buildlink3 framework (see <a class="xref" href="#buildlink" title="Chapter 18. Buildlink methodology">Chapter 18, <i>Buildlink methodology</i></a>).</p></dd> 3989 for the buildlink3 framework (see <a class="xref" href="#buildlink" title="Chapter 18. Buildlink methodology">Chapter 18, <i>Buildlink methodology</i></a>).</p></dd>
3990<dt><span class="term"><code class="filename">hacks.mk</code></span></dt> 3990<dt><span class="term"><code class="filename">hacks.mk</code></span></dt>
3991<dd><p>This file contains workarounds for compiler bugs 3991<dd><p>This file contains workarounds for compiler bugs
3992 and similar things. It is included automatically by the pkgsrc 3992 and similar things. It is included automatically by the pkgsrc
3993 infrastructure, so you don't need an extra 3993 infrastructure, so you don't need an extra
3994 <code class="literal">.include</code> line for 3994 <code class="literal">.include</code> line for
3995 it.</p></dd> 3995 it.</p></dd>
3996<dt><span class="term"><code class="filename">options.mk</code></span></dt> 3996<dt><span class="term"><code class="filename">options.mk</code></span></dt>
3997<dd><p>This file contains the code for the 3997<dd><p>This file contains the code for the
3998 package-specific options (see <a class="xref" href="#options" title="Chapter 16. Options handling">Chapter 16, <i>Options handling</i></a>) that can be 3998 package-specific options (see <a class="xref" href="#options" title="Chapter 16. Options handling">Chapter 16, <i>Options handling</i></a>) that can be
3999 selected by the user. If a package has only one or two options, 3999 selected by the user. If a package has only one or two options,
4000 it is equally acceptable to put the code directly into the 4000 it is equally acceptable to put the code directly into the
4001 <code class="filename">Makefile</code>.</p></dd> 4001 <code class="filename">Makefile</code>.</p></dd>
4002</dl></div> 4002</dl></div>
4003</div> 4003</div>
4004<div class="sect2"> 4004<div class="sect2">
4005<div class="titlepage"><div><div><h3 class="title"> 4005<div class="titlepage"><div><div><h3 class="title">
4006<a name="components.optional.none"></a>12.5.3. Files affecting nothing at all</h3></div></div></div> 4006<a name="components.optional.none"></a>12.5.3. Files affecting nothing at all</h3></div></div></div>
4007<div class="variablelist"><dl class="variablelist"> 4007<div class="variablelist"><dl class="variablelist">
4008<dt><span class="term"><code class="filename">README*</code></span></dt> 4008<dt><span class="term"><code class="filename">README*</code></span></dt>
4009<dd><p>These files do not take place in the creation of 4009<dd><p>These files do not take place in the creation of
4010 a package and thus are purely informative to the package 4010 a package and thus are purely informative to the package
4011 developer.</p></dd> 4011 developer.</p></dd>
4012<dt><span class="term"><code class="filename">TODO</code></span></dt> 4012<dt><span class="term"><code class="filename">TODO</code></span></dt>
4013<dd><p>This file contains things that need to be done 4013<dd><p>This file contains things that need to be done
4014 to make the package even 4014 to make the package even
4015 better.</p></dd> 4015 better.</p></dd>
4016</dl></div> 4016</dl></div>
4017</div> 4017</div>
4018</div> 4018</div>
4019<div class="sect1"> 4019<div class="sect1">
4020<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4020<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4021<a name="work-dir"></a>12.6. <code class="filename">work*</code> 4021<a name="work-dir"></a>12.6. <code class="filename">work*</code>
4022</h2></div></div></div> 4022</h2></div></div></div>
4023<p>When you type <span class="command"><strong>make</strong></span>, the distribution files are 4023<p>When you type <span class="command"><strong>make</strong></span>, the distribution files are
4024 unpacked into the directory denoted by 4024 unpacked into the directory denoted by
4025 <code class="varname">WRKDIR</code>. It can be removed by running 4025 <code class="varname">WRKDIR</code>. It can be removed by running
4026 <span class="command"><strong>make clean</strong></span>. Besides the sources, this 4026 <span class="command"><strong>make clean</strong></span>. Besides the sources, this
4027 directory is also used to keep various timestamp files. 4027 directory is also used to keep various timestamp files.
4028 The directory gets <span class="emphasis"><em>removed completely</em></span> on clean. 4028 The directory gets <span class="emphasis"><em>removed completely</em></span> on clean.
4029 The default is <code class="filename">${.CURDIR}/work</code> 4029 The default is <code class="filename">${.CURDIR}/work</code>
4030 or <code class="filename">${.CURDIR}/work.${MACHINE_ARCH}</code> 4030 or <code class="filename">${.CURDIR}/work.${MACHINE_ARCH}</code>
4031 if <code class="varname">OBJMACHINE</code> is set.</p> 4031 if <code class="varname">OBJMACHINE</code> is set.</p>
4032</div> 4032</div>
4033<div class="sect1"> 4033<div class="sect1">
4034<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4034<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4035<a name="files-dir"></a>12.7. <code class="filename">files/*</code> 4035<a name="files-dir"></a>12.7. <code class="filename">files/*</code>
4036</h2></div></div></div> 4036</h2></div></div></div>
4037<p>If you have any files that you wish to be placed in the package 4037<p>If you have any files that you wish to be placed in the package
4038 prior to configuration or building, you can place these files here 4038 prior to configuration or building, you can place these files here
4039 and use a <span class="command"><strong>${CP}</strong></span> command in the 4039 and use a <span class="command"><strong>${CP}</strong></span> command in the
4040 <span class="quote">&#8220;<span class="quote">post-extract</span>&#8221;</span> target to achieve this.</p> 4040 <span class="quote">&#8220;<span class="quote">post-extract</span>&#8221;</span> target to achieve this.</p>
4041<p>If you want to share files in this way with other 4041<p>If you want to share files in this way with other
4042 packages, set the <code class="varname">FILESDIR</code> variable to point 4042 packages, set the <code class="varname">FILESDIR</code> variable to point
4043 to the other package's <code class="filename">files</code> directory, 4043 to the other package's <code class="filename">files</code> directory,
4044 e.g.:</p> 4044 e.g.:</p>
4045<pre class="programlisting"> 4045<pre class="programlisting">
4046FILESDIR= ../../editors/xemacs/files 4046FILESDIR= ../../editors/xemacs/files
4047</pre> 4047</pre>
4048</div> 4048</div>
4049</div> 4049</div>
4050<div class="chapter"> 4050<div class="chapter">
4051<div class="titlepage"><div><div><h2 class="title"> 4051<div class="titlepage"><div><div><h2 class="title">
4052<a name="build"></a>Chapter 13. The build process</h2></div></div></div> 4052<a name="build"></a>Chapter 13. The build process</h2></div></div></div>
4053<div class="toc"> 4053<div class="toc">
4054<p><b>Table of Contents</b></p> 4054<p><b>Table of Contents</b></p>
4055<dl class="toc"> 4055<dl class="toc">
4056<dt><span class="sect1"><a href="#build.intro">13.1. Introduction</a></span></dt> 4056<dt><span class="sect1"><a href="#build.intro">13.1. Introduction</a></span></dt>
4057<dt><span class="sect1"><a href="#build.prefix">13.2. Program location</a></span></dt> 4057<dt><span class="sect1"><a href="#build.prefix">13.2. Program location</a></span></dt>
4058<dt><span class="sect1"><a href="#build.builddirs">13.3. Directories used during the build process</a></span></dt> 4058<dt><span class="sect1"><a href="#build.builddirs">13.3. Directories used during the build process</a></span></dt>
4059<dt><span class="sect1"><a href="#build.running">13.4. Running a phase</a></span></dt> 4059<dt><span class="sect1"><a href="#build.running">13.4. Running a phase</a></span></dt>
4060<dt><span class="sect1"><a href="#build.fetch">13.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt> 4060<dt><span class="sect1"><a href="#build.fetch">13.5. The <span class="emphasis"><em>fetch</em></span> phase</a></span></dt>
4061<dd><dl> 4061<dd><dl>
4062<dt><span class="sect2"><a href="#build.fetch.what">13.5.1. What to fetch and where to get it from</a></span></dt> 4062<dt><span class="sect2"><a href="#build.fetch.what">13.5.1. What to fetch and where to get it from</a></span></dt>
4063<dt><span class="sect2"><a href="#build.fetch.how">13.5.2. How are the files fetched?</a></span></dt> 4063<dt><span class="sect2"><a href="#build.fetch.how">13.5.2. How are the files fetched?</a></span></dt>
4064</dl></dd> 4064</dl></dd>
4065<dt><span class="sect1"><a href="#build.checksum">13.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt> 4065<dt><span class="sect1"><a href="#build.checksum">13.6. The <span class="emphasis"><em>checksum</em></span> phase</a></span></dt>
4066<dt><span class="sect1"><a href="#build.extract">13.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt> 4066<dt><span class="sect1"><a href="#build.extract">13.7. The <span class="emphasis"><em>extract</em></span> phase</a></span></dt>
4067<dt><span class="sect1"><a href="#build.patch">13.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt> 4067<dt><span class="sect1"><a href="#build.patch">13.8. The <span class="emphasis"><em>patch</em></span> phase</a></span></dt>
4068<dt><span class="sect1"><a href="#build.tools">13.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt> 4068<dt><span class="sect1"><a href="#build.tools">13.9. The <span class="emphasis"><em>tools</em></span> phase</a></span></dt>
4069<dt><span class="sect1"><a href="#build.wrapper">13.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt> 4069<dt><span class="sect1"><a href="#build.wrapper">13.10. The <span class="emphasis"><em>wrapper</em></span> phase</a></span></dt>
4070<dt><span class="sect1"><a href="#build.configure">13.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt> 4070<dt><span class="sect1"><a href="#build.configure">13.11. The <span class="emphasis"><em>configure</em></span> phase</a></span></dt>
4071<dt><span class="sect1"><a href="#build.build">13.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt> 4071<dt><span class="sect1"><a href="#build.build">13.12. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
4072<dt><span class="sect1"><a href="#build.test">13.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt> 4072<dt><span class="sect1"><a href="#build.test">13.13. The <span class="emphasis"><em>test</em></span> phase</a></span></dt>
4073<dt><span class="sect1"><a href="#build.install">13.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt> 4073<dt><span class="sect1"><a href="#build.install">13.14. The <span class="emphasis"><em>install</em></span> phase</a></span></dt>
4074<dt><span class="sect1"><a href="#build.package">13.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt> 4074<dt><span class="sect1"><a href="#build.package">13.15. The <span class="emphasis"><em>package</em></span> phase</a></span></dt>
4075<dt><span class="sect1"><a href="#build.clean">13.16. Cleaning up</a></span></dt> 4075<dt><span class="sect1"><a href="#build.clean">13.16. Cleaning up</a></span></dt>
4076<dt><span class="sect1"><a href="#build.helpful-targets">13.17. Other helpful targets</a></span></dt> 4076<dt><span class="sect1"><a href="#build.helpful-targets">13.17. Other helpful targets</a></span></dt>
4077</dl> 4077</dl>
4078</div> 4078</div>
4079<div class="sect1"> 4079<div class="sect1">
4080<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4080<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4081<a name="build.intro"></a>13.1. Introduction</h2></div></div></div> 4081<a name="build.intro"></a>13.1. Introduction</h2></div></div></div>
4082<p>This chapter gives a detailed description on how a package is 4082<p>This chapter gives a detailed description on how a package is
4083 built. Building a package is separated into different 4083 built. Building a package is separated into different
4084 <span class="emphasis"><em>phases</em></span> (for example <code class="varname">fetch</code>, 4084 <span class="emphasis"><em>phases</em></span> (for example <code class="varname">fetch</code>,
4085 <code class="varname">build</code>, <code class="varname">install</code>), all of which are 4085 <code class="varname">build</code>, <code class="varname">install</code>), all of which are
4086 described in the following sections. Each phase is split into 4086 described in the following sections. Each phase is split into
4087 so-called <span class="emphasis"><em>stages</em></span>, which take the name of the 4087 so-called <span class="emphasis"><em>stages</em></span>, which take the name of the
4088 containing phase, prefixed by one of <code class="varname">pre-</code>, 4088 containing phase, prefixed by one of <code class="varname">pre-</code>,
4089 <code class="varname">do-</code> or <code class="varname">post-</code>. (Examples are 4089 <code class="varname">do-</code> or <code class="varname">post-</code>. (Examples are
4090 <code class="varname">pre-configure</code>, <code class="varname">post-build</code>.) Most 4090 <code class="varname">pre-configure</code>, <code class="varname">post-build</code>.) Most
4091 of the actual work is done in the <code class="varname">do-*</code> stages.</p> 4091 of the actual work is done in the <code class="varname">do-*</code> stages.</p>
4092<p>Never override the regular targets (like 4092<p>Never override the regular targets (like
4093 <code class="varname">fetch</code>), if you have to, override the 4093 <code class="varname">fetch</code>), if you have to, override the
4094 <code class="varname">do-*</code> ones instead.</p> 4094 <code class="varname">do-*</code> ones instead.</p>
4095<p>The basic steps for building a program are always the same. First 4095<p>The basic steps for building a program are always the same. First
4096 the program's source (<span class="emphasis"><em>distfile</em></span>) must be brought to 4096 the program's source (<span class="emphasis"><em>distfile</em></span>) must be brought to
4097 the local system and then extracted. After any pkgsrc-specific patches 4097 the local system and then extracted. After any pkgsrc-specific patches
4098 to compile properly are applied, the software can be configured, then 4098 to compile properly are applied, the software can be configured, then
4099 built (usually by compiling), and finally the generated binaries, etc. 4099 built (usually by compiling), and finally the generated binaries, etc.
4100 can be put into place on the system.</p> 4100 can be put into place on the system.</p>
4101<p>To get more details about what is happening at each step, 4101<p>To get more details about what is happening at each step,
4102 you can set the <code class="varname">PKG_VERBOSE</code> variable, or the 4102 you can set the <code class="varname">PKG_VERBOSE</code> variable, or the
4103 <code class="varname">PATCH_DEBUG</code> variable if you are just interested 4103 <code class="varname">PATCH_DEBUG</code> variable if you are just interested
4104 in more details about the <span class="emphasis"><em>patch</em></span> step.</p> 4104 in more details about the <span class="emphasis"><em>patch</em></span> step.</p>
4105</div> 4105</div>
4106<div class="sect1"> 4106<div class="sect1">
4107<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4107<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4108<a name="build.prefix"></a>13.2. Program location</h2></div></div></div> 4108<a name="build.prefix"></a>13.2. Program location</h2></div></div></div>
4109<p>Before outlining the process performed by the NetBSD package system in 4109<p>Before outlining the process performed by the NetBSD package system in
4110 the next section, here's a brief discussion on where programs are 4110 the next section, here's a brief discussion on where programs are
4111 installed, and which variables influence this.</p> 4111 installed, and which variables influence this.</p>
4112<p>The automatic variable <code class="varname">PREFIX</code> indicates 4112<p>The automatic variable <code class="varname">PREFIX</code> indicates
4113 where all files of the final program shall be installed. It is 4113 where all files of the final program shall be installed. It is
4114 usually set to <code class="varname">LOCALBASE</code> 4114 usually set to <code class="varname">LOCALBASE</code>
4115 (<code class="filename">/usr/pkg</code>), or <code class="varname">CROSSBASE</code> 4115 (<code class="filename">/usr/pkg</code>), or <code class="varname">CROSSBASE</code>
4116 for pkgs in the <code class="filename">cross</code> category. The value of 4116 for pkgs in the <code class="filename">cross</code> category. The value of
4117 <code class="varname">PREFIX</code> needs to be put 4117 <code class="varname">PREFIX</code> needs to be put
4118 into the various places in the program's source where paths to 4118 into the various places in the program's source where paths to
4119 these files are encoded. See <a class="xref" href="#components.patches" title="12.3. patches/*">Section 12.3, &#8220;<code class="filename">patches/*</code>&#8221;</a> and <a class="xref" href="#fixes.libtool" title="21.3.1. Shared libraries - libtool">Section 21.3.1, &#8220;Shared libraries - libtool&#8221;</a> for more details.</p> 4119 these files are encoded. See <a class="xref" href="#components.patches" title="12.3. patches/*">Section 12.3, &#8220;<code class="filename">patches/*</code>&#8221;</a> and <a class="xref" href="#fixes.libtool" title="21.3.1. Shared libraries - libtool">Section 21.3.1, &#8220;Shared libraries - libtool&#8221;</a> for more details.</p>
4120<p>When choosing which of these variables to use, 4120<p>When choosing which of these variables to use,
4121 follow the following rules:</p> 4121 follow the following rules:</p>
4122<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 4122<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
4123<li class="listitem"><p><code class="varname">PREFIX</code> always points to the location 4123<li class="listitem"><p><code class="varname">PREFIX</code> always points to the location
4124 where the current pkg will be installed. When referring to a 4124 where the current pkg will be installed. When referring to a
4125 pkg's own installation path, use 4125 pkg's own installation path, use
4126 <span class="quote">&#8220;<span class="quote">${PREFIX}</span>&#8221;</span>.</p></li> 4126 <span class="quote">&#8220;<span class="quote">${PREFIX}</span>&#8221;</span>.</p></li>
4127<li class="listitem"><p><code class="varname">LOCALBASE</code> is where all pkgs 4127<li class="listitem"><p><code class="varname">LOCALBASE</code> is where all pkgs
4128 are installed. If you need to construct a -I or -L argument 4128 are installed. If you need to construct a -I or -L argument
4129 to the compiler to find includes and libraries installed by 4129 to the compiler to find includes and libraries installed by
4130 another pkg, use <span class="quote">&#8220;<span class="quote">${LOCALBASE}</span>&#8221;</span>. The name 4130 another pkg, use <span class="quote">&#8220;<span class="quote">${LOCALBASE}</span>&#8221;</span>. The name
4131 <code class="varname">LOCALBASE</code> stems from FreeBSD, which 4131 <code class="varname">LOCALBASE</code> stems from FreeBSD, which
4132 installed all packages in <code class="filename">/usr/local</code>. As 4132 installed all packages in <code class="filename">/usr/local</code>. As
4133 pkgsrc leaves <code class="filename">/usr/local</code> for the system 4133 pkgsrc leaves <code class="filename">/usr/local</code> for the system
4134 administrator, this variable is a misnomer.</p></li> 4134 administrator, this variable is a misnomer.</p></li>
4135<li class="listitem"><p><code class="varname">X11BASE</code> is where the actual X11 4135<li class="listitem"><p><code class="varname">X11BASE</code> is where the actual X11
4136 distribution (from xsrc, etc.) is installed. When looking for 4136 distribution (from xsrc, etc.) is installed. When looking for
4137 <span class="emphasis"><em>standard</em></span> X11 includes (not those 4137 <span class="emphasis"><em>standard</em></span> X11 includes (not those
4138 installed by a package), use <span class="quote">&#8220;<span class="quote">${X11BASE}</span>&#8221;</span>.</p></li> 4138 installed by a package), use <span class="quote">&#8220;<span class="quote">${X11BASE}</span>&#8221;</span>.</p></li>
4139<li class="listitem"><p>X11-based packages using imake must set 4139<li class="listitem"><p>X11-based packages using imake must set
4140 <code class="varname">USE_IMAKE</code> to be installed correctly under 4140 <code class="varname">USE_IMAKE</code> to be installed correctly under
4141 <code class="varname">LOCALBASE</code>.</p></li> 4141 <code class="varname">LOCALBASE</code>.</p></li>
4142<li class="listitem"><p>Within <code class="filename">${PREFIX}</code>, packages should 4142<li class="listitem"><p>Within <code class="filename">${PREFIX}</code>, packages should
4143 install files according to <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/hier.7"><span class="citerefentry"><span class="refentrytitle">hier</span>(7)</span></a>, with the exception that 4143 install files according to <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/hier.7"><span class="citerefentry"><span class="refentrytitle">hier</span>(7)</span></a>, with the exception that
4144 manual pages go into <code class="filename">${PREFIX}/man</code>, not 4144 manual pages go into <code class="filename">${PREFIX}/man</code>, not
4145 <code class="filename">${PREFIX}/share/man</code>.</p></li> 4145 <code class="filename">${PREFIX}/share/man</code>.</p></li>
4146</ul></div> 4146</ul></div>
4147</div> 4147</div>
4148<div class="sect1"> 4148<div class="sect1">
4149<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4149<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4150<a name="build.builddirs"></a>13.3. Directories used during the build process</h2></div></div></div> 4150<a name="build.builddirs"></a>13.3. Directories used during the build process</h2></div></div></div>
4151<p>When building a package, various directories are used to store 4151<p>When building a package, various directories are used to store
4152 source files, temporary files, pkgsrc-internal files, and so on. These 4152 source files, temporary files, pkgsrc-internal files, and so on. These
4153 directories are explained here.</p> 4153 directories are explained here.</p>
4154<p>Some of the directory variables contain relative pathnames. There 4154<p>Some of the directory variables contain relative pathnames. There
4155 are two common base directories for these relative directories: 4155 are two common base directories for these relative directories:
4156 <code class="varname">PKGSRCDIR/PKGPATH</code> is used for directories that are 4156 <code class="varname">PKGSRCDIR/PKGPATH</code> is used for directories that are
4157 pkgsrc-specific. <code class="varname">WRKSRC</code> is used for directories 4157 pkgsrc-specific. <code class="varname">WRKSRC</code> is used for directories
4158 inside the package itself.</p> 4158 inside the package itself.</p>
4159<div class="variablelist"><dl class="variablelist"> 4159<div class="variablelist"><dl class="variablelist">
4160<dt><span class="term"><code class="varname">PKGSRCDIR</code></span></dt> 4160<dt><span class="term"><code class="varname">PKGSRCDIR</code></span></dt>
4161<dd><p>This is an absolute pathname that points to the pkgsrc 4161<dd><p>This is an absolute pathname that points to the pkgsrc
4162 root directory. Generally, you don't need 4162 root directory. Generally, you don't need
4163 it.</p></dd> 4163 it.</p></dd>
4164<dt><span class="term"><code class="varname">PKGDIR</code></span></dt> 4164<dt><span class="term"><code class="varname">PKGDIR</code></span></dt>
4165<dd><p>This is an absolute pathname that points to the 4165<dd><p>This is an absolute pathname that points to the
4166 current package.</p></dd> 4166 current package.</p></dd>
4167<dt><span class="term"><code class="varname">PKGPATH</code></span></dt> 4167<dt><span class="term"><code class="varname">PKGPATH</code></span></dt>
4168<dd><p>This is a pathname relative to 4168<dd>
4169 <code class="varname">PKGSRCDIR</code> that points to the current 4169<p>This is a pathname relative to
4170 package.</p></dd> 4170 <code class="varname">PKGSRCDIR</code> that points to the current package.
 4171 It is defined after including <code class="filename">bsd.prefs.mk</code>
 4172 and can be used in makefile fragments that are used by several
 4173 packages to distinguish between these packages. Other variables
 4174 that would serve the same purpose are <code class="varname">PKGBASE</code>
 4175 and <code class="varname">PKGNAME</code>, but these are only defined after
 4176 including <code class="filename">bsd.pkg.mk</code>, which is too
 4177 late.</p>
 4178<p>In <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, the pkgsrc user can use
 4179 <code class="varname">PKGPATH</code> to tweak variables like
 4180 <code class="varname">MAKE_JOBS</code> and
 4181 <code class="varname">CFLAGS</code>.</p>
 4182</dd>
4171<dt><span class="term"><code class="varname">WRKDIR</code></span></dt> 4183<dt><span class="term"><code class="varname">WRKDIR</code></span></dt>
4172<dd><p>This is an absolute pathname pointing to the directory 4184<dd><p>This is an absolute pathname pointing to the directory
4173 where all work takes place. The distfiles are extracted to this 4185 where all work takes place. The distfiles are extracted to this
4174 directory. It also contains temporary directories and log files used by 4186 directory. It also contains temporary directories and log files used by
4175 the various pkgsrc frameworks, like <span class="emphasis"><em>buildlink</em></span> or 4187 the various pkgsrc frameworks, like <span class="emphasis"><em>buildlink</em></span> or
4176 the <span class="emphasis"><em>wrappers</em></span>.</p></dd> 4188 the <span class="emphasis"><em>wrappers</em></span>.</p></dd>
4177<dt><span class="term"><code class="varname">WRKSRC</code></span></dt> 4189<dt><span class="term"><code class="varname">WRKSRC</code></span></dt>
4178<dd><p>This is an absolute pathname pointing to the directory 4190<dd><p>This is an absolute pathname pointing to the directory
4179 where the distfiles are extracted. It is usually a direct subdirectory 4191 where the distfiles are extracted. It is usually a direct subdirectory
4180 of <code class="varname">WRKDIR</code>, and often it's the only directory entry 4192 of <code class="varname">WRKDIR</code>, and often it's the only directory entry
4181 that isn't hidden. This variable may be changed by a package 4193 that isn't hidden. This variable may be changed by a package
4182 <code class="filename">Makefile</code>.</p></dd> 4194 <code class="filename">Makefile</code>.</p></dd>
4183</dl></div> 4195</dl></div>
4184<p>The <code class="varname">CREATE_WRKDIR_SYMLINK</code> definition takes either 4196<p>The <code class="varname">CREATE_WRKDIR_SYMLINK</code> definition takes either
4185 the value <span class="emphasis"><em>yes</em></span> or <span class="emphasis"><em>no</em></span> and defaults 4197 the value <span class="emphasis"><em>yes</em></span> or <span class="emphasis"><em>no</em></span> and defaults
4186 to <span class="emphasis"><em>no</em></span>. It indicates whether a symbolic link to the 4198 to <span class="emphasis"><em>no</em></span>. It indicates whether a symbolic link to the
4187 <code class="varname">WRKDIR</code> is to be created in the pkgsrc entry's directory. 4199 <code class="varname">WRKDIR</code> is to be created in the pkgsrc entry's directory.
4188 If users would like to have their pkgsrc trees behave in a 4200 If users would like to have their pkgsrc trees behave in a
4189 read-only manner, then the value of 4201 read-only manner, then the value of
4190 <code class="varname">CREATE_WRKDIR_SYMLINK</code> should be set to 4202 <code class="varname">CREATE_WRKDIR_SYMLINK</code> should be set to
4191 <span class="emphasis"><em>no</em></span>.</p> 4203 <span class="emphasis"><em>no</em></span>.</p>
4192</div> 4204</div>
4193<div class="sect1"> 4205<div class="sect1">
4194<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4206<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4195<a name="build.running"></a>13.4. Running a phase</h2></div></div></div> 4207<a name="build.running"></a>13.4. Running a phase</h2></div></div></div>
4196<p>You can run a particular phase by typing <span class="command"><strong>make 4208<p>You can run a particular phase by typing <span class="command"><strong>make
4197 phase</strong></span>, where <span class="emphasis"><em>phase</em></span> is the name of the 4209 <em class="replaceable"><code>phase</code></em></strong></span>, where
4198 phase. This will automatically run all phases that are required for this 4210 <em class="replaceable"><code>phase</code></em> is the name of the phase. This will
4199 phase. The default phase is <code class="varname">build</code>, that is, when you 4211 automatically run all phases that are required for this phase. The
4200 run <span class="command"><strong>make</strong></span> without parameters in a package directory, 4212 default phase is <code class="varname">build</code>, that is, when you run
 4213 <span class="command"><strong>make</strong></span> without parameters in a package directory,
4201 the package will be built, but not installed.</p> 4214 the package will be built, but not installed.</p>
4202</div> 4215</div>
4203<div class="sect1"> 4216<div class="sect1">
4204<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4217<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4205<a name="build.fetch"></a>13.5. The <span class="emphasis"><em>fetch</em></span> phase</h2></div></div></div> 4218<a name="build.fetch"></a>13.5. The <span class="emphasis"><em>fetch</em></span> phase</h2></div></div></div>
4206<p>The first step in building a package is to fetch the 4219<p>The first step in building a package is to fetch the
4207 distribution files (distfiles) from the sites that are providing 4220 distribution files (distfiles) from the sites that are providing
4208 them. This is the task of the <span class="emphasis"><em>fetch</em></span> 4221 them. This is the task of the <span class="emphasis"><em>fetch</em></span>
4209 phase.</p> 4222 phase.</p>
4210<div class="sect2"> 4223<div class="sect2">
4211<div class="titlepage"><div><div><h3 class="title"> 4224<div class="titlepage"><div><div><h3 class="title">
4212<a name="build.fetch.what"></a>13.5.1. What to fetch and where to get it from</h3></div></div></div> 4225<a name="build.fetch.what"></a>13.5.1. What to fetch and where to get it from</h3></div></div></div>
4213<p>In simple cases, <code class="varname">MASTER_SITES</code> 4226<p>In simple cases, <code class="varname">MASTER_SITES</code>
4214 defines all URLs from where the distfile, whose name is 4227 defines all URLs from where the distfile, whose name is
4215 derived from the <code class="varname">DISTNAME</code> variable, is 4228 derived from the <code class="varname">DISTNAME</code> variable, is
4216 fetched. The more complicated cases are described 4229 fetched. The more complicated cases are described
4217 below.</p> 4230 below.</p>
4218<p>The variable <code class="varname">DISTFILES</code> specifies 4231<p>The variable <code class="varname">DISTFILES</code> specifies
4219 the list of distfiles that have to be fetched. Its value 4232 the list of distfiles that have to be fetched. Its value
4220 defaults to <code class="literal">${DEFAULT_DISTFILES}</code> and 4233 defaults to <code class="literal">${DEFAULT_DISTFILES}</code> and
4221 its value is <code class="literal">${DISTNAME}${EXTRACT_SUFX}</code>, 4234 its value is <code class="literal">${DISTNAME}${EXTRACT_SUFX}</code>,
4222 so that most packages don't need to define it at all. 4235 so that most packages don't need to define it at all.
4223 <code class="varname">EXTRACT_SUFX</code> is 4236 <code class="varname">EXTRACT_SUFX</code> is
4224 <code class="literal">.tar.gz</code> by default, but can be changed 4237 <code class="literal">.tar.gz</code> by default, but can be changed
4225 freely. Note that if your package requires additional 4238 freely. Note that if your package requires additional
4226 distfiles to the default one, you cannot just append the 4239 distfiles to the default one, you cannot just append the
4227 additional filenames using the <code class="literal">+=</code> 4240 additional filenames using the <code class="literal">+=</code>
4228 operator, but you have write for example:</p> 4241 operator, but you have write for example:</p>
4229<pre class="programlisting"> 4242<pre class="programlisting">
4230DISTFILES= ${DEFAULT_DISTFILES} additional-files.tar.gz 4243DISTFILES= ${DEFAULT_DISTFILES} additional-files.tar.gz
4231</pre> 4244</pre>
4232<p>Each distfile is fetched from a list of sites, usually 4245<p>Each distfile is fetched from a list of sites, usually
4233 <code class="varname">MASTER_SITES</code>. If the package has multiple 4246 <code class="varname">MASTER_SITES</code>. If the package has multiple
4234 <code class="varname">DISTFILES</code> or multiple 4247 <code class="varname">DISTFILES</code> or multiple
4235 <code class="varname">PATCHFILES</code> from different sites, you can 4248 <code class="varname">PATCHFILES</code> from different sites, you can
4236 set 4249 set
4237 <code class="varname">SITES.<em class="replaceable"><code>distfile</code></em></code> 4250 <code class="varname">SITES.<em class="replaceable"><code>distfile</code></em></code>
4238 to the list of URLs where the file 4251 to the list of URLs where the file
4239 <code class="filename"><em class="replaceable"><code>distfile</code></em></code> 4252 <code class="filename"><em class="replaceable"><code>distfile</code></em></code>
4240 (including the suffix) can be found.</p> 4253 (including the suffix) can be found.</p>
4241<pre class="programlisting"> 4254<pre class="programlisting">
4242DISTFILES= ${DISTNAME}${EXTRACT_SUFX} 4255DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
4243DISTFILES+= foo-file.tar.gz 4256DISTFILES+= foo-file.tar.gz
4244SITES.foo-file.tar.gz= \ 4257SITES.foo-file.tar.gz= \
4245https://www.somewhere.com/somehow/ \ 4258https://www.somewhere.com/somehow/ \
4246https://www.somewhereelse.com/mirror/somehow/ 4259https://www.somewhereelse.com/mirror/somehow/
4247</pre> 4260</pre>
4248<p>When actually fetching the distfiles, each item from 4261<p>When actually fetching the distfiles, each item from
4249 <code class="varname">MASTER_SITES</code> or 4262 <code class="varname">MASTER_SITES</code> or
4250 <code class="varname">SITES.*</code> gets the name of each distfile 4263 <code class="varname">SITES.*</code> gets the name of each distfile
4251 appended to it, without an intermediate slash. Therefore, 4264 appended to it, without an intermediate slash. Therefore,
4252 all site values have to end with a slash or other separator 4265 all site values have to end with a slash or other separator
4253 character. This allows for example to set 4266 character. This allows for example to set
4254 <code class="varname">MASTER_SITES</code> to a URL of a CGI script 4267 <code class="varname">MASTER_SITES</code> to a URL of a CGI script
4255 that gets the name of the distfile as a parameter. In this 4268 that gets the name of the distfile as a parameter. In this
4256 case, the definition would look like:</p> 4269 case, the definition would look like:</p>
4257<pre class="programlisting"> 4270<pre class="programlisting">
4258MASTER_SITES= https://www.example.com/download.cgi?file= 4271MASTER_SITES= https://www.example.com/download.cgi?file=
4259</pre> 4272</pre>
4260<p> The exception to this rule are URLs starting with a dash. 4273<p> The exception to this rule are URLs starting with a dash.
4261 In that case the URL is taken as is, fetched and the result 4274 In that case the URL is taken as is, fetched and the result
4262 stored under the name of the distfile. You can use this style 4275 stored under the name of the distfile. You can use this style
4263 for the case when the download URL style does not match the 4276 for the case when the download URL style does not match the
4264 above common case. For example, if permanent download URL is a 4277 above common case. For example, if permanent download URL is a
4265 redirector to the real download URL, or the download file name 4278 redirector to the real download URL, or the download file name
4266 is offered by an HTTP Content-Disposition header. In the 4279 is offered by an HTTP Content-Disposition header. In the
4267 following example, <code class="filename">foo-1.0.0.tar.gz</code> will be 4280 following example, <code class="filename">foo-1.0.0.tar.gz</code> will be
4268 created instead of the default 4281 created instead of the default
4269 <code class="filename">v1.0.0.tar.gz</code>.</p> 4282 <code class="filename">v1.0.0.tar.gz</code>.</p>
4270<pre class="programlisting"> 4283<pre class="programlisting">
4271DISTNAME= foo-1.0.0 4284DISTNAME= foo-1.0.0
4272MASTER_SITES= -https://www.example.com/archive/v1.0.0.tar.gz 4285MASTER_SITES= -https://www.example.com/archive/v1.0.0.tar.gz
4273</pre> 4286</pre>
4274<p>There are some predefined values for 4287<p>There are some predefined values for
4275 <code class="varname">MASTER_SITES</code>, which can be used in 4288 <code class="varname">MASTER_SITES</code>, which can be used in
4276 packages. The names of the variables should speak for 4289 packages. The names of the variables should speak for
4277 themselves.</p> 4290 themselves.</p>
4278<table border="0" summary="Simple list" class="simplelist"> 4291<table border="0" summary="Simple list" class="simplelist">
4279<tr> 4292<tr>
4280<td>MASTER_SITE_APACHE</td> 4293<td>MASTER_SITE_APACHE</td>
4281<td>MASTER_SITE_BACKUP</td> 4294<td>MASTER_SITE_BACKUP</td>
4282</tr> 4295</tr>
4283<tr> 4296<tr>
4284<td>MASTER_SITE_CRATESIO</td> 4297<td>MASTER_SITE_CRATESIO</td>
4285<td>MASTER_SITE_CYGWIN</td> 4298<td>MASTER_SITE_CYGWIN</td>
4286</tr> 4299</tr>
4287<tr> 4300<tr>
4288<td>MASTER_SITE_DEBIAN</td> 4301<td>MASTER_SITE_DEBIAN</td>
4289<td>MASTER_SITE_FREEBSD</td> 4302<td>MASTER_SITE_FREEBSD</td>
4290</tr> 4303</tr>
4291<tr> 4304<tr>
4292<td>MASTER_SITE_FREEBSD_LOCAL</td> 4305<td>MASTER_SITE_FREEBSD_LOCAL</td>
4293<td>MASTER_SITE_GENTOO</td> 4306<td>MASTER_SITE_GENTOO</td>
4294</tr> 4307</tr>
4295<tr> 4308<tr>
4296<td>MASTER_SITE_GITHUB</td> 4309<td>MASTER_SITE_GITHUB</td>
4297<td>MASTER_SITE_GITLAB</td> 4310<td>MASTER_SITE_GITLAB</td>
4298</tr> 4311</tr>
4299<tr> 4312<tr>
4300<td>MASTER_SITE_GNOME</td> 4313<td>MASTER_SITE_GNOME</td>
4301<td>MASTER_SITE_GNU</td> 4314<td>MASTER_SITE_GNU</td>
4302</tr> 4315</tr>
4303<tr> 4316<tr>
4304<td>MASTER_SITE_GNUSTEP</td> 4317<td>MASTER_SITE_GNUSTEP</td>
4305<td>MASTER_SITE_HASKELL_HACKAGE</td> 4318<td>MASTER_SITE_HASKELL_HACKAGE</td>
4306</tr> 4319</tr>
4307<tr> 4320<tr>
4308<td>MASTER_SITE_IFARCHIVE</td> 4321<td>MASTER_SITE_IFARCHIVE</td>
4309<td>MASTER_SITE_KDE</td> 4322<td>MASTER_SITE_KDE</td>
4310</tr> 4323</tr>
4311<tr> 4324<tr>
4312<td>MASTER_SITE_MOZILLA</td> 4325<td>MASTER_SITE_MOZILLA</td>
4313<td>MASTER_SITE_MOZILLA_ALL</td> 4326<td>MASTER_SITE_MOZILLA_ALL</td>
4314</tr> 4327</tr>
4315<tr> 4328<tr>
4316<td>MASTER_SITE_MYSQL</td> 4329<td>MASTER_SITE_MYSQL</td>
4317<td>MASTER_SITE_NETLIB</td> 4330<td>MASTER_SITE_NETLIB</td>
4318</tr> 4331</tr>
4319<tr> 4332<tr>
4320<td>MASTER_SITE_OPENBSD</td> 4333<td>MASTER_SITE_OPENBSD</td>
4321<td>MASTER_SITE_OPENOFFICE</td> 4334<td>MASTER_SITE_OPENOFFICE</td>
4322</tr> 4335</tr>
4323<tr> 4336<tr>
4324<td>MASTER_SITE_OSDN</td> 4337<td>MASTER_SITE_OSDN</td>
4325<td>MASTER_SITE_PERL_CPAN</td> 4338<td>MASTER_SITE_PERL_CPAN</td>
4326</tr> 4339</tr>
4327<tr> 4340<tr>
4328<td>MASTER_SITE_PGSQL</td> 4341<td>MASTER_SITE_PGSQL</td>
4329<td>MASTER_SITE_PYPI</td> 4342<td>MASTER_SITE_PYPI</td>
4330</tr> 4343</tr>
4331<tr> 4344<tr>
4332<td>MASTER_SITE_RUBYGEMS</td> 4345<td>MASTER_SITE_RUBYGEMS</td>
4333<td>MASTER_SITE_R_CRAN</td> 4346<td>MASTER_SITE_R_CRAN</td>
4334</tr> 4347</tr>
4335<tr> 4348<tr>
4336<td>MASTER_SITE_SOURCEFORGE</td> 4349<td>MASTER_SITE_SOURCEFORGE</td>
4337<td>MASTER_SITE_SUNSITE</td> 4350<td>MASTER_SITE_SUNSITE</td>
4338</tr> 4351</tr>
4339<tr> 4352<tr>
4340<td>MASTER_SITE_SUSE</td> 4353<td>MASTER_SITE_SUSE</td>
4341<td>MASTER_SITE_TEX_CTAN</td> 4354<td>MASTER_SITE_TEX_CTAN</td>
4342</tr> 4355</tr>
4343<tr> 4356<tr>
4344<td>MASTER_SITE_XCONTRIB</td> 4357<td>MASTER_SITE_XCONTRIB</td>
4345<td>MASTER_SITE_XEMACS</td> 4358<td>MASTER_SITE_XEMACS</td>
4346</tr> 4359</tr>
4347<tr> 4360<tr>
4348<td>MASTER_SITE_XORG</td> 4361<td>MASTER_SITE_XORG</td>
4349<td> </td> 4362<td> </td>
4350</tr> 4363</tr>
4351</table> 4364</table>
4352<p>Some explanations for the less self-explaining ones: 4365<p>Some explanations for the less self-explaining ones:
4353 <code class="varname">MASTER_SITE_BACKUP</code> contains backup sites 4366 <code class="varname">MASTER_SITE_BACKUP</code> contains backup sites
4354 for packages that are maintained in <a class="ulink" href="ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/%24%7BDIST_SUBDIR%7D" target="_top">ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/${DIST_SUBDIR}</a>. <code class="varname">MASTER_SITE_LOCAL</code> contains local 4367 for packages that are maintained in <a class="ulink" href="ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/%24%7BDIST_SUBDIR%7D" target="_top">ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/${DIST_SUBDIR}</a>. <code class="varname">MASTER_SITE_LOCAL</code> contains local
4355 package source distributions that are maintained in <a class="ulink" href="ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/LOCAL_PORTS/" target="_top">ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/LOCAL_PORTS/</a>.</p> 4368 package source distributions that are maintained in <a class="ulink" href="ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/LOCAL_PORTS/" target="_top">ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/LOCAL_PORTS/</a>.</p>
4356<p>If you choose one of these predefined sites, you may 4369<p>If you choose one of these predefined sites, you may
4357 want to specify a subdirectory of that site. Since these 4370 want to specify a subdirectory of that site. Since these
4358 macros may expand to more than one actual site, you 4371 macros may expand to more than one actual site, you
4359 <span class="emphasis"><em>must</em></span> use the following construct to 4372 <span class="emphasis"><em>must</em></span> use the following construct to
4360 specify a subdirectory:</p> 4373 specify a subdirectory:</p>
4361<pre class="programlisting"> 4374<pre class="programlisting">
4362MASTER_SITES= ${MASTER_SITE_GNU:=subdirectory/name/} 4375MASTER_SITES= ${MASTER_SITE_GNU:=subdirectory/name/}
4363MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=project_name/} 4376MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=project_name/}
4364</pre> 4377</pre>
4365<p>Note the trailing slash after the subdirectory 4378<p>Note the trailing slash after the subdirectory
4366 name.</p> 4379 name.</p>
4367</div> 4380</div>
4368<div class="sect2"> 4381<div class="sect2">
4369<div class="titlepage"><div><div><h3 class="title"> 4382<div class="titlepage"><div><div><h3 class="title">
4370<a name="build.fetch.how"></a>13.5.2. How are the files fetched?</h3></div></div></div> 4383<a name="build.fetch.how"></a>13.5.2. How are the files fetched?</h3></div></div></div>
4371<p>The <span class="emphasis"><em>fetch</em></span> phase makes sure that 4384<p>The <span class="emphasis"><em>fetch</em></span> phase makes sure that
4372 all the distfiles exist in a local directory 4385 all the distfiles exist in a local directory
4373 (<code class="varname">DISTDIR</code>, which can be set by the pkgsrc 4386 (<code class="varname">DISTDIR</code>, which can be set by the pkgsrc
4374 user). If the files do not exist, they are fetched using 4387 user). If the files do not exist, they are fetched using
4375 commands of the form</p> 4388 commands of the form</p>
4376<pre class="programlisting"> 4389<pre class="programlisting">
4377${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} 4390${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
4378</pre> 4391</pre>
4379<p>where <code class="literal">${site}</code> varies through 4392<p>where <code class="literal">${site}</code> varies through
4380 several possibilities in turn: first, 4393 several possibilities in turn: first,
4381 <code class="varname">MASTER_SITE_OVERRIDE</code> is tried, then the 4394 <code class="varname">MASTER_SITE_OVERRIDE</code> is tried, then the
4382 sites specified in either <code class="varname">SITES.file</code> if 4395 sites specified in either <code class="varname">SITES.file</code> if
4383 defined, else <code class="varname">MASTER_SITES</code> or 4396 defined, else <code class="varname">MASTER_SITES</code> or
4384 <code class="varname">PATCH_SITES</code>, as applies, then finally the 4397 <code class="varname">PATCH_SITES</code>, as applies, then finally the
4385 value of <code class="varname">MASTER_SITE_BACKUP</code>. The order of 4398 value of <code class="varname">MASTER_SITE_BACKUP</code>. The order of
4386 all except the first and the last can be optionally sorted 4399 all except the first and the last can be optionally sorted
4387 by the user, via setting either 4400 by the user, via setting either
4388 <code class="varname">MASTER_SORT_RANDOM</code>, and 4401 <code class="varname">MASTER_SORT_RANDOM</code>, and
4389 <code class="varname">MASTER_SORT_AWK</code> or 4402 <code class="varname">MASTER_SORT_AWK</code> or
4390 <code class="varname">MASTER_SORT_REGEX</code>.</p> 4403 <code class="varname">MASTER_SORT_REGEX</code>.</p>
4391<p> The specific command and arguments used depend on the 4404<p> The specific command and arguments used depend on the
4392 <code class="varname">FETCH_USING</code> parameter. The example above is 4405 <code class="varname">FETCH_USING</code> parameter. The example above is
4393 for <code class="literal">FETCH_USING=custom</code>.</p> 4406 for <code class="literal">FETCH_USING=custom</code>.</p>
4394<p>The distfiles mirror run by the NetBSD Foundation uses the 4407<p>The distfiles mirror run by the NetBSD Foundation uses the
4395 <span class="emphasis"><em>mirror-distfiles</em></span> target to mirror the 4408 <span class="emphasis"><em>mirror-distfiles</em></span> target to mirror the
4396 distfiles, if they are freely distributable. Packages setting 4409 distfiles, if they are freely distributable. Packages setting
4397 <code class="varname">NO_SRC_ON_FTP</code> (usually to 4410 <code class="varname">NO_SRC_ON_FTP</code> (usually to
4398 <span class="quote">&#8220;<span class="quote">${RESTRICTED}</span>&#8221;</span>) will not have their distfiles 4411 <span class="quote">&#8220;<span class="quote">${RESTRICTED}</span>&#8221;</span>) will not have their distfiles
4399 mirrored.</p> 4412 mirrored.</p>
4400</div> 4413</div>
4401</div> 4414</div>
4402<div class="sect1"> 4415<div class="sect1">
4403<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4416<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4404<a name="build.checksum"></a>13.6. The <span class="emphasis"><em>checksum</em></span> phase</h2></div></div></div> 4417<a name="build.checksum"></a>13.6. The <span class="emphasis"><em>checksum</em></span> phase</h2></div></div></div>
4405<p>After the distfile(s) are fetched, their checksum is 4418<p>After the distfile(s) are fetched, their checksum is
4406 generated and compared with the checksums stored in the 4419 generated and compared with the checksums stored in the
4407 distinfo file. If the checksums don't match, the build is 4420 distinfo file. If the checksums don't match, the build is
4408 aborted. This is to ensure the same distfile is used for 4421 aborted. This is to ensure the same distfile is used for
4409 building, and that the distfile wasn't changed, e.g. by some 4422 building, and that the distfile wasn't changed, e.g. by some
4410 malign force, deliberately changed distfiles on the master 4423 malign force, deliberately changed distfiles on the master
4411 distribution site or network lossage.</p> 4424 distribution site or network lossage.</p>
4412</div> 4425</div>
4413<div class="sect1"> 4426<div class="sect1">
4414<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4427<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4415<a name="build.extract"></a>13.7. The <span class="emphasis"><em>extract</em></span> phase</h2></div></div></div> 4428<a name="build.extract"></a>13.7. The <span class="emphasis"><em>extract</em></span> phase</h2></div></div></div>
4416<p>When the distfiles are present on the local system, they 4429<p>When the distfiles are present on the local system, they
4417 need to be extracted, as they usually come in the form of some 4430 need to be extracted, as they usually come in the form of some
4418 compressed archive format.</p> 4431 compressed archive format.</p>
4419<p>By default, all <code class="varname">DISTFILES</code> are 4432<p>By default, all <code class="varname">DISTFILES</code> are
4420 extracted. If you only need some of them, you can set the 4433 extracted. If you only need some of them, you can set the
4421 <code class="varname">EXTRACT_ONLY</code> variable to the list of those 4434 <code class="varname">EXTRACT_ONLY</code> variable to the list of those
4422 files.</p> 4435 files.</p>
4423<p>Extracting the files is usually done by a little 4436<p>Extracting the files is usually done by a little
4424 program, <code class="filename">mk/extract/extract</code>, which 4437 program, <code class="filename">mk/extract/extract</code>, which
4425 already knows how to extract various archive formats, so most 4438 already knows how to extract various archive formats, so most
4426 likely you will not need to change anything here. But if you 4439 likely you will not need to change anything here. But if you
4427 need, the following variables may help you:</p> 4440 need, the following variables may help you:</p>
4428<div class="variablelist"><dl class="variablelist"> 4441<div class="variablelist"><dl class="variablelist">
4429<dt><span class="term"><code class="varname">EXTRACT_OPTS_{BIN,LHA,PAX,RAR,TAR,ZIP,ZOO}</code></span></dt> 4442<dt><span class="term"><code class="varname">EXTRACT_OPTS_{BIN,LHA,PAX,RAR,TAR,ZIP,ZOO}</code></span></dt>
4430<dd><p>Use these variables to override the default 4443<dd><p>Use these variables to override the default
4431 options for an extract command, which are defined in 4444 options for an extract command, which are defined in
4432 <code class="filename">mk/extract/extract</code>.</p></dd> 4445 <code class="filename">mk/extract/extract</code>.</p></dd>
4433<dt><span class="term"><code class="varname">EXTRACT_USING</code></span></dt> 4446<dt><span class="term"><code class="varname">EXTRACT_USING</code></span></dt>
4434<dd><p>This variable can be set to 4447<dd><p>This variable can be set to
4435 <code class="literal">bsdtar</code>, <code class="literal">gtar</code>, <code class="literal">nbtar</code> 4448 <code class="literal">bsdtar</code>, <code class="literal">gtar</code>, <code class="literal">nbtar</code>
4436 (which is the default value), <code class="literal">pax</code>, or an 4449 (which is the default value), <code class="literal">pax</code>, or an
4437 absolute pathname pointing to the command with which tar 4450 absolute pathname pointing to the command with which tar
4438 archives should be extracted. It is preferred to choose bsdtar over gtar 4451 archives should be extracted. It is preferred to choose bsdtar over gtar
4439 if NetBSD's pax-as-tar is not good enough.</p></dd> 4452 if NetBSD's pax-as-tar is not good enough.</p></dd>
4440</dl></div> 4453</dl></div>
4441<p>If the <code class="filename">extract</code> program doesn't 4454<p>If the <code class="filename">extract</code> program doesn't
4442 serve your needs, you can also override the 4455 serve your needs, you can also override the
4443 <code class="varname">EXTRACT_CMD</code> variable, which holds the 4456 <code class="varname">EXTRACT_CMD</code> variable, which holds the
4444 command used for extracting the files. This command is 4457 command used for extracting the files. This command is
4445 executed in the <code class="filename">${WRKSRC}</code> 4458 executed in the <code class="filename">${WRKSRC}</code>
4446 directory. During execution of this command, the shell 4459 directory. During execution of this command, the shell
4447 variable <code class="varname">extract_file</code> holds the absolute 4460 variable <code class="varname">extract_file</code> holds the absolute
4448 pathname of the file that is going to be extracted.</p> 4461 pathname of the file that is going to be extracted.</p>
4449<p>And if that still does not suffice, you can override the 4462<p>And if that still does not suffice, you can override the
4450 <code class="varname">do-extract</code> target in the package 4463 <code class="varname">do-extract</code> target in the package
4451 Makefile.</p> 4464 Makefile.</p>
4452</div> 4465</div>
4453<div class="sect1"> 4466<div class="sect1">
4454<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4467<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4455<a name="build.patch"></a>13.8. The <span class="emphasis"><em>patch</em></span> phase</h2></div></div></div> 4468<a name="build.patch"></a>13.8. The <span class="emphasis"><em>patch</em></span> phase</h2></div></div></div>
4456<p>After extraction, all the patches named by the 4469<p>After extraction, all the patches named by the
4457 <code class="varname">PATCHFILES</code>, those present in the patches 4470 <code class="varname">PATCHFILES</code>, those present in the patches
4458 subdirectory of the package as well as in 4471 subdirectory of the package as well as in
4459 $LOCALPATCHES/$PKGPATH (e.g. 4472 $LOCALPATCHES/$PKGPATH (e.g.
4460 <code class="filename">/usr/local/patches/graphics/png</code>) are 4473 <code class="filename">/usr/local/patches/graphics/png</code>) are
4461 applied. Patchfiles ending in <code class="filename">.Z</code> or 4474 applied. Patchfiles ending in <code class="filename">.Z</code> or
4462 <code class="filename">.gz</code> are uncompressed before they are 4475 <code class="filename">.gz</code> are uncompressed before they are
4463 applied, files ending in <code class="filename">.orig</code> or 4476 applied, files ending in <code class="filename">.orig</code> or
4464 <code class="filename">.rej</code> are ignored. Any special options to 4477 <code class="filename">.rej</code> are ignored. Any special options to
4465 <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/patch.1"><span class="citerefentry"><span class="refentrytitle">patch</span>(1)</span></a> can be handed in 4478 <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/patch.1"><span class="citerefentry"><span class="refentrytitle">patch</span>(1)</span></a> can be handed in
4466 <code class="varname">PATCH_DIST_ARGS</code>. See <a class="xref" href="#components.patches" title="12.3. patches/*">Section 12.3, &#8220;<code class="filename">patches/*</code>&#8221;</a> for more details.</p> 4479 <code class="varname">PATCH_DIST_ARGS</code>. See <a class="xref" href="#components.patches" title="12.3. patches/*">Section 12.3, &#8220;<code class="filename">patches/*</code>&#8221;</a> for more details.</p>
4467<p>By default <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/patch.1"><span class="citerefentry"><span class="refentrytitle">patch</span>(1)</span></a> is given special arguments to make it 4480<p>By default <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/patch.1"><span class="citerefentry"><span class="refentrytitle">patch</span>(1)</span></a> is given special arguments to make it
4468 fail if the expected text from the patch context is not found in the 4481 fail if the expected text from the patch context is not found in the
4469 patched file. If that happens, fix the patch file by comparing it 4482 patched file. If that happens, fix the patch file by comparing it
4470 with the actual text in the file to be patched.</p> 4483 with the actual text in the file to be patched.</p>
4471</div> 4484</div>
4472<div class="sect1"> 4485<div class="sect1">
4473<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4486<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4474<a name="build.tools"></a>13.9. The <span class="emphasis"><em>tools</em></span> phase</h2></div></div></div> 4487<a name="build.tools"></a>13.9. The <span class="emphasis"><em>tools</em></span> phase</h2></div></div></div>
4475<p>This is covered in <a class="xref" href="#tools" title="Chapter 17. Tools needed for building or running">Chapter 17, <i>Tools needed for building or running</i></a>. 4488<p>This is covered in <a class="xref" href="#tools" title="Chapter 17. Tools needed for building or running">Chapter 17, <i>Tools needed for building or running</i></a>.
4476 </p> 4489 </p>
4477</div> 4490</div>
4478<div class="sect1"> 4491<div class="sect1">
4479<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4492<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4480<a name="build.wrapper"></a>13.10. The <span class="emphasis"><em>wrapper</em></span> phase</h2></div></div></div> 4493<a name="build.wrapper"></a>13.10. The <span class="emphasis"><em>wrapper</em></span> phase</h2></div></div></div>
4481<p>This phase creates wrapper programs for the compilers and 4494<p>This phase creates wrapper programs for the compilers and
4482 linkers. The following variables can be used to tweak the 4495 linkers. The following variables can be used to tweak the
4483 wrappers.</p> 4496 wrappers.</p>
4484<div class="variablelist"><dl class="variablelist"> 4497<div class="variablelist"><dl class="variablelist">
4485<dt><span class="term"><code class="varname">ECHO_WRAPPER_MSG</code></span></dt> 4498<dt><span class="term"><code class="varname">ECHO_WRAPPER_MSG</code></span></dt>
4486<dd><p>The command used to print progress 4499<dd><p>The command used to print progress
4487 messages. Does nothing by default. Set to 4500 messages. Does nothing by default. Set to
4488 <code class="literal">${ECHO}</code> to see the progress 4501 <code class="literal">${ECHO}</code> to see the progress
4489 messages.</p></dd> 4502 messages.</p></dd>
4490<dt><span class="term"><code class="varname">WRAPPER_DEBUG</code></span></dt> 4503<dt><span class="term"><code class="varname">WRAPPER_DEBUG</code></span></dt>
4491<dd><p>This variable can be set to 4504<dd><p>This variable can be set to
4492 <code class="literal">yes</code> (default) or <code class="literal">no</code>, 4505 <code class="literal">yes</code> (default) or <code class="literal">no</code>,
4493 depending on whether you want additional information in the 4506 depending on whether you want additional information in the
4494 wrapper log file.</p></dd> 4507 wrapper log file.</p></dd>
4495<dt><span class="term"><code class="varname">WRAPPER_UPDATE_CACHE</code></span></dt> 4508<dt><span class="term"><code class="varname">WRAPPER_UPDATE_CACHE</code></span></dt>
4496<dd><p>This variable can be set to 4509<dd><p>This variable can be set to
4497 <code class="literal">yes</code> or <code class="literal">no</code>, depending 4510 <code class="literal">yes</code> or <code class="literal">no</code>, depending
4498 on whether the wrapper should use its cache, which will 4511 on whether the wrapper should use its cache, which will
4499 improve the speed. The default value is 4512 improve the speed. The default value is
4500 <code class="literal">yes</code>, but is forced to 4513 <code class="literal">yes</code>, but is forced to
4501 <code class="literal">no</code> if the platform does not support 4514 <code class="literal">no</code> if the platform does not support
4502 it.</p></dd> 4515 it.</p></dd>
4503<dt><span class="term"><code class="varname">WRAPPER_REORDER_CMDS</code></span></dt> 4516<dt><span class="term"><code class="varname">WRAPPER_REORDER_CMDS</code></span></dt>
4504<dd><p>A list of reordering commands. A reordering 4517<dd><p>A list of reordering commands. A reordering
4505 command has the form 4518 command has the form
4506 <code class="literal">reorder:l:<em class="replaceable"><code>lib1</code></em>:<em class="replaceable"><code>lib2</code></em></code>. 4519 <code class="literal">reorder:l:<em class="replaceable"><code>lib1</code></em>:<em class="replaceable"><code>lib2</code></em></code>.
4507 It ensures that that 4520 It ensures that that
4508 <code class="literal">-l<em class="replaceable"><code>lib1</code></em></code> occurs 4521 <code class="literal">-l<em class="replaceable"><code>lib1</code></em></code> occurs
4509 before <code class="literal">-l<em class="replaceable"><code>lib2</code></em></code>. 4522 before <code class="literal">-l<em class="replaceable"><code>lib2</code></em></code>.
4510 </p></dd> 4523 </p></dd>
4511</dl></div> 4524</dl></div>
4512</div> 4525</div>
4513<div class="sect1"> 4526<div class="sect1">
4514<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4527<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4515<a name="build.configure"></a>13.11. The <span class="emphasis"><em>configure</em></span> phase</h2></div></div></div> 4528<a name="build.configure"></a>13.11. The <span class="emphasis"><em>configure</em></span> phase</h2></div></div></div>
4516<p>Most pieces of software need information on the header 4529<p>Most pieces of software need information on the header
4517 files, system calls, and library routines which are available 4530 files, system calls, and library routines which are available
4518 on the platform they run on. The process of determining this 4531 on the platform they run on. The process of determining this
4519 information is known as configuration, and is usually 4532 information is known as configuration, and is usually
4520 automated. In most cases, a script is supplied with the 4533 automated. In most cases, a script is supplied with the
4521 distfiles, and its invocation results in generation of header 4534 distfiles, and its invocation results in generation of header
4522 files, Makefiles, etc.</p> 4535 files, Makefiles, etc.</p>
4523<p>If the package contains a configure script, this can be 4536<p>If the package contains a configure script, this can be
4524 invoked by setting <code class="varname">HAS_CONFIGURE</code> to 4537 invoked by setting <code class="varname">HAS_CONFIGURE</code> to
4525 <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>. If the configure script is a GNU autoconf 4538 <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>. If the configure script is a GNU autoconf
4526 script, you should set <code class="varname">GNU_CONFIGURE</code> to 4539 script, you should set <code class="varname">GNU_CONFIGURE</code> to
4527 <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span> instead.</p> 4540 <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span> instead.</p>
4528<p>In the <code class="literal">do-configure</code> stage, a rough 4541<p>In the <code class="literal">do-configure</code> stage, a rough
4529 equivalent of the following command is run. See 4542 equivalent of the following command is run. See
4530 <code class="filename">mk/configure/configure.mk</code>, target 4543 <code class="filename">mk/configure/configure.mk</code>, target
4531 <code class="literal">do-configure-script</code> for the exact 4544 <code class="literal">do-configure-script</code> for the exact
4532 definition.</p> 4545 definition.</p>
4533<pre class="programlisting"> 4546<pre class="programlisting">
4534.for dir in ${CONFIGURE_DIRS} 4547.for dir in ${CONFIGURE_DIRS}
4535 cd ${WRKSRC} &amp;&amp; cd ${dir} \ 4548 cd ${WRKSRC} &amp;&amp; cd ${dir} \
4536 &amp;&amp; env ${CONFIGURE_ENV} \ 4549 &amp;&amp; env ${CONFIGURE_ENV} \
4537 ${CONFIG_SHELL} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} 4550 ${CONFIG_SHELL} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
4538.endfor 4551.endfor
4539</pre> 4552</pre>
4540<p><code class="varname">CONFIGURE_DIRS</code> (default: 4553<p><code class="varname">CONFIGURE_DIRS</code> (default:
4541 <span class="quote">&#8220;<span class="quote">.</span>&#8221;</span>) is a list of pathnames relative to 4554 <span class="quote">&#8220;<span class="quote">.</span>&#8221;</span>) is a list of pathnames relative to
4542 <code class="varname">WRKSRC</code>. In each of these directories, the 4555 <code class="varname">WRKSRC</code>. In each of these directories, the
4543 configure script is run with the environment 4556 configure script is run with the environment
4544 <code class="varname">CONFIGURE_ENV</code> and arguments 4557 <code class="varname">CONFIGURE_ENV</code> and arguments
4545 <code class="varname">CONFIGURE_ARGS</code>. The variables 4558 <code class="varname">CONFIGURE_ARGS</code>. The variables
4546 <code class="varname">CONFIGURE_ENV</code>, 4559 <code class="varname">CONFIGURE_ENV</code>,
4547 <code class="varname">CONFIGURE_SCRIPT</code> (default: 4560 <code class="varname">CONFIGURE_SCRIPT</code> (default:
4548 <span class="quote">&#8220;<span class="quote">./configure</span>&#8221;</span>) and 4561 <span class="quote">&#8220;<span class="quote">./configure</span>&#8221;</span>) and
4549 <code class="varname">CONFIGURE_ARGS</code> may all be changed by the 4562 <code class="varname">CONFIGURE_ARGS</code> may all be changed by the
4550 package.</p> 4563 package.</p>
4551<p>If the program uses the Perl way of configuration (mainly Perl 4564<p>If the program uses the Perl way of configuration (mainly Perl
4552 modules, but not only), i.e. a file called 4565 modules, but not only), i.e. a file called
4553 <code class="filename">Makefile.PL</code>, it should include 4566 <code class="filename">Makefile.PL</code>, it should include
4554 <code class="filename">../../lang/perl5/module.mk</code>. To set any parameter for 4567 <code class="filename">../../lang/perl5/module.mk</code>. To set any parameter for
4555 <code class="filename">Makefile.PL</code> use the <code class="varname">MAKE_PARAMS</code> 4568 <code class="filename">Makefile.PL</code> use the <code class="varname">MAKE_PARAMS</code>
4556 variable (e.g., <code class="literal">MAKE_PARAMS+=foo=bar</code></p> 4569 variable (e.g., <code class="literal">MAKE_PARAMS+=foo=bar</code></p>
4557<p>If the program uses an <code class="filename">Imakefile</code> 4570<p>If the program uses an <code class="filename">Imakefile</code>
4558 for configuration, the appropriate steps can be invoked by 4571 for configuration, the appropriate steps can be invoked by
4559 setting <code class="varname">USE_IMAKE</code> to 4572 setting <code class="varname">USE_IMAKE</code> to
4560 <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>. If you only need xmkmf, add it to <code class="varname">USE_TOOLS</code>. 4573 <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>. If you only need xmkmf, add it to <code class="varname">USE_TOOLS</code>.
4561 You can add variables to xmkmf's environment by adding them to the 4574 You can add variables to xmkmf's environment by adding them to the
4562 <code class="varname">SCRIPTS_ENV</code> variable.</p> 4575 <code class="varname">SCRIPTS_ENV</code> variable.</p>
4563<p>If the program uses <code class="filename">cmake</code> 4576<p>If the program uses <code class="filename">cmake</code>
4564 for configuration, the appropriate steps can be invoked by 4577 for configuration, the appropriate steps can be invoked by
4565 setting <code class="varname">USE_CMAKE</code> to <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>. 4578 setting <code class="varname">USE_CMAKE</code> to <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>.
4566 You can add variables to cmake's environment by adding them to the 4579 You can add variables to cmake's environment by adding them to the
4567 <code class="varname">CONFIGURE_ENV</code> variable and arguments to cmake 4580 <code class="varname">CONFIGURE_ENV</code> variable and arguments to cmake
4568 by adding them to the <code class="varname">CMAKE_ARGS</code> variable. 4581 by adding them to the <code class="varname">CMAKE_ARGS</code> variable.
4569 The top directory argument is given by the 4582 The top directory argument is given by the
4570 <code class="varname">CMAKE_ARG_PATH</code> variable, that defaults to 4583 <code class="varname">CMAKE_ARG_PATH</code> variable, that defaults to
4571 <span class="quote">&#8220;<span class="quote">.</span>&#8221;</span> (relative to <code class="varname">CONFIGURE_DIRS</code>)</p> 4584 <span class="quote">&#8220;<span class="quote">.</span>&#8221;</span> (relative to <code class="varname">CONFIGURE_DIRS</code>)</p>
4572<p>If there is no configure step at all, set 4585<p>If there is no configure step at all, set
4573 <code class="varname">NO_CONFIGURE</code> to <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>.</p> 4586 <code class="varname">NO_CONFIGURE</code> to <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>.</p>
4574</div> 4587</div>
4575<div class="sect1"> 4588<div class="sect1">
4576<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4589<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4577<a name="build.build"></a>13.12. The <span class="emphasis"><em>build</em></span> phase</h2></div></div></div> 4590<a name="build.build"></a>13.12. The <span class="emphasis"><em>build</em></span> phase</h2></div></div></div>
4578<p>For building a package, a rough equivalent of the following 4591<p>For building a package, a rough equivalent of the following
4579 code is executed; see <code class="filename">mk/build/build.mk</code>, target 4592 code is executed; see <code class="filename">mk/build/build.mk</code>, target
4580 <code class="literal">do-build</code> for the exact definition.</p> 4593 <code class="literal">do-build</code> for the exact definition.</p>
4581<pre class="programlisting"> 4594<pre class="programlisting">
4582.for dir in ${BUILD_DIRS} 4595.for dir in ${BUILD_DIRS}
4583 cd ${WRKSRC} &amp;&amp; cd ${dir} \ 4596 cd ${WRKSRC} &amp;&amp; cd ${dir} \
4584 &amp;&amp; env ${MAKE_ENV} \ 4597 &amp;&amp; env ${MAKE_ENV} \
4585 ${MAKE_PROGRAM} ${MAKE_FLAGS} ${BUILD_MAKE_FLAGS} \ 4598 ${MAKE_PROGRAM} ${MAKE_FLAGS} ${BUILD_MAKE_FLAGS} \
4586 -f ${MAKE_FILE} \ 4599 -f ${MAKE_FILE} \
4587 ${BUILD_TARGET} 4600 ${BUILD_TARGET}
4588.endfor 4601.endfor
4589</pre> 4602</pre>
4590<p><code class="varname">BUILD_DIRS</code> (default: 4603<p><code class="varname">BUILD_DIRS</code> (default:
4591 <span class="quote">&#8220;<span class="quote">.</span>&#8221;</span>) is a list of pathnames relative to 4604 <span class="quote">&#8220;<span class="quote">.</span>&#8221;</span>) is a list of pathnames relative to
4592 <code class="varname">WRKSRC</code>. In each of these directories, 4605 <code class="varname">WRKSRC</code>. In each of these directories,
4593 <code class="varname">MAKE_PROGRAM</code> is run with the environment 4606 <code class="varname">MAKE_PROGRAM</code> is run with the environment
4594 <code class="varname">MAKE_ENV</code> and arguments 4607 <code class="varname">MAKE_ENV</code> and arguments
4595 <code class="varname">BUILD_MAKE_FLAGS</code>. The variables 4608 <code class="varname">BUILD_MAKE_FLAGS</code>. The variables
4596 <code class="varname">MAKE_ENV</code>, 4609 <code class="varname">MAKE_ENV</code>,
4597 <code class="varname">BUILD_MAKE_FLAGS</code>, 4610 <code class="varname">BUILD_MAKE_FLAGS</code>,
4598 <code class="varname">MAKE_FILE</code> and 4611 <code class="varname">MAKE_FILE</code> and
4599 <code class="varname">BUILD_TARGET</code> may all be changed by the 4612 <code class="varname">BUILD_TARGET</code> may all be changed by the
4600 package.</p> 4613 package.</p>
4601<p>The default value of <code class="varname">MAKE_PROGRAM</code> is 4614<p>The default value of <code class="varname">MAKE_PROGRAM</code> is
4602 <span class="quote">&#8220;<span class="quote">gmake</span>&#8221;</span> if <code class="varname">USE_TOOLS</code> contains 4615 <span class="quote">&#8220;<span class="quote">gmake</span>&#8221;</span> if <code class="varname">USE_TOOLS</code> contains
4603 <span class="quote">&#8220;<span class="quote">gmake</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">make</span>&#8221;</span> otherwise. The 4616 <span class="quote">&#8220;<span class="quote">gmake</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">make</span>&#8221;</span> otherwise. The
4604 default value of <code class="varname">MAKE_FILE</code> is 4617 default value of <code class="varname">MAKE_FILE</code> is
4605 <span class="quote">&#8220;<span class="quote">Makefile</span>&#8221;</span>, and <code class="varname">BUILD_TARGET</code> 4618 <span class="quote">&#8220;<span class="quote">Makefile</span>&#8221;</span>, and <code class="varname">BUILD_TARGET</code>
4606 defaults to <span class="quote">&#8220;<span class="quote">all</span>&#8221;</span>.</p> 4619 defaults to <span class="quote">&#8220;<span class="quote">all</span>&#8221;</span>.</p>
4607<p>If there is no build step at all, set 4620<p>If there is no build step at all, set
4608 <code class="varname">NO_BUILD</code> to <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>.</p> 4621 <code class="varname">NO_BUILD</code> to <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>.</p>
4609</div> 4622</div>
4610<div class="sect1"> 4623<div class="sect1">
4611<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4624<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4612<a name="build.test"></a>13.13. The <span class="emphasis"><em>test</em></span> phase</h2></div></div></div> 4625<a name="build.test"></a>13.13. The <span class="emphasis"><em>test</em></span> phase</h2></div></div></div>
4613<p>[TODO]</p> 4626<p>[TODO]</p>
4614</div> 4627</div>
4615<div class="sect1"> 4628<div class="sect1">
4616<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4629<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4617<a name="build.install"></a>13.14. The <span class="emphasis"><em>install</em></span> phase</h2></div></div></div> 4630<a name="build.install"></a>13.14. The <span class="emphasis"><em>install</em></span> phase</h2></div></div></div>
4618<p>Once the build stage has completed, the final step is to 4631<p>Once the build stage has completed, the final step is to
4619 install the software in public directories, so users can 4632 install the software in public directories, so users can
4620 access the programs and files.</p> 4633 access the programs and files.</p>
4621<p>In the <span class="emphasis"><em>install</em></span> phase, a rough equivalent 4634<p>In the <span class="emphasis"><em>install</em></span> phase, a rough equivalent
4622 of the following code is executed; see 4635 of the following code is executed; see
4623 <code class="filename">mk/install/install.mk</code>, target 4636 <code class="filename">mk/install/install.mk</code>, target
4624 <code class="literal">do-install</code> for the exact definition. Additionally, 4637 <code class="literal">do-install</code> for the exact definition. Additionally,
4625 before and after this code, several consistency checks are run 4638 before and after this code, several consistency checks are run
4626 against the files-to-be-installed, see 4639 against the files-to-be-installed, see
4627 <code class="filename">mk/check/*.mk</code> for details.</p> 4640 <code class="filename">mk/check/*.mk</code> for details.</p>
4628<pre class="programlisting"> 4641<pre class="programlisting">
4629.for dir in ${INSTALL_DIRS} 4642.for dir in ${INSTALL_DIRS}
4630 cd ${WRKSRC} &amp;&amp; cd ${dir} \ 4643 cd ${WRKSRC} &amp;&amp; cd ${dir} \
4631 &amp;&amp; env ${INSTALL_ENV} ${MAKE_ENV} \ 4644 &amp;&amp; env ${INSTALL_ENV} ${MAKE_ENV} \
4632 ${MAKE_PROGRAM} ${MAKE_FLAGS} ${INSTALL_MAKE_FLAGS} \ 4645 ${MAKE_PROGRAM} ${MAKE_FLAGS} ${INSTALL_MAKE_FLAGS} \
4633 -f ${MAKE_FILE} ${INSTALL_TARGET} 4646 -f ${MAKE_FILE} ${INSTALL_TARGET}
4634.endfor 4647.endfor
4635</pre> 4648</pre>
4636<p>The variable's meanings are analogous to the ones in the 4649<p>The variable's meanings are analogous to the ones in the
4637 <span class="emphasis"><em>build</em></span> phase. 4650 <span class="emphasis"><em>build</em></span> phase.
4638 <code class="varname">INSTALL_DIRS</code> defaults to 4651 <code class="varname">INSTALL_DIRS</code> defaults to
4639 <code class="varname">BUILD_DIRS</code>. <code class="varname">INSTALL_TARGET</code> 4652 <code class="varname">BUILD_DIRS</code>. <code class="varname">INSTALL_TARGET</code>
4640 is <span class="quote">&#8220;<span class="quote">install</span>&#8221;</span> by default, plus 4653 is <span class="quote">&#8220;<span class="quote">install</span>&#8221;</span> by default, plus
4641 <span class="quote">&#8220;<span class="quote">install.man</span>&#8221;</span> if <code class="varname">USE_IMAKE</code> is 4654 <span class="quote">&#8220;<span class="quote">install.man</span>&#8221;</span> if <code class="varname">USE_IMAKE</code> is
4642 defined and <code class="varname">NO_INSTALL_MANPAGES</code> is not 4655 defined and <code class="varname">NO_INSTALL_MANPAGES</code> is not
4643 defined.</p> 4656 defined.</p>
4644<p>In the <span class="emphasis"><em>install</em></span> phase, the following 4657<p>In the <span class="emphasis"><em>install</em></span> phase, the following
4645 variables are useful. They are all variations of the 4658 variables are useful. They are all variations of the
4646 <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/install.1"><span class="citerefentry"><span class="refentrytitle">install</span>(1)</span></a> command that have the owner, group and 4659 <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/install.1"><span class="citerefentry"><span class="refentrytitle">install</span>(1)</span></a> command that have the owner, group and
4647 permissions preset. <code class="varname">INSTALL</code> is the plain 4660 permissions preset. <code class="varname">INSTALL</code> is the plain
4648 install command. The specialized variants, together with their 4661 install command. The specialized variants, together with their
4649 intended use, are:</p> 4662 intended use, are:</p>
4650<div class="variablelist"><dl class="variablelist"> 4663<div class="variablelist"><dl class="variablelist">
4651<dt><span class="term"><code class="varname">INSTALL_PROGRAM_DIR</code></span></dt> 4664<dt><span class="term"><code class="varname">INSTALL_PROGRAM_DIR</code></span></dt>
4652<dd><p>directories that contain 4665<dd><p>directories that contain
4653 binaries</p></dd> 4666 binaries</p></dd>
4654<dt><span class="term"><code class="varname">INSTALL_SCRIPT_DIR</code></span></dt> 4667<dt><span class="term"><code class="varname">INSTALL_SCRIPT_DIR</code></span></dt>
4655<dd><p>directories that contain 4668<dd><p>directories that contain
4656 scripts</p></dd> 4669 scripts</p></dd>
4657<dt><span class="term"><code class="varname">INSTALL_LIB_DIR</code></span></dt> 4670<dt><span class="term"><code class="varname">INSTALL_LIB_DIR</code></span></dt>
4658<dd><p>directories that contain shared and static 4671<dd><p>directories that contain shared and static
4659 libraries</p></dd> 4672 libraries</p></dd>
4660<dt><span class="term"><code class="varname">INSTALL_DATA_DIR</code></span></dt> 4673<dt><span class="term"><code class="varname">INSTALL_DATA_DIR</code></span></dt>
4661<dd><p>directories that contain data 4674<dd><p>directories that contain data
4662 files</p></dd> 4675 files</p></dd>
4663<dt><span class="term"><code class="varname">INSTALL_MAN_DIR</code></span></dt> 4676<dt><span class="term"><code class="varname">INSTALL_MAN_DIR</code></span></dt>
4664<dd><p>directories that contain man 4677<dd><p>directories that contain man
4665 pages</p></dd> 4678 pages</p></dd>
4666<dt><span class="term"><code class="varname">INSTALL_GAME_DIR</code></span></dt> 4679<dt><span class="term"><code class="varname">INSTALL_GAME_DIR</code></span></dt>
4667<dd><p>directories that contain data files for games 4680<dd><p>directories that contain data files for games
4668 </p></dd> 4681 </p></dd>
4669<dt><span class="term"><code class="varname">INSTALL_PROGRAM</code></span></dt> 4682<dt><span class="term"><code class="varname">INSTALL_PROGRAM</code></span></dt>
4670<dd><p>binaries that can be stripped from debugging 4683<dd><p>binaries that can be stripped from debugging
4671 symbols</p></dd> 4684 symbols</p></dd>
4672<dt><span class="term"><code class="varname">INSTALL_SCRIPT</code></span></dt> 4685<dt><span class="term"><code class="varname">INSTALL_SCRIPT</code></span></dt>
4673<dd><p>binaries that cannot be 4686<dd><p>binaries that cannot be
4674 stripped</p></dd> 4687 stripped</p></dd>
4675<dt><span class="term"><code class="varname">INSTALL_GAME</code></span></dt> 4688<dt><span class="term"><code class="varname">INSTALL_GAME</code></span></dt>
4676<dd><p>game 4689<dd><p>game
4677 binaries</p></dd> 4690 binaries</p></dd>
4678<dt><span class="term"><code class="varname">INSTALL_LIB</code></span></dt> 4691<dt><span class="term"><code class="varname">INSTALL_LIB</code></span></dt>
4679<dd><p>shared and static 4692<dd><p>shared and static
4680 libraries</p></dd> 4693 libraries</p></dd>
4681<dt><span class="term"><code class="varname">INSTALL_DATA</code></span></dt> 4694<dt><span class="term"><code class="varname">INSTALL_DATA</code></span></dt>
4682<dd><p>data files</p></dd> 4695<dd><p>data files</p></dd>
4683<dt><span class="term"><code class="varname">INSTALL_GAME_DATA</code></span></dt> 4696<dt><span class="term"><code class="varname">INSTALL_GAME_DATA</code></span></dt>
4684<dd><p>data files for 4697<dd><p>data files for
4685 games</p></dd> 4698 games</p></dd>
4686<dt><span class="term"><code class="varname">INSTALL_MAN</code></span></dt> 4699<dt><span class="term"><code class="varname">INSTALL_MAN</code></span></dt>
4687<dd><p>man pages</p></dd> 4700<dd><p>man pages</p></dd>
4688</dl></div> 4701</dl></div>
4689<p>Some other variables are:</p> 4702<p>Some other variables are:</p>
4690<div class="variablelist"><dl class="variablelist"> 4703<div class="variablelist"><dl class="variablelist">
4691<dt><span class="term"><code class="varname">INSTALL_UNSTRIPPED</code></span></dt> 4704<dt><span class="term"><code class="varname">INSTALL_UNSTRIPPED</code></span></dt>
4692<dd><p>If set to <code class="literal">yes</code>, do not run <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/strip.1"><span class="citerefentry"><span class="refentrytitle">strip</span>(1)</span></a> 4705<dd><p>If set to <code class="literal">yes</code>, do not run <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/strip.1"><span class="citerefentry"><span class="refentrytitle">strip</span>(1)</span></a>
4693 when installing binaries. Any debugging sections and symbols present in 4706 when installing binaries. Any debugging sections and symbols present in
4694 binaries will be preserved. 4707 binaries will be preserved.
4695 </p></dd> 4708 </p></dd>
4696<dt><span class="term"><code class="varname">INSTALLATION_DIRS</code></span></dt> 4709<dt><span class="term"><code class="varname">INSTALLATION_DIRS</code></span></dt>
4697<dd><p>A list of directories relative to 4710<dd><p>A list of directories relative to
4698 <code class="varname">PREFIX</code> that are created by pkgsrc at the 4711 <code class="varname">PREFIX</code> that are created by pkgsrc at the
4699 beginning of the <span class="emphasis"><em>install</em></span> phase. 4712 beginning of the <span class="emphasis"><em>install</em></span> phase.
4700 The package is supposed to create all needed directories itself 4713 The package is supposed to create all needed directories itself
4701 before installing files to it and list all other directories here. 4714 before installing files to it and list all other directories here.
4702 </p></dd> 4715 </p></dd>
4703</dl></div> 4716</dl></div>
4704<p>In the rare cases that a package shouldn't install anything, 4717<p>In the rare cases that a package shouldn't install anything,
4705 set <code class="varname">NO_INSTALL</code> to <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>. This is 4718 set <code class="varname">NO_INSTALL</code> to <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>. This is
4706 mostly relevant for packages in the <code class="filename">regress</code> 4719 mostly relevant for packages in the <code class="filename">regress</code>
4707 category.</p> 4720 category.</p>
4708</div> 4721</div>
4709<div class="sect1"> 4722<div class="sect1">
4710<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4723<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4711<a name="build.package"></a>13.15. The <span class="emphasis"><em>package</em></span> phase</h2></div></div></div> 4724<a name="build.package"></a>13.15. The <span class="emphasis"><em>package</em></span> phase</h2></div></div></div>
4712<p>Once the install stage has completed, a binary package of 4725<p>Once the install stage has completed, a binary package of
4713 the installed files can be built. These binary packages can be 4726 the installed files can be built. These binary packages can be
4714 used for quick installation without previous compilation, e.g. by 4727 used for quick installation without previous compilation, e.g. by
4715 the <span class="command"><strong>make bin-install</strong></span> or by using 4728 the <span class="command"><strong>make bin-install</strong></span> or by using
4716 <span class="command"><strong>pkg_add</strong></span>.</p> 4729 <span class="command"><strong>pkg_add</strong></span>.</p>
4717<p>By default, the binary packages are created in 4730<p>By default, the binary packages are created in
4718 <code class="filename">${PACKAGES}/All</code> and symlinks are created in 4731 <code class="filename">${PACKAGES}/All</code> and symlinks are created in
4719 <code class="filename">${PACKAGES}/<em class="replaceable"><code>category</code></em></code>, 4732 <code class="filename">${PACKAGES}/<em class="replaceable"><code>category</code></em></code>,
4720 one for each category in the <code class="varname">CATEGORIES</code> 4733 one for each category in the <code class="varname">CATEGORIES</code>
4721 variable. <code class="varname">PACKAGES</code> defaults to 4734 variable. <code class="varname">PACKAGES</code> defaults to
4722 <code class="filename">pkgsrc/packages</code>.</p> 4735 <code class="filename">pkgsrc/packages</code>.</p>
4723</div> 4736</div>
4724<div class="sect1"> 4737<div class="sect1">
4725<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4738<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4726<a name="build.clean"></a>13.16. Cleaning up</h2></div></div></div> 4739<a name="build.clean"></a>13.16. Cleaning up</h2></div></div></div>
4727<p>Once you're finished with a package, you can clean the work 4740<p>Once you're finished with a package, you can clean the work
4728 directory by running <span class="command"><strong>make clean</strong></span>. If you want 4741 directory by running <span class="command"><strong>make clean</strong></span>. If you want
4729 to clean the work directories of all dependencies too, use 4742 to clean the work directories of all dependencies too, use
4730 <span class="command"><strong>make clean-depends</strong></span>.</p> 4743 <span class="command"><strong>make clean-depends</strong></span>.</p>
4731</div> 4744</div>
4732<div class="sect1"> 4745<div class="sect1">
4733<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 4746<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4734<a name="build.helpful-targets"></a>13.17. Other helpful targets</h2></div></div></div> 4747<a name="build.helpful-targets"></a>13.17. Other helpful targets</h2></div></div></div>
4735<div class="variablelist"><dl class="variablelist"> 4748<div class="variablelist"><dl class="variablelist">
4736<dt><span class="term">pre/post-*</span></dt> 4749<dt><span class="term">pre/post-*</span></dt>
4737<dd> 4750<dd>
4738<p>For any of the main targets described in the previous 4751<p>For any of the main targets described in the previous
4739 section (configure, build, install, etc.), two auxiliary 4752 section (configure, build, install, etc.), two auxiliary
4740 targets exist with 4753 targets exist with
4741 <span class="quote">&#8220;<span class="quote">pre-</span>&#8221;</span> and <span class="quote">&#8220;<span class="quote">post-</span>&#8221;</span> used as a 4754 <span class="quote">&#8220;<span class="quote">pre-</span>&#8221;</span> and <span class="quote">&#8220;<span class="quote">post-</span>&#8221;</span> used as a
4742 prefix for the main target's name. These targets are 4755 prefix for the main target's name. These targets are
4743 invoked before and after the main target is called, 4756 invoked before and after the main target is called,
4744 allowing extra configuration or installation steps be 4757 allowing extra configuration or installation steps be
4745 performed from a package's Makefile, for example, which 4758 performed from a package's Makefile, for example, which
4746 a program's configure script or install target 4759 a program's configure script or install target
4747 omitted.</p> 4760 omitted.</p>
4748<p>About 5% of the pkgsrc packages define their custom 4761<p>About 5% of the pkgsrc packages define their custom
4749 post-extract target, another 5% define pre-configure, and 10% 4762 post-extract target, another 5% define pre-configure, and 10%
4750 define post-install. The other pre/post-* targets are defined 4763 define post-install. The other pre/post-* targets are defined
4751 even less often.</p> 4764 even less often.</p>
4752</dd> 4765</dd>
4753<dt><span class="term">do-*</span></dt> 4766<dt><span class="term">do-*</span></dt>
4754<dd> 4767<dd>
4755<p>Should one of the main targets do the wrong thing, 4768<p>Should one of the main targets do the wrong thing,
4756 and should there be no variable to fix this, you can 4769 and should there be no variable to fix this, you can
4757 redefine it with the do-* target. (Note that redefining 4770 redefine it with the do-* target. (Note that redefining
4758 the target itself instead of the do-* target is a bad 4771 the target itself instead of the do-* target is a bad
4759 idea, as the pre-* and post-* targets won't be called 4772 idea, as the pre-* and post-* targets won't be called
4760 anymore, etc.)</p> 4773 anymore, etc.)</p>
4761<p>About 15% of the pkgsrc packages override the default 4774<p>About 15% of the pkgsrc packages override the default
4762 do-install, the other do-* targets are overridden even less 4775 do-install, the other do-* targets are overridden even less
4763 often.</p> 4776 often.</p>
4764</dd> 4777</dd>
4765<dt><span class="term">reinstall</span></dt> 4778<dt><span class="term">reinstall</span></dt>
4766<dd> 4779<dd>
4767<p>If you did a <span class="command"><strong>make install</strong></span> and 4780<p>If you did a <span class="command"><strong>make install</strong></span> and
4768 you noticed some file was not installed properly, you 4781 you noticed some file was not installed properly, you
4769 can repeat the installation with this target, which will 4782 can repeat the installation with this target, which will
4770 ignore the <span class="quote">&#8220;<span class="quote">already installed</span>&#8221;</span> flag.</p> 4783 ignore the <span class="quote">&#8220;<span class="quote">already installed</span>&#8221;</span> flag.</p>
4771<p>This is the default value of 4784<p>This is the default value of
4772 <code class="varname">DEPENDS_TARGET</code> except in the case of 4785 <code class="varname">DEPENDS_TARGET</code> except in the case of
4773 <span class="command"><strong>make update</strong></span> and <span class="command"><strong>make 4786 <span class="command"><strong>make update</strong></span> and <span class="command"><strong>make
4774 package</strong></span>, where the defaults are 4787 package</strong></span>, where the defaults are
4775 <span class="quote">&#8220;<span class="quote">package</span>&#8221;</span> and <span class="quote">&#8220;<span class="quote">update</span>&#8221;</span>, 4788 <span class="quote">&#8220;<span class="quote">package</span>&#8221;</span> and <span class="quote">&#8220;<span class="quote">update</span>&#8221;</span>,
4776 respectively.</p> 4789 respectively.</p>
4777</dd> 4790</dd>
4778<dt><span class="term">deinstall</span></dt> 4791<dt><span class="term">deinstall</span></dt>
4779<dd> 4792<dd>
4780<p>This target does a <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_delete.1"><span class="citerefentry"><span class="refentrytitle">pkg_delete</span>(1)</span></a> in the 4793<p>This target does a <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_delete.1"><span class="citerefentry"><span class="refentrytitle">pkg_delete</span>(1)</span></a> in the
4781 current directory, effectively de-installing the 4794 current directory, effectively de-installing the
4782 package. The following variables can be used to tune the 4795 package. The following variables can be used to tune the
4783 behaviour:</p> 4796 behaviour:</p>
4784<div class="variablelist"><dl class="variablelist"> 4797<div class="variablelist"><dl class="variablelist">
4785<dt><span class="term"><code class="varname">PKG_VERBOSE</code></span></dt> 4798<dt><span class="term"><code class="varname">PKG_VERBOSE</code></span></dt>
4786<dd><p>Add a "-v" to the <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_delete.1"><span class="citerefentry"><span class="refentrytitle">pkg_delete</span>(1)</span></a> command.</p></dd> 4799<dd><p>Add a "-v" to the <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_delete.1"><span class="citerefentry"><span class="refentrytitle">pkg_delete</span>(1)</span></a> command.</p></dd>
4787<dt><span class="term"><code class="varname">DEINSTALLDEPENDS</code></span></dt> 4800<dt><span class="term"><code class="varname">DEINSTALLDEPENDS</code></span></dt>
4788<dd><p>Remove all packages that require (depend on) 4801<dd><p>Remove all packages that require (depend on)
4789 the given package. This can be used to remove any 4802 the given package. This can be used to remove any
4790 packages that may have been pulled in by a given 4803 packages that may have been pulled in by a given
4791 package, e.g. if <span class="command"><strong>make deinstall 4804 package, e.g. if <span class="command"><strong>make deinstall
4792 DEINSTALLDEPENDS=1</strong></span> is done in 4805 DEINSTALLDEPENDS=1</strong></span> is done in
4793 <code class="filename">pkgsrc/x11/kde</code>, this is 4806 <code class="filename">pkgsrc/x11/kde</code>, this is
4794 likely to remove whole KDE. Works by adding 4807 likely to remove whole KDE. Works by adding
4795 <span class="quote">&#8220;<span class="quote">-R</span>&#8221;</span> to the <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_delete.1"><span class="citerefentry"><span class="refentrytitle">pkg_delete</span>(1)</span></a> 4808 <span class="quote">&#8220;<span class="quote">-R</span>&#8221;</span> to the <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_delete.1"><span class="citerefentry"><span class="refentrytitle">pkg_delete</span>(1)</span></a>
4796 command line.</p></dd> 4809 command line.</p></dd>
4797</dl></div> 4810</dl></div>
4798</dd> 4811</dd>
4799<dt><span class="term">bin-install</span></dt> 4812<dt><span class="term">bin-install</span></dt>
4800<dd><p>Install a binary package from local disk and via FTP 4813<dd><p>Install a binary package from local disk and via FTP
4801 from a list of sites (see the 4814 from a list of sites (see the
4802 <code class="varname">BINPKG_SITES</code> variable), and do a 4815 <code class="varname">BINPKG_SITES</code> variable), and do a
4803 <span class="command"><strong>make package</strong></span> if no binary package is 4816 <span class="command"><strong>make package</strong></span> if no binary package is
4804 available anywhere. The arguments given to 4817 available anywhere. The arguments given to
4805 <span class="command"><strong>pkg_add</strong></span> can be set via 4818 <span class="command"><strong>pkg_add</strong></span> can be set via
4806 <code class="varname">BIN_INSTALL_FLAGS</code> e.g., to do verbose 4819 <code class="varname">BIN_INSTALL_FLAGS</code> e.g., to do verbose
4807 operation, etc.</p></dd> 4820 operation, etc.</p></dd>
4808<dt><span class="term">install-clean</span></dt> 4821<dt><span class="term">install-clean</span></dt>
4809<dd><p>This target removes the state files for the "install" and later 4822<dd><p>This target removes the state files for the "install" and later
4810 phases so that the "install" target may be re-invoked. This can be 4823 phases so that the "install" target may be re-invoked. This can be
4811 used after editing the PLIST to install the package without 4824 used after editing the PLIST to install the package without
4812 rebuilding it.</p></dd> 4825 rebuilding it.</p></dd>
4813<dt><span class="term">build-clean</span></dt> 4826<dt><span class="term">build-clean</span></dt>
4814<dd><p>This target removes the state files for the "build" and later 4827<dd><p>This target removes the state files for the "build" and later
4815 phases so that the "build" target may be re-invoked.</p></dd> 4828 phases so that the "build" target may be re-invoked.</p></dd>
4816<dt><span class="term">update</span></dt> 4829<dt><span class="term">update</span></dt>
4817<dd> 4830<dd>
4818<p>This target causes the current package to be 4831<p>This target causes the current package to be
4819 updated to the latest version. The package and all 4832 updated to the latest version. The package and all
4820 depending packages first get de-installed, then current 4833 depending packages first get de-installed, then current
4821 versions of the corresponding packages get compiled and 4834 versions of the corresponding packages get compiled and
4822 installed. This is similar to manually noting which 4835 installed. This is similar to manually noting which
4823 packages are currently installed, then performing a 4836 packages are currently installed, then performing a
4824 series of <span class="command"><strong>make deinstall</strong></span> and 4837 series of <span class="command"><strong>make deinstall</strong></span> and
4825 <span class="command"><strong>make install</strong></span> (or whatever 4838 <span class="command"><strong>make install</strong></span> (or whatever
4826 <code class="varname">UPDATE_TARGET</code> is set to) for these 4839 <code class="varname">UPDATE_TARGET</code> is set to) for these
4827 packages.</p> 4840 packages.</p>
4828<p>You can use the <span class="quote">&#8220;<span class="quote">update</span>&#8221;</span> target to 4841<p>You can use the <span class="quote">&#8220;<span class="quote">update</span>&#8221;</span> target to
4829 resume package updating in case a previous <span class="command"><strong>make 4842 resume package updating in case a previous <span class="command"><strong>make
4830 update</strong></span> was interrupted for some reason. 4843 update</strong></span> was interrupted for some reason.
4831 However, in this case, make sure you don't call 4844 However, in this case, make sure you don't call
4832 <span class="command"><strong>make clean</strong></span> or otherwise remove the 4845 <span class="command"><strong>make clean</strong></span> or otherwise remove the
4833 list of dependent packages in <code class="varname">WRKDIR</code>. 4846 list of dependent packages in <code class="varname">WRKDIR</code>.
4834 Otherwise, you lose the ability to automatically update 4847 Otherwise, you lose the ability to automatically update
4835 the current package along with the dependent packages 4848 the current package along with the dependent packages
4836 you have installed.</p> 4849 you have installed.</p>
4837<p>Resuming an interrupted <span class="command"><strong>make 4850<p>Resuming an interrupted <span class="command"><strong>make
4838 update</strong></span> will only work as long as the package 4851 update</strong></span> will only work as long as the package
4839 tree remains unchanged. If the source code for one of 4852 tree remains unchanged. If the source code for one of
4840 the packages to be updated has been changed, resuming 4853 the packages to be updated has been changed, resuming
4841 <span class="command"><strong>make update</strong></span> will most certainly 4854 <span class="command"><strong>make update</strong></span> will most certainly
4842 fail!</p> 4855 fail!</p>
4843<p>The following variables can be used either on the 4856<p>The following variables can be used either on the
4844 command line or in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> to 4857 command line or in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> to
4845 alter the behaviour of <span class="command"><strong>make 4858 alter the behaviour of <span class="command"><strong>make
4846 update</strong></span>:</p> 4859 update</strong></span>:</p>
4847<div class="variablelist"><dl class="variablelist"> 4860<div class="variablelist"><dl class="variablelist">
4848<dt><span class="term"><code class="varname">UPDATE_TARGET</code></span></dt> 4861<dt><span class="term"><code class="varname">UPDATE_TARGET</code></span></dt>
4849<dd><p>Install target to recursively use for the 4862<dd><p>Install target to recursively use for the
4850 updated package and the dependent packages. 4863 updated package and the dependent packages.
4851 Defaults to <code class="varname">DEPENDS_TARGET</code> if 4864 Defaults to <code class="varname">DEPENDS_TARGET</code> if
4852 set, <span class="quote">&#8220;<span class="quote">install</span>&#8221;</span> otherwise for 4865 set, <span class="quote">&#8220;<span class="quote">install</span>&#8221;</span> otherwise for
4853 <span class="command"><strong>make update</strong></span>. Other good 4866 <span class="command"><strong>make update</strong></span>. Other good
4854 targets are <span class="quote">&#8220;<span class="quote">package</span>&#8221;</span> or 4867 targets are <span class="quote">&#8220;<span class="quote">package</span>&#8221;</span> or
4855 <span class="quote">&#8220;<span class="quote">bin-install</span>&#8221;</span>. Do not set this to 4868 <span class="quote">&#8220;<span class="quote">bin-install</span>&#8221;</span>. Do not set this to
4856 <span class="quote">&#8220;<span class="quote">update</span>&#8221;</span> or you will get stuck in an 4869 <span class="quote">&#8220;<span class="quote">update</span>&#8221;</span> or you will get stuck in an
4857 endless loop!</p></dd> 4870 endless loop!</p></dd>
4858<dt><span class="term"><code class="varname">NOCLEAN</code></span></dt> 4871<dt><span class="term"><code class="varname">NOCLEAN</code></span></dt>
4859<dd><p>Don't clean up after updating. Useful if 4872<dd><p>Don't clean up after updating. Useful if
4860 you want to leave the work sources of the updated 4873 you want to leave the work sources of the updated
4861 packages around for inspection or other purposes. 4874 packages around for inspection or other purposes.
4862 Be sure you eventually clean up the source tree 4875 Be sure you eventually clean up the source tree
4863 (see the <span class="quote">&#8220;<span class="quote">clean-update</span>&#8221;</span> target below) 4876 (see the <span class="quote">&#8220;<span class="quote">clean-update</span>&#8221;</span> target below)
4864 or you may run into troubles with old source code 4877 or you may run into troubles with old source code
4865 still lying around on your next 4878 still lying around on your next
4866 <span class="command"><strong>make</strong></span> or <span class="command"><strong>make 4879 <span class="command"><strong>make</strong></span> or <span class="command"><strong>make
4867 update</strong></span>.</p></dd> 4880 update</strong></span>.</p></dd>
4868<dt><span class="term"><code class="varname">REINSTALL</code></span></dt> 4881<dt><span class="term"><code class="varname">REINSTALL</code></span></dt>
4869<dd><p>Deinstall each package before installing 4882<dd><p>Deinstall each package before installing
4870 (making <code class="varname">DEPENDS_TARGET</code>). This 4883 (making <code class="varname">DEPENDS_TARGET</code>). This
4871 may be necessary if the 4884 may be necessary if the
4872 <span class="quote">&#8220;<span class="quote">clean-update</span>&#8221;</span> target (see below) was 4885 <span class="quote">&#8220;<span class="quote">clean-update</span>&#8221;</span> target (see below) was
4873 called after interrupting a running <span class="command"><strong>make 4886 called after interrupting a running <span class="command"><strong>make
4874 update</strong></span>.</p></dd> 4887 update</strong></span>.</p></dd>
4875<dt><span class="term"><code class="varname">DEPENDS_TARGET</code></span></dt> 4888<dt><span class="term"><code class="varname">DEPENDS_TARGET</code></span></dt>
4876<dd><p>Allows you to disable recursion and hardcode 4889<dd><p>Allows you to disable recursion and hardcode
4877 the target for packages. The default is 4890 the target for packages. The default is
4878 <span class="quote">&#8220;<span class="quote">update</span>&#8221;</span> for the update target, 4891 <span class="quote">&#8220;<span class="quote">update</span>&#8221;</span> for the update target,
4879 facilitating a recursive update of prerequisite 4892 facilitating a recursive update of prerequisite
4880 packages. Only set 4893 packages. Only set
4881 <code class="varname">DEPENDS_TARGET</code> if you want to 4894 <code class="varname">DEPENDS_TARGET</code> if you want to
4882 disable recursive updates. Use 4895 disable recursive updates. Use
4883 <code class="varname">UPDATE_TARGET</code> instead to just 4896 <code class="varname">UPDATE_TARGET</code> instead to just
4884 set a specific target for each package to be 4897 set a specific target for each package to be
4885 installed during <span class="command"><strong>make update</strong></span> 4898 installed during <span class="command"><strong>make update</strong></span>
4886 (see above).</p></dd> 4899 (see above).</p></dd>
4887</dl></div> 4900</dl></div>
4888</dd> 4901</dd>
4889<dt><span class="term">clean-update</span></dt> 4902<dt><span class="term">clean-update</span></dt>
4890<dd> 4903<dd>
4891<p>Clean the source tree for all packages that would 4904<p>Clean the source tree for all packages that would
4892 get updated if <span class="command"><strong>make update</strong></span> was called 4905 get updated if <span class="command"><strong>make update</strong></span> was called
4893 from the current directory. This target should not be 4906 from the current directory. This target should not be
4894 used if the current package (or any of its depending 4907 used if the current package (or any of its depending
4895 packages) have already been de-installed (e.g., after 4908 packages) have already been de-installed (e.g., after
4896 calling <span class="command"><strong>make update</strong></span>) or you may lose 4909 calling <span class="command"><strong>make update</strong></span>) or you may lose
4897 some packages you intended to update. As a rule of 4910 some packages you intended to update. As a rule of
4898 thumb: only use this target <span class="emphasis"><em>before</em></span> 4911 thumb: only use this target <span class="emphasis"><em>before</em></span>
4899 the first time you run <span class="command"><strong>make update</strong></span> 4912 the first time you run <span class="command"><strong>make update</strong></span>
4900 and only if you have a dirty package tree (e.g., if you 4913 and only if you have a dirty package tree (e.g., if you
4901 used <code class="varname">NOCLEAN</code>).</p> 4914 used <code class="varname">NOCLEAN</code>).</p>
4902<p>If you are unsure about whether your tree is 4915<p>If you are unsure about whether your tree is
4903 clean, you can either perform a <span class="command"><strong>make 4916 clean, you can either perform a <span class="command"><strong>make
4904 clean</strong></span> at the top of the tree, or use the 4917 clean</strong></span> at the top of the tree, or use the
4905 following sequence of commands from the directory of the 4918 following sequence of commands from the directory of the
4906 package you want to update (<span class="emphasis"><em>before</em></span> 4919 package you want to update (<span class="emphasis"><em>before</em></span>
4907 running <span class="command"><strong>make update</strong></span> for the first 4920 running <span class="command"><strong>make update</strong></span> for the first
4908 time, otherwise you lose all the packages you wanted to 4921 time, otherwise you lose all the packages you wanted to
4909 update!):</p> 4922 update!):</p>
4910<pre class="screen"> 4923<pre class="screen">
4911<code class="prompt">#</code> <strong class="userinput"><code>make clean-update</code></strong> 4924<code class="prompt">#</code> <strong class="userinput"><code>make clean-update</code></strong>
4912<code class="prompt">#</code> <strong class="userinput"><code>make clean CLEANDEPENDS=YES</code></strong> 4925<code class="prompt">#</code> <strong class="userinput"><code>make clean CLEANDEPENDS=YES</code></strong>
4913<code class="prompt">#</code> <strong class="userinput"><code>make update</code></strong> 4926<code class="prompt">#</code> <strong class="userinput"><code>make update</code></strong>
4914 </pre> 4927 </pre>
4915<p>The following variables can be used either on the 4928<p>The following variables can be used either on the
4916 command line or in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> to alter the behaviour of 4929 command line or in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> to alter the behaviour of
4917 <span class="command"><strong>make clean-update</strong></span>:</p> 4930 <span class="command"><strong>make clean-update</strong></span>:</p>
4918<div class="variablelist"><dl class="variablelist"> 4931<div class="variablelist"><dl class="variablelist">
4919<dt><span class="term"><code class="varname">CLEAR_DIRLIST</code></span></dt> 4932<dt><span class="term"><code class="varname">CLEAR_DIRLIST</code></span></dt>
4920<dd><p>After <span class="command"><strong>make clean</strong></span>, do not 4933<dd><p>After <span class="command"><strong>make clean</strong></span>, do not
4921 reconstruct the list of directories to update for 4934 reconstruct the list of directories to update for
4922 this package. Only use this if <span class="command"><strong>make 4935 this package. Only use this if <span class="command"><strong>make
4923 update</strong></span> successfully installed all 4936 update</strong></span> successfully installed all
4924 packages you wanted to update. Normally, this is 4937 packages you wanted to update. Normally, this is
4925 done automatically on <span class="command"><strong>make 4938 done automatically on <span class="command"><strong>make
4926 update</strong></span>, but may have been suppressed by 4939 update</strong></span>, but may have been suppressed by
4927 the <code class="varname">NOCLEAN</code> variable (see 4940 the <code class="varname">NOCLEAN</code> variable (see
4928 above).</p></dd> 4941 above).</p></dd>
4929</dl></div> 4942</dl></div>
4930</dd> 4943</dd>
4931<dt><span class="term">replace</span></dt> 4944<dt><span class="term">replace</span></dt>
4932<dd> 4945<dd>
4933<p>Update the installation of the current package. This 4946<p>Update the installation of the current package. This
4934 differs from update in that it does not replace dependent 4947 differs from update in that it does not replace dependent
4935 packages. You will need to install <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_tarup/index.html" target="_top"><code class="filename">pkgtools/pkg_tarup</code></a> for this 4948 packages. You will need to install <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_tarup/index.html" target="_top"><code class="filename">pkgtools/pkg_tarup</code></a> for this
4936 target to work.</p> 4949 target to work.</p>
4937<p><span class="emphasis"><em>Be careful when using this 4950<p><span class="emphasis"><em>Be careful when using this
4938 target!</em></span> There are no guarantees that dependent 4951 target!</em></span> There are no guarantees that dependent
4939 packages will still work, in particular they will most 4952 packages will still work, in particular they will most
4940 certainly break if you <span class="command"><strong>make replace</strong></span> a 4953 certainly break if you <span class="command"><strong>make replace</strong></span> a
4941 library package whose shared library major version changed 4954 library package whose shared library major version changed
4942 between your installed version and the new one. For this 4955 between your installed version and the new one. For this
4943 reason, this target is not officially supported and only 4956 reason, this target is not officially supported and only
4944 recommended for advanced users.</p> 4957 recommended for advanced users.</p>
4945</dd> 4958</dd>
4946<dt><span class="term">info</span></dt> 4959<dt><span class="term">info</span></dt>
4947<dd><p>This target invokes <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_info.1"><span class="citerefentry"><span class="refentrytitle">pkg_info</span>(1)</span></a> for the current 4960<dd><p>This target invokes <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/pkg_info.1"><span class="citerefentry"><span class="refentrytitle">pkg_info</span>(1)</span></a> for the current
4948 package. You can use this to check which version of a 4961 package. You can use this to check which version of a
4949 package is installed.</p></dd> 4962 package is installed.</p></dd>
4950<dt><span class="term">index</span></dt> 4963<dt><span class="term">index</span></dt>
4951<dd> 4964<dd>
4952<p>This is a top-level command, i.e. it should be used in 4965<p>This is a top-level command, i.e. it should be used in
4953 the <code class="filename">pkgsrc</code> directory. It creates a 4966 the <code class="filename">pkgsrc</code> directory. It creates a
4954 database of all packages in the local pkgsrc tree, including 4967 database of all packages in the local pkgsrc tree, including
4955 dependencies, comment, maintainer, and some other useful 4968 dependencies, comment, maintainer, and some other useful
4956 information. Individual entries are created by running 4969 information. Individual entries are created by running
4957 <span class="command"><strong>make describe</strong></span> in the packages' 4970 <span class="command"><strong>make describe</strong></span> in the packages'
4958 directories. This index file is saved as 4971 directories. This index file is saved as
4959 <code class="filename">pkgsrc/INDEX</code>. It can be displayed in 4972 <code class="filename">pkgsrc/INDEX</code>. It can be displayed in
4960 verbose format by running <span class="command"><strong>make 4973 verbose format by running <span class="command"><strong>make
4961 print-index</strong></span>. You can search in it with 4974 print-index</strong></span>. You can search in it with
4962 <span class="command"><strong>make search 4975 <span class="command"><strong>make search
4963 key=<em class="replaceable"><code>something</code></em></strong></span>. You can 4976 key=<em class="replaceable"><code>something</code></em></strong></span>. You can
4964 extract a list of all packages that depend on a particular 4977 extract a list of all packages that depend on a particular
4965 one by running <span class="command"><strong>make show-deps 4978 one by running <span class="command"><strong>make show-deps
4966 PKG=<em class="replaceable"><code>somepackage</code></em></strong></span>.</p> 4979 PKG=<em class="replaceable"><code>somepackage</code></em></strong></span>.</p>
4967<p>Running this command takes a very long time, some 4980<p>Running this command takes a very long time, some
4968 hours even on fast machines!</p> 4981 hours even on fast machines!</p>
4969</dd> 4982</dd>
4970<dt><span class="term">readme</span></dt> 4983<dt><span class="term">readme</span></dt>
4971<dd> 4984<dd>
4972<p>This target generates a 4985<p>This target generates a
4973 <code class="filename">index.html</code> file, which can be 4986 <code class="filename">index.html</code> file, which can be
4974 viewed using a browser such as <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/www/firefox/index.html" target="_top"><code class="filename">www/firefox</code></a> or <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/www/links/index.html" target="_top"><code class="filename">www/links</code></a>. The generated files 4987 viewed using a browser such as <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/www/firefox/index.html" target="_top"><code class="filename">www/firefox</code></a> or <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/www/links/index.html" target="_top"><code class="filename">www/links</code></a>. The generated files
4975 contain references to any packages which are in the 4988 contain references to any packages which are in the
4976 <code class="varname">PACKAGES</code> directory on the local 4989 <code class="varname">PACKAGES</code> directory on the local
4977 host. The generated files can be made to refer to URLs 4990 host. The generated files can be made to refer to URLs
4978 based on <code class="varname">FTP_PKG_URL_HOST</code> and 4991 based on <code class="varname">FTP_PKG_URL_HOST</code> and
4979 <code class="varname">FTP_PKG_URL_DIR</code>. For example, if I 4992 <code class="varname">FTP_PKG_URL_DIR</code>. For example, if I
4980 wanted to generate <code class="filename">index.html</code> 4993 wanted to generate <code class="filename">index.html</code>
4981 files which pointed to binary packages on the local 4994 files which pointed to binary packages on the local
4982 machine, in the directory 4995 machine, in the directory
4983 <code class="filename">/usr/packages</code>, set 4996 <code class="filename">/usr/packages</code>, set
4984 <code class="varname">FTP_PKG_URL_HOST=file://localhost</code> and 4997 <code class="varname">FTP_PKG_URL_HOST=file://localhost</code> and
4985 <code class="varname">FTP_PKG_URL_DIR=/usr/packages</code>. The 4998 <code class="varname">FTP_PKG_URL_DIR=/usr/packages</code>. The
4986 <code class="varname">${PACKAGES}</code> directory and its 4999 <code class="varname">${PACKAGES}</code> directory and its
4987 subdirectories will be searched for all the binary 5000 subdirectories will be searched for all the binary
4988 packages.</p> 5001 packages.</p>
4989<p>The target can be run at the toplevel or in category 5002<p>The target can be run at the toplevel or in category
4990 directories, in which case it descends recursively.</p> 5003 directories, in which case it descends recursively.</p>
4991</dd> 5004</dd>
4992<dt><span class="term">readme-all</span></dt> 5005<dt><span class="term">readme-all</span></dt>
4993<dd><p>This is a top-level command, run it in 5006<dd><p>This is a top-level command, run it in
4994 <code class="filename">pkgsrc</code>. Use this target to create a 5007 <code class="filename">pkgsrc</code>. Use this target to create a
4995 file <code class="filename">README-all.html</code> which contains a 5008 file <code class="filename">README-all.html</code> which contains a
4996 list of all packages currently available in the NetBSD 5009 list of all packages currently available in the NetBSD
4997 Packages Collection, together with the category they belong 5010 Packages Collection, together with the category they belong
4998 to and a short description. This file is compiled from the 5011 to and a short description. This file is compiled from the
4999 <code class="filename">pkgsrc/*/index.html</code> files, so be sure 5012 <code class="filename">pkgsrc/*/index.html</code> files, so be sure
5000 to run this <span class="emphasis"><em>after</em></span> a <span class="command"><strong>make 5013 to run this <span class="emphasis"><em>after</em></span> a <span class="command"><strong>make
5001 readme</strong></span>.</p></dd> 5014 readme</strong></span>.</p></dd>
5002<dt><span class="term">cdrom-readme</span></dt> 5015<dt><span class="term">cdrom-readme</span></dt>
5003<dd><p>This is very much the same as the 5016<dd><p>This is very much the same as the
5004 <span class="quote">&#8220;<span class="quote">readme</span>&#8221;</span> target (see above), but is to be 5017 <span class="quote">&#8220;<span class="quote">readme</span>&#8221;</span> target (see above), but is to be
5005 used when generating a pkgsrc tree to be written to a 5018 used when generating a pkgsrc tree to be written to a
5006 CD-ROM. This target also produces 5019 CD-ROM. This target also produces
5007 <code class="filename">index.html</code> files, and can be made 5020 <code class="filename">index.html</code> files, and can be made
5008 to refer to URLs based on 5021 to refer to URLs based on
5009 <code class="varname">CDROM_PKG_URL_HOST</code> and 5022 <code class="varname">CDROM_PKG_URL_HOST</code> and
5010 <code class="varname">CDROM_PKG_URL_DIR</code>.</p></dd> 5023 <code class="varname">CDROM_PKG_URL_DIR</code>.</p></dd>
5011<dt><span class="term">show-distfiles</span></dt> 5024<dt><span class="term">show-distfiles</span></dt>
5012<dd><p>This target shows which distfiles and patchfiles 5025<dd><p>This target shows which distfiles and patchfiles
5013 are needed to build the package 5026 are needed to build the package
5014 (<code class="varname">ALLFILES</code>, which contains all 5027 (<code class="varname">ALLFILES</code>, which contains all
5015 <code class="varname">DISTFILES</code> and 5028 <code class="varname">DISTFILES</code> and
5016 <code class="varname">PATCHFILES</code>, but not 5029 <code class="varname">PATCHFILES</code>, but not
5017 <code class="filename">patches/*</code>).</p></dd> 5030 <code class="filename">patches/*</code>).</p></dd>
5018<dt><span class="term">show-downlevel</span></dt> 5031<dt><span class="term">show-downlevel</span></dt>
5019<dd><p>This target shows nothing if the package is not 5032<dd><p>This target shows nothing if the package is not
5020 installed. If a version of this package is installed, 5033 installed. If a version of this package is installed,
5021 but is not the version provided in this version of 5034 but is not the version provided in this version of
5022 pkgsrc, then a warning message is displayed. This target 5035 pkgsrc, then a warning message is displayed. This target
5023 can be used to show which of your installed packages are 5036 can be used to show which of your installed packages are
5024 downlevel, and so the old versions can be deleted, and 5037 downlevel, and so the old versions can be deleted, and
5025 the current ones added.</p></dd> 5038 the current ones added.</p></dd>
5026<dt><span class="term">show-pkgsrc-dir</span></dt> 5039<dt><span class="term">show-pkgsrc-dir</span></dt>
5027<dd><p>This target shows the directory in the pkgsrc 5040<dd><p>This target shows the directory in the pkgsrc
5028 hierarchy from which the package can be built and 5041 hierarchy from which the package can be built and
5029 installed. This may not be the same directory as the one 5042 installed. This may not be the same directory as the one
5030 from which the package was installed. This target is 5043 from which the package was installed. This target is
5031 intended to be used by people who may wish to upgrade 5044 intended to be used by people who may wish to upgrade
5032 many packages on a single host, and can be invoked from 5045 many packages on a single host, and can be invoked from
5033 the top-level pkgsrc Makefile by using the 5046 the top-level pkgsrc Makefile by using the
5034 <span class="quote">&#8220;<span class="quote">show-host-specific-pkgs</span>&#8221;</span> target.</p></dd> 5047 <span class="quote">&#8220;<span class="quote">show-host-specific-pkgs</span>&#8221;</span> target.</p></dd>
5035<dt><span class="term">show-installed-depends</span></dt> 5048<dt><span class="term">show-installed-depends</span></dt>
5036<dd><p>This target shows which installed packages match 5049<dd><p>This target shows which installed packages match
5037 the current package's <code class="varname">DEPENDS</code>. Useful 5050 the current package's <code class="varname">DEPENDS</code>. Useful
5038 if out of date dependencies are causing build 5051 if out of date dependencies are causing build
5039 problems.</p></dd> 5052 problems.</p></dd>
5040<dt><span class="term">print-build-depends-list</span></dt> 5053<dt><span class="term">print-build-depends-list</span></dt>
5041<dd><p>This target shows the list of packages that the current package 5054<dd><p>This target shows the list of packages that the current package
5042 depends on for building.</p></dd> 5055 depends on for building.</p></dd>
5043<dt><span class="term">print-run-depends-list</span></dt> 5056<dt><span class="term">print-run-depends-list</span></dt>
5044<dd><p>This target shows the list of packages that the current package 5057<dd><p>This target shows the list of packages that the current package
5045 depends on for running.</p></dd> 5058 depends on for running.</p></dd>
5046<dt><span class="term">check-shlibs</span></dt> 5059<dt><span class="term">check-shlibs</span></dt>
5047<dd><p>After a package is installed, check all its 5060<dd><p>After a package is installed, check all its
5048 binaries and (on ELF platforms) shared libraries to see 5061 binaries and (on ELF platforms) shared libraries to see
5049 if they find the shared libs they need. Run by default 5062 if they find the shared libs they need. Run by default
5050 if <code class="varname">PKG_DEVELOPER</code> is set in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p></dd> 5063 if <code class="varname">PKG_DEVELOPER</code> is set in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p></dd>
5051<dt><span class="term">print-PLIST</span></dt> 5064<dt><span class="term">print-PLIST</span></dt>
5052<dd> 5065<dd>
5053<p>After a <span class="quote">&#8220;<span class="quote">make install</span>&#8221;</span> from a new or 5066<p>After a <span class="quote">&#8220;<span class="quote">make install</span>&#8221;</span> from a new or
5054 upgraded pkg, this prints out an attempt to generate a 5067 upgraded pkg, this prints out an attempt to generate a
5055 new <code class="filename">PLIST</code> from a <span class="command"><strong>find 5068 new <code class="filename">PLIST</code> from a <span class="command"><strong>find
5056 -newer work/.extract_done</strong></span>. An attempt is made 5069 -newer work/.extract_done</strong></span>. An attempt is made
5057 to care for shared libs etc., but it is 5070 to care for shared libs etc., but it is
5058 <span class="emphasis"><em>strongly</em></span> recommended to review the 5071 <span class="emphasis"><em>strongly</em></span> recommended to review the
5059 result before putting it into 5072 result before putting it into
5060 <code class="filename">PLIST</code>. On upgrades, it's useful to 5073 <code class="filename">PLIST</code>. On upgrades, it's useful to
5061 diff the output of this command against an already 5074 diff the output of this command against an already
5062 existing <code class="filename">PLIST</code> file.</p> 5075 existing <code class="filename">PLIST</code> file.</p>
5063<p>If the package installs files via <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/tar.1"><span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span></a> or 5076<p>If the package installs files via <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/tar.1"><span class="citerefentry"><span class="refentrytitle">tar</span>(1)</span></a> or
5064 other methods that don't update file access times, be 5077 other methods that don't update file access times, be
5065 sure to add these files manually to your 5078 sure to add these files manually to your
5066 <code class="filename">PLIST</code>, as the <span class="quote">&#8220;<span class="quote">find 5079 <code class="filename">PLIST</code>, as the <span class="quote">&#8220;<span class="quote">find
5067 -newer</span>&#8221;</span> command used by this target won't catch 5080 -newer</span>&#8221;</span> command used by this target won't catch
5068 them!</p> 5081 them!</p>
5069<p>See <a class="xref" href="#print-PLIST" title="19.3. Tweaking output of make print-PLIST">Section 19.3, &#8220;Tweaking output of <span class="command"><strong>make print-PLIST</strong></span>&#8221;</a> for more 5082<p>See <a class="xref" href="#print-PLIST" title="19.3. Tweaking output of make print-PLIST">Section 19.3, &#8220;Tweaking output of <span class="command"><strong>make print-PLIST</strong></span>&#8221;</a> for more
5070 information on this target.</p> 5083 information on this target.</p>
5071</dd> 5084</dd>
5072</dl></div> 5085</dl></div>
5073</div> 5086</div>
5074</div> 5087</div>
5075<div class="chapter"> 5088<div class="chapter">
5076<div class="titlepage"><div><div><h2 class="title"> 5089<div class="titlepage"><div><div><h2 class="title">
5077<a name="creating"></a>Chapter 14. Creating a new pkgsrc package from scratch</h2></div></div></div> 5090<a name="creating"></a>Chapter 14. Creating a new pkgsrc package from scratch</h2></div></div></div>
5078<div class="toc"> 5091<div class="toc">
5079<p><b>Table of Contents</b></p> 5092<p><b>Table of Contents</b></p>
5080<dl class="toc"> 5093<dl class="toc">
5081<dt><span class="sect1"><a href="#creating.common">14.1. Common types of packages</a></span></dt> 5094<dt><span class="sect1"><a href="#creating.common">14.1. Common types of packages</a></span></dt>
5082<dd><dl> 5095<dd><dl>
5083<dt><span class="sect2"><a href="#creating.python-module">14.1.1. Python modules and programs</a></span></dt> 5096<dt><span class="sect2"><a href="#creating.python-module">14.1.1. Python modules and programs</a></span></dt>
5084<dt><span class="sect2"><a href="#creating.R-package">14.1.2. R packages</a></span></dt> 5097<dt><span class="sect2"><a href="#creating.R-package">14.1.2. R packages</a></span></dt>
5085<dt><span class="sect2"><a href="#creating.TeX-package">14.1.3. TeXlive packages</a></span></dt> 5098<dt><span class="sect2"><a href="#creating.TeX-package">14.1.3. TeXlive packages</a></span></dt>
5086</dl></dd> 5099</dl></dd>
5087<dt><span class="sect1"><a href="#creating.examples">14.2. Examples</a></span></dt> 5100<dt><span class="sect1"><a href="#creating.examples">14.2. Examples</a></span></dt>
5088<dd><dl><dt><span class="sect2"><a href="#creating.nvu">14.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd> 5101<dd><dl><dt><span class="sect2"><a href="#creating.nvu">14.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd>
5089</dl> 5102</dl>
5090</div> 5103</div>
5091<p>When you find a package that is not yet in pkgsrc, you 5104<p>When you find a package that is not yet in pkgsrc, you
5092most likely have a URL from where you can download the source 5105most likely have a URL from where you can download the source
5093code. Starting with this URL, creating a package involves only a 5106code. Starting with this URL, creating a package involves only a
5094few steps.</p> 5107few steps.</p>
5095<div class="procedure"><ol class="procedure" type="1"> 5108<div class="procedure"><ol class="procedure" type="1">
5096<li class="step"><p>In your <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, set <code class="code">PKG_DEVELOPER=yes</code> to 5109<li class="step"><p>In your <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, set <code class="code">PKG_DEVELOPER=yes</code> to
5097enable the basic quality checks.</p></li> 5110enable the basic quality checks.</p></li>
5098<li class="step"> 5111<li class="step">
5099<p>Install the package <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/pkg_developer/index.html" target="_top"><code class="filename">meta-pkgs/pkg_developer</code></a>, which among others will 5112<p>Install the package <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/pkg_developer/index.html" target="_top"><code class="filename">meta-pkgs/pkg_developer</code></a>, which among others will
5100install the utilities <span class="command"><strong>url2pkg</strong></span>, 5113install the utilities <span class="command"><strong>url2pkg</strong></span>,
5101<span class="command"><strong>pkglint</strong></span>, <span class="command"><strong>pkgvi</strong></span> and 5114<span class="command"><strong>pkglint</strong></span>, <span class="command"><strong>pkgvi</strong></span> and
5102<span class="command"><strong>mkpatches</strong></span>:</p> 5115<span class="command"><strong>mkpatches</strong></span>:</p>
5103<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>cd /usr/pkgsrc</code></strong> 5116<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>cd /usr/pkgsrc</code></strong>
5104<code class="prompt">$</code> <strong class="userinput"><code>(cd meta-pkgs/pkg_developer &amp;&amp; bmake update)</code></strong></pre> 5117<code class="prompt">$</code> <strong class="userinput"><code>(cd meta-pkgs/pkg_developer &amp;&amp; bmake update)</code></strong></pre>
5105</li> 5118</li>
5106<li class="step"> 5119<li class="step">
5107<p>Choose one of the top-level directories as the category in 5120<p>Choose one of the top-level directories as the category in
5108which you want to place your package. You can also create a directory of 5121which you want to place your package. You can also create a directory of
5109your own (maybe called <code class="filename">local</code>). Change into that 5122your own (maybe called <code class="filename">local</code>). Change into that
5110category directory:</p> 5123category directory:</p>
5111<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>cd <em class="replaceable"><code>category</code></em></code></strong></pre> 5124<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>cd <em class="replaceable"><code>category</code></em></code></strong></pre>
5112</li> 5125</li>
5113<li class="step"> 5126<li class="step">
5114<p>Run the program <span class="command"><strong>url2pkg</strong></span>, passing as 5127<p>Run the program <span class="command"><strong>url2pkg</strong></span>, passing as
5115argument the URL of the distribution file (in most cases a 5128argument the URL of the distribution file (in most cases a
5116<code class="filename">.tar.gz</code> file). This will download the distribution 5129<code class="filename">.tar.gz</code> file). This will download the distribution
5117file and create the necessary files of the package, based on what's in 5130file and create the necessary files of the package, based on what's in
5118the distribution file:</p> 5131the distribution file:</p>
5119<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>url2pkg <em class="replaceable"><code>https://www.example.org/packages/package-1.0.tar.gz</code></em></code></strong></pre> 5132<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>url2pkg <em class="replaceable"><code>https://www.example.org/packages/package-1.0.tar.gz</code></em></code></strong></pre>
5120</li> 5133</li>
5121<li class="step"> 5134<li class="step">
5122<p>Examine the extracted files to determine the dependencies of 5135<p>Examine the extracted files to determine the dependencies of
5123your package. Ideally, this is mentioned in some 5136your package. Ideally, this is mentioned in some
5124<code class="filename">README</code> file, but things may differ. For each of 5137<code class="filename">README</code> file, but things may differ. For each of
5125these dependencies, look where it exists in pkgsrc, and if there is a 5138these dependencies, look where it exists in pkgsrc, and if there is a
5126file called <code class="filename">buildlink3.mk</code> in that directory, add a 5139file called <code class="filename">buildlink3.mk</code> in that directory, add a
5127line to your package <code class="filename">Makefile</code> which includes that 5140line to your package <code class="filename">Makefile</code> which includes that
5128file just before the last line. If the 5141file just before the last line. If the
5129<code class="filename">buildlink3.mk</code> file does not exist, it must be 5142<code class="filename">buildlink3.mk</code> file does not exist, it must be
5130created first. The <code class="filename">buildlink3.mk</code> file makes sure 5143created first. The <code class="filename">buildlink3.mk</code> file makes sure
5131that the package's include files and libraries are provided.</p> 5144that the package's include files and libraries are provided.</p>
5132<p>If you just need binaries from a dependent package, add a 5145<p>If you just need binaries from a dependent package, add a
5133<code class="varname">DEPENDS</code> line to the Makefile, which specifies the 5146<code class="varname">DEPENDS</code> line to the Makefile, which specifies the
5134version of the dependency and where it can be found in pkgsrc. This line 5147version of the dependency and where it can be found in pkgsrc. This line
5135should be placed in the third paragraph. If the dependency is only 5148should be placed in the third paragraph. If the dependency is only
5136needed for building the package, but not when using it, use 5149needed for building the package, but not when using it, use
5137<code class="varname">TOOL_DEPENDS</code> or <code class="varname">BUILD_DEPENDS</code> 5150<code class="varname">TOOL_DEPENDS</code> or <code class="varname">BUILD_DEPENDS</code>
5138instead of <code class="varname">DEPENDS</code>. 5151instead of <code class="varname">DEPENDS</code>.
5139The difference between <code class="varname">TOOL_DEPENDS</code> and 5152The difference between <code class="varname">TOOL_DEPENDS</code> and
5140<code class="varname">BUILD_DEPENDS</code> occurs when cross-compiling: 5153<code class="varname">BUILD_DEPENDS</code> occurs when cross-compiling:
5141<code class="varname">TOOL_DEPENDS</code> are <span class="emphasis"><em>native</em></span> 5154<code class="varname">TOOL_DEPENDS</code> are <span class="emphasis"><em>native</em></span>
5142packages, i.e. packages for the platform where the package is built; 5155packages, i.e. packages for the platform where the package is built;
5143<code class="varname">BUILD_DEPENDS</code> are <span class="emphasis"><em>target</em></span> 5156<code class="varname">BUILD_DEPENDS</code> are <span class="emphasis"><em>target</em></span>
5144packages, i.e. packages for the platform for which the package 5157packages, i.e. packages for the platform for which the package
5145is built. There is also <code class="varname">TEST_DEPENDS</code>, which 5158is built. There is also <code class="varname">TEST_DEPENDS</code>, which
5146specifies a dependency used only for testing the resulting package 5159specifies a dependency used only for testing the resulting package
5147built, using the upstream project's included test suite, on the native 5160built, using the upstream project's included test suite, on the native
5148platform. 5161platform.
5149Your package may then look like this:</p> 5162Your package may then look like this:</p>
5150<pre class="programlisting"> 5163<pre class="programlisting">
5151[...] 5164[...]
5152 5165
5153TOOL_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt 5166TOOL_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt
5154DEPENDS+= screen-[0-9]*:../../misc/screen 5167DEPENDS+= screen-[0-9]*:../../misc/screen
5155DEPENDS+= screen&gt;=4.0:../../misc/screen 5168DEPENDS+= screen&gt;=4.0:../../misc/screen
5156 5169
5157[...] 5170[...]
5158 5171
5159.include "../../<em class="replaceable"><code>category</code></em>/<em class="replaceable"><code>package</code></em>/buildlink3.mk" 5172.include "../../<em class="replaceable"><code>category</code></em>/<em class="replaceable"><code>package</code></em>/buildlink3.mk"
5160.include "../../devel/glib2/buildlink3.mk" 5173.include "../../devel/glib2/buildlink3.mk"
5161.include "../../mk/bsd.pkg.mk" 5174.include "../../mk/bsd.pkg.mk"
5162</pre> 5175</pre>
5163</li> 5176</li>
5164<li class="step"><p>Run <span class="command"><strong>pkglint</strong></span> to see what things still need 5177<li class="step"><p>Run <span class="command"><strong>pkglint</strong></span> to see what things still need
5165to be done to make your package a <span class="quote">&#8220;<span class="quote">good</span>&#8221;</span> one. If you don't 5178to be done to make your package a <span class="quote">&#8220;<span class="quote">good</span>&#8221;</span> one. If you don't
5166know what pkglint's warnings want to tell you, try <span class="command"><strong>pkglint 5179know what pkglint's warnings want to tell you, try <span class="command"><strong>pkglint
5167--explain</strong></span> or <span class="command"><strong>pkglint -e</strong></span>, which outputs 5180--explain</strong></span> or <span class="command"><strong>pkglint -e</strong></span>, which outputs
5168additional explanations.</p></li> 5181additional explanations.</p></li>
5169<li class="step"><p>In many cases the package is not yet ready to build. You can 5182<li class="step"><p>In many cases the package is not yet ready to build. You can
5170find instructions for the most common cases in the next section, <a class="xref" href="#creating.common" title="14.1. Common types of packages">Section 14.1, &#8220;Common types of packages&#8221;</a>. After you have followed the instructions 5183find instructions for the most common cases in the next section, <a class="xref" href="#creating.common" title="14.1. Common types of packages">Section 14.1, &#8220;Common types of packages&#8221;</a>. After you have followed the instructions
5171over there, you can hopefully continue here.</p></li> 5184over there, you can hopefully continue here.</p></li>
5172<li class="step"><p>Run <span class="command"><strong>bmake clean</strong></span> to clean the working 5185<li class="step"><p>Run <span class="command"><strong>bmake clean</strong></span> to clean the working
5173directory from the extracted files. Besides these files, a lot of cache 5186directory from the extracted files. Besides these files, a lot of cache
5174files and other system information have been saved in the working 5187files and other system information have been saved in the working
5175directory, which may have become outdated after you edited the 5188directory, which may have become outdated after you edited the
5176<code class="filename">Makefile</code>.</p></li> 5189<code class="filename">Makefile</code>.</p></li>
5177<li class="step"> 5190<li class="step">
5178<p>Now, run <span class="command"><strong>bmake</strong></span> to build the package. For 5191<p>Now, run <span class="command"><strong>bmake</strong></span> to build the package. For
5179the various things that can go wrong in this phase, consult <a class="xref" href="#fixes" title="Chapter 21. Making your package work">Chapter 21, <i>Making your package work</i></a>.</p> 5192the various things that can go wrong in this phase, consult <a class="xref" href="#fixes" title="Chapter 21. Making your package work">Chapter 21, <i>Making your package work</i></a>.</p>
5180<p>If the extracted files from the package need to be fixed, run 5193<p>If the extracted files from the package need to be fixed, run
5181multiple rounds of these commands:</p> 5194multiple rounds of these commands:</p>
5182<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>bmake</code></strong> 5195<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>bmake</code></strong>
5183<code class="prompt">$</code> <strong class="userinput"><code>pkgvi ${WRKSRC}/some/file/that/does/not/compile</code></strong> 5196<code class="prompt">$</code> <strong class="userinput"><code>pkgvi ${WRKSRC}/some/file/that/does/not/compile</code></strong>
5184<code class="prompt">$</code> <strong class="userinput"><code>mkpatches</code></strong> 5197<code class="prompt">$</code> <strong class="userinput"><code>mkpatches</code></strong>
5185<code class="prompt">$</code> <strong class="userinput"><code>bmake mps</code></strong> 5198<code class="prompt">$</code> <strong class="userinput"><code>bmake mps</code></strong>
5186<code class="prompt">$</code> <strong class="userinput"><code>bmake clean</code></strong></pre> 5199<code class="prompt">$</code> <strong class="userinput"><code>bmake clean</code></strong></pre>
5187</li> 5200</li>
5188<li class="step"><p>When the package builds fine, the next step is to install 5201<li class="step"><p>When the package builds fine, the next step is to install
5189the package. Run <span class="command"><strong>bmake install</strong></span> and hope that 5202the package. Run <span class="command"><strong>bmake install</strong></span> and hope that
5190everything works.</p></li> 5203everything works.</p></li>
5191<li class="step"><p>Up to now, the file <code class="filename">PLIST</code>, which 5204<li class="step"><p>Up to now, the file <code class="filename">PLIST</code>, which
5192contains a list of the files that are installed by the package, is 5205contains a list of the files that are installed by the package, is
5193nearly empty. Run <span class="command"><strong>bmake print-PLIST 5206nearly empty. Run <span class="command"><strong>bmake print-PLIST
5194&gt;PLIST</strong></span> to generate a probably correct list. Check 5207&gt;PLIST</strong></span> to generate a probably correct list. Check
5195the file using your preferred text editor to see if the list of 5208the file using your preferred text editor to see if the list of
5196files looks plausible.</p></li> 5209files looks plausible.</p></li>
5197<li class="step"><p>Run <span class="command"><strong>pkglint</strong></span> again to see if the generated 5210<li class="step"><p>Run <span class="command"><strong>pkglint</strong></span> again to see if the generated
5198<code class="filename">PLIST</code> contains garbage or not.</p></li> 5211<code class="filename">PLIST</code> contains garbage or not.</p></li>
5199<li class="step"><p>When you ran <span class="command"><strong>bmake install</strong></span>, the package 5212<li class="step"><p>When you ran <span class="command"><strong>bmake install</strong></span>, the package
@@ -7998,1998 +8011,2007 @@ cases.

 @@ -7998,1998 +8011,2007 @@ cases.

7998happen after that. Typical examples are packages that use the 8011happen after that. Typical examples are packages that use the
7999<code class="literal">pre-configure</code> stage to regenerate the GNU configure 8012<code class="literal">pre-configure</code> stage to regenerate the GNU configure
8000script from 8013script from
8001<code class="filename">configure.ac</code>.</p></dd> 8014<code class="filename">configure.ac</code>.</p></dd>
8002<dt><span class="term"><code class="literal">post-configure</code></span></dt> 8015<dt><span class="term"><code class="literal">post-configure</code></span></dt>
8003<dd><p>This stage is used to fix up any mistakes by the 8016<dd><p>This stage is used to fix up any mistakes by the
8004configure stage.</p></dd> 8017configure stage.</p></dd>
8005<dt><span class="term"><code class="literal">pre-build</code></span></dt> 8018<dt><span class="term"><code class="literal">pre-build</code></span></dt>
8006<dd><p>This stage should only be used for substitutions that are 8019<dd><p>This stage should only be used for substitutions that are
8007clearly related to building the package, not for fixing the 8020clearly related to building the package, not for fixing the
8008configuration. Substitutions for pathnames (such as replacing 8021configuration. Substitutions for pathnames (such as replacing
8009<code class="filename">/usr/local</code> with <code class="literal">${PREFIX}</code>) or 8022<code class="filename">/usr/local</code> with <code class="literal">${PREFIX}</code>) or
8010user names (such as replacing <code class="literal">@MY_USER@</code> with the 8023user names (such as replacing <code class="literal">@MY_USER@</code> with the
8011actual username) belong in pre-configure or post-configure 8024actual username) belong in pre-configure or post-configure
8012instead.</p></dd> 8025instead.</p></dd>
8013<dt><span class="term"><code class="literal">post-build</code></span></dt> 8026<dt><span class="term"><code class="literal">post-build</code></span></dt>
8014<dd> 8027<dd>
8015<p>Just as with pre-build, this stage should only be used 8028<p>Just as with pre-build, this stage should only be used
8016for substitutions that are clearly related to building the package, not 8029for substitutions that are clearly related to building the package, not
8017for fixing the configuration. Substitutions for pathnames (such as 8030for fixing the configuration. Substitutions for pathnames (such as
8018replacing <code class="filename">/usr/local</code> with 8031replacing <code class="filename">/usr/local</code> with
8019<code class="literal">${PREFIX}</code>) or user names (such as replacing 8032<code class="literal">${PREFIX}</code>) or user names (such as replacing
8020<code class="literal">@MY_USER@</code> with the actual username) belong in 8033<code class="literal">@MY_USER@</code> with the actual username) belong in
8021pre-configure or post-configure instead.</p> 8034pre-configure or post-configure instead.</p>
8022<p>A typical use is to update pkg-config files to include the rpath 8035<p>A typical use is to update pkg-config files to include the rpath
8023compiler options.</p> 8036compiler options.</p>
8024</dd> 8037</dd>
8025<dt><span class="term"><code class="literal">pre-install</code></span></dt> 8038<dt><span class="term"><code class="literal">pre-install</code></span></dt>
8026<dd><p>In general, the install phase should be as simple as 8039<dd><p>In general, the install phase should be as simple as
8027possible. As with the pre-build and post-build stages, it should not be 8040possible. As with the pre-build and post-build stages, it should not be
8028used to fix pathnames or user names, these belong in pre-configure 8041used to fix pathnames or user names, these belong in pre-configure
8029instead. There are only few legitimate use cases for applying 8042instead. There are only few legitimate use cases for applying
8030substitutions in this stage.</p></dd> 8043substitutions in this stage.</p></dd>
8031</dl></div> 8044</dl></div>
8032</div> 8045</div>
8033<div class="sect3"> 8046<div class="sect3">
8034<div class="titlepage"><div><div><h4 class="title"> 8047<div class="titlepage"><div><div><h4 class="title">
8035<a name="fixes.subst.where"></a>21.1.11.2. Choosing the files where the substitutions happen</h4></div></div></div> 8048<a name="fixes.subst.where"></a>21.1.11.2. Choosing the files where the substitutions happen</h4></div></div></div>
8036<p>The <code class="varname">SUBST_FILES.*</code> variable contains a list of 8049<p>The <code class="varname">SUBST_FILES.*</code> variable contains a list of
8037filename patterns. These patterns are relative to 8050filename patterns. These patterns are relative to
8038<code class="varname">WRKSRC</code> since that is where most substitutions happen. 8051<code class="varname">WRKSRC</code> since that is where most substitutions happen.
8039A typical example is:</p> 8052A typical example is:</p>
8040<pre class="programlisting"> 8053<pre class="programlisting">
8041SUBST_FILES.path= Makefile */Makefile */*/Makefile *.[ch] 8054SUBST_FILES.path= Makefile */Makefile */*/Makefile *.[ch]
8042</pre> 8055</pre>
8043<p>The above patterns, especially the last, are quite broad. The SUBST 8056<p>The above patterns, especially the last, are quite broad. The SUBST
8044implementation checks that each filename pattern that is mentioned here 8057implementation checks that each filename pattern that is mentioned here
8045has an effect. For example, if none of the 8058has an effect. For example, if none of the
8046<code class="filename">*/*/Makefile</code> files contains the patterns to be found 8059<code class="filename">*/*/Makefile</code> files contains the patterns to be found
8047and substituted, that filename pattern is redundant and should be left 8060and substituted, that filename pattern is redundant and should be left
8048out. By default, the SUBST framework will complain with an error message. 8061out. By default, the SUBST framework will complain with an error message.
8049If the text to be substituted occurs in some of the files from a single 8062If the text to be substituted occurs in some of the files from a single
8050pattern, but not in all of them, that is totally ok, and the SUBST 8063pattern, but not in all of them, that is totally ok, and the SUBST
8051framework will only print an INFO message for those files.</p> 8064framework will only print an INFO message for those files.</p>
8052<p>If there is a good reason for having redundant filename patterns, 8065<p>If there is a good reason for having redundant filename patterns,
8053set <code class="varname">SUBST_NOOP_OK.*</code> to <code class="literal">yes</code>.</p> 8066set <code class="varname">SUBST_NOOP_OK.*</code> to <code class="literal">yes</code>.</p>
8054<p>Another popular way of choosing the files for the substitutions is 8067<p>Another popular way of choosing the files for the substitutions is
8055via a shell command, like this:</p> 8068via a shell command, like this:</p>
8056<pre class="programlisting"> 8069<pre class="programlisting">
8057C_FILES_CMD= cd ${WRKSRC} &amp;&amp; ${FIND} . -name '*.c' 8070C_FILES_CMD= cd ${WRKSRC} &amp;&amp; ${FIND} . -name '*.c'
8058SUBST_FILES.path= ${C_FILES_CMD:sh} 8071SUBST_FILES.path= ${C_FILES_CMD:sh}
8059</pre> 8072</pre>
8060<p>The variable name <code class="varname">C_FILES_CMD</code> in this example is 8073<p>The variable name <code class="varname">C_FILES_CMD</code> in this example is
8061freely chosen and independent of the SUBST framework.</p> 8074freely chosen and independent of the SUBST framework.</p>
8062<p>In this variant, the <code class="varname">SUBST_FILES.*</code> variable 8075<p>In this variant, the <code class="varname">SUBST_FILES.*</code> variable
8063lists each file individually. Thereby chances are higher that there are 8076lists each file individually. Thereby chances are higher that there are
8064filename patterns in which no substitution happens. Since the SUBST 8077filename patterns in which no substitution happens. Since the SUBST
8065framework cannot know whether the filename patterns in 8078framework cannot know whether the filename patterns in
8066<code class="varname">SUBST_FILES.*</code> have been explicitly listed in the 8079<code class="varname">SUBST_FILES.*</code> have been explicitly listed in the
8067Makefile (where any redundant filename pattern would be suspicious) or 8080Makefile (where any redundant filename pattern would be suspicious) or
8068been generated by a shell command (in which redundant filename patterns 8081been generated by a shell command (in which redundant filename patterns
8069are more likely and to be expected), it will complain about these 8082are more likely and to be expected), it will complain about these
8070redundant filename patterns. Therefore, SUBST blocks that use a shell 8083redundant filename patterns. Therefore, SUBST blocks that use a shell
8071command to generate the list of filename patterns often need to set 8084command to generate the list of filename patterns often need to set
8072<code class="varname">SUBST_NOOP_OK.*</code> to <code class="literal">yes</code>.</p> 8085<code class="varname">SUBST_NOOP_OK.*</code> to <code class="literal">yes</code>.</p>
8073</div> 8086</div>
8074<div class="sect3"> 8087<div class="sect3">
8075<div class="titlepage"><div><div><h4 class="title"> 8088<div class="titlepage"><div><div><h4 class="title">
8076<a name="fixes.subst.what"></a>21.1.11.3. Choosing what to substitute</h4></div></div></div> 8089<a name="fixes.subst.what"></a>21.1.11.3. Choosing what to substitute</h4></div></div></div>
8077<p>In most cases, the substitutions are given using one or more 8090<p>In most cases, the substitutions are given using one or more
8078<a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/sed.1"><span class="citerefentry"><span class="refentrytitle">sed</span>(1)</span></a> commands, like this:</p> 8091<a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/sed.1"><span class="citerefentry"><span class="refentrytitle">sed</span>(1)</span></a> commands, like this:</p>
8079<pre class="programlisting"> 8092<pre class="programlisting">
8080SUBST_SED.path= -e 's|/usr/local|${PREFIX}|g' 8093SUBST_SED.path= -e 's|/usr/local|${PREFIX}|g'
8081</pre> 8094</pre>
8082<p>Each of the sed commands needs to be preceded by the 8095<p>Each of the sed commands needs to be preceded by the
8083<code class="literal">-e</code> option and should be specified on a line of its 8096<code class="literal">-e</code> option and should be specified on a line of its
8084own, to avoid hiding short sed commands at the end of a line.</p> 8097own, to avoid hiding short sed commands at the end of a line.</p>
8085<p>Since the sed commands often contain shell metacharacters as the 8098<p>Since the sed commands often contain shell metacharacters as the
8086separator (the <code class="literal">|</code> in the above example), it is common 8099separator (the <code class="literal">|</code> in the above example), it is common
8087to enclose them in single quotes.</p> 8100to enclose them in single quotes.</p>
8088<p>A common substitution is to replace placeholders of the form 8101<p>A common substitution is to replace placeholders of the form
8089<code class="literal">@VARNAME@</code> with their pkgsrc counterpart variable 8102<code class="literal">@VARNAME@</code> with their pkgsrc counterpart variable
8090<code class="literal">${VARNAME}</code>. A typical example is:</p> 8103<code class="literal">${VARNAME}</code>. A typical example is:</p>
8091<pre class="programlisting"> 8104<pre class="programlisting">
8092SUBST_VARS.path= PREFIX 8105SUBST_VARS.path= PREFIX
8093</pre> 8106</pre>
8094<p>This type of substitutions is typically done by the GNU configure 8107<p>This type of substitutions is typically done by the GNU configure
8095scripts during the do-configure stage, but in some cases these need to be 8108scripts during the do-configure stage, but in some cases these need to be
8096overridden. The same pattern is also used when a package defines patches 8109overridden. The same pattern is also used when a package defines patches
8097that replace previously hard-coded paths like 8110that replace previously hard-coded paths like
8098<code class="literal">/usr/local</code> with a <code class="literal">@PREFIX@</code> 8111<code class="literal">/usr/local</code> with a <code class="literal">@PREFIX@</code>
8099placeholder first, which then gets substituted by the actual 8112placeholder first, which then gets substituted by the actual
8100<code class="literal">${PREFIX}</code> in the pre-configure stage. In many of these 8113<code class="literal">${PREFIX}</code> in the pre-configure stage. In many of these
8101cases, it works equally well to just use the SUBST framework to directly 8114cases, it works equally well to just use the SUBST framework to directly
8102replace <code class="literal">/usr/local</code> with <code class="literal">${PREFIX}</code>, 8115replace <code class="literal">/usr/local</code> with <code class="literal">${PREFIX}</code>,
8103thereby omitting the intermediate patch file.</p> 8116thereby omitting the intermediate patch file.</p>
8104<p>If the above is not flexible enough, it is possible to not use sed 8117<p>If the above is not flexible enough, it is possible to not use sed
8105at all for the substitution but to specify an entirely different command, 8118at all for the substitution but to specify an entirely different command,
8106like this:</p> 8119like this:</p>
8107<pre class="programlisting"> 8120<pre class="programlisting">
8108SUBST_FILTER_CMD.path= LC_ALL=C ${TR} -d '\r' 8121SUBST_FILTER_CMD.path= LC_ALL=C ${TR} -d '\r'
8109</pre> 8122</pre>
8110<p>This is used for the few remaining packages in which the 8123<p>This is used for the few remaining packages in which the
8111distributed files use Windows-style line endings that need to be 8124distributed files use Windows-style line endings that need to be
8112converted to UNIX-style line endings.</p> 8125converted to UNIX-style line endings.</p>
8113</div> 8126</div>
8114<div class="sect3"> 8127<div class="sect3">
8115<div class="titlepage"><div><div><h4 class="title"> 8128<div class="titlepage"><div><div><h4 class="title">
8116<a name="fixes.subst.other"></a>21.1.11.4. Other SUBST variables</h4></div></div></div> 8129<a name="fixes.subst.other"></a>21.1.11.4. Other SUBST variables</h4></div></div></div>
8117<p>When a SUBST block is applied during a package build, a message is 8130<p>When a SUBST block is applied during a package build, a message is
8118logged. The default message is fine for most purposes but can be 8131logged. The default message is fine for most purposes but can be
8119overridden by setting <code class="literal">SUBST_MESSAGE.*</code> to an individual 8132overridden by setting <code class="literal">SUBST_MESSAGE.*</code> to an individual
8120message.</p> 8133message.</p>
8121</div> 8134</div>
8122</div> 8135</div>
8123</div> 8136</div>
8124<div class="sect1"> 8137<div class="sect1">
8125<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 8138<div class="titlepage"><div><div><h2 class="title" style="clear: both">
8126<a name="fixes.fetch"></a>21.2. The <span class="emphasis"><em>fetch</em></span> phase</h2></div></div></div> 8139<a name="fixes.fetch"></a>21.2. The <span class="emphasis"><em>fetch</em></span> phase</h2></div></div></div>
8127<div class="sect2"> 8140<div class="sect2">
8128<div class="titlepage"><div><div><h3 class="title"> 8141<div class="titlepage"><div><div><h3 class="title">
8129<a name="no-plain-download"></a>21.2.1. Packages whose distfiles aren't available for plain downloading</h3></div></div></div> 8142<a name="no-plain-download"></a>21.2.1. Packages whose distfiles aren't available for plain downloading</h3></div></div></div>
8130<p>If you need to download from a dynamic URL you can set 8143<p>If you need to download from a dynamic URL you can set
8131 <code class="varname">DYNAMIC_MASTER_SITES</code> and a <span class="command"><strong>make 8144 <code class="varname">DYNAMIC_MASTER_SITES</code> and a <span class="command"><strong>make
8132 fetch</strong></span> will call <code class="filename">files/getsite.sh</code> 8145 fetch</strong></span> will call <code class="filename">files/getsite.sh</code>
8133 with the name of each file to download as an argument, expecting 8146 with the name of each file to download as an argument, expecting
8134 it to output the URL of the directory from which to download 8147 it to output the URL of the directory from which to download
8135 it. <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/graphics/ns-cult3d/index.html" target="_top"><code class="filename">graphics/ns-cult3d</code></a> is an 8148 it. <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/graphics/ns-cult3d/index.html" target="_top"><code class="filename">graphics/ns-cult3d</code></a> is an
8136 example of this usage.</p> 8149 example of this usage.</p>
8137<p>If the download can't be automated, because the user must 8150<p>If the download can't be automated, because the user must
8138 submit personal information to apply for a password, or must pay 8151 submit personal information to apply for a password, or must pay
8139 for the source, or whatever, you can set 8152 for the source, or whatever, you can set
8140 <code class="varname">FETCH_MESSAGE</code> to a list of lines that are 8153 <code class="varname">FETCH_MESSAGE</code> to a list of lines that are
8141 displayed to the user before aborting the build. Example:</p> 8154 displayed to the user before aborting the build. Example:</p>
8142<pre class="programlisting"> 8155<pre class="programlisting">
8143FETCH_MESSAGE= "Please download the files" 8156FETCH_MESSAGE= "Please download the files"
8144FETCH_MESSAGE+= " "${DISTFILES:Q} 8157FETCH_MESSAGE+= " "${DISTFILES:Q}
8145FETCH_MESSAGE+= "manually from "${MASTER_SITES:Q}"." 8158FETCH_MESSAGE+= "manually from "${MASTER_SITES:Q}"."
8146</pre> 8159</pre>
8147</div> 8160</div>
8148<div class="sect2"> 8161<div class="sect2">
8149<div class="titlepage"><div><div><h3 class="title"> 8162<div class="titlepage"><div><div><h3 class="title">
8150<a name="modified-distfiles-same-name"></a>21.2.2. How to handle modified distfiles with the 'old' name</h3></div></div></div> 8163<a name="modified-distfiles-same-name"></a>21.2.2. How to handle modified distfiles with the 'old' name</h3></div></div></div>
8151<p>Sometimes authors of a software package make some 8164<p>Sometimes authors of a software package make some
8152 modifications after the software was released, and they put up a 8165 modifications after the software was released, and they put up a
8153 new distfile without changing the package's version number. If a 8166 new distfile without changing the package's version number. If a
8154 package is already in pkgsrc at that time, the checksum will 8167 package is already in pkgsrc at that time, the checksum will
8155 no longer match. The contents of the new distfile should be 8168 no longer match. The contents of the new distfile should be
8156 compared against the old one before changing anything, to make 8169 compared against the old one before changing anything, to make
8157 sure the distfile was really updated on purpose, and that 8170 sure the distfile was really updated on purpose, and that
8158 no trojan horse or so crept in. 8171 no trojan horse or so crept in.
8159 Please mention that the distfiles were compared and what was found 8172 Please mention that the distfiles were compared and what was found
8160 in your commit message.</p> 8173 in your commit message.</p>
8161<p>Then, the correct way to work around this is to set 8174<p>Then, the correct way to work around this is to set
8162 <code class="varname">DIST_SUBDIR</code> to a unique directory name, usually 8175 <code class="varname">DIST_SUBDIR</code> to a unique directory name, usually
8163 based on <code class="varname">PKGNAME_NOREV</code> (but take care with 8176 based on <code class="varname">PKGNAME_NOREV</code> (but take care with
8164 python or ruby packages, where <code class="varname">PKGNAME</code> includes 8177 python or ruby packages, where <code class="varname">PKGNAME</code> includes
8165 a variable prefix). All <code class="varname">DISTFILES</code> and 8178 a variable prefix). All <code class="varname">DISTFILES</code> and
8166 <code class="varname">PATCHFILES</code> for this package will be put in that 8179 <code class="varname">PATCHFILES</code> for this package will be put in that
8167 subdirectory of the local distfiles directory. (See <a class="xref" href="#bumping-pkgrevision" title="21.1.10. How to handle incrementing versions when fixing an existing package">Section 21.1.10, &#8220;How to handle incrementing versions when fixing an existing package&#8221;</a> for more details.) In case this 8180 subdirectory of the local distfiles directory. (See <a class="xref" href="#bumping-pkgrevision" title="21.1.10. How to handle incrementing versions when fixing an existing package">Section 21.1.10, &#8220;How to handle incrementing versions when fixing an existing package&#8221;</a> for more details.) In case this
8168 happens more often, <code class="varname">PKGNAME</code> can be used (thus 8181 happens more often, <code class="varname">PKGNAME</code> can be used (thus
8169 including the <code class="filename">nbX</code> suffix) or a date stamp can 8182 including the <code class="filename">nbX</code> suffix) or a date stamp can
8170 be appended, like 8183 be appended, like
8171 <code class="varname">${PKGNAME_NOREV}-YYYYMMDD</code>.</p> 8184 <code class="varname">${PKGNAME_NOREV}-YYYYMMDD</code>.</p>
8172<p><code class="varname">DIST_SUBDIR</code> is also used when a distfile's 8185<p><code class="varname">DIST_SUBDIR</code> is also used when a distfile's
8173 name does not contain a version and the distfile is apt to change. In 8186 name does not contain a version and the distfile is apt to change. In
8174 cases where the likelihood of this is very small, 8187 cases where the likelihood of this is very small,
8175 <code class="varname">DIST_SUBDIR</code> might not be required. Additionally, 8188 <code class="varname">DIST_SUBDIR</code> might not be required. Additionally,
8176 <code class="varname">DIST_SUBDIR</code> must not be removed unless the 8189 <code class="varname">DIST_SUBDIR</code> must not be removed unless the
8177 distfile name changes, even if a package is being moved or 8190 distfile name changes, even if a package is being moved or
8178 renamed.</p> 8191 renamed.</p>
8179<p>Do not forget regenerating the <code class="filename">distinfo</code> file 8192<p>Do not forget regenerating the <code class="filename">distinfo</code> file
8180 after that, since it contains the <code class="varname">DIST_SUBDIR</code> 8193 after that, since it contains the <code class="varname">DIST_SUBDIR</code>
8181 path in the filenames. 8194 path in the filenames.
8182 Also, increase the PKGREVISION if the installed package is different. 8195 Also, increase the PKGREVISION if the installed package is different.
8183 Furthermore, a mail to the package's authors seems appropriate 8196 Furthermore, a mail to the package's authors seems appropriate
8184 telling them that changing distfiles after releases without 8197 telling them that changing distfiles after releases without
8185 changing the file names is not good practice.</p> 8198 changing the file names is not good practice.</p>
8186</div> 8199</div>
8187<div class="sect2"> 8200<div class="sect2">
8188<div class="titlepage"><div><div><h3 class="title"> 8201<div class="titlepage"><div><div><h3 class="title">
8189<a name="build.fetch.github"></a>21.2.3. Packages hosted on github.com</h3></div></div></div> 8202<a name="build.fetch.github"></a>21.2.3. Packages hosted on github.com</h3></div></div></div>
8190<p>Helper methods exist for packages hosted on github.com which 8203<p>Helper methods exist for packages hosted on github.com which
8191 will often have distfile names that clash with other packages, for 8204 will often have distfile names that clash with other packages, for
8192 example <code class="filename">1.0.tar.gz</code>. Use one of the three recipes 8205 example <code class="filename">1.0.tar.gz</code>. Use one of the three recipes
8193 from below:</p> 8206 from below:</p>
8194<div class="sect3"> 8207<div class="sect3">
8195<div class="titlepage"><div><div><h4 class="title"> 8208<div class="titlepage"><div><div><h4 class="title">
8196<a name="build.fetch.github.tag"></a>21.2.3.1. Fetch based on a tagged release</h4></div></div></div> 8209<a name="build.fetch.github.tag"></a>21.2.3.1. Fetch based on a tagged release</h4></div></div></div>
8197<p>If your distfile URL looks similar to 8210<p>If your distfile URL looks similar to
8198 <code class="literal">https://github.com/username/example/archive/v1.0.zip</code>, 8211 <code class="literal">https://github.com/username/example/archive/v1.0.zip</code>,
8199 then you are packaging a tagged release.</p> 8212 then you are packaging a tagged release.</p>
8200<pre class="programlisting"> 8213<pre class="programlisting">
8201DISTNAME= example-1.0 8214DISTNAME= example-1.0
8202MASTER_SITES= ${MASTER_SITE_GITHUB:=username/} 8215MASTER_SITES= ${MASTER_SITE_GITHUB:=username/}
8203#GITHUB_PROJECT= example # can be omitted if same as DISTNAME 8216#GITHUB_PROJECT= example # can be omitted if same as DISTNAME
8204GITHUB_TAG= v${PKGVERSION_NOREV} 8217GITHUB_TAG= v${PKGVERSION_NOREV}
8205EXTRACT_SUFX= .zip 8218EXTRACT_SUFX= .zip
8206</pre> 8219</pre>
8207</div> 8220</div>
8208<div class="sect3"> 8221<div class="sect3">
8209<div class="titlepage"><div><div><h4 class="title"> 8222<div class="titlepage"><div><div><h4 class="title">
8210<a name="build.fetch.github.commit.prerelease"></a>21.2.3.2. Fetch based on a specific commit before the first release</h4></div></div></div> 8223<a name="build.fetch.github.commit.prerelease"></a>21.2.3.2. Fetch based on a specific commit before the first release</h4></div></div></div>
8211<p>If your distfile looks similar to 8224<p>If your distfile looks similar to
8212 <code class="literal">https://github.com/username/example/archive/988881adc9fc3655077dc2d4d757d480b5ea0e11</code> and is from a commit before the first 8225 <code class="literal">https://github.com/username/example/archive/988881adc9fc3655077dc2d4d757d480b5ea0e11</code> and is from a commit before the first
8213 release, then set the package version to 0.0.0.N, where N is the number 8226 release, then set the package version to 0.0.0.N, where N is the number
8214 of commits to the repository, and set GITHUB_TAG to the commit hash. 8227 of commits to the repository, and set GITHUB_TAG to the commit hash.
8215 This will (almost) ensure that the first tagged release will have a 8228 This will (almost) ensure that the first tagged release will have a
8216 version greater than this one so that package upgrades will function 8229 version greater than this one so that package upgrades will function
8217 properly.</p> 8230 properly.</p>
8218<pre class="programlisting"> 8231<pre class="programlisting">
8219DISTNAME= example-0.0.0.347 8232DISTNAME= example-0.0.0.347
8220MASTER_SITES= ${MASTER_SITE_GITHUB:=username/} 8233MASTER_SITES= ${MASTER_SITE_GITHUB:=username/}
8221#GITHUB_PROJECT= example # can be omitted if same as DISTNAME 8234#GITHUB_PROJECT= example # can be omitted if same as DISTNAME
8222GITHUB_TAG= 988881adc9fc3655077dc2d4d757d480b5ea0e11 8235GITHUB_TAG= 988881adc9fc3655077dc2d4d757d480b5ea0e11
8223</pre> 8236</pre>
8224</div> 8237</div>
8225<div class="sect3"> 8238<div class="sect3">
8226<div class="titlepage"><div><div><h4 class="title"> 8239<div class="titlepage"><div><div><h4 class="title">
8227<a name="build.fetch.github.commit.postrelease"></a>21.2.3.3. Fetch based on a specific commit after a release</h4></div></div></div> 8240<a name="build.fetch.github.commit.postrelease"></a>21.2.3.3. Fetch based on a specific commit after a release</h4></div></div></div>
8228<p>If your distfile looks similar to 8241<p>If your distfile looks similar to
8229 <code class="literal">https://github.com/username/example/archive/988881adc9fc3655077dc2d4d757d480b5ea0e11</code> and is from a commit after a release, 8242 <code class="literal">https://github.com/username/example/archive/988881adc9fc3655077dc2d4d757d480b5ea0e11</code> and is from a commit after a release,
8230 then include the last release version and the commit count since that 8243 then include the last release version and the commit count since that
8231 release in the package version and set GITHUB_TAG to the commit hash. 8244 release in the package version and set GITHUB_TAG to the commit hash.
8232 The latest release and commit count are shown in the output of 8245 The latest release and commit count are shown in the output of
8233 "git describe --tags": 8246 "git describe --tags":
8234 </p> 8247 </p>
8235<pre class="screen"> 8248<pre class="screen">
8236# git clone https://github.com/username/example 8249# git clone https://github.com/username/example
8237# cd example 8250# cd example
8238# git describe --tags 8251# git describe --tags
82391.2.3-5-g988881a 82521.2.3-5-g988881a
8240</pre> 8253</pre>
8241<pre class="programlisting"> 8254<pre class="programlisting">
8242DISTNAME= example-1.2.3.5 8255DISTNAME= example-1.2.3.5
8243MASTER_SITES= ${MASTER_SITE_GITHUB:=username/} 8256MASTER_SITES= ${MASTER_SITE_GITHUB:=username/}
8244#GITHUB_PROJECT= example # can be omitted if same as DISTNAME 8257#GITHUB_PROJECT= example # can be omitted if same as DISTNAME
8245GITHUB_TAG= 988881adc9fc3655077dc2d4d757d480b5ea0e11 8258GITHUB_TAG= 988881adc9fc3655077dc2d4d757d480b5ea0e11
8246</pre> 8259</pre>
8247</div> 8260</div>
8248<div class="sect3"> 8261<div class="sect3">
8249<div class="titlepage"><div><div><h4 class="title"> 8262<div class="titlepage"><div><div><h4 class="title">
8250<a name="build.fetch.github.release"></a>21.2.3.4. Fetch based on release</h4></div></div></div> 8263<a name="build.fetch.github.release"></a>21.2.3.4. Fetch based on release</h4></div></div></div>
8251<p>If your distfile URL looks similar to 8264<p>If your distfile URL looks similar to
8252 <code class="literal">https://github.com/username/example/releases/download/rel-1.6/offensive-1.6.zip</code>, 8265 <code class="literal">https://github.com/username/example/releases/download/rel-1.6/offensive-1.6.zip</code>,
8253 then you are packaging a release.</p> 8266 then you are packaging a release.</p>
8254<pre class="programlisting"> 8267<pre class="programlisting">
8255DISTNAME= offensive-1.6 8268DISTNAME= offensive-1.6
8256PKGNAME= ${DISTNAME:S/offensive/proper/} 8269PKGNAME= ${DISTNAME:S/offensive/proper/}
8257MASTER_SITES= ${MASTER_SITE_GITHUB:=username/} 8270MASTER_SITES= ${MASTER_SITE_GITHUB:=username/}
8258GITHUB_PROJECT= example 8271GITHUB_PROJECT= example
8259GITHUB_RELEASE= rel-${PKGVERSION_NOREV} # usually just set this to ${DISTNAME} 8272GITHUB_RELEASE= rel-${PKGVERSION_NOREV} # usually just set this to ${DISTNAME}
8260EXTRACT_SUFX= .zip 8273EXTRACT_SUFX= .zip
8261</pre> 8274</pre>
8262</div> 8275</div>
8263</div> 8276</div>
8264</div> 8277</div>
8265<div class="sect1"> 8278<div class="sect1">
8266<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 8279<div class="titlepage"><div><div><h2 class="title" style="clear: both">
8267<a name="fixes.configure"></a>21.3. The <span class="emphasis"><em>configure</em></span> phase</h2></div></div></div> 8280<a name="fixes.configure"></a>21.3. The <span class="emphasis"><em>configure</em></span> phase</h2></div></div></div>
8268<div class="sect2"> 8281<div class="sect2">
8269<div class="titlepage"><div><div><h3 class="title"> 8282<div class="titlepage"><div><div><h3 class="title">
8270<a name="fixes.libtool"></a>21.3.1. Shared libraries - libtool</h3></div></div></div> 8283<a name="fixes.libtool"></a>21.3.1. Shared libraries - libtool</h3></div></div></div>
8271<p>pkgsrc supports many different machines, with different 8284<p>pkgsrc supports many different machines, with different
8272 object formats like a.out and ELF, and varying abilities to do 8285 object formats like a.out and ELF, and varying abilities to do
8273 shared library and dynamic loading at all. To accompany this, 8286 shared library and dynamic loading at all. To accompany this,
8274 varying commands and options have to be passed to the 8287 varying commands and options have to be passed to the
8275 compiler, linker, etc. to get the Right Thing, which can be 8288 compiler, linker, etc. to get the Right Thing, which can be
8276 pretty annoying especially if you don't have all the machines 8289 pretty annoying especially if you don't have all the machines
8277 at your hand to test things. The 8290 at your hand to test things. The
8278 <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/devel/libtool/index.html" target="_top"><code class="filename">devel/libtool</code></a> pkg 8291 <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/devel/libtool/index.html" target="_top"><code class="filename">devel/libtool</code></a> pkg
8279 can help here, as it just <span class="quote">&#8220;<span class="quote">knows</span>&#8221;</span> how to build 8292 can help here, as it just <span class="quote">&#8220;<span class="quote">knows</span>&#8221;</span> how to build
8280 both static and dynamic libraries from a set of source files, 8293 both static and dynamic libraries from a set of source files,
8281 thus being platform-independent.</p> 8294 thus being platform-independent.</p>
8282<p>Here's how to use libtool in a package in seven simple 8295<p>Here's how to use libtool in a package in seven simple
8283 steps:</p> 8296 steps:</p>
8284<div class="orderedlist"><ol class="orderedlist" type="1"> 8297<div class="orderedlist"><ol class="orderedlist" type="1">
8285<li class="listitem"><p>Add <code class="varname">USE_LIBTOOL=yes</code> to the package 8298<li class="listitem"><p>Add <code class="varname">USE_LIBTOOL=yes</code> to the package
8286 Makefile.</p></li> 8299 Makefile.</p></li>
8287<li class="listitem"><p>For library objects, use <span class="quote">&#8220;<span class="quote">${LIBTOOL} --mode=compile 8300<li class="listitem"><p>For library objects, use <span class="quote">&#8220;<span class="quote">${LIBTOOL} --mode=compile
8288 ${CC}</span>&#8221;</span> in place of <span class="quote">&#8220;<span class="quote">${CC}</span>&#8221;</span>. You could even 8301 ${CC}</span>&#8221;</span> in place of <span class="quote">&#8220;<span class="quote">${CC}</span>&#8221;</span>. You could even
8289 add it to the definition of <code class="varname">CC</code>, if only 8302 add it to the definition of <code class="varname">CC</code>, if only
8290 libraries are being built in a given Makefile. This one command 8303 libraries are being built in a given Makefile. This one command
8291 will build both PIC and non-PIC library objects, so you need not 8304 will build both PIC and non-PIC library objects, so you need not
8292 have separate shared and non-shared library rules.</p></li> 8305 have separate shared and non-shared library rules.</p></li>
8293<li class="listitem"> 8306<li class="listitem">
8294<p>For the linking of the library, remove any 8307<p>For the linking of the library, remove any
8295 <span class="quote">&#8220;<span class="quote">ar</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">ranlib</span>&#8221;</span>, and <span class="quote">&#8220;<span class="quote">ld 8308 <span class="quote">&#8220;<span class="quote">ar</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">ranlib</span>&#8221;</span>, and <span class="quote">&#8220;<span class="quote">ld
8296 -Bshareable</span>&#8221;</span> commands, and instead use:</p> 8309 -Bshareable</span>&#8221;</span> commands, and instead use:</p>
8297<pre class="programlisting"> 8310<pre class="programlisting">
8298${LIBTOOL} --mode=link \ 8311${LIBTOOL} --mode=link \
8299 ${CC} -o ${.TARGET:.a=.la} \ 8312 ${CC} -o ${.TARGET:.a=.la} \
8300 ${OBJS:.o=.lo} \ 8313 ${OBJS:.o=.lo} \
8301 -rpath ${PREFIX}/lib \ 8314 -rpath ${PREFIX}/lib \
8302 -version-info major:minor 8315 -version-info major:minor
8303</pre> 8316</pre>
8304<p>Note that the library is changed to have a 8317<p>Note that the library is changed to have a
8305 <code class="filename">.la</code> extension, and the objects are 8318 <code class="filename">.la</code> extension, and the objects are
8306 changed to have a <code class="filename">.lo</code> 8319 changed to have a <code class="filename">.lo</code>
8307 extension. Change <code class="varname">OBJS</code> as 8320 extension. Change <code class="varname">OBJS</code> as
8308 necessary. This automatically creates all of the 8321 necessary. This automatically creates all of the
8309 <code class="filename">.a</code>, 8322 <code class="filename">.a</code>,
8310 <code class="filename">.so.major.minor</code>, and ELF symlinks (if 8323 <code class="filename">.so.major.minor</code>, and ELF symlinks (if
8311 necessary) in the build directory. Be sure to include 8324 necessary) in the build directory. Be sure to include
8312 <span class="quote">&#8220;<span class="quote">-version-info</span>&#8221;</span>, especially when major and 8325 <span class="quote">&#8220;<span class="quote">-version-info</span>&#8221;</span>, especially when major and
8313 minor are zero, as libtool will otherwise strip off the 8326 minor are zero, as libtool will otherwise strip off the
8314 shared library version.</p> 8327 shared library version.</p>
8315<p>From the libtool manual:</p> 8328<p>From the libtool manual:</p>
8316<pre class="programlisting"> 8329<pre class="programlisting">
8317So, libtool library versions are described by three integers: 8330So, libtool library versions are described by three integers:
8318 8331
8319CURRENT 8332CURRENT
8320The most recent interface number that this library implements. 8333The most recent interface number that this library implements.
8321 8334
8322REVISION 8335REVISION
8323The implementation number of the CURRENT interface. 8336The implementation number of the CURRENT interface.
8324 8337
8325AGE 8338AGE
8326The difference between the newest and oldest interfaces that 8339The difference between the newest and oldest interfaces that
8327this library implements. In other words, the library implements 8340this library implements. In other words, the library implements
8328all the interface numbers in the range from number `CURRENT - 8341all the interface numbers in the range from number `CURRENT -
8329AGE' to `CURRENT'. 8342AGE' to `CURRENT'.
8330 8343
8331If two libraries have identical CURRENT and AGE numbers, then the 8344If two libraries have identical CURRENT and AGE numbers, then the
8332dynamic linker chooses the library with the greater REVISION number. 8345dynamic linker chooses the library with the greater REVISION number.
8333</pre> 8346</pre>
8334<p>The <span class="quote">&#8220;<span class="quote">-release</span>&#8221;</span> option will produce 8347<p>The <span class="quote">&#8220;<span class="quote">-release</span>&#8221;</span> option will produce
8335 different results for a.out and ELF (excluding symlinks) 8348 different results for a.out and ELF (excluding symlinks)
8336 in only one case. An ELF library of the form 8349 in only one case. An ELF library of the form
8337 <span class="quote">&#8220;<span class="quote">libfoo-release.so.<span class="emphasis"><em>x</em></span>.<span class="emphasis"><em>y</em></span></span>&#8221;</span> 8350 <span class="quote">&#8220;<span class="quote">libfoo-release.so.<span class="emphasis"><em>x</em></span>.<span class="emphasis"><em>y</em></span></span>&#8221;</span>
8338 will have a symlink of 8351 will have a symlink of
8339 <span class="quote">&#8220;<span class="quote">libfoo.so.<span class="emphasis"><em>x</em></span>.<span class="emphasis"><em>y</em></span></span>&#8221;</span> 8352 <span class="quote">&#8220;<span class="quote">libfoo.so.<span class="emphasis"><em>x</em></span>.<span class="emphasis"><em>y</em></span></span>&#8221;</span>
8340 on an a.out platform. This is handled 8353 on an a.out platform. This is handled
8341 automatically.</p> 8354 automatically.</p>
8342<p>The <span class="quote">&#8220;<span class="quote">-rpath argument</span>&#8221;</span> is the install 8355<p>The <span class="quote">&#8220;<span class="quote">-rpath argument</span>&#8221;</span> is the install
8343 directory of the library being built.</p> 8356 directory of the library being built.</p>
8344<p>In the <code class="filename">PLIST</code>, include only the 8357<p>In the <code class="filename">PLIST</code>, include only the
8345 <code class="filename">.la</code> file, the other files will be 8358 <code class="filename">.la</code> file, the other files will be
8346 added automatically.</p> 8359 added automatically.</p>
8347</li> 8360</li>
8348<li class="listitem"> 8361<li class="listitem">
8349<p>When linking shared object (<code class="filename">.so</code>) 8362<p>When linking shared object (<code class="filename">.so</code>)
8350 files, i.e. files that are loaded via <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/dlopen.3"><span class="citerefentry"><span class="refentrytitle">dlopen</span>(3)</span></a>, NOT 8363 files, i.e. files that are loaded via <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/dlopen.3"><span class="citerefentry"><span class="refentrytitle">dlopen</span>(3)</span></a>, NOT
8351 shared libraries, use <span class="quote">&#8220;<span class="quote">-module 8364 shared libraries, use <span class="quote">&#8220;<span class="quote">-module
8352 -avoid-version</span>&#8221;</span> to prevent them getting version 8365 -avoid-version</span>&#8221;</span> to prevent them getting version
8353 tacked on.</p> 8366 tacked on.</p>
8354<p>The <code class="filename">PLIST</code> file gets the 8367<p>The <code class="filename">PLIST</code> file gets the
8355 <code class="filename">foo.so</code> entry.</p> 8368 <code class="filename">foo.so</code> entry.</p>
8356</li> 8369</li>
8357<li class="listitem"> 8370<li class="listitem">
8358<p>When linking programs that depend on these libraries 8371<p>When linking programs that depend on these libraries
8359 <span class="emphasis"><em>before</em></span> they are installed, preface 8372 <span class="emphasis"><em>before</em></span> they are installed, preface
8360 the <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/cc.1"><span class="citerefentry"><span class="refentrytitle">cc</span>(1)</span></a> or <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/ld.1"><span class="citerefentry"><span class="refentrytitle">ld</span>(1)</span></a> line with <span class="quote">&#8220;<span class="quote">${LIBTOOL} 8373 the <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/cc.1"><span class="citerefentry"><span class="refentrytitle">cc</span>(1)</span></a> or <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/ld.1"><span class="citerefentry"><span class="refentrytitle">ld</span>(1)</span></a> line with <span class="quote">&#8220;<span class="quote">${LIBTOOL}
8361 --mode=link</span>&#8221;</span>, and it will find the correct 8374 --mode=link</span>&#8221;</span>, and it will find the correct
8362 libraries (static or shared), but please be aware that 8375 libraries (static or shared), but please be aware that
8363 libtool will not allow you to specify a relative path in 8376 libtool will not allow you to specify a relative path in
8364 -L (such as <span class="quote">&#8220;<span class="quote">-L../somelib</span>&#8221;</span>), because it 8377 -L (such as <span class="quote">&#8220;<span class="quote">-L../somelib</span>&#8221;</span>), because it
8365 expects you to change that argument to be the 8378 expects you to change that argument to be the
8366 <code class="filename">.la</code> file. e.g.</p> 8379 <code class="filename">.la</code> file. e.g.</p>
8367<pre class="programlisting"> 8380<pre class="programlisting">
8368${LIBTOOL} --mode=link ${CC} -o someprog -L../somelib -lsomelib 8381${LIBTOOL} --mode=link ${CC} -o someprog -L../somelib -lsomelib
8369</pre> 8382</pre>
8370<p>should be changed to:</p> 8383<p>should be changed to:</p>
8371<pre class="programlisting"> 8384<pre class="programlisting">
8372${LIBTOOL} --mode=link ${CC} -o <em class="replaceable"><code>someprog</code></em> <em class="replaceable"><code>../somelib/somelib.la</code></em> 8385${LIBTOOL} --mode=link ${CC} -o <em class="replaceable"><code>someprog</code></em> <em class="replaceable"><code>../somelib/somelib.la</code></em>
8373</pre> 8386</pre>
8374<p>and it will do the right thing with the libraries.</p> 8387<p>and it will do the right thing with the libraries.</p>
8375</li> 8388</li>
8376<li class="listitem"> 8389<li class="listitem">
8377<p>When installing libraries, preface the <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/install.1"><span class="citerefentry"><span class="refentrytitle">install</span>(1)</span></a> 8390<p>When installing libraries, preface the <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/install.1"><span class="citerefentry"><span class="refentrytitle">install</span>(1)</span></a>
8378 or <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/cp.1"><span class="citerefentry"><span class="refentrytitle">cp</span>(1)</span></a> command with <span class="quote">&#8220;<span class="quote">${LIBTOOL} 8391 or <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/cp.1"><span class="citerefentry"><span class="refentrytitle">cp</span>(1)</span></a> command with <span class="quote">&#8220;<span class="quote">${LIBTOOL}
8379 --mode=install</span>&#8221;</span>, and change the library name to 8392 --mode=install</span>&#8221;</span>, and change the library name to
8380 <code class="filename">.la</code>. e.g.</p> 8393 <code class="filename">.la</code>. e.g.</p>
8381<pre class="programlisting"> 8394<pre class="programlisting">
8382${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${SOMELIB:.a=.la} ${PREFIX}/lib 8395${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${SOMELIB:.a=.la} ${PREFIX}/lib
8383</pre> 8396</pre>
8384<p>This will install the static <code class="filename">.a</code>, 8397<p>This will install the static <code class="filename">.a</code>,
8385 shared library, any needed symlinks, and run 8398 shared library, any needed symlinks, and run
8386 <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/ldconfig.8"><span class="citerefentry"><span class="refentrytitle">ldconfig</span>(8)</span></a>.</p> 8399 <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/ldconfig.8"><span class="citerefentry"><span class="refentrytitle">ldconfig</span>(8)</span></a>.</p>
8387</li> 8400</li>
8388<li class="listitem"><p>In your <code class="filename">PLIST</code>, include only 8401<li class="listitem"><p>In your <code class="filename">PLIST</code>, include only
8389 the <code class="filename">.la</code> 8402 the <code class="filename">.la</code>
8390 file (this is a change from previous behaviour).</p></li> 8403 file (this is a change from previous behaviour).</p></li>
8391</ol></div> 8404</ol></div>
8392</div> 8405</div>
8393<div class="sect2"> 8406<div class="sect2">
8394<div class="titlepage"><div><div><h3 class="title"> 8407<div class="titlepage"><div><div><h3 class="title">
8395<a name="using-libtool"></a>21.3.2. Using libtool on GNU packages that already support libtool</h3></div></div></div> 8408<a name="using-libtool"></a>21.3.2. Using libtool on GNU packages that already support libtool</h3></div></div></div>
8396<p>Add <code class="varname">USE_LIBTOOL=yes</code> to the 8409<p>Add <code class="varname">USE_LIBTOOL=yes</code> to the
8397 package Makefile. This will override the package's own libtool 8410 package Makefile. This will override the package's own libtool
8398 in most cases. For older libtool using packages, libtool is 8411 in most cases. For older libtool using packages, libtool is
8399 made by ltconfig script during the do-configure step; you can 8412 made by ltconfig script during the do-configure step; you can
8400 check the libtool script location by doing <span class="command"><strong>make 8413 check the libtool script location by doing <span class="command"><strong>make
8401 configure; find work*/ -name libtool</strong></span>.</p> 8414 configure; find work*/ -name libtool</strong></span>.</p>
8402<p><code class="varname">LIBTOOL_OVERRIDE</code> specifies which libtool 8415<p><code class="varname">LIBTOOL_OVERRIDE</code> specifies which libtool
8403 scripts, relative to <code class="varname">WRKSRC</code>, to override. By 8416 scripts, relative to <code class="varname">WRKSRC</code>, to override. By
8404 default, it is set to <span class="quote">&#8220;<span class="quote">libtool */libtool 8417 default, it is set to <span class="quote">&#8220;<span class="quote">libtool */libtool
8405 */*/libtool</span>&#8221;</span>. If this does not match the location of the 8418 */*/libtool</span>&#8221;</span>. If this does not match the location of the
8406 package's libtool script(s), set it as appropriate.</p> 8419 package's libtool script(s), set it as appropriate.</p>
8407<p>If you do not need <code class="filename">*.a</code> static 8420<p>If you do not need <code class="filename">*.a</code> static
8408 libraries built and installed, then use 8421 libraries built and installed, then use
8409 <code class="varname">SHLIBTOOL_OVERRIDE</code> instead.</p> 8422 <code class="varname">SHLIBTOOL_OVERRIDE</code> instead.</p>
8410<p>If your package makes use of the platform-independent library 8423<p>If your package makes use of the platform-independent library
8411 for loading dynamic shared objects, that comes with libtool 8424 for loading dynamic shared objects, that comes with libtool
8412 (libltdl), you should include devel/libltdl/buildlink3.mk.</p> 8425 (libltdl), you should include devel/libltdl/buildlink3.mk.</p>
8413<p>Some packages use libtool incorrectly so that the package 8426<p>Some packages use libtool incorrectly so that the package
8414 may not work or build in some circumstances. Some of the more 8427 may not work or build in some circumstances. Some of the more
8415 common errors are:</p> 8428 common errors are:</p>
8416<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 8429<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
8417<li class="listitem"> 8430<li class="listitem">
8418<p>The inclusion of a shared object (-module) as a dependent library in an 8431<p>The inclusion of a shared object (-module) as a dependent library in an
8419 executable or library. This in itself isn't a problem if one of two things 8432 executable or library. This in itself isn't a problem if one of two things
8420 has been done:</p> 8433 has been done:</p>
8421<div class="orderedlist"><ol class="orderedlist" type="1"> 8434<div class="orderedlist"><ol class="orderedlist" type="1">
8422<li class="listitem"><p>The shared object is named correctly, i.e. 8435<li class="listitem"><p>The shared object is named correctly, i.e.
8423 <code class="filename">libfoo.la</code>, not 8436 <code class="filename">libfoo.la</code>, not
8424 <code class="filename">foo.la</code></p></li> 8437 <code class="filename">foo.la</code></p></li>
8425<li class="listitem"><p>The -dlopen option is used when linking an executable.</p></li> 8438<li class="listitem"><p>The -dlopen option is used when linking an executable.</p></li>
8426</ol></div> 8439</ol></div>
8427</li> 8440</li>
8428<li class="listitem"><p>The use of libltdl without the correct calls to initialisation routines. 8441<li class="listitem"><p>The use of libltdl without the correct calls to initialisation routines.
8429 The function lt_dlinit() should be called and the macro 8442 The function lt_dlinit() should be called and the macro
8430 <code class="varname">LTDL_SET_PRELOADED_SYMBOLS</code> included in 8443 <code class="varname">LTDL_SET_PRELOADED_SYMBOLS</code> included in
8431 executables.</p></li> 8444 executables.</p></li>
8432</ul></div> 8445</ul></div>
8433</div> 8446</div>
8434<div class="sect2"> 8447<div class="sect2">
8435<div class="titlepage"><div><div><h3 class="title"> 8448<div class="titlepage"><div><div><h3 class="title">
8436<a name="autoconf-automake"></a>21.3.3. GNU Autoconf/Automake</h3></div></div></div> 8449<a name="autoconf-automake"></a>21.3.3. GNU Autoconf/Automake</h3></div></div></div>
8437<p>If a package needs GNU autoconf or automake to be executed 8450<p>If a package needs GNU autoconf or automake to be executed
8438 to regenerate the 8451 to regenerate the
8439 <code class="filename">configure</code> 8452 <code class="filename">configure</code>
8440 script and <code class="filename">Makefile.in</code> makefile 8453 script and <code class="filename">Makefile.in</code> makefile
8441 templates from <code class="filename">configure.ac</code> and 8454 templates from <code class="filename">configure.ac</code> and
8442 <code class="filename">Makefile.am</code>, 8455 <code class="filename">Makefile.am</code>,
8443 then they should be executed in a pre-configure target:</p> 8456 then they should be executed in a pre-configure target:</p>
8444<pre class="programlisting"> 8457<pre class="programlisting">
8445USE_TOOLS+= autoconf automake autoreconf 8458USE_TOOLS+= autoconf automake autoreconf
8446GNU_CONFIGURE= yes 8459GNU_CONFIGURE= yes
8447... 8460...
8448 8461
8449pre-configure: 8462pre-configure:
8450 set -e; cd ${WRKSRC} &amp;&amp; autoreconf -fi 8463 set -e; cd ${WRKSRC} &amp;&amp; autoreconf -fi
8451... 8464...
8452</pre> 8465</pre>
8453<p>Packages which use GNU Automake will sometimes 8466<p>Packages which use GNU Automake will sometimes
8454 require GNU Make (<code class="literal">gmake</code> in 8467 require GNU Make (<code class="literal">gmake</code> in
8455 <code class="varname">USE_TOOLS</code>), 8468 <code class="varname">USE_TOOLS</code>),
8456 but not always. Note that autoreconf 8469 but not always. Note that autoreconf
8457 only needs to be executed if <code class="filename">configure.ac</code> 8470 only needs to be executed if <code class="filename">configure.ac</code>
8458 or Makefiles are modified, or <code class="filename">configure</code> 8471 or Makefiles are modified, or <code class="filename">configure</code>
8459 is not present.</p> 8472 is not present.</p>
8460<p>There are times when the configure process makes 8473<p>There are times when the configure process makes
8461 additional changes to the generated files, which then causes 8474 additional changes to the generated files, which then causes
8462 the build process to try to re-execute the automake sequence. 8475 the build process to try to re-execute the automake sequence.
8463 This is prevented by touching various files in the configure 8476 This is prevented by touching various files in the configure
8464 stage. If this causes problems with your package you can set 8477 stage. If this causes problems with your package you can set
8465 <code class="varname">AUTOMAKE_OVERRIDE=NO</code> in the package 8478 <code class="varname">AUTOMAKE_OVERRIDE=NO</code> in the package
8466 Makefile.</p> 8479 Makefile.</p>
8467</div> 8480</div>
8468<div class="sect2"> 8481<div class="sect2">
8469<div class="titlepage"><div><div><h3 class="title"> 8482<div class="titlepage"><div><div><h3 class="title">
8470<a name="meson"></a>21.3.4. Meson / ninja</h3></div></div></div> 8483<a name="meson"></a>21.3.4. Meson / ninja</h3></div></div></div>
8471<p>Packages using Meson to configure need to include: 8484<p>Packages using Meson to configure need to include:
8472 8485
8473</p> 8486</p>
8474<pre class="programlisting"> 8487<pre class="programlisting">
8475.include "../../devel/meson/build.mk" 8488.include "../../devel/meson/build.mk"
8476</pre> 8489</pre>
8477<p>In nearly all cases (any program with dependencies), 8490<p>In nearly all cases (any program with dependencies),
8478 pkg-config needs to be added to 8491 pkg-config needs to be added to
8479 <code class="varname">USE_TOOLS</code>. If the package installs 8492 <code class="varname">USE_TOOLS</code>. If the package installs
8480 translation files for non-English languages, also 8493 translation files for non-English languages, also
8481 add msgfmt and xgettext: 8494 add msgfmt and xgettext:
8482 8495
8483</p> 8496</p>
8484<pre class="programlisting"> 8497<pre class="programlisting">
8485USE_TOOLS+= pkg-config msgfmt xgettext 8498USE_TOOLS+= pkg-config msgfmt xgettext
8486</pre> 8499</pre>
8487<p>If any options need to be passed to Meson, use 8500<p>If any options need to be passed to Meson, use
8488 <code class="varname">MESON_ARGS</code> instead of 8501 <code class="varname">MESON_ARGS</code> instead of
8489 <code class="varname">CONFIGURE_ARGS</code>: 8502 <code class="varname">CONFIGURE_ARGS</code>:
8490 8503
8491</p> 8504</p>
8492<pre class="programlisting"> 8505<pre class="programlisting">
8493MESON_ARGS+= -Dx11=false 8506MESON_ARGS+= -Dx11=false
8494</pre> 8507</pre>
8495</div> 8508</div>
8496</div> 8509</div>
8497<div class="sect1"> 8510<div class="sect1">
8498<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 8511<div class="titlepage"><div><div><h2 class="title" style="clear: both">
8499<a name="programming-languages"></a>21.4. Programming languages</h2></div></div></div> 8512<a name="programming-languages"></a>21.4. Programming languages</h2></div></div></div>
8500<div class="sect2"> 8513<div class="sect2">
8501<div class="titlepage"><div><div><h3 class="title"> 8514<div class="titlepage"><div><div><h3 class="title">
8502<a name="basic-programming-languages"></a>21.4.1. C, C++, and Fortran</h3></div></div></div> 8515<a name="basic-programming-languages"></a>21.4.1. C, C++, and Fortran</h3></div></div></div>
8503<p>Compilers for the C and C++ languages comes with 8516<p>Compilers for the C and C++ languages comes with
8504 the NetBSD base system. By default, pkgsrc assumes that a package 8517 the NetBSD base system. By default, pkgsrc assumes that a package
8505 is written in C and will hide all other compilers (via the wrapper 8518 is written in C and will hide all other compilers (via the wrapper
8506 framework, see <a class="xref" href="#buildlink" title="Chapter 18. Buildlink methodology">Chapter 18, <i>Buildlink methodology</i></a>).</p> 8519 framework, see <a class="xref" href="#buildlink" title="Chapter 18. Buildlink methodology">Chapter 18, <i>Buildlink methodology</i></a>).</p>
8507<p>To declare which language's compiler a package needs, set 8520<p>To declare which language's compiler a package needs, set
8508 the <code class="varname">USE_LANGUAGES</code> variable. Allowed values 8521 the <code class="varname">USE_LANGUAGES</code> variable. Allowed values
8509 currently are: 8522 currently are:
8510 </p> 8523 </p>
8511<pre class="programlisting"> 8524<pre class="programlisting">
8512 c99, c++, c++03, gnu++03, c++0x, gnu++0x, c++11, gnu++11, 8525 c99, c++, c++03, gnu++03, c++0x, gnu++0x, c++11, gnu++11,
8513 c++14, gnu++14, c++17, gnu++17, c++20, gnu++20, fortran, 8526 c++14, gnu++14, c++17, gnu++17, c++20, gnu++20, fortran,
8514 fortran77, java, objc, obj-c++, and ada. 8527 fortran77, java, objc, obj-c++, and ada.
8515 </pre> 8528 </pre>
8516<p> 8529<p>
8517 (and any combination). The default is 8530 (and any combination). The default is
8518 <span class="quote">&#8220;<span class="quote">c</span>&#8221;</span>. Packages using GNU configure scripts, even if 8531 <span class="quote">&#8220;<span class="quote">c</span>&#8221;</span>. Packages using GNU configure scripts, even if
8519 written in C++, usually need a C compiler for the configure 8532 written in C++, usually need a C compiler for the configure
8520 phase.</p> 8533 phase.</p>
8521<p>To express a general requirement on a specific C or C++ 8534<p>To express a general requirement on a specific C or C++
8522 version, normally only <code class="varname">GCC_REQD</code> needs to be set. 8535 version, normally only <code class="varname">GCC_REQD</code> needs to be set.
8523 For example, GCC 7 includes support for C++17, so if the package uses 8536 For example, GCC 7 includes support for C++17, so if the package uses
8524 C++17 it should specify: 8537 C++17 it should specify:
8525 8538
8526 </p> 8539 </p>
8527<pre class="programlisting"> 8540<pre class="programlisting">
8528 GCC_REQD+= 7 8541 GCC_REQD+= 7
8529 </pre> 8542 </pre>
8530<p>Language variants like <code class="literal">c++11</code> for 8543<p>Language variants like <code class="literal">c++11</code> for
8531 <code class="varname">USE_LANGUAGES</code> should only be specified 8544 <code class="varname">USE_LANGUAGES</code> should only be specified
8532 if the package does not explicitly set <code class="literal">-std=...</code> 8545 if the package does not explicitly set <code class="literal">-std=...</code>
8533 when compiling (i.e. the package assumes the compiler defaults to 8546 when compiling (i.e. the package assumes the compiler defaults to
8534 C++11 or some other standard). This is usually a bug in the 8547 C++11 or some other standard). This is usually a bug in the
8535 upstream build system.</p> 8548 upstream build system.</p>
8536<p>GCC version 5 includes support for C++14, while GCC 4.7 includes 8549<p>GCC version 5 includes support for C++14, while GCC 4.7 includes
8537 more-or-less complete support for C++11. For more information, consult 8550 more-or-less complete support for C++11. For more information, consult
8538 <a class="ulink" href="https://gcc.gnu.org/projects/cxx-status.html" target="_top">GCC's own documentation on programming language support.</a></p> 8551 <a class="ulink" href="https://gcc.gnu.org/projects/cxx-status.html" target="_top">GCC's own documentation on programming language support.</a></p>
8539</div> 8552</div>
8540<div class="sect2"> 8553<div class="sect2">
8541<div class="titlepage"><div><div><h3 class="title"> 8554<div class="titlepage"><div><div><h3 class="title">
8542<a name="java-programming-language"></a>21.4.2. Java</h3></div></div></div> 8555<a name="java-programming-language"></a>21.4.2. Java</h3></div></div></div>
8543<p>If a program is written in Java, use the Java framework in 8556<p>If a program is written in Java, use the Java framework in
8544 pkgsrc. The package must include 8557 pkgsrc. The package must include
8545 <code class="filename">../../mk/java-vm.mk</code>. This Makefile fragment 8558 <code class="filename">../../mk/java-vm.mk</code>. This Makefile fragment
8546 provides the following variables:</p> 8559 provides the following variables:</p>
8547<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 8560<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
8548<li class="listitem"><p><code class="varname">USE_JAVA</code> defines if a build 8561<li class="listitem"><p><code class="varname">USE_JAVA</code> defines if a build
8549 dependency on the JDK is added. If 8562 dependency on the JDK is added. If
8550 <code class="varname">USE_JAVA</code> is set to <span class="quote">&#8220;<span class="quote">run</span>&#8221;</span>, then 8563 <code class="varname">USE_JAVA</code> is set to <span class="quote">&#8220;<span class="quote">run</span>&#8221;</span>, then
8551 there is only a runtime dependency on the JDK. The default is 8564 there is only a runtime dependency on the JDK. The default is
8552 <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>, which also adds a build dependency on the 8565 <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>, which also adds a build dependency on the
8553 JDK.</p></li> 8566 JDK.</p></li>
8554<li class="listitem"><p>Set <code class="varname">USE_JAVA2</code> to declare that 8567<li class="listitem"><p>Set <code class="varname">USE_JAVA2</code> to declare that
8555 a package needs a Java2 implementation. The supported values 8568 a package needs a Java2 implementation. The supported values
8556 are <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">1.4</span>&#8221;</span>, and 8569 are <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">1.4</span>&#8221;</span>, and
8557 <span class="quote">&#8220;<span class="quote">1.5</span>&#8221;</span>. <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span> accepts any Java2 8570 <span class="quote">&#8220;<span class="quote">1.5</span>&#8221;</span>. <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span> accepts any Java2
8558 implementation, <span class="quote">&#8220;<span class="quote">1.4</span>&#8221;</span> insists on versions 1.4 or 8571 implementation, <span class="quote">&#8220;<span class="quote">1.4</span>&#8221;</span> insists on versions 1.4 or
8559 above, and <span class="quote">&#8220;<span class="quote">1.5</span>&#8221;</span> only accepts versions 1.5 or 8572 above, and <span class="quote">&#8220;<span class="quote">1.5</span>&#8221;</span> only accepts versions 1.5 or
8560 above. This variable is not set by default.</p></li> 8573 above. This variable is not set by default.</p></li>
8561<li class="listitem"><p><code class="varname">PKG_JAVA_HOME</code> is 8574<li class="listitem"><p><code class="varname">PKG_JAVA_HOME</code> is
8562 automatically set to the runtime location of the used Java 8575 automatically set to the runtime location of the used Java
8563 implementation dependency. It may be used to set 8576 implementation dependency. It may be used to set
8564 <code class="varname">JAVA_HOME</code> to a good value if the program 8577 <code class="varname">JAVA_HOME</code> to a good value if the program
8565 needs this variable to be defined. 8578 needs this variable to be defined.
8566 </p></li> 8579 </p></li>
8567</ul></div> 8580</ul></div>
8568</div> 8581</div>
8569<div class="sect2"> 8582<div class="sect2">
8570<div class="titlepage"><div><div><h3 class="title"> 8583<div class="titlepage"><div><div><h3 class="title">
8571<a name="go-programming-language"></a>21.4.3. Go</h3></div></div></div> 8584<a name="go-programming-language"></a>21.4.3. Go</h3></div></div></div>
8572<p>If a program is written in Go and has any dependencies on 8585<p>If a program is written in Go and has any dependencies on
8573 other Go modules, have the package include 8586 other Go modules, have the package include
8574 <code class="filename">../../lang/go/go-module.mk</code>.</p> 8587 <code class="filename">../../lang/go/go-module.mk</code>.</p>
8575<div class="orderedlist"><ol class="orderedlist" type="1"> 8588<div class="orderedlist"><ol class="orderedlist" type="1">
8576<li class="listitem"><p>Generate a list of those dependencies with 8589<li class="listitem"><p>Generate a list of those dependencies with
8577 <span class="command"><strong>make clean &amp;&amp; make patch &amp;&amp; make show-go-modules &gt; 8590 <span class="command"><strong>make clean &amp;&amp; make patch &amp;&amp; make show-go-modules &gt;
8578 go-modules.mk</strong></span>.</p></li> 8591 go-modules.mk</strong></span>.</p></li>
8579<li class="listitem"><p>Prepend 8592<li class="listitem"><p>Prepend
8580 <code class="literal">.include "go-modules.mk"</code> to any other 8593 <code class="literal">.include "go-modules.mk"</code> to any other
8581 <code class="literal">.include</code>s.</p></li> 8594 <code class="literal">.include</code>s.</p></li>
8582<li class="listitem"><p>Incorporate these modules in 8595<li class="listitem"><p>Incorporate these modules in
8583 <code class="filename">distinfo</code> with <span class="command"><strong>make 8596 <code class="filename">distinfo</code> with <span class="command"><strong>make
8584 makesum</strong></span>.</p></li> 8597 makesum</strong></span>.</p></li>
8585</ol></div> 8598</ol></div>
8586</div> 8599</div>
8587<div class="sect2"> 8600<div class="sect2">
8588<div class="titlepage"><div><div><h3 class="title"> 8601<div class="titlepage"><div><div><h3 class="title">
8589<a name="rust-programming-language"></a>21.4.4. Rust</h3></div></div></div> 8602<a name="rust-programming-language"></a>21.4.4. Rust</h3></div></div></div>
8590<p>If a program is written in Rust and uses Cargo to build, 8603<p>If a program is written in Rust and uses Cargo to build,
8591 have the package include 8604 have the package include
8592 <code class="filename">../../lang/rust/cargo.mk</code>.</p> 8605 <code class="filename">../../lang/rust/cargo.mk</code>.</p>
8593<div class="orderedlist"><ol class="orderedlist" type="1"> 8606<div class="orderedlist"><ol class="orderedlist" type="1">
8594<li class="listitem"><p>Generate a list of those dependencies with 8607<li class="listitem"><p>Generate a list of those dependencies with
8595 <span class="command"><strong>make CARGO_ARGS="build --release" build &amp;&amp; 8608 <span class="command"><strong>make CARGO_ARGS="build --release" build &amp;&amp;
8596 make print-cargo-depends &gt; cargo-depends.mk</strong></span>.</p></li> 8609 make print-cargo-depends &gt; cargo-depends.mk</strong></span>.</p></li>
8597<li class="listitem"><p>Prepend 8610<li class="listitem"><p>Prepend
8598 <code class="literal">.include "cargo-depends.mk"</code> to any other 8611 <code class="literal">.include "cargo-depends.mk"</code> to any other
8599 <code class="literal">.include</code>s.</p></li> 8612 <code class="literal">.include</code>s.</p></li>
8600<li class="listitem"><p>Incorporate these modules in 8613<li class="listitem"><p>Incorporate these modules in
8601 <code class="filename">distinfo</code> with <span class="command"><strong>make 8614 <code class="filename">distinfo</code> with <span class="command"><strong>make
8602 makesum</strong></span>.</p></li> 8615 makesum</strong></span>.</p></li>
8603</ol></div> 8616</ol></div>
8604</div> 8617</div>
8605<div class="sect2"> 8618<div class="sect2">
8606<div class="titlepage"><div><div><h3 class="title"> 8619<div class="titlepage"><div><div><h3 class="title">
8607<a name="perl-scripts"></a>21.4.5. Packages containing Perl scripts</h3></div></div></div> 8620<a name="perl-scripts"></a>21.4.5. Packages containing Perl scripts</h3></div></div></div>
8608<p>If your package contains interpreted Perl scripts, add 8621<p>If your package contains interpreted Perl scripts, add
8609 <span class="quote">&#8220;<span class="quote">perl</span>&#8221;</span> to the <code class="varname">USE_TOOLS</code> variable 8622 <span class="quote">&#8220;<span class="quote">perl</span>&#8221;</span> to the <code class="varname">USE_TOOLS</code> variable
8610 and set <code class="varname">REPLACE_PERL</code> to ensure that the proper 8623 and set <code class="varname">REPLACE_PERL</code> to ensure that the proper
8611 interpreter path is set. <code class="varname">REPLACE_PERL</code> should 8624 interpreter path is set. <code class="varname">REPLACE_PERL</code> should
8612 contain a list of scripts, relative to <code class="varname">WRKSRC</code>, 8625 contain a list of scripts, relative to <code class="varname">WRKSRC</code>,
8613 that you want adjusted. Every occurrence of 8626 that you want adjusted. Every occurrence of
8614 <code class="filename">*/bin/perl</code> in a she-bang line will be 8627 <code class="filename">*/bin/perl</code> in a she-bang line will be
8615 replaced with the full path to the Perl executable.</p> 8628 replaced with the full path to the Perl executable.</p>
8616<p>If a particular version of Perl is needed, set the 8629<p>If a particular version of Perl is needed, set the
8617 <code class="varname">PERL5_REQD</code> variable to the version number. The 8630 <code class="varname">PERL5_REQD</code> variable to the version number. The
8618 default is <span class="quote">&#8220;<span class="quote">5.0</span>&#8221;</span>.</p> 8631 default is <span class="quote">&#8220;<span class="quote">5.0</span>&#8221;</span>.</p>
8619<p>See <a class="xref" href="#perl-modules" title="21.6.6. Packages installing Perl modules">Section 21.6.6, &#8220;Packages installing Perl modules&#8221;</a> for information 8632<p>See <a class="xref" href="#perl-modules" title="21.6.6. Packages installing Perl modules">Section 21.6.6, &#8220;Packages installing Perl modules&#8221;</a> for information
8620 about handling Perl modules.</p> 8633 about handling Perl modules.</p>
8621<p>There is also the <code class="varname">REPLACE_PERL6</code> variable 8634<p>There is also the <code class="varname">REPLACE_PERL6</code> variable
8622 for the language now known as Raku.</p> 8635 for the language now known as Raku.</p>
8623</div> 8636</div>
8624<div class="sect2"> 8637<div class="sect2">
8625<div class="titlepage"><div><div><h3 class="title"> 8638<div class="titlepage"><div><div><h3 class="title">
8626<a name="shell-scripts"></a>21.4.6. Packages containing shell scripts</h3></div></div></div> 8639<a name="shell-scripts"></a>21.4.6. Packages containing shell scripts</h3></div></div></div>
8627<p><code class="varname">REPLACE_SH</code>, 8640<p><code class="varname">REPLACE_SH</code>,
8628 <code class="varname">REPLACE_BASH</code>, <code class="varname">REPLACE_CSH</code>, 8641 <code class="varname">REPLACE_BASH</code>, <code class="varname">REPLACE_CSH</code>,
8629 and <code class="varname">REPLACE_KSH</code> can be used to replace shell 8642 and <code class="varname">REPLACE_KSH</code> can be used to replace shell
8630 she-bangs in files. Please use the appropriate one, preferring 8643 she-bangs in files. Please use the appropriate one, preferring
8631 <code class="varname">REPLACE_SH</code> when this shell is sufficient. 8644 <code class="varname">REPLACE_SH</code> when this shell is sufficient.
8632 Each should contain a list of scripts, relative to 8645 Each should contain a list of scripts, relative to
8633 <code class="varname">WRKSRC</code>, that you want adjusted. Every 8646 <code class="varname">WRKSRC</code>, that you want adjusted. Every
8634 occurrence of the matching shell in a she-bang line will be 8647 occurrence of the matching shell in a she-bang line will be
8635 replaced with the full path to the shell executable. 8648 replaced with the full path to the shell executable.
8636 When using <code class="varname">REPLACE_BASH</code>, don't forget to add 8649 When using <code class="varname">REPLACE_BASH</code>, don't forget to add
8637 <code class="filename">bash</code> to <code class="varname">USE_TOOLS</code>.</p> 8650 <code class="filename">bash</code> to <code class="varname">USE_TOOLS</code>.</p>
8638</div> 8651</div>
8639<div class="sect2"> 8652<div class="sect2">
8640<div class="titlepage"><div><div><h3 class="title"> 8653<div class="titlepage"><div><div><h3 class="title">
8641<a name="other-programming-languages"></a>21.4.7. Other programming languages</h3></div></div></div> 8654<a name="other-programming-languages"></a>21.4.7. Other programming languages</h3></div></div></div>
8642<p>There are further similar REPLACE variables available, e.g., 8655<p>There are further similar REPLACE variables available, e.g.,
8643 <code class="varname">REPLACE_AWK</code> for packages containing awk scripts, 8656 <code class="varname">REPLACE_AWK</code> for packages containing awk scripts,
8644 and <code class="varname">REPLACE_R</code> for R. These two, like the others 8657 and <code class="varname">REPLACE_R</code> for R. These two, like the others
8645 noted above, have their actions defined centrally in 8658 noted above, have their actions defined centrally in
8646 <code class="filename">mk/configure/replace-interpreter.mk</code>. Other 8659 <code class="filename">mk/configure/replace-interpreter.mk</code>. Other
8647 languages define the actions of these variables within their own 8660 languages define the actions of these variables within their own
8648 dedicated part of the tree, e.g., <code class="varname">REPLACE_PHP</code> is 8661 dedicated part of the tree, e.g., <code class="varname">REPLACE_PHP</code> is
8649 actioned in <code class="filename">lang/php/phpversion.mk</code>, and 8662 actioned in <code class="filename">lang/php/phpversion.mk</code>, and
8650 <code class="varname">REPLACE_PYTHON</code> is actioned in 8663 <code class="varname">REPLACE_PYTHON</code> is actioned in
8651 <code class="filename">lang/python/application.mk</code>. For other languages, 8664 <code class="filename">lang/python/application.mk</code>. For other languages,
8652 consult the mk files found within their specific directories (the 8665 consult the mk files found within their specific directories (the
8653 naming convention varies), or check the list found in 8666 naming convention varies), or check the list found in
8654 <a class="xref" href="#help-topics" title="Appendix E. Help topics">Appendix E, <i>Help topics</i></a>.</p> 8667 <a class="xref" href="#help-topics" title="Appendix E. Help topics">Appendix E, <i>Help topics</i></a>.</p>
8655<p>Currently, special handling for other languages varies 8668<p>Currently, special handling for other languages varies
8656 in pkgsrc. If a compiler package provides a 8669 in pkgsrc. If a compiler package provides a
8657 <code class="filename">buildlink3.mk</code> file, include that, otherwise 8670 <code class="filename">buildlink3.mk</code> file, include that, otherwise
8658 just add a (build) dependency on the appropriate compiler 8671 just add a (build) dependency on the appropriate compiler
8659 package.</p> 8672 package.</p>
8660</div> 8673</div>
8661</div> 8674</div>
8662<div class="sect1"> 8675<div class="sect1">
8663<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 8676<div class="titlepage"><div><div><h2 class="title" style="clear: both">
8664<a name="fixes.build"></a>21.5. The <span class="emphasis"><em>build</em></span> phase</h2></div></div></div> 8677<a name="fixes.build"></a>21.5. The <span class="emphasis"><em>build</em></span> phase</h2></div></div></div>
8665<p>The most common failures when building a package are that 8678<p>The most common failures when building a package are that
8666 some platforms do not provide certain header files, functions or 8679 some platforms do not provide certain header files, functions or
8667 libraries, or they provide the functions in a library that the 8680 libraries, or they provide the functions in a library that the
8668 original package author didn't know. To work around this, you 8681 original package author didn't know. To work around this, you
8669 can rewrite the source code in most cases so that it does not 8682 can rewrite the source code in most cases so that it does not
8670 use the missing functions or provides a replacement function.</p> 8683 use the missing functions or provides a replacement function.</p>
8671<div class="sect2"> 8684<div class="sect2">
8672<div class="titlepage"><div><div><h3 class="title"> 8685<div class="titlepage"><div><div><h3 class="title">
8673<a name="fixes.build.cpp"></a>21.5.1. Compiling C and C++ code conditionally</h3></div></div></div> 8686<a name="fixes.build.cpp"></a>21.5.1. Compiling C and C++ code conditionally</h3></div></div></div>
8674<p>If a package already comes with a GNU configure script, the 8687<p>If a package already comes with a GNU configure script, the
8675 preferred way to fix the build failure is to change the 8688 preferred way to fix the build failure is to change the
8676 configure script, not the code. In the other cases, you can 8689 configure script, not the code. In the other cases, you can
8677 utilize the C preprocessor, which defines certain macros 8690 utilize the C preprocessor, which defines certain macros
8678 depending on the operating system and hardware architecture it 8691 depending on the operating system and hardware architecture it
8679 compiles for. These macros can be queried using for example 8692 compiles for. These macros can be queried using for example
8680 <code class="varname">#if defined(__i386)</code>. Almost every operating 8693 <code class="varname">#if defined(__i386)</code>. Almost every operating
8681 system, hardware architecture and compiler has its own macro. 8694 system, hardware architecture and compiler has its own macro.
8682 For example, if the macros <code class="varname">__GNUC__</code>, 8695 For example, if the macros <code class="varname">__GNUC__</code>,
8683 <code class="varname">__i386__</code> and <code class="varname">__NetBSD__</code> 8696 <code class="varname">__i386__</code> and <code class="varname">__NetBSD__</code>
8684 are all defined, you know that you are using NetBSD on an i386 8697 are all defined, you know that you are using NetBSD on an i386
8685 compatible CPU, and your compiler is GCC.</p> 8698 compatible CPU, and your compiler is GCC.</p>
8686<p>The list of the following macros for hardware and 8699<p>The list of the following macros for hardware and
8687 operating system depends on the compiler that is used. For 8700 operating system depends on the compiler that is used. For
8688 example, if you want to conditionally compile code on Solaris, 8701 example, if you want to conditionally compile code on Solaris,
8689 don't use <code class="varname">__sun__</code>, as the SunPro compiler 8702 don't use <code class="varname">__sun__</code>, as the SunPro compiler
8690 does not define it. Use <code class="varname">__sun</code> instead.</p> 8703 does not define it. Use <code class="varname">__sun</code> instead.</p>
8691<div class="sect3"> 8704<div class="sect3">
8692<div class="titlepage"><div><div><h4 class="title"> 8705<div class="titlepage"><div><div><h4 class="title">
8693<a name="fixes.build.cpp.os"></a>21.5.1.1. C preprocessor macros to identify the operating system</h4></div></div></div> 8706<a name="fixes.build.cpp.os"></a>21.5.1.1. C preprocessor macros to identify the operating system</h4></div></div></div>
8694<p>To distinguish between specific NetBSD versions, 8707<p>To distinguish between specific NetBSD versions,
8695 you should use the following code.</p> 8708 you should use the following code.</p>
8696<pre class="programlisting"> 8709<pre class="programlisting">
8697#ifdef __NetBSD__ 8710#ifdef __NetBSD__
8698#include &lt;sys/param.h&gt; 8711#include &lt;sys/param.h&gt;
8699#if __NetBSD_Prereq__(9,99,17) 8712#if __NetBSD_Prereq__(9,99,17)
8700/* use a newer feature */ 8713/* use a newer feature */
8701#else 8714#else
8702/* older code */ 8715/* older code */
8703#endif 8716#endif
8704#endif 8717#endif
8705 8718
8706#ifndef _WIN32 8719#ifndef _WIN32
8707/* Unix-like specific code */ 8720/* Unix-like specific code */
8708#endif 8721#endif
8709</pre> 8722</pre>
8710<p>To distinguish between 4.4 BSD-derived systems and the 8723<p>To distinguish between 4.4 BSD-derived systems and the
8711 rest of the world, you should use the following code.</p> 8724 rest of the world, you should use the following code.</p>
8712<pre class="programlisting"> 8725<pre class="programlisting">
8713#include &lt;sys/param.h&gt; 8726#include &lt;sys/param.h&gt;
8714#if (defined(BSD) &amp;&amp; BSD &gt;= 199306) 8727#if (defined(BSD) &amp;&amp; BSD &gt;= 199306)
8715/* BSD-specific code goes here */ 8728/* BSD-specific code goes here */
8716#else 8729#else
8717/* non-BSD-specific code goes here */ 8730/* non-BSD-specific code goes here */
8718#endif 8731#endif
8719</pre> 8732</pre>
8720<p>You can also test for the following macros:</p> 8733<p>You can also test for the following macros:</p>
8721<pre class="programlisting"> 8734<pre class="programlisting">
8722Cygwin __CYGWIN__ 8735Cygwin __CYGWIN__
8723DragonFly __DragonFly__ 8736DragonFly __DragonFly__
8724FreeBSD __FreeBSD__ 8737FreeBSD __FreeBSD__
8725Haiku __HAIKU__ 8738Haiku __HAIKU__
8726Interix __INTERIX 8739Interix __INTERIX
8727IRIX __sgi (TODO: get a definite source for this) 8740IRIX __sgi (TODO: get a definite source for this)
8728Linux __linux 8741Linux __linux
8729Mac OS X __APPLE__ 8742Mac OS X __APPLE__
8730MirBSD __MirBSD__ (__OpenBSD__ is also defined) 8743MirBSD __MirBSD__ (__OpenBSD__ is also defined)
8731Minix3 __minix 8744Minix3 __minix
8732NetBSD __NetBSD__ 8745NetBSD __NetBSD__
8733OpenBSD __OpenBSD__ 8746OpenBSD __OpenBSD__
8734Solaris sun, __sun 8747Solaris sun, __sun
8735</pre> 8748</pre>
8736</div> 8749</div>
8737<div class="sect3"> 8750<div class="sect3">
8738<div class="titlepage"><div><div><h4 class="title"> 8751<div class="titlepage"><div><div><h4 class="title">
8739<a name="fixes.build.cpp.arch"></a>21.5.1.2. C preprocessor macros to identify the hardware architecture</h4></div></div></div> 8752<a name="fixes.build.cpp.arch"></a>21.5.1.2. C preprocessor macros to identify the hardware architecture</h4></div></div></div>
8740<pre class="programlisting"> 8753<pre class="programlisting">
8741i386 i386, __i386, __i386__ 8754i386 i386, __i386, __i386__
8742x86-64 __amd64__, __x86_64__ 8755x86-64 __amd64__, __x86_64__
8743ARM __arm__ 8756ARM __arm__
8744MIPS __mips 8757MIPS __mips
8745SPARC sparc, __sparc 8758SPARC sparc, __sparc
8746PowerPC __powerpc 8759PowerPC __powerpc
8747</pre> 8760</pre>
8748</div> 8761</div>
8749<div class="sect3"> 8762<div class="sect3">
8750<div class="titlepage"><div><div><h4 class="title"> 8763<div class="titlepage"><div><div><h4 class="title">
8751<a name="fixes.build.cpp.compiler"></a>21.5.1.3. C preprocessor macros to identify the compiler</h4></div></div></div> 8764<a name="fixes.build.cpp.compiler"></a>21.5.1.3. C preprocessor macros to identify the compiler</h4></div></div></div>
8752<pre class="programlisting"> 8765<pre class="programlisting">
8753GCC __GNUC__ (major version), __GNUC_MINOR__ 8766GCC __GNUC__ (major version), __GNUC_MINOR__
8754MIPSpro _COMPILER_VERSION (0x741 for MIPSpro 7.41) 8767MIPSpro _COMPILER_VERSION (0x741 for MIPSpro 7.41)
8755SunPro __SUNPRO_C (0x570 for Sun C 5.7) 8768SunPro __SUNPRO_C (0x570 for Sun C 5.7)
8756SunPro C++ __SUNPRO_CC (0x580 for Sun C++ 5.8) 8769SunPro C++ __SUNPRO_CC (0x580 for Sun C++ 5.8)
8757</pre> 8770</pre>
8758</div> 8771</div>
8759</div> 8772</div>
8760<div class="sect2"> 8773<div class="sect2">
8761<div class="titlepage"><div><div><h3 class="title"> 8774<div class="titlepage"><div><div><h3 class="title">
8762<a name="compiler-bugs"></a>21.5.2. How to handle compiler bugs</h3></div></div></div> 8775<a name="compiler-bugs"></a>21.5.2. How to handle compiler bugs</h3></div></div></div>
8763<p>Some source files trigger bugs in the compiler, based on 8776<p>Some source files trigger bugs in the compiler, based on
8764 combinations of compiler version and architecture and almost 8777 combinations of compiler version and architecture and almost
8765 always relation to optimisation being enabled. Common symptoms 8778 always relation to optimisation being enabled. Common symptoms
8766 are gcc internal errors or never finishing compiling a 8779 are gcc internal errors or never finishing compiling a
8767 file.</p> 8780 file.</p>
8768<p>Typically, a workaround involves testing the 8781<p>Typically, a workaround involves testing the
8769 <code class="varname">MACHINE_ARCH</code> and compiler version, disabling 8782 <code class="varname">MACHINE_ARCH</code> and compiler version, disabling
8770 optimisation for that combination of file, 8783 optimisation for that combination of file,
8771 <code class="varname">MACHINE_ARCH</code> and compiler.</p> 8784 <code class="varname">MACHINE_ARCH</code> and compiler.</p>
8772<p>This used to be a big problem in the past, but is rarely 8785<p>This used to be a big problem in the past, but is rarely
8773 needed now as compiler technology has matured. If you still need 8786 needed now as compiler technology has matured. If you still need
8774 to add a compiler specific workaround, please do so in the file 8787 to add a compiler specific workaround, please do so in the file
8775 <code class="filename">hacks.mk</code> and describe the symptom and 8788 <code class="filename">hacks.mk</code> and describe the symptom and
8776 compiler version as detailed as possible.</p> 8789 compiler version as detailed as possible.</p>
8777</div> 8790</div>
8778<div class="sect2"> 8791<div class="sect2">
8779<div class="titlepage"><div><div><h3 class="title"> 8792<div class="titlepage"><div><div><h3 class="title">
8780<a name="fixes.build.header"></a>21.5.3. No such file or directory</h3></div></div></div> 8793<a name="fixes.build.header"></a>21.5.3. No such file or directory</h3></div></div></div>
8781<p>Compilation sometimes fails with an error message like this:</p> 8794<p>Compilation sometimes fails with an error message like this:</p>
8782<pre class="programlisting"> 8795<pre class="programlisting">
8783.../x11/gtk3/work/gtk+-3.24.12/gdk/gdktypes.h:35:10: 8796.../x11/gtk3/work/gtk+-3.24.12/gdk/gdktypes.h:35:10:
8784 fatal error: pango/pango.h: No such file or directory 8797 fatal error: pango/pango.h: No such file or directory
8785</pre> 8798</pre>
8786<p>The proper way to fix this problem depends on the type of the 8799<p>The proper way to fix this problem depends on the type of the
8787header, which is described in the following sections.</p> 8800header, which is described in the following sections.</p>
8788<div class="sect3"> 8801<div class="sect3">
8789<div class="titlepage"><div><div><h4 class="title"> 8802<div class="titlepage"><div><div><h4 class="title">
8790<a name="fixes.build.header.bl3"></a>21.5.3.1. Headers from other packages</h4></div></div></div> 8803<a name="fixes.build.header.bl3"></a>21.5.3.1. Headers from other packages</h4></div></div></div>
8791<p>If the header name looks like it comes from a different package, 8804<p>If the header name looks like it comes from a different package,
8792that other package should be included via the buildlink3 8805that other package should be included via the buildlink3
8793framework.</p> 8806framework.</p>
8794<p>First, look whether the header is somewhere in the buildlink3 8807<p>First, look whether the header is somewhere in the buildlink3
8795directory below <code class="varname">WRKDIR</code>. In the above case of 8808directory below <code class="varname">WRKDIR</code>. In the above case of
8796the missing Pango header:</p> 8809the missing Pango header:</p>
8797<pre class="programlisting"> 8810<pre class="programlisting">
8798<code class="prompt">$</code> find work/.buildlink/ -print | grep -F pango/pango.h 8811<code class="prompt">$</code> find work/.buildlink/ -print | grep -F pango/pango.h
8799</pre> 8812</pre>
8800<p>In the case of Pango, the output is:</p> 8813<p>In the case of Pango, the output is:</p>
8801<pre class="programlisting"> 8814<pre class="programlisting">
8802work/.buildlink/include/pango-1.0/pango/pango.h 8815work/.buildlink/include/pango-1.0/pango/pango.h
8803</pre> 8816</pre>
8804<p>If the <code class="filename">pango/pango.h</code> file were placed directly 8817<p>If the <code class="filename">pango/pango.h</code> file were placed directly
8805in the <code class="filename">.buildlink</code> directory, it would have been 8818in the <code class="filename">.buildlink</code> directory, it would have been
8806found automatically. There is an extra <code class="filename">pango-1.0</code> 8819found automatically. There is an extra <code class="filename">pango-1.0</code>
8807path component though, which means that the compiler command line must 8820path component though, which means that the compiler command line must
8808contain an option of the form 8821contain an option of the form
8809<code class="literal">-I${BUILDLINK3_PREFIX.pango}/include/pango-1.0</code>. In 8822<code class="literal">-I${BUILDLINK3_PREFIX.pango}/include/pango-1.0</code>. In
8810most cases this option is generated by the configure script, which can be examined using:</p> 8823most cases this option is generated by the configure script, which can be examined using:</p>
8811<pre class="programlisting"> 8824<pre class="programlisting">
8812<code class="prompt">$</code> $ grep -o '[-]I[^[:space:]]*/pango[^[:space:]]*' work/*/Makefile 8825<code class="prompt">$</code> $ grep -o '[-]I[^[:space:]]*/pango[^[:space:]]*' work/*/Makefile
8813-I/usr/pkg/include/pango-1.0 8826-I/usr/pkg/include/pango-1.0
8814-I/usr/pkg/include/pango-1.0 8827-I/usr/pkg/include/pango-1.0
8815-I/usr/pkg/include/pango-1.0 8828-I/usr/pkg/include/pango-1.0
8816-I/usr/pkg/include/pango-1.0 8829-I/usr/pkg/include/pango-1.0
8817-I/usr/pkg/include/pango-1.0 8830-I/usr/pkg/include/pango-1.0
8818</pre> 8831</pre>
8819<p>This looks good. These options are transformed by the buildlink 8832<p>This looks good. These options are transformed by the buildlink
8820wrapper to refer to the correct path inside 8833wrapper to refer to the correct path inside
8821<code class="filename">work/.buildlink</code>.</p> 8834<code class="filename">work/.buildlink</code>.</p>
8822<p>Since the compilation fails though, examine the compiler command 8835<p>Since the compilation fails though, examine the compiler command
8823lines in <code class="filename">work/.work.log</code> to see whether the 8836lines in <code class="filename">work/.work.log</code> to see whether the
8824<code class="literal">-I</code> option is included in the particular command 8837<code class="literal">-I</code> option is included in the particular command
8825line.</p> 8838line.</p>
8826<p>To further analyze the situation, run <span class="command"><strong>bmake 8839<p>To further analyze the situation, run <span class="command"><strong>bmake
8827build-env</strong></span>, which sets up an interactive, realistic environment 8840build-env</strong></span>, which sets up an interactive, realistic environment
8828including all the pkgsrc wrapper commands and environment variables. From 8841including all the pkgsrc wrapper commands and environment variables. From
8829there, try to compile some simple example programs that use the 8842there, try to compile some simple example programs that use the
8830header.</p> 8843header.</p>
8831</div> 8844</div>
8832<div class="sect3"> 8845<div class="sect3">
8833<div class="titlepage"><div><div><h4 class="title"> 8846<div class="titlepage"><div><div><h4 class="title">
8834<a name="fixes.build.header.gen"></a>21.5.3.2. Headers generated during the build</h4></div></div></div> 8847<a name="fixes.build.header.gen"></a>21.5.3.2. Headers generated during the build</h4></div></div></div>
8835<p>If the name of the header seems to come from the package itself, 8848<p>If the name of the header seems to come from the package itself,
8836and if the build is run with parallel jobs, the package may have some 8849and if the build is run with parallel jobs, the package may have some
8837undeclared dependencies between the <code class="filename">.c</code> and the 8850undeclared dependencies between the <code class="filename">.c</code> and the
8838<code class="filename">.h</code> files, and a C file is compiled before its 8851<code class="filename">.h</code> files, and a C file is compiled before its
8839required header is generated.</p> 8852required header is generated.</p>
8840<p>To see whether the build runs with parallel jobs, run 8853<p>To see whether the build runs with parallel jobs, run
8841<span class="command"><strong>bmake show-all-build | grep JOBS</strong></span>. Its output looks 8854<span class="command"><strong>bmake show-all-build | grep JOBS</strong></span>. Its output looks
8842like this:</p> 8855like this:</p>
8843<pre class="programlisting"> 8856<pre class="programlisting">
8844 usr MAKE_JOBS= 7 8857 usr MAKE_JOBS= 7
8845 pkg MAKE_JOBS_SAFE # undefined 8858 pkg MAKE_JOBS_SAFE # undefined
8846 def _MAKE_JOBS_N= 7 8859 def _MAKE_JOBS_N= 7
8847</pre> 8860</pre>
8848<p>In this case the pkgsrc user has asked pkgsrc to build packages 8861<p>In this case the pkgsrc user has asked pkgsrc to build packages
8849with 7 jobs in parallel (<code class="varname">MAKE_JOBS</code>). The 8862with 7 jobs in parallel (<code class="varname">MAKE_JOBS</code>). The
8850package could have disabled parallel builds by setting 8863package could have disabled parallel builds by setting
8851<code class="varname">MAKE_JOBS_SAFE</code> to <code class="literal">no</code>, but 8864<code class="varname">MAKE_JOBS_SAFE</code> to <code class="literal">no</code>, but
8852in this case it hasn't.</p> 8865in this case it hasn't.</p>
8853<p>To see whether the build failure is caused by parallel builds, 8866<p>To see whether the build failure is caused by parallel builds,
8854first save the exact error message and a bit of context, maybe you need 8867first save the exact error message and a bit of context, maybe you need
8855it later for reporting a bug. Next, run:</p> 8868it later for reporting a bug. Next, run:</p>
8856<pre class="programlisting"> 8869<pre class="programlisting">
8857MAKE_JOBS_SAFE=no bmake clean build 8870MAKE_JOBS_SAFE=no bmake clean build
8858</pre> 8871</pre>
8859<p>If that succeeds, <a class="ulink" href="https://www.NetBSD.org/cgi-bin/sendpr.cgi?gndb=netbsd" target="_top">file a bug 8872<p>If that succeeds, <a class="ulink" href="https://www.NetBSD.org/cgi-bin/sendpr.cgi?gndb=netbsd" target="_top">file a bug
8860report</a> against the pkgsrc package, including the exact error 8873report</a> against the pkgsrc package, including the exact error
8861message and the contents of your <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> file.</p> 8874message and the contents of your <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> file.</p>
8862</div> 8875</div>
8863<div class="sect3"> 8876<div class="sect3">
8864<div class="titlepage"><div><div><h4 class="title"> 8877<div class="titlepage"><div><div><h4 class="title">
8865<a name="fixes.build.header.symlink"></a>21.5.3.3. Symlinks</h4></div></div></div> 8878<a name="fixes.build.header.symlink"></a>21.5.3.3. Symlinks</h4></div></div></div>
8866<p>Pkgsrc does not work reliably if any of 8879<p>Pkgsrc does not work reliably if any of
8867<code class="varname">LOCALBASE</code>, <code class="varname">VARBASE</code> or 8880<code class="varname">LOCALBASE</code>, <code class="varname">VARBASE</code> or
8868<code class="varname">WRKDIR</code> contains a symlink. Since 2019Q2, the pkgsrc 8881<code class="varname">WRKDIR</code> contains a symlink. Since 2019Q2, the pkgsrc
8869bootstrap program prevents installing pkgsrc in symlink-based 8882bootstrap program prevents installing pkgsrc in symlink-based
8870directories. Existing pkgsrc installations are not checked for symlinks 8883directories. Existing pkgsrc installations are not checked for symlinks
8871though.</p> 8884though.</p>
8872<p>The "No such file or directory" error messages are a typical 8885<p>The "No such file or directory" error messages are a typical
8873symptom of symlinks, and it's quite difficult to find out that this is 8886symptom of symlinks, and it's quite difficult to find out that this is
8874the actual cause.</p> 8887the actual cause.</p>
8875</div> 8888</div>
8876<div class="sect3"> 8889<div class="sect3">
8877<div class="titlepage"><div><div><h4 class="title"> 8890<div class="titlepage"><div><div><h4 class="title">
8878<a name="fixes.build.header.stale"></a>21.5.3.4. Stale working directories</h4></div></div></div> 8891<a name="fixes.build.header.stale"></a>21.5.3.4. Stale working directories</h4></div></div></div>
8879<p>When building a hierarchy of packages, it may happen that one 8892<p>When building a hierarchy of packages, it may happen that one
8880package is built and then pkgsrc is updated. This situation can provoke 8893package is built and then pkgsrc is updated. This situation can provoke
8881various hard to diagnose build errors. To clean up the situation:</p> 8894various hard to diagnose build errors. To clean up the situation:</p>
8882<pre class="programlisting"> 8895<pre class="programlisting">
8883<code class="prompt">$</code> (cd ../../ &amp;&amp; cat mk/bsd.pkg.mk &gt;/dev/null &amp;&amp; rm -rf */*/work) 8896<code class="prompt">$</code> (cd ../../ &amp;&amp; cat mk/bsd.pkg.mk &gt;/dev/null &amp;&amp; rm -rf */*/work)
8884</pre> 8897</pre>
8885<p>(The only purpose of the <code class="filename">bsd.pkg.mk</code> is to 8898<p>(The only purpose of the <code class="filename">bsd.pkg.mk</code> is to
8886prevent running this command in the wrong directory.)</p> 8899prevent running this command in the wrong directory.)</p>
8887<p>If you have set <code class="varname">WRKOBJDIR</code> in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, remove 8900<p>If you have set <code class="varname">WRKOBJDIR</code> in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, remove
8888that directory as well.</p> 8901that directory as well.</p>
8889</div> 8902</div>
8890<div class="sect3"> 8903<div class="sect3">
8891<div class="titlepage"><div><div><h4 class="title"> 8904<div class="titlepage"><div><div><h4 class="title">
8892<a name="fixes.build.header.misc"></a>21.5.3.5. Other possible reasons</h4></div></div></div> 8905<a name="fixes.build.header.misc"></a>21.5.3.5. Other possible reasons</h4></div></div></div>
8893<p>On platforms other than BSD, third-party packages are installed in 8906<p>On platforms other than BSD, third-party packages are installed in
8894<code class="filename">/usr/include</code>, together with the base system. This 8907<code class="filename">/usr/include</code>, together with the base system. This
8895means that pkgsrc cannot distinguish between headers provided by the base 8908means that pkgsrc cannot distinguish between headers provided by the base
8896system (which it needs) and headers from third-party packages (which are 8909system (which it needs) and headers from third-party packages (which are
8897often included in pkgsrc as well). This can lead to subtle version 8910often included in pkgsrc as well). This can lead to subtle version
8898mismatches.</p> 8911mismatches.</p>
8899<p>In pkgsrc installations that have been active for several years, it 8912<p>In pkgsrc installations that have been active for several years, it
8900may happen that some files are manually deleted. To exclude this unlikely 8913may happen that some files are manually deleted. To exclude this unlikely
8901reason, run <span class="command"><strong>pkg_admin check</strong></span>.</p> 8914reason, run <span class="command"><strong>pkg_admin check</strong></span>.</p>
8902<p>It may help to run <span class="command"><strong>pkg_admin rebuild-tree</strong></span> to 8915<p>It may help to run <span class="command"><strong>pkg_admin rebuild-tree</strong></span> to
8903check/fix dependencies.</p> 8916check/fix dependencies.</p>
8904<p>If all of the above doesn't help, see <a class="xref" href="#help-user" title="Chapter 2. Getting help">Chapter 2, <i>Getting help</i></a> 8917<p>If all of the above doesn't help, see <a class="xref" href="#help-user" title="Chapter 2. Getting help">Chapter 2, <i>Getting help</i></a>
8905for contact information. Be prepared to describe what you have tried so 8918for contact information. Be prepared to describe what you have tried so
8906far and what any error messages were.</p> 8919far and what any error messages were.</p>
8907</div> 8920</div>
8908</div> 8921</div>
8909<div class="sect2"> 8922<div class="sect2">
8910<div class="titlepage"><div><div><h3 class="title"> 8923<div class="titlepage"><div><div><h3 class="title">
8911<a name="undefined-reference"></a>21.5.4. Undefined reference to <span class="quote">&#8220;<span class="quote">...</span>&#8221;</span> 8924<a name="undefined-reference"></a>21.5.4. Undefined reference to <span class="quote">&#8220;<span class="quote">...</span>&#8221;</span>
8912</h3></div></div></div> 8925</h3></div></div></div>
8913<p>This error message often means that a package did not 8926<p>This error message often means that a package did not
8914 link to a shared library it needs. The following functions are 8927 link to a shared library it needs. The following functions are
8915 known to cause this error message over and over.</p> 8928 known to cause this error message over and over.</p>
8916<div class="informaltable"> 8929<div class="informaltable">
8917<a name="undefined-reference-functions"></a><table class="informaltable" border="1"> 8930<a name="undefined-reference-functions"></a><table class="informaltable" border="1">
8918<colgroup> 8931<colgroup>
8919<col> 8932<col>
8920<col> 8933<col>
8921<col> 8934<col>
8922</colgroup> 8935</colgroup>
8923<thead><tr> 8936<thead><tr>
8924<th>Function</th> 8937<th>Function</th>
8925<th>Library</th> 8938<th>Library</th>
8926<th>Affected platforms</th> 8939<th>Affected platforms</th>
8927</tr></thead> 8940</tr></thead>
8928<tbody> 8941<tbody>
8929<tr> 8942<tr>
8930<td>accept, bind, connect</td> 8943<td>accept, bind, connect</td>
8931<td>-lsocket</td> 8944<td>-lsocket</td>
8932<td>Solaris</td> 8945<td>Solaris</td>
8933</tr> 8946</tr>
8934<tr> 8947<tr>
8935<td>crypt</td> 8948<td>crypt</td>
8936<td>-lcrypt</td> 8949<td>-lcrypt</td>
8937<td>DragonFly, NetBSD</td> 8950<td>DragonFly, NetBSD</td>
8938</tr> 8951</tr>
8939<tr> 8952<tr>
8940<td>dlopen, dlsym</td> 8953<td>dlopen, dlsym</td>
8941<td>-ldl</td> 8954<td>-ldl</td>
8942<td>Linux</td> 8955<td>Linux</td>
8943</tr> 8956</tr>
8944<tr> 8957<tr>
8945<td>gethost*</td> 8958<td>gethost*</td>
8946<td>-lnsl</td> 8959<td>-lnsl</td>
8947<td>Solaris</td> 8960<td>Solaris</td>
8948</tr> 8961</tr>
8949<tr> 8962<tr>
8950<td>inet_aton</td> 8963<td>inet_aton</td>
8951<td>-lresolv</td> 8964<td>-lresolv</td>
8952<td>Solaris</td> 8965<td>Solaris</td>
8953</tr> 8966</tr>
8954<tr> 8967<tr>
8955<td>nanosleep, sem_*, timer_*</td> 8968<td>nanosleep, sem_*, timer_*</td>
8956<td>-lrt</td> 8969<td>-lrt</td>
8957<td>Solaris</td> 8970<td>Solaris</td>
8958</tr> 8971</tr>
8959<tr> 8972<tr>
8960<td>openpty</td> 8973<td>openpty</td>
8961<td>-lutil</td> 8974<td>-lutil</td>
8962<td>Linux</td> 8975<td>Linux</td>
8963</tr> 8976</tr>
8964</tbody> 8977</tbody>
8965</table> 8978</table>
8966</div> 8979</div>
8967<p>To fix these linker errors, it is often sufficient to add 8980<p>To fix these linker errors, it is often sufficient to add
8968 <code class="literal">LIBS.<em class="replaceable"><code>OperatingSystem</code></em>+= 8981 <code class="literal">LIBS.<em class="replaceable"><code>OperatingSystem</code></em>+=
8969 -l<em class="replaceable"><code>foo</code></em></code> to the package 8982 -l<em class="replaceable"><code>foo</code></em></code> to the package
8970 <code class="filename">Makefile</code> and then run <span class="command"><strong>bmake clean; 8983 <code class="filename">Makefile</code> and then run <span class="command"><strong>bmake clean;
8971 bmake</strong></span>.</p> 8984 bmake</strong></span>.</p>
8972<div class="sect3"> 8985<div class="sect3">
8973<div class="titlepage"><div><div><h4 class="title"> 8986<div class="titlepage"><div><div><h4 class="title">
8974<a name="undefined-reference-sunpro"></a>21.5.4.1. The SunPro compiler and inline functions</h4></div></div></div> 8987<a name="undefined-reference-sunpro"></a>21.5.4.1. The SunPro compiler and inline functions</h4></div></div></div>
8975<p>When you are using the SunPro compiler, there is another 8988<p>When you are using the SunPro compiler, there is another
8976possibility. That compiler cannot handle the following code:</p> 8989possibility. That compiler cannot handle the following code:</p>
8977<pre class="programlisting"> 8990<pre class="programlisting">
8978extern int extern_func(int); 8991extern int extern_func(int);
8979 8992
8980static inline int 8993static inline int
8981inline_func(int x) 8994inline_func(int x)
8982{ 8995{
8983 return extern_func(x); 8996 return extern_func(x);
8984} 8997}
8985 8998
8986int main(void) 8999int main(void)
8987{ 9000{
8988 return 0; 9001 return 0;
8989} 9002}
8990</pre> 9003</pre>
8991<p>It generates the code for <code class="function">inline_func</code> even if 9004<p>It generates the code for <code class="function">inline_func</code> even if
8992that function is never used. This code then refers to 9005that function is never used. This code then refers to
8993<code class="function">extern_func</code>, which can usually not be resolved. To 9006<code class="function">extern_func</code>, which can usually not be resolved. To
8994solve this problem you can try to tell the package to disable inlining 9007solve this problem you can try to tell the package to disable inlining
8995of functions.</p> 9008of functions.</p>
8996</div> 9009</div>
 9010<div class="sect3">
 9011<div class="titlepage"><div><div><h4 class="title">
 9012<a name="undefined-reference-atomic"></a>21.5.4.2. Missing atomic functions</h4></div></div></div>
 9013<p>When building for older machine architectures (e.g., i386, PowerPC),
 9014 builds may fail because the package expects modern 64-bit atomic functions
 9015 which the underlying hardware either doesn't support, or will only support
 9016 with specific compiler flags. This is generally handled via inclusion of
 9017 mk/atomic64.mk.</p>
 9018</div>
8997</div> 9019</div>
8998<div class="sect2"> 9020<div class="sect2">
8999<div class="titlepage"><div><div><h3 class="title"> 9021<div class="titlepage"><div><div><h3 class="title">
9000<a name="out-of-memory"></a>21.5.5. Running out of memory</h3></div></div></div> 9022<a name="out-of-memory"></a>21.5.5. Running out of memory</h3></div></div></div>
9001<p>Sometimes packages fail to build because the compiler runs 9023<p>Sometimes packages fail to build because the compiler runs
9002 into an operating system specific soft limit. With the 9024 into an operating system specific soft limit. With the
9003 <code class="varname">UNLIMIT_RESOURCES</code> variable pkgsrc can be told 9025 <code class="varname">UNLIMIT_RESOURCES</code> variable pkgsrc can be told
9004 to unlimit the resources. The allowed values are any combination of 9026 to unlimit the resources. The allowed values are any combination of
9005 <span class="quote">&#8220;<span class="quote">cputime</span>&#8221;</span>, 9027 <span class="quote">&#8220;<span class="quote">cputime</span>&#8221;</span>,
9006 <span class="quote">&#8220;<span class="quote">datasize</span>&#8221;</span>, 9028 <span class="quote">&#8220;<span class="quote">datasize</span>&#8221;</span>,
9007 <span class="quote">&#8220;<span class="quote">memorysize</span>&#8221;</span>, 9029 <span class="quote">&#8220;<span class="quote">memorysize</span>&#8221;</span>,
9008 <span class="quote">&#8220;<span class="quote">stacksize</span>&#8221;</span> and 9030 <span class="quote">&#8220;<span class="quote">stacksize</span>&#8221;</span> and
9009 <span class="quote">&#8220;<span class="quote">virtualsize</span>&#8221;</span>. 9031 <span class="quote">&#8220;<span class="quote">virtualsize</span>&#8221;</span>.
9010 Setting this variable is similar to running the shell builtin 9032 Setting this variable is similar to running the shell builtin
9011 <span class="command"><strong>ulimit</strong></span> command to raise the maximum data 9033 <span class="command"><strong>ulimit</strong></span> command to raise the maximum data
9012 segment size or maximum stack size of a process, respectively, to 9034 segment size or maximum stack size of a process, respectively, to
9013 their hard limits.</p> 9035 their hard limits.</p>
9014</div> 9036</div>
9015</div> 9037</div>
9016<div class="sect1"> 9038<div class="sect1">
9017<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 9039<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9018<a name="fixes.install"></a>21.6. The <span class="emphasis"><em>install</em></span> phase</h2></div></div></div> 9040<a name="fixes.install"></a>21.6. The <span class="emphasis"><em>install</em></span> phase</h2></div></div></div>
9019<div class="sect2"> 9041<div class="sect2">
9020<div class="titlepage"><div><div><h3 class="title"> 9042<div class="titlepage"><div><div><h3 class="title">
9021<a name="install-scripts"></a>21.6.1. Creating needed directories</h3></div></div></div> 9043<a name="install-scripts"></a>21.6.1. Creating needed directories</h3></div></div></div>
9022<p>The BSD-compatible <span class="command"><strong>install</strong></span> supplied 9044<p>The BSD-compatible <span class="command"><strong>install</strong></span> supplied
9023 with some operating systems cannot create more than one 9045 with some operating systems cannot create more than one
9024 directory at a time. As such, you should call 9046 directory at a time. As such, you should call
9025 <code class="literal">${INSTALL_*_DIR}</code> like this:</p> 9047 <code class="literal">${INSTALL_*_DIR}</code> like this:</p>
9026<pre class="programlisting"> 9048<pre class="programlisting">
9027${INSTALL_DATA_DIR} ${PREFIX}/dir1 9049${INSTALL_DATA_DIR} ${PREFIX}/dir1
9028${INSTALL_DATA_DIR} ${PREFIX}/dir2 9050${INSTALL_DATA_DIR} ${PREFIX}/dir2
9029</pre> 9051</pre>
9030<p>Instead of running the <span class="command"><strong>install</strong></span> commands 9052<p>Instead of running the <span class="command"><strong>install</strong></span> commands
9031 directly, you can also append <span class="quote">&#8220;<span class="quote"><code class="literal">dir1 9053 directly, you can also append <span class="quote">&#8220;<span class="quote"><code class="literal">dir1
9032 dir2</code></span>&#8221;</span> to the <code class="varname">INSTALLATION_DIRS</code> 9054 dir2</code></span>&#8221;</span> to the <code class="varname">INSTALLATION_DIRS</code>
9033 variable, which will automatically do the right thing.</p> 9055 variable, which will automatically do the right thing.</p>
9034</div> 9056</div>
9035<div class="sect2"> 9057<div class="sect2">
9036<div class="titlepage"><div><div><h3 class="title"> 9058<div class="titlepage"><div><div><h3 class="title">
9037<a name="where-to-install-documentation"></a>21.6.2. Where to install documentation</h3></div></div></div> 9059<a name="where-to-install-documentation"></a>21.6.2. Where to install documentation</h3></div></div></div>
9038<p>In general, documentation should be installed into 9060<p>In general, documentation should be installed into
9039 <code class="filename">${PREFIX}/share/doc/${PKGBASE}</code> or 9061 <code class="filename">${PREFIX}/share/doc/${PKGBASE}</code> or
9040 <code class="filename">${PREFIX}/share/doc/${PKGNAME_NOREV}</code> (the latter 9062 <code class="filename">${PREFIX}/share/doc/${PKGNAME_NOREV}</code> (the latter
9041 includes the version number of the package).</p> 9063 includes the version number of the package).</p>
9042<p>Many modern packages using GNU autoconf allow to set the 9064<p>Many modern packages using GNU autoconf allow to set the
9043 directory where HTML documentation is installed with the 9065 directory where HTML documentation is installed with the
9044 <span class="quote">&#8220;<span class="quote">--with-html-dir</span>&#8221;</span> option. Sometimes using this flag is 9066 <span class="quote">&#8220;<span class="quote">--with-html-dir</span>&#8221;</span> option. Sometimes using this flag is
9045 needed because otherwise the documentation ends up in 9067 needed because otherwise the documentation ends up in
9046 <code class="filename">${PREFIX}/share/doc/html</code> or other places. In 9068 <code class="filename">${PREFIX}/share/doc/html</code> or other places. In
9047 pkgsrc, the HTML documentation should go into the package-specific 9069 pkgsrc, the HTML documentation should go into the package-specific
9048 directory, just like any other documentation.</p> 9070 directory, just like any other documentation.</p>
9049<p>An exception to the above is that library API documentation 9071<p>An exception to the above is that library API documentation
9050 generated with the <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/textproc/gtk-doc/index.html" target="_top"><code class="filename">textproc/gtk-doc</code></a> tools, for use by special 9072 generated with the <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/textproc/gtk-doc/index.html" target="_top"><code class="filename">textproc/gtk-doc</code></a> tools, for use by special
9051 browsers (devhelp) should be left at their default location, which 9073 browsers (devhelp) should be left at their default location, which
9052 is <code class="filename">${PREFIX}/share/gtk-doc</code>. Such 9074 is <code class="filename">${PREFIX}/share/gtk-doc</code>. Such
9053 documentation can be recognized from files ending in 9075 documentation can be recognized from files ending in
9054 <code class="filename">.devhelp</code> or <code class="filename">.devhelp2</code>. 9076 <code class="filename">.devhelp</code> or <code class="filename">.devhelp2</code>.
9055 (It is also acceptable to install such files in 9077 (It is also acceptable to install such files in
9056 <code class="filename">${PREFIX}/share/doc/${PKGBASE}</code> or 9078 <code class="filename">${PREFIX}/share/doc/${PKGBASE}</code> or
9057 <code class="filename">${PREFIX}/share/doc/${PKGNAME}</code>; the 9079 <code class="filename">${PREFIX}/share/doc/${PKGNAME}</code>; the
9058 <code class="filename">.devhelp*</code> file must be directly in that 9080 <code class="filename">.devhelp*</code> file must be directly in that
9059 directory then, no additional subdirectory level is allowed in 9081 directory then, no additional subdirectory level is allowed in
9060 this case. This is usually achieved by using 9082 this case. This is usually achieved by using
9061 <span class="quote">&#8220;<span class="quote">--with-html-dir=${PREFIX}/share/doc</span>&#8221;</span>. 9083 <span class="quote">&#8220;<span class="quote">--with-html-dir=${PREFIX}/share/doc</span>&#8221;</span>.
9062 <code class="filename">${PREFIX}/share/gtk-doc</code> is preferred 9084 <code class="filename">${PREFIX}/share/gtk-doc</code> is preferred
9063 though.)</p> 9085 though.)</p>
9064</div> 9086</div>
9065<div class="sect2"> 9087<div class="sect2">
9066<div class="titlepage"><div><div><h3 class="title"> 9088<div class="titlepage"><div><div><h3 class="title">
9067<a name="installing-score-files"></a>21.6.3. Installing highscore files</h3></div></div></div> 9089<a name="installing-score-files"></a>21.6.3. Installing highscore files</h3></div></div></div>
9068<p>Certain packages, most of them in the games category, install 9090<p>Certain packages, most of them in the games category, install
9069 a score file that allows all users on the system to record their 9091 a score file that allows all users on the system to record their
9070 highscores. In order for this to work, the binaries need to be 9092 highscores. In order for this to work, the binaries need to be
9071 installed setgid and the score files owned by the appropriate 9093 installed setgid and the score files owned by the appropriate
9072 group and/or owner (traditionally the "games" user/group). Set 9094 group and/or owner (traditionally the "games" user/group). Set
9073 <code class="varname">USE_GAMESGROUP</code> to yes to support this. The 9095 <code class="varname">USE_GAMESGROUP</code> to yes to support this. The
9074 following variables, documented in more detail in 9096 following variables, documented in more detail in
9075 <code class="filename">mk/defaults/mk.conf</code>, control this 9097 <code class="filename">mk/defaults/mk.conf</code>, control this
9076 behaviour: <code class="varname">GAMEDATAMODE</code>, 9098 behaviour: <code class="varname">GAMEDATAMODE</code>,
9077 <code class="varname">GAMEDIRMODE</code>, <code class="varname">GAMES_GROUP</code>, 9099 <code class="varname">GAMEDIRMODE</code>, <code class="varname">GAMES_GROUP</code>,
9078 <code class="varname">GAMEMODE</code>, <code class="varname">GAME_USER</code>. 9100 <code class="varname">GAMEMODE</code>, <code class="varname">GAME_USER</code>.
9079 Other useful variables are: <code class="varname">GAMEDIR_PERMS</code>, 9101 Other useful variables are: <code class="varname">GAMEDIR_PERMS</code>,
9080 <code class="varname">GAMEDATA_PERMS</code> and 9102 <code class="varname">GAMEDATA_PERMS</code> and
9081 <code class="varname">SETGID_GAMES_PERMS</code>.</p> 9103 <code class="varname">SETGID_GAMES_PERMS</code>.</p>
9082<p>An example that illustrates some of the variables described above is 9104<p>An example that illustrates some of the variables described above is
9083 <code class="filename">games/moon-buggy</code>. <code class="varname">OWN_DIRS_PERMS</code> is 9105 <code class="filename">games/moon-buggy</code>. <code class="varname">OWN_DIRS_PERMS</code> is
9084 used to properly set directory permissions of the directory where the 9106 used to properly set directory permissions of the directory where the
9085 scorefile is saved, <code class="varname">REQD_FILES_PERMS</code> is used to create a 9107 scorefile is saved, <code class="varname">REQD_FILES_PERMS</code> is used to create a
9086 dummy scorefile (<code class="filename">mbscore</code>) with the proper permissions 9108 dummy scorefile (<code class="filename">mbscore</code>) with the proper permissions
9087 and <code class="varname">SPECIAL_PERMS</code> is used to install setgid the game 9109 and <code class="varname">SPECIAL_PERMS</code> is used to install setgid the game
9088 binary:</p> 9110 binary:</p>
9089<pre class="programlisting"> 9111<pre class="programlisting">
9090USE_GAMESGROUP= yes 9112USE_GAMESGROUP= yes
9091 9113
9092BUILD_DEFS+= VARBASE 9114BUILD_DEFS+= VARBASE
9093 9115
9094OWN_DIRS_PERMS+= ${VARBASE}/games/moon-buggy ${GAMEDIR_PERMS} 9116OWN_DIRS_PERMS+= ${VARBASE}/games/moon-buggy ${GAMEDIR_PERMS}
9095REQD_FILES_PERMS+= /dev/null ${VARBASE}/games/moon-buggy/mbscore ${GAMEDATA_PERMS} 9117REQD_FILES_PERMS+= /dev/null ${VARBASE}/games/moon-buggy/mbscore ${GAMEDATA_PERMS}
9096SPECIAL_PERMS+= ${PREFIX}/bin/moon-buggy ${SETGID_GAMES_PERMS} 9118SPECIAL_PERMS+= ${PREFIX}/bin/moon-buggy ${SETGID_GAMES_PERMS}
9097</pre> 9119</pre>
9098<p>Various <code class="varname">INSTALL_*</code> variables are also available: 9120<p>Various <code class="varname">INSTALL_*</code> variables are also available:
9099 <code class="varname">INSTALL_GAME</code> to install setgid game binaries, 9121 <code class="varname">INSTALL_GAME</code> to install setgid game binaries,
9100 <code class="varname">INSTALL_GAME_DIR</code> to install game directories that are 9122 <code class="varname">INSTALL_GAME_DIR</code> to install game directories that are
9101 needed to be accessed by setgid games and 9123 needed to be accessed by setgid games and
9102 <code class="varname">INSTALL_GAME_DATA</code> to install scorefiles.</p> 9124 <code class="varname">INSTALL_GAME_DATA</code> to install scorefiles.</p>
9103<p>A package should therefore never hard code file ownership or 9125<p>A package should therefore never hard code file ownership or
9104 access permissions but rely on <code class="varname">*_PERMS</code> as described above 9126 access permissions but rely on <code class="varname">*_PERMS</code> as described above
9105 or alternatively on <code class="varname">INSTALL_GAME</code>, 9127 or alternatively on <code class="varname">INSTALL_GAME</code>,
9106 <code class="varname">INSTALL_GAME_DATA</code> and 9128 <code class="varname">INSTALL_GAME_DATA</code> and
9107 <code class="varname">INSTALL_GAME_DIR</code> to set these correctly.</p> 9129 <code class="varname">INSTALL_GAME_DIR</code> to set these correctly.</p>
9108</div> 9130</div>
9109<div class="sect2"> 9131<div class="sect2">
9110<div class="titlepage"><div><div><h3 class="title"> 9132<div class="titlepage"><div><div><h3 class="title">
9111<a name="destdir-support"></a>21.6.4. Adding DESTDIR support to packages</h3></div></div></div> 9133<a name="destdir-support"></a>21.6.4. Adding DESTDIR support to packages</h3></div></div></div>
9112<p><code class="varname">DESTDIR</code> support means that a package 9134<p><code class="varname">DESTDIR</code> support means that a package
9113 installs into a staging directory, not the final location of the 9135 installs into a staging directory, not the final location of the
9114 files. Then a binary package is created which can be used for 9136 files. Then a binary package is created which can be used for
9115 installation as usual. There are two ways: Either the package must 9137 installation as usual. There are two ways: Either the package must
9116 install as root (<span class="quote">&#8220;<span class="quote">destdir</span>&#8221;</span>) or the package can 9138 install as root (<span class="quote">&#8220;<span class="quote">destdir</span>&#8221;</span>) or the package can
9117 install as non-root user (<span class="quote">&#8220;<span class="quote">user-destdir</span>&#8221;</span>).</p> 9139 install as non-root user (<span class="quote">&#8220;<span class="quote">user-destdir</span>&#8221;</span>).</p>
9118<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 9140<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
9119<li class="listitem"><p><code class="varname">PKG_DESTDIR_SUPPORT</code> has to be 9141<li class="listitem"><p><code class="varname">PKG_DESTDIR_SUPPORT</code> has to be
9120 set to <span class="quote">&#8220;<span class="quote">destdir</span>&#8221;</span> or <span class="quote">&#8220;<span class="quote">user-destdir</span>&#8221;</span>. 9142 set to <span class="quote">&#8220;<span class="quote">destdir</span>&#8221;</span> or <span class="quote">&#8220;<span class="quote">user-destdir</span>&#8221;</span>.
9121 By default <code class="varname">PKG_DESTDIR_SUPPORT</code> 9143 By default <code class="varname">PKG_DESTDIR_SUPPORT</code>
9122 is set to <span class="quote">&#8220;<span class="quote">user-destdir</span>&#8221;</span> to help catching more 9144 is set to <span class="quote">&#8220;<span class="quote">user-destdir</span>&#8221;</span> to help catching more
9123 potential packaging problems. If bsd.prefs.mk is included in the Makefile, 9145 potential packaging problems. If bsd.prefs.mk is included in the Makefile,
9124 <code class="varname">PKG_DESTDIR_SUPPORT</code> needs to be set before 9146 <code class="varname">PKG_DESTDIR_SUPPORT</code> needs to be set before
9125 the inclusion.</p></li> 9147 the inclusion.</p></li>
9126<li class="listitem"><p>All installation operations have to be prefixed with 9148<li class="listitem"><p>All installation operations have to be prefixed with
9127 <code class="filename">${DESTDIR}</code>.</p></li> 9149 <code class="filename">${DESTDIR}</code>.</p></li>
9128<li class="listitem"><p>automake gets this DESTDIR mostly right 9150<li class="listitem"><p>automake gets this DESTDIR mostly right
9129 automatically. Many manual rules and pre/post-install often are 9151 automatically. Many manual rules and pre/post-install often are
9130 incorrect; fix them.</p></li> 9152 incorrect; fix them.</p></li>
9131<li class="listitem"><p>If files are installed with special owner/group 9153<li class="listitem"><p>If files are installed with special owner/group
9132 use <code class="varname">SPECIAL_PERMS</code>.</p></li> 9154 use <code class="varname">SPECIAL_PERMS</code>.</p></li>
9133<li class="listitem"><p>In general, packages should support 9155<li class="listitem"><p>In general, packages should support
9134 <code class="varname">UNPRIVILEGED</code> to be able to use 9156 <code class="varname">UNPRIVILEGED</code> to be able to use
9135 DESTDIR.</p></li> 9157 DESTDIR.</p></li>
9136</ul></div> 9158</ul></div>
9137</div> 9159</div>
9138<div class="sect2"> 9160<div class="sect2">
9139<div class="titlepage"><div><div><h3 class="title"> 9161<div class="titlepage"><div><div><h3 class="title">
9140<a name="hardcoded-paths"></a>21.6.5. Packages with hardcoded paths to other interpreters</h3></div></div></div> 9162<a name="hardcoded-paths"></a>21.6.5. Packages with hardcoded paths to other interpreters</h3></div></div></div>
9141<p>Your package may also contain scripts with hardcoded paths to 9163<p>Your package may also contain scripts with hardcoded paths to
9142 other interpreters besides (or as well as) Perl. To correct the 9164 other interpreters besides (or as well as) Perl. To correct the
9143 full pathname to the script interpreter, you need to set the 9165 full pathname to the script interpreter, you need to set the
9144 following definitions in your <code class="filename">Makefile</code> (we 9166 following definitions in your <code class="filename">Makefile</code> (we
9145 shall use <span class="command"><strong>tclsh</strong></span> in this example):</p> 9167 shall use <span class="command"><strong>tclsh</strong></span> in this example):</p>
9146<pre class="programlisting"> 9168<pre class="programlisting">
9147REPLACE_INTERPRETER+= tcl 9169REPLACE_INTERPRETER+= tcl
9148REPLACE.tcl.old= .*/bin/tclsh 9170REPLACE.tcl.old= .*/bin/tclsh
9149REPLACE.tcl.new= ${PREFIX}/bin/tclsh 9171REPLACE.tcl.new= ${PREFIX}/bin/tclsh
9150REPLACE_FILES.tcl= # list of tcl scripts which need to be fixed, 9172REPLACE_FILES.tcl= # list of tcl scripts which need to be fixed,
9151# relative to ${WRKSRC}, just as in REPLACE_PERL 9173# relative to ${WRKSRC}, just as in REPLACE_PERL
9152</pre> 9174</pre>
9153</div> 9175</div>
9154<div class="sect2"> 9176<div class="sect2">
9155<div class="titlepage"><div><div><h3 class="title"> 9177<div class="titlepage"><div><div><h3 class="title">
9156<a name="perl-modules"></a>21.6.6. Packages installing Perl modules</h3></div></div></div> 9178<a name="perl-modules"></a>21.6.6. Packages installing Perl modules</h3></div></div></div>
9157<p>Makefiles of packages providing perl5 modules should include 9179<p>Makefiles of packages providing perl5 modules should include
9158 the Makefile fragment 9180 the Makefile fragment
9159 <code class="filename">../../lang/perl5/module.mk</code>. It provides a 9181 <code class="filename">../../lang/perl5/module.mk</code>. It provides a
9160 <span class="command"><strong>do-configure</strong></span> target for the standard perl 9182 <span class="command"><strong>do-configure</strong></span> target for the standard perl
9161 configuration for such modules as well as various hooks to tune 9183 configuration for such modules as well as various hooks to tune
9162 this configuration. See comments in this file for 9184 this configuration. See comments in this file for
9163 details.</p> 9185 details.</p>
9164<p>Perl5 modules will install into different places depending 9186<p>Perl5 modules will install into different places depending
9165 on the version of perl used during the build process. To 9187 on the version of perl used during the build process. To
9166 address this, pkgsrc will append lines to the 9188 address this, pkgsrc will append lines to the
9167 <code class="filename">PLIST</code> corresponding to the files listed in 9189 <code class="filename">PLIST</code> corresponding to the files listed in
9168 the installed <code class="filename">.packlist</code> file generated by 9190 the installed <code class="filename">.packlist</code> file generated by
9169 most perl5 modules. This is invoked by defining 9191 most perl5 modules. This is invoked by defining
9170 <code class="varname">PERL5_PACKLIST</code> to a space-separated list of 9192 <code class="varname">PERL5_PACKLIST</code> to a space-separated list of
9171 packlist files relative to <code class="varname">PERL5_PACKLIST_DIR</code> 9193 packlist files relative to <code class="varname">PERL5_PACKLIST_DIR</code>
9172 (<code class="varname">PERL5_INSTALLVENDORARCH</code> by default), 9194 (<code class="varname">PERL5_INSTALLVENDORARCH</code> by default),
9173 e.g.:</p> 9195 e.g.:</p>
9174<pre class="programlisting"> 9196<pre class="programlisting">
9175PERL5_PACKLIST= auto/Pg/.packlist 9197PERL5_PACKLIST= auto/Pg/.packlist
9176</pre> 9198</pre>
9177<p>The perl5 config variables 9199<p>The perl5 config variables
9178 <code class="varname">installarchlib</code>, 9200 <code class="varname">installarchlib</code>,
9179 <code class="varname">installscript</code>, 9201 <code class="varname">installscript</code>,
9180 <code class="varname">installvendorbin</code>, 9202 <code class="varname">installvendorbin</code>,
9181 <code class="varname">installvendorscript</code>, 9203 <code class="varname">installvendorscript</code>,
9182 <code class="varname">installvendorarch</code>, 9204 <code class="varname">installvendorarch</code>,
9183 <code class="varname">installvendorlib</code>, 9205 <code class="varname">installvendorlib</code>,
9184 <code class="varname">installvendorman1dir</code>, and 9206 <code class="varname">installvendorman1dir</code>, and
9185 <code class="varname">installvendorman3dir</code> represent those 9207 <code class="varname">installvendorman3dir</code> represent those
9186 locations in which components of perl5 modules may be installed, 9208 locations in which components of perl5 modules may be installed,
9187 provided as variable with uppercase and prefixed with 9209 provided as variable with uppercase and prefixed with
9188 <code class="varname">PERL5_</code>, e.g. <code class="varname">PERL5_INSTALLARCHLIB</code> 9210 <code class="varname">PERL5_</code>, e.g. <code class="varname">PERL5_INSTALLARCHLIB</code>
9189 and may be used by perl5 packages that don't have a packlist. 9211 and may be used by perl5 packages that don't have a packlist.
9190 These variables are also substituted for in the 9212 These variables are also substituted for in the
9191 <code class="filename">PLIST</code> as uppercase prefixed with 9213 <code class="filename">PLIST</code> as uppercase prefixed with
9192 <code class="varname">PERL5_SUB_</code>.</p> 9214 <code class="varname">PERL5_SUB_</code>.</p>
9193</div> 9215</div>
9194<div class="sect2"> 9216<div class="sect2">
9195<div class="titlepage"><div><div><h3 class="title"> 9217<div class="titlepage"><div><div><h3 class="title">
9196<a name="faq.info-files"></a>21.6.7. Packages installing info files</h3></div></div></div> 9218<a name="faq.info-files"></a>21.6.7. Packages installing info files</h3></div></div></div>
9197<p>Some packages install info files or use the 9219<p>Some packages install info files or use the
9198 <span class="quote">&#8220;<span class="quote">makeinfo</span>&#8221;</span> or <span class="quote">&#8220;<span class="quote">install-info</span>&#8221;</span> 9220 <span class="quote">&#8220;<span class="quote">makeinfo</span>&#8221;</span> or <span class="quote">&#8220;<span class="quote">install-info</span>&#8221;</span>
9199 commands. <code class="varname">INFO_FILES</code> should be defined in 9221 commands. <code class="varname">INFO_FILES</code> should be defined in
9200 the package Makefile so that <code class="filename">INSTALL</code> and 9222 the package Makefile so that <code class="filename">INSTALL</code> and
9201 <code class="filename">DEINSTALL</code> scripts will be generated to 9223 <code class="filename">DEINSTALL</code> scripts will be generated to
9202 handle registration of the info files in the Info directory 9224 handle registration of the info files in the Info directory
9203 file. The <span class="quote">&#8220;<span class="quote">install-info</span>&#8221;</span> command used for the info 9225 file. The <span class="quote">&#8220;<span class="quote">install-info</span>&#8221;</span> command used for the info
9204 files registration is either provided by the system, or by a 9226 files registration is either provided by the system, or by a
9205 special purpose package automatically added as dependency if 9227 special purpose package automatically added as dependency if
9206 needed.</p> 9228 needed.</p>
9207<p><code class="varname">PKGINFODIR</code> is the directory under 9229<p><code class="varname">PKGINFODIR</code> is the directory under
9208 <code class="filename">${PREFIX}</code> where info files are primarily 9230 <code class="filename">${PREFIX}</code> where info files are primarily
9209 located. <code class="varname">PKGINFODIR</code> defaults to 9231 located. <code class="varname">PKGINFODIR</code> defaults to
9210 <span class="quote">&#8220;<span class="quote">info</span>&#8221;</span> and can be overridden by the user.</p> 9232 <span class="quote">&#8220;<span class="quote">info</span>&#8221;</span> and can be overridden by the user.</p>
9211<p>The info files for the package should be listed in the 9233<p>The info files for the package should be listed in the
9212 package <code class="filename">PLIST</code>; however any split info files 9234 package <code class="filename">PLIST</code>; however any split info files
9213 need not be listed.</p> 9235 need not be listed.</p>
9214<p>A package which needs the <span class="quote">&#8220;<span class="quote">makeinfo</span>&#8221;</span> command 9236<p>A package which needs the <span class="quote">&#8220;<span class="quote">makeinfo</span>&#8221;</span> command
9215 at build time must add <span class="quote">&#8220;<span class="quote">makeinfo</span>&#8221;</span> to 9237 at build time must add <span class="quote">&#8220;<span class="quote">makeinfo</span>&#8221;</span> to
9216 <code class="varname">USE_TOOLS</code> in its Makefile. If a minimum 9238 <code class="varname">USE_TOOLS</code> in its Makefile. If a minimum
9217 version of the <span class="quote">&#8220;<span class="quote">makeinfo</span>&#8221;</span> command is needed it 9239 version of the <span class="quote">&#8220;<span class="quote">makeinfo</span>&#8221;</span> command is needed it
9218 should be noted with the <code class="varname">TEXINFO_REQD</code> 9240 should be noted with the <code class="varname">TEXINFO_REQD</code>
9219 variable in the package <code class="filename">Makefile</code>. By 9241 variable in the package <code class="filename">Makefile</code>. By
9220 default, a minimum version of 3.12 is required. If the system 9242 default, a minimum version of 3.12 is required. If the system
9221 does not provide a <span class="command"><strong>makeinfo</strong></span> command or if it 9243 does not provide a <span class="command"><strong>makeinfo</strong></span> command or if it
9222 does not match the required minimum, a build dependency on the 9244 does not match the required minimum, a build dependency on the
9223 <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/devel/gtexinfo/index.html" target="_top"><code class="filename">devel/gtexinfo</code></a> package will 9245 <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/devel/gtexinfo/index.html" target="_top"><code class="filename">devel/gtexinfo</code></a> package will
9224 be added automatically.</p> 9246 be added automatically.</p>
9225<p>The build and installation process of the software provided 9247<p>The build and installation process of the software provided
9226 by the package should not use the 9248 by the package should not use the
9227 <span class="command"><strong>install-info</strong></span> command as the registration of 9249 <span class="command"><strong>install-info</strong></span> command as the registration of
9228 info files is the task of the package 9250 info files is the task of the package
9229 <code class="filename">INSTALL</code> script, and it must use the 9251 <code class="filename">INSTALL</code> script, and it must use the
9230 appropriate <span class="command"><strong>makeinfo</strong></span> command.</p> 9252 appropriate <span class="command"><strong>makeinfo</strong></span> command.</p>
9231<p>To achieve this goal, the pkgsrc infrastructure creates 9253<p>To achieve this goal, the pkgsrc infrastructure creates
9232 overriding scripts for the <span class="command"><strong>install-info</strong></span> and 9254 overriding scripts for the <span class="command"><strong>install-info</strong></span> and
9233 <span class="command"><strong>makeinfo</strong></span> commands in a directory listed early 9255 <span class="command"><strong>makeinfo</strong></span> commands in a directory listed early
9234 in <code class="varname">PATH</code>.</p> 9256 in <code class="varname">PATH</code>.</p>
9235<p>The script overriding <span class="command"><strong>install-info</strong></span> has 9257<p>The script overriding <span class="command"><strong>install-info</strong></span> has
9236 no effect except the logging of a message. The script overriding 9258 no effect except the logging of a message. The script overriding
9237 <span class="command"><strong>makeinfo</strong></span> logs a message and according to the 9259 <span class="command"><strong>makeinfo</strong></span> logs a message and according to the
9238 value of <code class="varname">TEXINFO_REQD</code> either runs the appropriate 9260 value of <code class="varname">TEXINFO_REQD</code> either runs the appropriate
9239 <span class="command"><strong>makeinfo</strong></span> command or exit on error.</p> 9261 <span class="command"><strong>makeinfo</strong></span> command or exit on error.</p>
9240</div> 9262</div>
9241<div class="sect2"> 9263<div class="sect2">
9242<div class="titlepage"><div><div><h3 class="title"> 9264<div class="titlepage"><div><div><h3 class="title">
9243<a name="manpages"></a>21.6.8. Packages installing man pages</h3></div></div></div> 9265<a name="manpages"></a>21.6.8. Packages installing man pages</h3></div></div></div>
9244<p>All packages that install manual pages should install them 9266<p>All packages that install manual pages should install them
9245 into the same directory, so that there is one common place to look 9267 into the same directory, so that there is one common place to look
9246 for them. In pkgsrc, this place is 9268 for them. In pkgsrc, this place is
9247 <code class="literal">${PREFIX}/${PKGMANDIR}</code>, and this expression 9269 <code class="literal">${PREFIX}/${PKGMANDIR}</code>, and this expression
9248 should be used in packages. The default for 9270 should be used in packages. The default for
9249 <code class="varname">PKGMANDIR</code> is 9271 <code class="varname">PKGMANDIR</code> is
9250 <span class="quote">&#8220;<span class="quote"><code class="filename">man</code></span>&#8221;</span>. Another often-used value 9272 <span class="quote">&#8220;<span class="quote"><code class="filename">man</code></span>&#8221;</span>. Another often-used value
9251 is <span class="quote">&#8220;<span class="quote"><code class="filename">share/man</code></span>&#8221;</span>.</p> 9273 is <span class="quote">&#8220;<span class="quote"><code class="filename">share/man</code></span>&#8221;</span>.</p>
9252<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> 9274<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
9253<h3 class="title">Note</h3> 9275<h3 class="title">Note</h3>
9254<p>The support for a custom <code class="varname">PKGMANDIR</code> 9276<p>The support for a custom <code class="varname">PKGMANDIR</code>
9255 is far from complete.</p> 9277 is far from complete.</p>
9256</div> 9278</div>
9257<p>The <code class="filename">PLIST</code> files can just use 9279<p>The <code class="filename">PLIST</code> files can just use
9258 <code class="filename">man/</code> as the top level directory for the man 9280 <code class="filename">man/</code> as the top level directory for the man
9259 page file entries, and the pkgsrc framework will convert as 9281 page file entries, and the pkgsrc framework will convert as
9260 needed. In all other places, the correct 9282 needed. In all other places, the correct
9261 <code class="varname">PKGMANDIR</code> must be used.</p> 9283 <code class="varname">PKGMANDIR</code> must be used.</p>
9262<p>Packages that are 9284<p>Packages that are
9263 configured with <code class="varname">GNU_CONFIGURE</code> set as 9285 configured with <code class="varname">GNU_CONFIGURE</code> set as
9264 <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>, by default will use the 9286 <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>, by default will use the
9265 <code class="filename">./configure</code> 9287 <code class="filename">./configure</code>
9266 --mandir switch to set where the man pages should be installed. 9288 --mandir switch to set where the man pages should be installed.
9267 The path is <code class="varname">GNU_CONFIGURE_MANDIR</code> which defaults 9289 The path is <code class="varname">GNU_CONFIGURE_MANDIR</code> which defaults
9268 to <code class="varname">${PREFIX}/${PKGMANDIR}</code>.</p> 9290 to <code class="varname">${PREFIX}/${PKGMANDIR}</code>.</p>
9269<p>Packages that use <code class="varname">GNU_CONFIGURE</code> but do not 9291<p>Packages that use <code class="varname">GNU_CONFIGURE</code> but do not
9270 use --mandir, can set <code class="varname">CONFIGURE_HAS_MANDIR</code> 9292 use --mandir, can set <code class="varname">CONFIGURE_HAS_MANDIR</code>
9271 to <span class="quote">&#8220;<span class="quote">no</span>&#8221;</span>. 9293 to <span class="quote">&#8220;<span class="quote">no</span>&#8221;</span>.
9272 Or if the <code class="filename">./configure</code> script uses 9294 Or if the <code class="filename">./configure</code> script uses
9273 a non-standard use of --mandir, you can set 9295 a non-standard use of --mandir, you can set
9274 <code class="varname">GNU_CONFIGURE_MANDIR</code> as needed.</p> 9296 <code class="varname">GNU_CONFIGURE_MANDIR</code> as needed.</p>
9275<p>See <a class="xref" href="#manpage-compression" title="19.5. Man page compression">Section 19.5, &#8220;Man page compression&#8221;</a> for 9297<p>See <a class="xref" href="#manpage-compression" title="19.5. Man page compression">Section 19.5, &#8220;Man page compression&#8221;</a> for
9276 information on installation of compressed manual pages.</p> 9298 information on installation of compressed manual pages.</p>
9277</div> 9299</div>
9278<div class="sect2"> 9300<div class="sect2">
9279<div class="titlepage"><div><div><h3 class="title"> 9301<div class="titlepage"><div><div><h3 class="title">
9280<a name="x11-fonts"></a>21.6.9. Packages installing X11 fonts</h3></div></div></div> 9302<a name="x11-fonts"></a>21.6.9. Packages installing X11 fonts</h3></div></div></div>
9281<p>If a package installs font files, you will need to rebuild 9303<p>If a package installs font files, you will need to rebuild
9282 the fonts database in the directory where they get installed at 9304 the fonts database in the directory where they get installed at
9283 installation and deinstallation time. This can be automatically 9305 installation and deinstallation time. This can be automatically
9284 done by using the pkginstall framework.</p> 9306 done by using the pkginstall framework.</p>
9285<p>You can list the directories where fonts are installed in the 9307<p>You can list the directories where fonts are installed in the
9286 <code class="varname">FONTS_DIRS.<em class="replaceable"><code>type</code></em></code> 9308 <code class="varname">FONTS_DIRS.<em class="replaceable"><code>type</code></em></code>
9287 variables, where <em class="replaceable"><code>type</code></em> can be one of 9309 variables, where <em class="replaceable"><code>type</code></em> can be one of
9288 <span class="quote">&#8220;<span class="quote">ttf</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">type1</span>&#8221;</span> or <span class="quote">&#8220;<span class="quote">x11</span>&#8221;</span>. 9310 <span class="quote">&#8220;<span class="quote">ttf</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">type1</span>&#8221;</span> or <span class="quote">&#8220;<span class="quote">x11</span>&#8221;</span>.
9289 Also make sure that the database file 9311 Also make sure that the database file
9290 <code class="filename">fonts.dir</code> is not listed in the PLIST.</p> 9312 <code class="filename">fonts.dir</code> is not listed in the PLIST.</p>
9291<p>Note that you should not create new directories for fonts; 9313<p>Note that you should not create new directories for fonts;
9292 instead use the standard ones to avoid that the user needs to 9314 instead use the standard ones to avoid that the user needs to
9293 manually configure his X server to find them.</p> 9315 manually configure his X server to find them.</p>
9294</div> 9316</div>
9295<div class="sect2"> 9317<div class="sect2">
9296<div class="titlepage"><div><div><h3 class="title"> 9318<div class="titlepage"><div><div><h3 class="title">
9297<a name="sgml-xml-data"></a>21.6.10. Packages installing SGML or XML data</h3></div></div></div> 9319<a name="sgml-xml-data"></a>21.6.10. Packages installing SGML or XML data</h3></div></div></div>
9298<p>If a package installs SGML or XML data files that need to be 9320<p>If a package installs SGML or XML data files that need to be
9299 registered in system-wide catalogs (like DTDs, sub-catalogs, 9321 registered in system-wide catalogs (like DTDs, sub-catalogs,
9300 etc.), you need to take some extra steps:</p> 9322 etc.), you need to take some extra steps:</p>
9301<div class="orderedlist"><ol class="orderedlist" type="1"> 9323<div class="orderedlist"><ol class="orderedlist" type="1">
9302<li class="listitem"><p>Include 9324<li class="listitem"><p>Include
9303 <code class="filename">../../textproc/xmlcatmgr/catalogs.mk</code> in 9325 <code class="filename">../../textproc/xmlcatmgr/catalogs.mk</code> in
9304 your <code class="filename">Makefile</code>, which takes care of 9326 your <code class="filename">Makefile</code>, which takes care of
9305 registering those files in system-wide catalogs at 9327 registering those files in system-wide catalogs at
9306 installation and deinstallation time.</p></li> 9328 installation and deinstallation time.</p></li>
9307<li class="listitem"><p>Set <code class="varname">SGML_CATALOGS</code> to the full path of 9329<li class="listitem"><p>Set <code class="varname">SGML_CATALOGS</code> to the full path of
9308 any SGML catalogs installed by the package.</p></li> 9330 any SGML catalogs installed by the package.</p></li>
9309<li class="listitem"><p>Set <code class="varname">XML_CATALOGS</code> to the full path of 9331<li class="listitem"><p>Set <code class="varname">XML_CATALOGS</code> to the full path of
9310 any XML catalogs installed by the package.</p></li> 9332 any XML catalogs installed by the package.</p></li>
9311<li class="listitem"><p>Set <code class="varname">SGML_ENTRIES</code> to individual entries 9333<li class="listitem"><p>Set <code class="varname">SGML_ENTRIES</code> to individual entries
9312 to be added to the SGML catalog. These come in groups of 9334 to be added to the SGML catalog. These come in groups of
9313 three strings; see xmlcatmgr(1) for more information 9335 three strings; see xmlcatmgr(1) for more information
9314 (specifically, arguments recognized by the 'add' action). 9336 (specifically, arguments recognized by the 'add' action).
9315 Note that you will normally not use this variable.</p></li> 9337 Note that you will normally not use this variable.</p></li>
9316<li class="listitem"><p>Set <code class="varname">XML_ENTRIES</code> to individual entries 9338<li class="listitem"><p>Set <code class="varname">XML_ENTRIES</code> to individual entries
9317 to be added to the XML catalog. These come in groups of three 9339 to be added to the XML catalog. These come in groups of three
9318 strings; see xmlcatmgr(1) for more information (specifically, 9340 strings; see xmlcatmgr(1) for more information (specifically,
9319 arguments recognized by the 'add' action). Note that you will 9341 arguments recognized by the 'add' action). Note that you will
9320 normally not use this variable.</p></li> 9342 normally not use this variable.</p></li>
9321</ol></div> 9343</ol></div>
9322</div> 9344</div>
9323<div class="sect2"> 9345<div class="sect2">
9324<div class="titlepage"><div><div><h3 class="title"> 9346<div class="titlepage"><div><div><h3 class="title">
9325<a name="mime-database"></a>21.6.11. Packages installing extensions to the MIME database</h3></div></div></div> 9347<a name="mime-database"></a>21.6.11. Packages installing extensions to the MIME database</h3></div></div></div>
9326<p>If a package provides extensions to the MIME database by 9348<p>If a package provides extensions to the MIME database by
9327 installing <code class="filename">.xml</code> files inside 9349 installing <code class="filename">.xml</code> files inside
9328 <code class="filename">${PREFIX}/share/mime/packages</code>, you 9350 <code class="filename">${PREFIX}/share/mime/packages</code>, you
9329 need to take some extra steps to ensure that the database is kept 9351 need to take some extra steps to ensure that the database is kept
9330 consistent with respect to these new files:</p> 9352 consistent with respect to these new files:</p>
9331<div class="orderedlist"><ol class="orderedlist" type="1"> 9353<div class="orderedlist"><ol class="orderedlist" type="1">
9332<li class="listitem"><p>Include 9354<li class="listitem"><p>Include
9333 <code class="filename">../../databases/shared-mime-info/mimedb.mk</code> 9355 <code class="filename">../../databases/shared-mime-info/mimedb.mk</code>
9334 (avoid using the <code class="filename">buildlink3.mk</code> file from 9356 (avoid using the <code class="filename">buildlink3.mk</code> file from
9335 this same directory, which is reserved for inclusion from 9357 this same directory, which is reserved for inclusion from
9336 other <code class="filename">buildlink3.mk</code> files). It takes 9358 other <code class="filename">buildlink3.mk</code> files). It takes
9337 care of rebuilding the MIME database at installation and 9359 care of rebuilding the MIME database at installation and
9338 deinstallation time, and disallows any access to it directly 9360 deinstallation time, and disallows any access to it directly
9339 from the package.</p></li> 9361 from the package.</p></li>
9340<li class="listitem"><p>Check the PLIST and remove any entries under the 9362<li class="listitem"><p>Check the PLIST and remove any entries under the
9341 <code class="filename">share/mime</code> directory, 9363 <code class="filename">share/mime</code> directory,
9342 <span class="emphasis"><em>except</em></span> for files saved under 9364 <span class="emphasis"><em>except</em></span> for files saved under
9343 <code class="filename">share/mime/packages</code>. The former are 9365 <code class="filename">share/mime/packages</code>. The former are
9344 handled automatically by 9366 handled automatically by
9345 the update-mime-database program, but the latter are 9367 the update-mime-database program, but the latter are
9346 package-dependent and must be removed by the package that 9368 package-dependent and must be removed by the package that
9347 installed them in the first place.</p></li> 9369 installed them in the first place.</p></li>
9348<li class="listitem"><p>Remove any <code class="filename">share/mime/*</code> directories 9370<li class="listitem"><p>Remove any <code class="filename">share/mime/*</code> directories
9349 from the PLIST. They will be handled by the shared-mime-info 9371 from the PLIST. They will be handled by the shared-mime-info
9350 package.</p></li> 9372 package.</p></li>
9351</ol></div> 9373</ol></div>
9352</div> 9374</div>
9353<div class="sect2"> 9375<div class="sect2">
9354<div class="titlepage"><div><div><h3 class="title"> 9376<div class="titlepage"><div><div><h3 class="title">
9355<a name="intltool"></a>21.6.12. Packages using intltool</h3></div></div></div> 9377<a name="intltool"></a>21.6.12. Packages using intltool</h3></div></div></div>
9356<p>If a package uses intltool during its build, add 9378<p>If a package uses intltool during its build, add
9357 <code class="literal">intltool</code> to the <code class="varname">USE_TOOLS</code>, 9379 <code class="literal">intltool</code> to the <code class="varname">USE_TOOLS</code>,
9358 which forces it to use the intltool package provided by pkgsrc, 9380 which forces it to use the intltool package provided by pkgsrc,
9359 instead of the one bundled with the distribution file.</p> 9381 instead of the one bundled with the distribution file.</p>
9360<p>This tracks intltool's build-time dependencies and uses the 9382<p>This tracks intltool's build-time dependencies and uses the
9361 latest available version; this way, the package benefits of any 9383 latest available version; this way, the package benefits of any
9362 bug fixes that may have appeared since it was released.</p> 9384 bug fixes that may have appeared since it was released.</p>
9363</div> 9385</div>
9364<div class="sect2"> 9386<div class="sect2">
9365<div class="titlepage"><div><div><h3 class="title"> 9387<div class="titlepage"><div><div><h3 class="title">
9366<a name="startup-scripts"></a>21.6.13. Packages installing startup scripts</h3></div></div></div> 9388<a name="startup-scripts"></a>21.6.13. Packages installing startup scripts</h3></div></div></div>
9367<p>If a package contains a rc.d script, it won't be copied into 9389<p>If a package contains a rc.d script, it won't be copied into
9368 the startup directory by default, but you can enable it, by adding 9390 the startup directory by default, but you can enable it, by adding
9369 the option <code class="varname">PKG_RCD_SCRIPTS=YES</code> in 9391 the option <code class="varname">PKG_RCD_SCRIPTS=YES</code> in
9370 <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>. This option will copy the scripts 9392 <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>. This option will copy the scripts
9371 into <code class="filename">/etc/rc.d</code> when a package is installed, and 9393 into <code class="filename">/etc/rc.d</code> when a package is installed, and
9372 it will automatically remove the scripts when the package is 9394 it will automatically remove the scripts when the package is
9373 deinstalled.</p> 9395 deinstalled.</p>
9374</div> 9396</div>
9375<div class="sect2"> 9397<div class="sect2">
9376<div class="titlepage"><div><div><h3 class="title"> 9398<div class="titlepage"><div><div><h3 class="title">
9377<a name="tex-packages"></a>21.6.14. Packages installing TeX modules</h3></div></div></div> 9399<a name="tex-packages"></a>21.6.14. Packages installing TeX modules</h3></div></div></div>
9378<p>If a package installs TeX packages into the texmf tree, 9400<p>If a package installs TeX packages into the texmf tree,
9379 the <code class="filename">ls-R</code> database of the tree needs to be 9401 the <code class="filename">ls-R</code> database of the tree needs to be
9380 updated.</p> 9402 updated.</p>
9381<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> 9403<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
9382<h3 class="title">Note</h3> 9404<h3 class="title">Note</h3>
9383<p>Except the main TeX packages such as kpathsea, 9405<p>Except the main TeX packages such as kpathsea,
9384 packages should install files 9406 packages should install files
9385 into <code class="filename">${PREFIX}/share/texmf-dist</code>, 9407 into <code class="filename">${PREFIX}/share/texmf-dist</code>,
9386 not <code class="filename">${PREFIX}/share/texmf</code>.</p> 9408 not <code class="filename">${PREFIX}/share/texmf</code>.</p>
9387</div> 9409</div>
9388<div class="orderedlist"><ol class="orderedlist" type="1"> 9410<div class="orderedlist"><ol class="orderedlist" type="1">
9389<li class="listitem"><p>Include 9411<li class="listitem"><p>Include
9390 <code class="filename">../../print/kpathsea/texmf.mk</code>. This 9412 <code class="filename">../../print/kpathsea/texmf.mk</code>. This
9391 takes care of rebuilding the <code class="filename">ls-R</code> 9413 takes care of rebuilding the <code class="filename">ls-R</code>
9392 database at installation and deinstallation time.</p></li> 9414 database at installation and deinstallation time.</p></li>
9393<li class="listitem"> 9415<li class="listitem">
9394<p>If your package installs files into a texmf 9416<p>If your package installs files into a texmf
9395 tree other than the one 9417 tree other than the one
9396 at <code class="filename">${PREFIX}/share/texmf-dist</code>, 9418 at <code class="filename">${PREFIX}/share/texmf-dist</code>,
9397 set <code class="varname">TEX_TEXMF_DIRS</code> to the list of all texmf 9419 set <code class="varname">TEX_TEXMF_DIRS</code> to the list of all texmf
9398 trees that need database update.</p> 9420 trees that need database update.</p>
9399<p>If your package also installs font map files that need 9421<p>If your package also installs font map files that need
9400 to be registered using <span class="command"><strong>updmap</strong></span>, 9422 to be registered using <span class="command"><strong>updmap</strong></span>,
9401 include <code class="filename">../../print/tex-tetex/map.mk</code> and 9423 include <code class="filename">../../print/tex-tetex/map.mk</code> and
9402 set <code class="varname">TEX_MAP_FILES</code> and/or 9424 set <code class="varname">TEX_MAP_FILES</code> and/or
9403 <code class="varname">TEX_MIXEDMAP_FILES</code> to the list of all 9425 <code class="varname">TEX_MIXEDMAP_FILES</code> to the list of all
9404 such font map files. Then <span class="command"><strong>updmap</strong></span> will 9426 such font map files. Then <span class="command"><strong>updmap</strong></span> will
9405 be run automatically at installation/deinstallation to 9427 be run automatically at installation/deinstallation to
9406 enable/disable font map files for TeX output 9428 enable/disable font map files for TeX output
9407 drivers.</p> 9429 drivers.</p>
9408</li> 9430</li>
9409<li class="listitem"><p>Make sure that none of <code class="filename">ls-R</code> 9431<li class="listitem"><p>Make sure that none of <code class="filename">ls-R</code>
9410 databases are included in <code class="filename">PLIST</code>, as 9432 databases are included in <code class="filename">PLIST</code>, as
9411 they will be removed only by the kpathsea package.</p></li> 9433 they will be removed only by the kpathsea package.</p></li>
9412</ol></div> 9434</ol></div>
9413</div> 9435</div>
9414<div class="sect2"> 9436<div class="sect2">
9415<div class="titlepage"><div><div><h3 class="title"> 9437<div class="titlepage"><div><div><h3 class="title">
9416<a name="emulation-packages"></a>21.6.15. Packages supporting running binaries in 9438<a name="emulation-packages"></a>21.6.15. Packages supporting running binaries in
9417 emulation</h3></div></div></div> 9439 emulation</h3></div></div></div>
9418<p>There are some packages that provide libraries and 9440<p>There are some packages that provide libraries and
9419 executables for running binaries from a one operating system 9441 executables for running binaries from a one operating system
9420 on a different one (if the latter supports it). One example 9442 on a different one (if the latter supports it). One example
9421 is running Linux binaries on NetBSD.</p> 9443 is running Linux binaries on NetBSD.</p>
9422<p>The <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/rpm2pkg/index.html" target="_top"><code class="filename">pkgtools/rpm2pkg</code></a> 9444<p>The <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/rpm2pkg/index.html" target="_top"><code class="filename">pkgtools/rpm2pkg</code></a>
9423 helps in extracting and packaging Linux rpm packages.</p> 9445 helps in extracting and packaging Linux rpm packages.</p>
9424<p>The <code class="varname">CHECK_SHLIBS</code> can be set to no to 9446<p>The <code class="varname">CHECK_SHLIBS</code> can be set to no to
9425 avoid the <span class="command"><strong>check-shlibs</strong></span> target, which tests 9447 avoid the <span class="command"><strong>check-shlibs</strong></span> target, which tests
9426 if all libraries for each installed executable can be found by 9448 if all libraries for each installed executable can be found by
9427 the dynamic linker. Since the standard dynamic linker is run, 9449 the dynamic linker. Since the standard dynamic linker is run,
9428 this fails for emulation packages, because the libraries used 9450 this fails for emulation packages, because the libraries used
9429 by the emulation are not in the standard directories.</p> 9451 by the emulation are not in the standard directories.</p>
9430</div> 9452</div>
9431<div class="sect2"> 9453<div class="sect2">
9432<div class="titlepage"><div><div><h3 class="title"> 9454<div class="titlepage"><div><div><h3 class="title">
9433<a name="hicolor-theme"></a>21.6.16. Packages installing hicolor icons</h3></div></div></div> 9455<a name="hicolor-theme"></a>21.6.16. Packages installing hicolor icons</h3></div></div></div>
9434<p>If a package installs images under the 9456<p>If a package installs images under the
9435 <code class="filename">share/icons/hicolor</code> and/or updates the 9457 <code class="filename">share/icons/hicolor</code> and/or updates the
9436 <code class="filename">share/icons/hicolor/icon-theme.cache</code> 9458 <code class="filename">share/icons/hicolor/icon-theme.cache</code>
9437 database, you need to take some extra steps to make sure that the 9459 database, you need to take some extra steps to make sure that the
9438 shared theme directory is handled appropriately and that the cache 9460 shared theme directory is handled appropriately and that the cache
9439 database is rebuilt:</p> 9461 database is rebuilt:</p>
9440<div class="orderedlist"><ol class="orderedlist" type="1"> 9462<div class="orderedlist"><ol class="orderedlist" type="1">
9441<li class="listitem"><p>Include 9463<li class="listitem"><p>Include
9442 <code class="filename">../../graphics/hicolor-icon-theme/buildlink3.mk</code>.</p></li> 9464 <code class="filename">../../graphics/hicolor-icon-theme/buildlink3.mk</code>.</p></li>
9443<li class="listitem"><p>Check the <code class="filename">PLIST</code> and remove the 9465<li class="listitem"><p>Check the <code class="filename">PLIST</code> and remove the
9444 entry that refers to the theme cache.</p></li> 9466 entry that refers to the theme cache.</p></li>
9445<li class="listitem"><p>Ensure that the PLIST does not remove the shared icon 9467<li class="listitem"><p>Ensure that the PLIST does not remove the shared icon
9446 directories from the <code class="filename">share/icons/hicolor</code> 9468 directories from the <code class="filename">share/icons/hicolor</code>
9447 hierarchy because they will be handled automatically.</p></li> 9469 hierarchy because they will be handled automatically.</p></li>
9448</ol></div> 9470</ol></div>
9449<p>The best way to verify that the PLIST is correct with 9471<p>The best way to verify that the PLIST is correct with
9450 respect to the last two points is to regenerate it using 9472 respect to the last two points is to regenerate it using
9451 <span class="command"><strong>make print-PLIST</strong></span>.</p> 9473 <span class="command"><strong>make print-PLIST</strong></span>.</p>
9452</div> 9474</div>
9453<div class="sect2"> 9475<div class="sect2">
9454<div class="titlepage"><div><div><h3 class="title"> 9476<div class="titlepage"><div><div><h3 class="title">
9455<a name="desktop-files"></a>21.6.17. Packages installing desktop files</h3></div></div></div> 9477<a name="desktop-files"></a>21.6.17. Packages installing desktop files</h3></div></div></div>
9456<p>If a package installs <code class="filename">.desktop</code> files 9478<p>If a package installs <code class="filename">.desktop</code> files
9457 under <code class="filename">share/applications</code> and these include 9479 under <code class="filename">share/applications</code> and these include
9458 MIME information (MimeType key), you need to take extra steps to 9480 MIME information (MimeType key), you need to take extra steps to
9459 ensure that they are registered into the MIME database:</p> 9481 ensure that they are registered into the MIME database:</p>
9460<div class="orderedlist"><ol class="orderedlist" type="1"> 9482<div class="orderedlist"><ol class="orderedlist" type="1">
9461<li class="listitem"><p>Include 9483<li class="listitem"><p>Include
9462 <code class="filename">../../sysutils/desktop-file-utils/desktopdb.mk</code>.</p></li> 9484 <code class="filename">../../sysutils/desktop-file-utils/desktopdb.mk</code>.</p></li>
9463<li class="listitem"><p>Check the PLIST and remove the entry that refers to the 9485<li class="listitem"><p>Check the PLIST and remove the entry that refers to the
9464 <code class="filename">share/applications/mimeinfo.cache</code> file. 9486 <code class="filename">share/applications/mimeinfo.cache</code> file.
9465 It will be handled automatically.</p></li> 9487 It will be handled automatically.</p></li>
9466</ol></div> 9488</ol></div>
9467<p>The best way to verify that the PLIST is correct with 9489<p>The best way to verify that the PLIST is correct with
9468 respect to the last point is to regenerate it using <span class="command"><strong>make 9490 respect to the last point is to regenerate it using <span class="command"><strong>make
9469 print-PLIST</strong></span>.</p> 9491 print-PLIST</strong></span>.</p>
9470</div> 9492</div>
9471</div> 9493</div>
9472<div class="sect1"> 9494<div class="sect1">
9473<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 9495<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9474<a name="punting"></a>21.7. Marking packages as having problems</h2></div></div></div> 9496<a name="punting"></a>21.7. Marking packages as having problems</h2></div></div></div>
9475<p>In some cases one does not have the time to solve a problem 9497<p>In some cases one does not have the time to solve a problem
9476 immediately. In this case, one can plainly mark a package as broken. For 9498 immediately. In this case, one can plainly mark a package as broken. For
9477 this, one just sets the variable <code class="varname">BROKEN</code> to the 9499 this, one just sets the variable <code class="varname">BROKEN</code> to the
9478 reason why the package is broken (similar to the 9500 reason why the package is broken (similar to the
9479 <code class="varname">PKG_FAIL_REASON</code> variable). A user trying to build 9501 <code class="varname">PKG_FAIL_REASON</code> variable). A user trying to build
9480 the package will immediately be shown this message, and the build 9502 the package will immediately be shown this message, and the build
9481 will not be even tried.</p> 9503 will not be even tried.</p>
9482<p><code class="varname">BROKEN</code> packages are removed from pkgsrc in irregular 9504<p><code class="varname">BROKEN</code> packages are removed from pkgsrc in irregular
9483 intervals.</p> 9505 intervals.</p>
9484</div> 9506</div>
9485</div> 9507</div>
9486<div class="chapter"> 9508<div class="chapter">
9487<div class="titlepage"><div><div><h2 class="title"> 9509<div class="titlepage"><div><div><h2 class="title">
9488<a name="gnome"></a>Chapter 22. GNOME packaging and porting</h2></div></div></div> 9510<a name="gnome"></a>Chapter 22. GNOME packaging and porting</h2></div></div></div>
9489<div class="toc"> 9511<div class="toc">
9490<p><b>Table of Contents</b></p> 9512<p><b>Table of Contents</b></p>
9491<dl class="toc"> 9513<dl class="toc">
9492<dt><span class="sect1"><a href="#meta-packages">22.1. Meta packages</a></span></dt> 9514<dt><span class="sect1"><a href="#meta-packages">22.1. Meta packages</a></span></dt>
9493<dt><span class="sect1"><a href="#new-package">22.2. Packaging a GNOME application</a></span></dt> 9515<dt><span class="sect1"><a href="#new-package">22.2. Packaging a GNOME application</a></span></dt>
9494<dt><span class="sect1"><a href="#full-update">22.3. Updating GNOME to a newer version</a></span></dt> 9516<dt><span class="sect1"><a href="#full-update">22.3. Updating GNOME to a newer version</a></span></dt>
9495<dt><span class="sect1"><a href="#patching">22.4. Patching guidelines</a></span></dt> 9517<dt><span class="sect1"><a href="#patching">22.4. Patching guidelines</a></span></dt>
9496</dl> 9518</dl>
9497</div> 9519</div>
9498<p>Quoting <a class="ulink" href="https://www.gnome.org/" target="_top">GNOME's web 9520<p>Quoting <a class="ulink" href="https://www.gnome.org/" target="_top">GNOME's web
9499site</a>:</p> 9521site</a>:</p>
9500<div class="blockquote"><blockquote class="blockquote"><p>The GNOME project provides two things: The GNOME desktop 9522<div class="blockquote"><blockquote class="blockquote"><p>The GNOME project provides two things: The GNOME desktop
9501 environment, an intuitive and attractive desktop for users, and the 9523 environment, an intuitive and attractive desktop for users, and the
9502 GNOME development platform, an extensive framework for building 9524 GNOME development platform, an extensive framework for building
9503 applications that integrate into the rest of the desktop.</p></blockquote></div> 9525 applications that integrate into the rest of the desktop.</p></blockquote></div>
9504<p>pkgsrc provides a seamless way to automatically build and install 9526<p>pkgsrc provides a seamless way to automatically build and install
9505a complete GNOME environment <span class="emphasis"><em>under many different 9527a complete GNOME environment <span class="emphasis"><em>under many different
9506platforms</em></span>. We can say with confidence that pkgsrc is one of 9528platforms</em></span>. We can say with confidence that pkgsrc is one of
9507the most advanced build and packaging systems for GNOME due to its 9529the most advanced build and packaging systems for GNOME due to its
9508included technologies buildlink3, the wrappers and tools framework and 9530included technologies buildlink3, the wrappers and tools framework and
9509automatic configuration file management. Lots of efforts are put into 9531automatic configuration file management. Lots of efforts are put into
9510achieving a completely clean deinstallation of installed software 9532achieving a completely clean deinstallation of installed software
9511components.</p> 9533components.</p>
9512<p>Given that pkgsrc is <a class="ulink" href="https://www.NetBSD.org/" target="_top">NetBSD</a>'s official packaging system, 9534<p>Given that pkgsrc is <a class="ulink" href="https://www.NetBSD.org/" target="_top">NetBSD</a>'s official packaging system,
9513the above also means that great efforts are put into making GNOME work 9535the above also means that great efforts are put into making GNOME work
9514under this operating system.</p> 9536under this operating system.</p>
9515<p>This chapter is aimed at pkgsrc developers and other people 9537<p>This chapter is aimed at pkgsrc developers and other people
9516interested in helping our GNOME porting and packaging efforts. It 9538interested in helping our GNOME porting and packaging efforts. It
9517provides instructions on how to manage the existing packages and some 9539provides instructions on how to manage the existing packages and some
9518important information regarding their internals.</p> 9540important information regarding their internals.</p>
9519<div class="sect1"> 9541<div class="sect1">
9520<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 9542<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9521<a name="meta-packages"></a>22.1. Meta packages</h2></div></div></div> 9543<a name="meta-packages"></a>22.1. Meta packages</h2></div></div></div>
9522<p>pkgsrc includes three GNOME-related meta packages:</p> 9544<p>pkgsrc includes three GNOME-related meta packages:</p>
9523<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 9545<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
9524<li class="listitem"><p><a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome-base/index.html" target="_top"><code class="filename">meta-pkgs/gnome-base</code></a>: Provides 9546<li class="listitem"><p><a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome-base/index.html" target="_top"><code class="filename">meta-pkgs/gnome-base</code></a>: Provides
9525 the core GNOME desktop environment. It only includes the necessary 9547 the core GNOME desktop environment. It only includes the necessary
9526 bits to get it to boot correctly, although it may lack important 9548 bits to get it to boot correctly, although it may lack important
9527 functionality for daily operation. The idea behind this package is 9549 functionality for daily operation. The idea behind this package is
9528 to let end users build their own configurations on top of this one, 9550 to let end users build their own configurations on top of this one,
9529 first installing this meta package to achieve a functional setup and 9551 first installing this meta package to achieve a functional setup and
9530 then adding individual applications.</p></li> 9552 then adding individual applications.</p></li>
9531<li class="listitem"><p><a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome/index.html" target="_top"><code class="filename">meta-pkgs/gnome</code></a>: Provides a 9553<li class="listitem"><p><a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome/index.html" target="_top"><code class="filename">meta-pkgs/gnome</code></a>: Provides a
9532 complete installation of the GNOME platform and desktop as defined 9554 complete installation of the GNOME platform and desktop as defined
9533 by the GNOME project; this is based on the components distributed in 9555 by the GNOME project; this is based on the components distributed in
9534 the <code class="filename">platform/x.y/x.y.z/sources</code> and 9556 the <code class="filename">platform/x.y/x.y.z/sources</code> and
9535 <code class="filename">desktop/x.y/x.y.z/sources</code> directories of the 9557 <code class="filename">desktop/x.y/x.y.z/sources</code> directories of the
9536 official FTP server. Developer-only tools found in those 9558 official FTP server. Developer-only tools found in those
9537 directories are not installed unless required by some other 9559 directories are not installed unless required by some other
9538 component to work properly. Similarly, packages from the bindings 9560 component to work properly. Similarly, packages from the bindings
9539 set (<code class="filename">bindings/x.y/x.y.z/sources</code>) are not pulled 9561 set (<code class="filename">bindings/x.y/x.y.z/sources</code>) are not pulled
9540 in unless required as a dependency for an end-user component. This 9562 in unless required as a dependency for an end-user component. This
9541 package "extends" <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome-base/index.html" target="_top"><code class="filename">meta-pkgs/gnome-base</code></a>.</p></li> 9563 package "extends" <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome-base/index.html" target="_top"><code class="filename">meta-pkgs/gnome-base</code></a>.</p></li>
9542<li class="listitem"><p><a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome-devel/index.html" target="_top"><code class="filename">meta-pkgs/gnome-devel</code></a>: 9564<li class="listitem"><p><a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome-devel/index.html" target="_top"><code class="filename">meta-pkgs/gnome-devel</code></a>:
9543 Installs all the tools required to build a GNOME component when 9565 Installs all the tools required to build a GNOME component when
9544 fetched from the CVS repository. These are required to let the 9566 fetched from the CVS repository. These are required to let the
9545 <span class="command"><strong>autogen.sh</strong></span> scripts work appropriately.</p></li> 9567 <span class="command"><strong>autogen.sh</strong></span> scripts work appropriately.</p></li>
9546</ul></div> 9568</ul></div>
9547<p>In all these packages, the <code class="varname">DEPENDS</code> lines are 9569<p>In all these packages, the <code class="varname">DEPENDS</code> lines are
9548sorted in a way that eases updates: a package may depend on other 9570sorted in a way that eases updates: a package may depend on other
9549packages listed before it but not on any listed after it. It is very 9571packages listed before it but not on any listed after it. It is very
9550important to keep this order to ease updates so... <span class="emphasis"><em>do not 9572important to keep this order to ease updates so... <span class="emphasis"><em>do not
9551change it to alphabetical sorting!</em></span></p> 9573change it to alphabetical sorting!</em></span></p>
9552</div> 9574</div>
9553<div class="sect1"> 9575<div class="sect1">
9554<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 9576<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9555<a name="new-package"></a>22.2. Packaging a GNOME application</h2></div></div></div> 9577<a name="new-package"></a>22.2. Packaging a GNOME application</h2></div></div></div>
9556<p>Almost all GNOME applications are written in C and use a common 9578<p>Almost all GNOME applications are written in C and use a common
9557set of tools as their build system. Things get different with the new 9579set of tools as their build system. Things get different with the new
9558bindings to other languages (such as Python), but the following will 9580bindings to other languages (such as Python), but the following will
9559give you a general idea on the minimum required tools:</p> 9581give you a general idea on the minimum required tools:</p>
9560<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 9582<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
9561<li class="listitem"> 9583<li class="listitem">
9562<p>Almost all GNOME applications use the GNU Autotools as their 9584<p>Almost all GNOME applications use the GNU Autotools as their
9563 build system. As a general rule you will need to tell this to your 9585 build system. As a general rule you will need to tell this to your
9564 package:</p> 9586 package:</p>
9565<pre class="programlisting"> 9587<pre class="programlisting">
9566GNU_CONFIGURE= yes 9588GNU_CONFIGURE= yes
9567USE_LIBTOOL= yes 9589USE_LIBTOOL= yes
9568USE_TOOLS+= gmake 9590USE_TOOLS+= gmake
9569</pre> 9591</pre>
9570</li> 9592</li>
9571<li class="listitem"> 9593<li class="listitem">
9572<p>If the package uses pkg-config to detect dependencies, add this 9594<p>If the package uses pkg-config to detect dependencies, add this
9573 tool to the list of required utilities:</p> 9595 tool to the list of required utilities:</p>
9574<pre class="programlisting"> 9596<pre class="programlisting">
9575USE_TOOLS+= pkg-config 9597USE_TOOLS+= pkg-config
9576</pre> 9598</pre>
9577<p>Also use <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/verifypc/index.html" target="_top"><code class="filename">pkgtools/verifypc</code></a> at 9599<p>Also use <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/verifypc/index.html" target="_top"><code class="filename">pkgtools/verifypc</code></a> at
9578 the end of the build process to ensure that you did not miss to 9600 the end of the build process to ensure that you did not miss to
9579 specify any dependency in your package and that the version 9601 specify any dependency in your package and that the version
9580 requirements are all correct.</p> 9602 requirements are all correct.</p>
9581</li> 9603</li>
9582<li class="listitem"><p>If the package uses intltool, be sure to add 9604<li class="listitem"><p>If the package uses intltool, be sure to add
9583 <code class="literal">intltool</code> to the <code class="varname">USE_TOOLS</code> 9605 <code class="literal">intltool</code> to the <code class="varname">USE_TOOLS</code>
9584 to handle dependencies and to force the package to use the latest 9606 to handle dependencies and to force the package to use the latest
9585 available version.</p></li> 9607 available version.</p></li>
9586<li class="listitem"> 9608<li class="listitem">
9587<p>If the package uses gtk-doc (a documentation generation 9609<p>If the package uses gtk-doc (a documentation generation
9588 utility), do <span class="emphasis"><em>not</em></span> add a dependency on it. The 9610 utility), do <span class="emphasis"><em>not</em></span> add a dependency on it. The
9589 tool is rather big and the distfile should come with pregenerated 9611 tool is rather big and the distfile should come with pregenerated
9590 documentation anyway; if it does not, it is a bug that you ought to 9612 documentation anyway; if it does not, it is a bug that you ought to
9591 report. For such packages you should disable gtk-doc (unless it is 9613 report. For such packages you should disable gtk-doc (unless it is
9592 the default):</p> 9614 the default):</p>
9593<pre class="programlisting"> 9615<pre class="programlisting">
9594CONFIGURE_ARGS+= --disable-gtk-doc 9616CONFIGURE_ARGS+= --disable-gtk-doc
9595</pre> 9617</pre>
9596<p>The default location of installed HTML files 9618<p>The default location of installed HTML files
9597 (<code class="filename">share/gtk-doc/&lt;package-name&gt;</code>) is correct 9619 (<code class="filename">share/gtk-doc/&lt;package-name&gt;</code>) is correct
9598 and should not be changed unless the package insists on installing 9620 and should not be changed unless the package insists on installing
9599 them somewhere else. Otherwise programs as 9621 them somewhere else. Otherwise programs as
9600 <span class="command"><strong>devhelp</strong></span> will not be able to open them. You can 9622 <span class="command"><strong>devhelp</strong></span> will not be able to open them. You can
9601 do that with an entry similar to:</p> 9623 do that with an entry similar to:</p>
9602<pre class="programlisting"> 9624<pre class="programlisting">
9603CONFIGURE_ARGS+= --with-html-dir=${PREFIX}/share/gtk-doc/... 9625CONFIGURE_ARGS+= --with-html-dir=${PREFIX}/share/gtk-doc/...
9604</pre> 9626</pre>
9605</li> 9627</li>
9606</ul></div> 9628</ul></div>
9607<p>GNOME uses multiple <span class="emphasis"><em>shared</em></span> directories and 9629<p>GNOME uses multiple <span class="emphasis"><em>shared</em></span> directories and
9608files under the installation prefix to maintain databases. In this 9630files under the installation prefix to maintain databases. In this
9609context, shared means that those exact same directories and files are 9631context, shared means that those exact same directories and files are
9610used among several different packages, leading to conflicts in the 9632used among several different packages, leading to conflicts in the
9611<code class="filename">PLIST</code>. pkgsrc currently includes functionality to 9633<code class="filename">PLIST</code>. pkgsrc currently includes functionality to
9612handle the most common cases, so you have to forget about using 9634handle the most common cases, so you have to forget about using
9613<code class="literal">@unexec ${RMDIR}</code> lines in your file lists and 9635<code class="literal">@unexec ${RMDIR}</code> lines in your file lists and
9614omitting shared files from them. If you find yourself doing those, 9636omitting shared files from them. If you find yourself doing those,
9615<span class="emphasis"><em>your package is most likely incorrect</em></span>.</p> 9637<span class="emphasis"><em>your package is most likely incorrect</em></span>.</p>
9616<p>The following table lists the common situations that result in 9638<p>The following table lists the common situations that result in
9617using shared directories or files. For each of them, the appropriate 9639using shared directories or files. For each of them, the appropriate
9618solution is given. After applying the solution be sure to 9640solution is given. After applying the solution be sure to
9619<span class="emphasis"><em>regenerate the package's file list</em></span> with 9641<span class="emphasis"><em>regenerate the package's file list</em></span> with
9620<span class="command"><strong>make print-PLIST</strong></span> and ensure it is correct.</p> 9642<span class="command"><strong>make print-PLIST</strong></span> and ensure it is correct.</p>
9621<div class="table"> 9643<div class="table">
9622<a name="plist-handling"></a><p class="title"><b>Table 22.1. PLIST handling for GNOME packages</b></p> 9644<a name="plist-handling"></a><p class="title"><b>Table 22.1. PLIST handling for GNOME packages</b></p>
9623<div class="table-contents"><table class="table" summary="PLIST handling for GNOME packages" border="1"> 9645<div class="table-contents"><table class="table" summary="PLIST handling for GNOME packages" border="1">
9624<colgroup> 9646<colgroup>
9625<col> 9647<col>
9626<col> 9648<col>
9627</colgroup> 9649</colgroup>
9628<thead><tr> 9650<thead><tr>
9629<th>If the package...</th> 9651<th>If the package...</th>
9630<th>Then...</th> 9652<th>Then...</th>
9631</tr></thead> 9653</tr></thead>
9632<tbody> 9654<tbody>
9633<tr> 9655<tr>
9634<td>Installs icons under the 9656<td>Installs icons under the
9635 <code class="filename">share/icons/hicolor</code> hierarchy or updates 9657 <code class="filename">share/icons/hicolor</code> hierarchy or updates
9636 <code class="filename">share/icons/hicolor/icon-theme.cache</code>.</td> 9658 <code class="filename">share/icons/hicolor/icon-theme.cache</code>.</td>
9637<td>See <a class="xref" href="#hicolor-theme" title="21.6.16. Packages installing hicolor icons">Section 21.6.16, &#8220;Packages installing hicolor icons&#8221;</a>.</td> 9659<td>See <a class="xref" href="#hicolor-theme" title="21.6.16. Packages installing hicolor icons">Section 21.6.16, &#8220;Packages installing hicolor icons&#8221;</a>.</td>
9638</tr> 9660</tr>
9639<tr> 9661<tr>
9640<td>Installs files under 9662<td>Installs files under
9641 <code class="filename">share/mime/packages</code>.</td> 9663 <code class="filename">share/mime/packages</code>.</td>
9642<td>See <a class="xref" href="#mime-database" title="21.6.11. Packages installing extensions to the MIME database">Section 21.6.11, &#8220;Packages installing extensions to the MIME database&#8221;</a>.</td> 9664<td>See <a class="xref" href="#mime-database" title="21.6.11. Packages installing extensions to the MIME database">Section 21.6.11, &#8220;Packages installing extensions to the MIME database&#8221;</a>.</td>
9643</tr> 9665</tr>
9644<tr> 9666<tr>
9645<td>Installs <code class="filename">.desktop</code> files under 9667<td>Installs <code class="filename">.desktop</code> files under
9646 <code class="filename">share/applications</code> and these include MIME 9668 <code class="filename">share/applications</code> and these include MIME
9647 information.</td> 9669 information.</td>
9648<td>See <a class="xref" href="#desktop-files" title="21.6.17. Packages installing desktop files">Section 21.6.17, &#8220;Packages installing desktop files&#8221;</a>.</td> 9670<td>See <a class="xref" href="#desktop-files" title="21.6.17. Packages installing desktop files">Section 21.6.17, &#8220;Packages installing desktop files&#8221;</a>.</td>
9649</tr> 9671</tr>
9650</tbody> 9672</tbody>
9651</table></div> 9673</table></div>
9652</div> 9674</div>
9653<br class="table-break"> 9675<br class="table-break">
9654</div> 9676</div>
9655<div class="sect1"> 9677<div class="sect1">
9656<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 9678<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9657<a name="full-update"></a>22.3. Updating GNOME to a newer version</h2></div></div></div> 9679<a name="full-update"></a>22.3. Updating GNOME to a newer version</h2></div></div></div>
9658<p>When seeing GNOME as a whole, there are two kinds of 9680<p>When seeing GNOME as a whole, there are two kinds of
9659updates:</p> 9681updates:</p>
9660<div class="variablelist"><dl class="variablelist"> 9682<div class="variablelist"><dl class="variablelist">
9661<dt><span class="term">Major update</span></dt> 9683<dt><span class="term">Major update</span></dt>
9662<dd> 9684<dd>
9663<p>Given that there is still a very long way for GNOME 3 (if it 9685<p>Given that there is still a very long way for GNOME 3 (if it
9664 ever appears), we consider a major update one that goes from a 9686 ever appears), we consider a major update one that goes from a
9665 <code class="literal">2.X</code> version to a <code class="literal">2.Y</code> one, 9687 <code class="literal">2.X</code> version to a <code class="literal">2.Y</code> one,
9666 where <code class="literal">Y</code> is even and greater than 9688 where <code class="literal">Y</code> is even and greater than
9667 <code class="literal">X</code>. These are hard to achieve because they 9689 <code class="literal">X</code>. These are hard to achieve because they
9668 introduce lots of changes in the components' code and almost all 9690 introduce lots of changes in the components' code and almost all
9669 GNOME distfiles are updated to newer versions. Some of them can 9691 GNOME distfiles are updated to newer versions. Some of them can
9670 even break API and ABI compatibility with the previous major 9692 even break API and ABI compatibility with the previous major
9671 version series. As a result, the update needs to be done all at 9693 version series. As a result, the update needs to be done all at
9672 once to minimize breakage.</p> 9694 once to minimize breakage.</p>
9673<p>A major update typically consists of around 80 package 9695<p>A major update typically consists of around 80 package
9674 updates and the addition of some new ones.</p> 9696 updates and the addition of some new ones.</p>
9675</dd> 9697</dd>
9676<dt><span class="term">Minor update</span></dt> 9698<dt><span class="term">Minor update</span></dt>
9677<dd> 9699<dd>
9678<p>We consider a minor update one that goes from a 9700<p>We consider a minor update one that goes from a
9679 <code class="literal">2.A.X</code> version to a <code class="literal">2.A.Y</code> 9701 <code class="literal">2.A.X</code> version to a <code class="literal">2.A.Y</code>
9680 one where <code class="literal">Y</code> is greater than 9702 one where <code class="literal">Y</code> is greater than
9681 <code class="literal">X</code>. These are easy to achieve because they do 9703 <code class="literal">X</code>. These are easy to achieve because they do
9682 not update all GNOME components, can be done in an incremental way 9704 not update all GNOME components, can be done in an incremental way
9683 and do not break API nor ABI compatibility.</p> 9705 and do not break API nor ABI compatibility.</p>
9684<p>A minor update typically consists of around 50 package 9706<p>A minor update typically consists of around 50 package
9685 updates, although the numbers here may vary a lot.</p> 9707 updates, although the numbers here may vary a lot.</p>
9686</dd> 9708</dd>
9687</dl></div> 9709</dl></div>
9688<p>In order to update the GNOME components in pkgsrc to a new stable 9710<p>In order to update the GNOME components in pkgsrc to a new stable
9689release (either major or minor), the following steps should be 9711release (either major or minor), the following steps should be
9690followed:</p> 9712followed:</p>
9691<div class="orderedlist"><ol class="orderedlist" type="1"> 9713<div class="orderedlist"><ol class="orderedlist" type="1">
9692<li class="listitem"> 9714<li class="listitem">
9693<p>Get a list of all the tarballs that form the new release by 9715<p>Get a list of all the tarballs that form the new release by
9694 using the following commands. These will leave the full list of the 9716 using the following commands. These will leave the full list of the
9695 components' distfiles into the <code class="filename">list.txt</code> 9717 components' distfiles into the <code class="filename">list.txt</code>
9696 file:</p> 9718 file:</p>
9697<pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>echo ls "*.tar.bz2" | \ 9719<pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>echo ls "*.tar.bz2" | \
9698 ftp -V ftp://ftp.gnome.org/pub/gnome/platform/x.y/x.y.z/sources/ | \ 9720 ftp -V ftp://ftp.gnome.org/pub/gnome/platform/x.y/x.y.z/sources/ | \
9699 awk '{ print $9 }' &gt;list.txt</code></strong> 9721 awk '{ print $9 }' &gt;list.txt</code></strong>
9700<code class="prompt">%</code> <strong class="userinput"><code>echo ls "*.tar.bz2" | \ 9722<code class="prompt">%</code> <strong class="userinput"><code>echo ls "*.tar.bz2" | \
9701 ftp -V ftp://ftp.gnome.org/pub/gnome/desktop/x.y/x.y.z/sources/ | \ 9723 ftp -V ftp://ftp.gnome.org/pub/gnome/desktop/x.y/x.y.z/sources/ | \
9702 awk '{ print $9 }' &gt;&gt;list.txt</code></strong></pre> 9724 awk '{ print $9 }' &gt;&gt;list.txt</code></strong></pre>
9703</li> 9725</li>
9704<li class="listitem"><p>Open each meta package's <code class="filename">Makefile</code> and 9726<li class="listitem"><p>Open each meta package's <code class="filename">Makefile</code> and
9705 bump their version to the release you are updating them to. The 9727 bump their version to the release you are updating them to. The
9706 three meta packages should be always consistent with versioning. 9728 three meta packages should be always consistent with versioning.
9707 Obviously remove any <code class="varname">PKGREVISION</code>s that might be 9729 Obviously remove any <code class="varname">PKGREVISION</code>s that might be
9708 in them.</p></li> 9730 in them.</p></li>
9709<li class="listitem"> 9731<li class="listitem">
9710<p>For each meta package, update all its 9732<p>For each meta package, update all its
9711 <code class="varname">DEPENDS</code> lines to match the latest versions as 9733 <code class="varname">DEPENDS</code> lines to match the latest versions as
9712 shown by the above commands. Do <span class="emphasis"><em>not</em></span> list any 9734 shown by the above commands. Do <span class="emphasis"><em>not</em></span> list any
9713 newer version (even if found in the FTP) because the meta packages 9735 newer version (even if found in the FTP) because the meta packages
9714 are supposed to list the exact versions that form a specific GNOME 9736 are supposed to list the exact versions that form a specific GNOME
9715 release. Exceptions are permitted here if a newer version solves a 9737 release. Exceptions are permitted here if a newer version solves a
9716 serious issue in the overall desktop experience; these typically 9738 serious issue in the overall desktop experience; these typically
9717 come in the form of a revision bump in pkgsrc, not in newer versions 9739 come in the form of a revision bump in pkgsrc, not in newer versions
9718 from the developers.</p> 9740 from the developers.</p>
9719<p>Packages not listed in the <code class="filename">list.txt</code> file 9741<p>Packages not listed in the <code class="filename">list.txt</code> file
9720 should be updated to the latest version available (if found in 9742 should be updated to the latest version available (if found in
9721 pkgsrc). This is the case, for example, of the dependencies on the 9743 pkgsrc). This is the case, for example, of the dependencies on the
9722 GNU Autotools in the <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome-devel/index.html" target="_top"><code class="filename">meta-pkgs/gnome-devel</code></a> meta package.</p> 9744 GNU Autotools in the <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/gnome-devel/index.html" target="_top"><code class="filename">meta-pkgs/gnome-devel</code></a> meta package.</p>
9723</li> 9745</li>
9724<li class="listitem"> 9746<li class="listitem">
9725<p>Generate a patch from the modified meta packages and extract the 9747<p>Generate a patch from the modified meta packages and extract the
9726 list of "new" lines. This will provide you an outline on what 9748 list of "new" lines. This will provide you an outline on what
9727 packages need to be updated in pkgsrc and in what order:</p> 9749 packages need to be updated in pkgsrc and in what order:</p>
9728<pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>cvs diff -u gnome-devel gnome-base gnome | grep '^+D' &gt;todo.txt</code></strong></pre> 9750<pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>cvs diff -u gnome-devel gnome-base gnome | grep '^+D' &gt;todo.txt</code></strong></pre>
9729</li> 9751</li>
9730<li class="listitem"><p>For major desktop updates it is recommended to zap all your 9752<li class="listitem"><p>For major desktop updates it is recommended to zap all your
9731 installed packages and start over from scratch at this point.</p></li> 9753 installed packages and start over from scratch at this point.</p></li>
9732<li class="listitem"><p>Now comes the longest step by far: iterate over the contents 9754<li class="listitem"><p>Now comes the longest step by far: iterate over the contents
9733 of <code class="filename">todo.txt</code> and update the packages listed in 9755 of <code class="filename">todo.txt</code> and update the packages listed in
9734 it in order. For major desktop updates none of these should be 9756 it in order. For major desktop updates none of these should be
9735 committed until the entire set is completed because there are chances 9757 committed until the entire set is completed because there are chances
9736 of breaking not-yet-updated packages.</p></li> 9758 of breaking not-yet-updated packages.</p></li>
9737<li class="listitem"><p>Once the packages are up to date and working, commit them to 9759<li class="listitem"><p>Once the packages are up to date and working, commit them to
9738 the tree one by one with appropriate log messages. At the end, 9760 the tree one by one with appropriate log messages. At the end,
9739 commit the three meta package updates and all the corresponding 9761 commit the three meta package updates and all the corresponding
9740 changes to the <code class="filename">doc/CHANGES-&lt;YEAR&gt;</code> and 9762 changes to the <code class="filename">doc/CHANGES-&lt;YEAR&gt;</code> and
9741 <a href="http://cvsweb.NetBSD.org/bsdweb.cgi/pkgsrc/doc/TODO?rev=HEAD&amp;content-type=text/x-cvsweb-markup" target="_top"><code class="filename">pkgsrc/doc/TODO</code></a> files.</p></li> 9763 <a href="http://cvsweb.NetBSD.org/bsdweb.cgi/pkgsrc/doc/TODO?rev=HEAD&amp;content-type=text/x-cvsweb-markup" target="_top"><code class="filename">pkgsrc/doc/TODO</code></a> files.</p></li>
9742</ol></div> 9764</ol></div>
9743</div> 9765</div>
9744<div class="sect1"> 9766<div class="sect1">
9745<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 9767<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9746<a name="patching"></a>22.4. Patching guidelines</h2></div></div></div> 9768<a name="patching"></a>22.4. Patching guidelines</h2></div></div></div>
9747<p>GNOME is a very big component in pkgsrc which approaches 100 9769<p>GNOME is a very big component in pkgsrc which approaches 100
9748packages. Please, it is very important that you always, always, 9770packages. Please, it is very important that you always, always,
9749<span class="strong"><strong>always</strong></span> feed back any portability 9771<span class="strong"><strong>always</strong></span> feed back any portability
9750fixes you do to a GNOME package to the mainstream developers (see <a class="xref" href="#components.patches.feedback" title="12.3.5. Feedback to the author">Section 12.3.5, &#8220;Feedback to the author&#8221;</a>). This is the only way to get 9772fixes you do to a GNOME package to the mainstream developers (see <a class="xref" href="#components.patches.feedback" title="12.3.5. Feedback to the author">Section 12.3.5, &#8220;Feedback to the author&#8221;</a>). This is the only way to get
9751their attention on portability issues and to ensure that future versions 9773their attention on portability issues and to ensure that future versions
9752can be built out-of-the box on NetBSD. The less custom patches in 9774can be built out-of-the box on NetBSD. The less custom patches in
9753pkgsrc, the easier further updates are. Those developers in charge of 9775pkgsrc, the easier further updates are. Those developers in charge of
9754issuing major GNOME updates will be grateful if you do that.</p> 9776issuing major GNOME updates will be grateful if you do that.</p>
9755<p>The most common places to report bugs are the <a class="ulink" href="https://gitlab.gnome.org/GNOME" target="_top">GNOME's GitLab</a> and the <a class="ulink" href="https://gitlab.freedesktop.org/explore/groups" target="_top">freedesktop.org's 9777<p>The most common places to report bugs are the <a class="ulink" href="https://gitlab.gnome.org/GNOME" target="_top">GNOME's GitLab</a> and the <a class="ulink" href="https://gitlab.freedesktop.org/explore/groups" target="_top">freedesktop.org's
9756GitLab</a>. Not all components use these to track bugs, but most 9778GitLab</a>. Not all components use these to track bugs, but most
9757of them do. Do not be short on your reports: always provide detailed 9779of them do. Do not be short on your reports: always provide detailed
9758explanations of the current failure, how it can be improved to achieve 9780explanations of the current failure, how it can be improved to achieve
9759maximum portability and, if at all possible, provide a patch against the 9781maximum portability and, if at all possible, provide a patch against the
9760main Git branch. The more verbose you are, the higher chances of your 9782main Git branch. The more verbose you are, the higher chances of your
9761patch being accepted.</p> 9783patch being accepted.</p>
9762<p>Also, please avoid using preprocessor magic to fix portability 9784<p>Also, please avoid using preprocessor magic to fix portability
9763issues. While the FreeBSD GNOME people are doing a great job in porting 9785issues. While the FreeBSD GNOME people are doing a great job in porting
9764GNOME to their operating system, the official GNOME sources are now 9786GNOME to their operating system, the official GNOME sources are now
9765plagued by conditionals that check for <code class="varname">__FreeBSD__</code> 9787plagued by conditionals that check for <code class="varname">__FreeBSD__</code>
9766and similar macros. This hurts portability. Please see our patching 9788and similar macros. This hurts portability. Please see our patching
9767guidelines (<a class="xref" href="#components.patches.guidelines" title="12.3.4. Patching guidelines">Section 12.3.4, &#8220;Patching guidelines&#8221;</a>) for more 9789guidelines (<a class="xref" href="#components.patches.guidelines" title="12.3.4. Patching guidelines">Section 12.3.4, &#8220;Patching guidelines&#8221;</a>) for more
9768details.</p> 9790details.</p>
9769</div> 9791</div>
9770</div> 9792</div>
9771<div class="chapter"> 9793<div class="chapter">
9772<div class="titlepage"><div><div><h2 class="title"> 9794<div class="titlepage"><div><div><h2 class="title">
9773<a name="submit"></a>Chapter 23. Submitting and Committing</h2></div></div></div> 9795<a name="submit"></a>Chapter 23. Submitting and Committing</h2></div></div></div>
9774<div class="toc"> 9796<div class="toc">
9775<p><b>Table of Contents</b></p> 9797<p><b>Table of Contents</b></p>
9776<dl class="toc"> 9798<dl class="toc">
9777<dt><span class="sect1"><a href="#submitting-binary-packages">23.1. Submitting binary packages</a></span></dt> 9799<dt><span class="sect1"><a href="#submitting-binary-packages">23.1. Submitting binary packages</a></span></dt>
9778<dt><span class="sect1"><a href="#submitting-your-package">23.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt> 9800<dt><span class="sect1"><a href="#submitting-your-package">23.2. Submitting source packages (for non-NetBSD-developers)</a></span></dt>
9779<dt><span class="sect1"><a href="#general-notes-for-changes">23.3. General notes when adding, updating, or removing packages</a></span></dt> 9801<dt><span class="sect1"><a href="#general-notes-for-changes">23.3. General notes when adding, updating, or removing packages</a></span></dt>
9780<dt><span class="sect1"><a href="#commit-messages">23.4. Commit Messages</a></span></dt> 9802<dt><span class="sect1"><a href="#commit-messages">23.4. Commit Messages</a></span></dt>
9781<dt><span class="sect1"><a href="#committing-importing">23.5. Committing: Adding a package to CVS</a></span></dt> 9803<dt><span class="sect1"><a href="#committing-importing">23.5. Committing: Adding a package to CVS</a></span></dt>
9782<dt><span class="sect1"><a href="#updating-package">23.6. Updating a package to a newer version</a></span></dt> 9804<dt><span class="sect1"><a href="#updating-package">23.6. Updating a package to a newer version</a></span></dt>
9783<dt><span class="sect1"><a href="#renaming-package">23.7. Renaming a package in pkgsrc</a></span></dt> 9805<dt><span class="sect1"><a href="#renaming-package">23.7. Renaming a package in pkgsrc</a></span></dt>
9784<dt><span class="sect1"><a href="#moving-package">23.8. Moving a package in pkgsrc</a></span></dt> 9806<dt><span class="sect1"><a href="#moving-package">23.8. Moving a package in pkgsrc</a></span></dt>
9785</dl> 9807</dl>
9786</div> 9808</div>
9787<div class="sect1"> 9809<div class="sect1">
9788<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 9810<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9789<a name="submitting-binary-packages"></a>23.1. Submitting binary packages</h2></div></div></div> 9811<a name="submitting-binary-packages"></a>23.1. Submitting binary packages</h2></div></div></div>
9790<p>Our policy is that we accept binaries only from pkgsrc 9812<p>Our policy is that we accept binaries only from pkgsrc
9791 developers to guarantee that the packages don't contain any 9813 developers to guarantee that the packages don't contain any
9792 trojan horses etc. This is not to annoy anyone but rather to 9814 trojan horses etc. This is not to annoy anyone but rather to
9793 protect our users! You're still free to put up your home-made 9815 protect our users! You're still free to put up your home-made
9794 binary packages and tell the world where to get them. NetBSD 9816 binary packages and tell the world where to get them. NetBSD
9795 developers doing bulk builds and wanting to upload them please 9817 developers doing bulk builds and wanting to upload them please
9796 see <a class="xref" href="#bulk" title="Chapter 8. Creating binary packages for everything in pkgsrc (bulk builds)">Chapter 8, <i>Creating binary packages for everything in pkgsrc (bulk 9818 see <a class="xref" href="#bulk" title="Chapter 8. Creating binary packages for everything in pkgsrc (bulk builds)">Chapter 8, <i>Creating binary packages for everything in pkgsrc (bulk
9797builds)</i></a>.</p> 9819builds)</i></a>.</p>
9798</div> 9820</div>
9799<div class="sect1"> 9821<div class="sect1">
9800<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 9822<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9801<a name="submitting-your-package"></a>23.2. Submitting source packages (for non-NetBSD-developers)</h2></div></div></div> 9823<a name="submitting-your-package"></a>23.2. Submitting source packages (for non-NetBSD-developers)</h2></div></div></div>
9802<p>Firstly, you can import new packages into 9824<p>Firstly, you can import new packages into
9803 pkgsrc-wip (<span class="quote">&#8220;<span class="quote">pkgsrc work-in-progress</span>&#8221;</span>); see the 9825 pkgsrc-wip (<span class="quote">&#8220;<span class="quote">pkgsrc work-in-progress</span>&#8221;</span>); see the
9804 homepage at <a class="ulink" href="https://pkgsrc.org/wip/" target="_top">https://pkgsrc.org/wip/</a> 9826 homepage at <a class="ulink" href="https://pkgsrc.org/wip/" target="_top">https://pkgsrc.org/wip/</a>
9805 for details.</p> 9827 for details.</p>
9806<p>Next, check that your package is complete, compiles and 9828<p>Next, check that your package is complete, compiles and
9807 runs well; see <a class="xref" href="#creating" title="Chapter 14. Creating a new pkgsrc package from scratch">Chapter 14, <i>Creating a new pkgsrc package from scratch</i></a> and the rest of this 9829 runs well; see <a class="xref" href="#creating" title="Chapter 14. Creating a new pkgsrc package from scratch">Chapter 14, <i>Creating a new pkgsrc package from scratch</i></a> and the rest of this
9808 document. Run the <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/index.html" target="_top"><code class="filename">pkgtools/pkglint</code></a> 9830 document. Run the <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/index.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>
9809 tool and fix any errors that appear.</p> 9831 tool and fix any errors that appear.</p>
9810<p>Finally, send a report to the pkgsrc bug tracking system, 9832<p>Finally, send a report to the pkgsrc bug tracking system,
9811 either with the <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/send-pr.1"><span class="citerefentry"><span class="refentrytitle">send-pr</span>(1)</span></a> command, or if you don't have 9833 either with the <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/send-pr.1"><span class="citerefentry"><span class="refentrytitle">send-pr</span>(1)</span></a> command, or if you don't have
9812 that, go to the web page 9834 that, go to the web page
9813 <a class="ulink" href="https://www.NetBSD.org/support/send-pr.html" target="_top">https://www.NetBSD.org/support/send-pr.html</a>, 9835 <a class="ulink" href="https://www.NetBSD.org/support/send-pr.html" target="_top">https://www.NetBSD.org/support/send-pr.html</a>,
9814 which contains some instructions and a link to a form where you 9836 which contains some instructions and a link to a form where you
9815 can submit packages. The 9837 can submit packages. The
9816 <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/sysutils/gtk-send-pr/index.html" target="_top"><code class="filename">sysutils/gtk-send-pr</code></a> package is 9838 <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/sysutils/gtk-send-pr/index.html" target="_top"><code class="filename">sysutils/gtk-send-pr</code></a> package is
9817 also available as a substitute for either of the above two tools. 9839 also available as a substitute for either of the above two tools.
9818 </p> 9840 </p>
9819<p>In the form of the problem report, the category should be 9841<p>In the form of the problem report, the category should be
9820 <span class="quote">&#8220;<span class="quote">pkg</span>&#8221;</span>, the synopsis should include the package name 9842 <span class="quote">&#8220;<span class="quote">pkg</span>&#8221;</span>, the synopsis should include the package name
9821 and version number, and the description field should contain a 9843 and version number, and the description field should contain a
9822 short description of your package (contents of the COMMENT 9844 short description of your package (contents of the COMMENT
9823 variable or DESCR file are OK).</p> 9845 variable or DESCR file are OK).</p>
9824</div> 9846</div>
9825<div class="sect1"> 9847<div class="sect1">
9826<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 9848<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9827<a name="general-notes-for-changes"></a>23.3. General notes when adding, updating, or removing packages</h2></div></div></div> 9849<a name="general-notes-for-changes"></a>23.3. General notes when adding, updating, or removing packages</h2></div></div></div>
9828<p>Please note all package additions, updates, moves, and 9850<p>Please note all package additions, updates, moves, and
9829 removals in <code class="filename">pkgsrc/doc/CHANGES-<em class="replaceable"><code>YYYY</code></em></code>. It's very 9851 removals in <code class="filename">pkgsrc/doc/CHANGES-<em class="replaceable"><code>YYYY</code></em></code>. It's very
9830 important to keep this file up to date and conforming to the 9852 important to keep this file up to date and conforming to the
9831 existing format, because it will be used by scripts to 9853 existing format, because it will be used by scripts to
9832 automatically update pages on <a class="ulink" href="https://www.NetBSD.org/" target="_top">www.NetBSD.org</a> and other 9854 automatically update pages on <a class="ulink" href="https://www.NetBSD.org/" target="_top">www.NetBSD.org</a> and other
9833 sites. Additionally, check the 9855 sites. Additionally, check the
9834 <code class="filename">pkgsrc/doc/TODO</code> file and remove the entry 9856 <code class="filename">pkgsrc/doc/TODO</code> file and remove the entry
9835 for the package you updated or removed, in case it was mentioned 9857 for the package you updated or removed, in case it was mentioned
9836 there.</p> 9858 there.</p>
9837<p>When the <code class="varname">PKGREVISION</code> of a package is 9859<p>When the <code class="varname">PKGREVISION</code> of a package is
9838 bumped, the change should appear in 9860 bumped, the change should appear in
9839 <code class="filename">pkgsrc/doc/CHANGES-<em class="replaceable"><code>YYYY</code></em></code> if it is security 9861 <code class="filename">pkgsrc/doc/CHANGES-<em class="replaceable"><code>YYYY</code></em></code> if it is security
9840 related or otherwise relevant. Mass bumps that result from a 9862 related or otherwise relevant. Mass bumps that result from a
9841 dependency being updated should not be mentioned. In all other 9863 dependency being updated should not be mentioned. In all other
9842 cases it's the developer's decision.</p> 9864 cases it's the developer's decision.</p>
9843<p>There is a make target that helps in creating proper 9865<p>There is a make target that helps in creating proper
9844 <code class="filename">CHANGES-<em class="replaceable"><code>YYYY</code></em></code> entries: <span class="command"><strong>make 9866 <code class="filename">CHANGES-<em class="replaceable"><code>YYYY</code></em></code> entries: <span class="command"><strong>make
9845 changes-entry</strong></span>. It uses the optional <code class="varname">CTYPE</code> 9867 changes-entry</strong></span>. It uses the optional <code class="varname">CTYPE</code>
9846 and <code class="varname">NETBSD_LOGIN_NAME</code> variables. The general 9868 and <code class="varname">NETBSD_LOGIN_NAME</code> variables. The general
9847 usage is to first make sure that your <code class="filename">CHANGES-<em class="replaceable"><code>YYYY</code></em></code> 9869 usage is to first make sure that your <code class="filename">CHANGES-<em class="replaceable"><code>YYYY</code></em></code>
9848 file is up-to-date (to avoid having to resolve conflicts later-on) 9870 file is up-to-date (to avoid having to resolve conflicts later-on)
9849 and then to <span class="command"><strong>cd</strong></span> to the package directory. For 9871 and then to <span class="command"><strong>cd</strong></span> to the package directory. For
9850 package updates, <span class="command"><strong>make changes-entry</strong></span> is enough. 9872 package updates, <span class="command"><strong>make changes-entry</strong></span> is enough.
9851 For new packages, or package moves or removals, set the 9873 For new packages, or package moves or removals, set the
9852 <code class="varname">CTYPE</code> variable on the command line to "Added", 9874 <code class="varname">CTYPE</code> variable on the command line to "Added",
9853 "Moved", or "Removed". You can set <code class="varname">NETBSD_LOGIN_NAME</code> 9875 "Moved", or "Removed". You can set <code class="varname">NETBSD_LOGIN_NAME</code>
9854 in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> if your local login name is 9876 in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> if your local login name is
9855 not the same as your NetBSD login name. The target also automatically 9877 not the same as your NetBSD login name. The target also automatically
9856 removes possibly existing entries for the package in the 9878 removes possibly existing entries for the package in the
9857 <code class="filename">TODO</code> file. Don't forget to commit 9879 <code class="filename">TODO</code> file. Don't forget to commit
9858 the changes, e.g. by using <span class="command"><strong>make commit-changes-entry</strong></span>! 9880 the changes, e.g. by using <span class="command"><strong>make commit-changes-entry</strong></span>!
9859 If you are not using a checkout directly from cvs.NetBSD.org, but e.g. 9881 If you are not using a checkout directly from cvs.NetBSD.org, but e.g.
9860 a local copy of the repository, you can set USE_NETBSD_REPO=yes. This 9882 a local copy of the repository, you can set USE_NETBSD_REPO=yes. This
9861 makes the cvs commands use the main repository. 9883 makes the cvs commands use the main repository.
9862 </p> 9884 </p>
9863</div> 9885</div>
9864<div class="sect1"> 9886<div class="sect1">
9865<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 9887<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9866<a name="commit-messages"></a>23.4. Commit Messages</h2></div></div></div> 9888<a name="commit-messages"></a>23.4. Commit Messages</h2></div></div></div>
9867<p>For several years, there have been mirrors of pkgsrc in 9889<p>For several years, there have been mirrors of pkgsrc in
9868 fossil, git, and hg. Standard practise when using these tools is to 9890 fossil, git, and hg. Standard practise when using these tools is to
9869 make the first line of a commit message function as a summary that 9891 make the first line of a commit message function as a summary that
9870 can be read without the rest, such as is commonly done with "git log 9892 can be read without the rest, such as is commonly done with "git log
9871 --oneline". For this reason, we have the following guidelines for 9893 --oneline". For this reason, we have the following guidelines for
9872 pkgsrc commit messages:</p> 9894 pkgsrc commit messages:</p>
9873<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 9895<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
9874<li class="listitem"><p>Start the commit message with a line that explains the 9896<li class="listitem"><p>Start the commit message with a line that explains the
9875 big picture in 65 characters or less. When a commit is for one 9897 big picture in 65 characters or less. When a commit is for one
9876 package, include the name of the package. For updates, include the 9898 package, include the name of the package. For updates, include the
9877 version to which it is updated.</p></li> 9899 version to which it is updated.</p></li>
9878<li class="listitem"><p>Leave the next line empty.</p></li> 9900<li class="listitem"><p>Leave the next line empty.</p></li>
9879<li class="listitem"><p>Then come the details for the commit (changes in that 9901<li class="listitem"><p>Then come the details for the commit (changes in that
9880 package, reason for a change) and any relevant PRs. Wrap this 9902 package, reason for a change) and any relevant PRs. Wrap this
9881 section.</p></li> 9903 section.</p></li>
9882</ul></div> 9904</ul></div>
9883<p>Here is an example: 9905<p>Here is an example:
9884 </p> 9906 </p>
9885<pre class="programlisting"> 9907<pre class="programlisting">
9886 libxslt: update to 1.0.30 9908 libxslt: update to 1.0.30
9887 9909
9888 Changes since 1.0.29: 9910 Changes since 1.0.29:
9889 ... 9911 ...
9890 </pre> 9912 </pre>
9891<p> 9913<p>
9892 </p> 9914 </p>
9893<p>Here is another example: 9915<p>Here is another example:
9894 </p> 9916 </p>
9895<pre class="programlisting"> 9917<pre class="programlisting">
9896 mk/bsd.pkg.mk: enable SSP by default on NetBSD 9918 mk/bsd.pkg.mk: enable SSP by default on NetBSD
9897 9919
9898 (rationale) 9920 (rationale)
9899 </pre> 9921 </pre>
9900<p> 9922<p>
9901 </p> 9923 </p>
9902<p>Commit messages are final: no <span class="quote">&#8220;<span class="quote">cvs admin</span>&#8221;</span> is 9924<p>Commit messages are final: no <span class="quote">&#8220;<span class="quote">cvs admin</span>&#8221;</span> is
9903 allowed on the pkgsrc repository to change commit messages.</p> 9925 allowed on the pkgsrc repository to change commit messages.</p>
9904</div> 9926</div>
9905<div class="sect1"> 9927<div class="sect1">
9906<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 9928<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9907<a name="committing-importing"></a>23.5. Committing: Adding a package to CVS</h2></div></div></div> 9929<a name="committing-importing"></a>23.5. Committing: Adding a package to CVS</h2></div></div></div>
9908<p>This section is only of interest for pkgsrc developers with write 9930<p>This section is only of interest for pkgsrc developers with write
9909 access to the pkgsrc repository.</p> 9931 access to the pkgsrc repository.</p>
9910<p>When the package is finished, <span class="quote">&#8220;<span class="quote">cvs add</span>&#8221;</span> the files. 9932<p>When the package is finished, <span class="quote">&#8220;<span class="quote">cvs add</span>&#8221;</span> the files.
9911Start by adding the directory and then files in the directory. Don't 9933Start by adding the directory and then files in the directory. Don't
9912forget to add the new package to the category's 9934forget to add the new package to the category's
9913<code class="filename">Makefile</code>. Make sure you don't forget any files; 9935<code class="filename">Makefile</code>. Make sure you don't forget any files;
9914you can check by running <span class="quote">&#8220;<span class="quote">cvs status</span>&#8221;</span>. An example:</p> 9936you can check by running <span class="quote">&#8220;<span class="quote">cvs status</span>&#8221;</span>. An example:</p>
9915<pre class="programlisting"> 9937<pre class="programlisting">
9916<code class="prompt">$</code> cd .../pkgsrc/category 9938<code class="prompt">$</code> cd .../pkgsrc/category
9917<code class="prompt">$</code> cvs add pkgname 9939<code class="prompt">$</code> cvs add pkgname
9918<code class="prompt">$</code> cd pkgname 9940<code class="prompt">$</code> cd pkgname
9919<code class="prompt">$</code> cvs add DESCR Makefile PLIST distinfo buildlink3.mk patches 9941<code class="prompt">$</code> cvs add DESCR Makefile PLIST distinfo buildlink3.mk patches
9920<code class="prompt">$</code> cvs add patches/p* 9942<code class="prompt">$</code> cvs add patches/p*
9921<code class="prompt">$</code> cvs status | less 9943<code class="prompt">$</code> cvs status | less
9922<code class="prompt">$</code> cvs commit 9944<code class="prompt">$</code> cvs commit
9923<code class="prompt">$</code> cd .. 9945<code class="prompt">$</code> cd ..
9924<code class="prompt">$</code> vi Makefile # add SUBDIRS+=pkgname line 9946<code class="prompt">$</code> vi Makefile # add SUBDIRS+=pkgname line
9925<code class="prompt">$</code> cvs commit Makefile 9947<code class="prompt">$</code> cvs commit Makefile
9926<code class="prompt">$</code> cd pkgname 9948<code class="prompt">$</code> cd pkgname
9927<code class="prompt">$</code> make CTYPE=Added commit-changes-entry 9949<code class="prompt">$</code> make CTYPE=Added commit-changes-entry
9928</pre> 9950</pre>
9929<p>The commit message of the initial import should include part of the 9951<p>The commit message of the initial import should include part of the
9930 <code class="filename">DESCR</code> file, so people reading the mailing lists know 9952 <code class="filename">DESCR</code> file, so people reading the mailing lists know
9931 what the package is/does.</p> 9953 what the package is/does.</p>
9932<p>Also mention the new package in 9954<p>Also mention the new package in
9933<code class="filename">pkgsrc/doc/CHANGES-20xx</code>.</p> 9955<code class="filename">pkgsrc/doc/CHANGES-20xx</code>.</p>
9934<p>Previously, <span class="quote">&#8220;<span class="quote">cvs import</span>&#8221;</span> was suggested, but it was 9956<p>Previously, <span class="quote">&#8220;<span class="quote">cvs import</span>&#8221;</span> was suggested, but it was
9935much easier to get wrong than <span class="quote">&#8220;<span class="quote">cvs add</span>&#8221;</span>.</p> 9957much easier to get wrong than <span class="quote">&#8220;<span class="quote">cvs add</span>&#8221;</span>.</p>
9936</div> 9958</div>
9937<div class="sect1"> 9959<div class="sect1">
9938<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 9960<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9939<a name="updating-package"></a>23.6. Updating a package to a newer version</h2></div></div></div> 9961<a name="updating-package"></a>23.6. Updating a package to a newer version</h2></div></div></div>
9940<p>Please always put a concise, appropriate and relevant summary of the 9962<p>Please always put a concise, appropriate and relevant summary of the
9941 changes between old and new versions into the commit log when updating 9963 changes between old and new versions into the commit log when updating
9942 a package. There are various reasons for this:</p> 9964 a package. There are various reasons for this:</p>
9943<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 9965<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
9944<li class="listitem"><p>A URL is volatile, and can change over time. It may go away completely 9966<li class="listitem"><p>A URL is volatile, and can change over time. It may go away completely
9945 or its information may be overwritten by newer information.</p></li> 9967 or its information may be overwritten by newer information.</p></li>
9946<li class="listitem"><p>Having the change information between old and new versions in our CVS 9968<li class="listitem"><p>Having the change information between old and new versions in our CVS
9947 repository is very useful for people who use either cvs or anoncvs.</p></li> 9969 repository is very useful for people who use either cvs or anoncvs.</p></li>
9948<li class="listitem"><p>Having the change information between old and new versions in our CVS 9970<li class="listitem"><p>Having the change information between old and new versions in our CVS
9949 repository is very useful for people who read the pkgsrc-changes mailing 9971 repository is very useful for people who read the pkgsrc-changes mailing
9950 list, so that they can make tactical decisions about when to upgrade 9972 list, so that they can make tactical decisions about when to upgrade
9951 the package.</p></li> 9973 the package.</p></li>
9952</ul></div> 9974</ul></div>
9953<p>Please also recognize that, just because a new version of a package 9975<p>Please also recognize that, just because a new version of a package
9954 has been released, it should not automatically be upgraded in the CVS 9976 has been released, it should not automatically be upgraded in the CVS
9955 repository. We prefer to be conservative in the packages that are 9977 repository. We prefer to be conservative in the packages that are
9956 included in pkgsrc - development or beta packages are not really the 9978 included in pkgsrc - development or beta packages are not really the
9957 best thing for most places in which pkgsrc is used. Please use your 9979 best thing for most places in which pkgsrc is used. Please use your
9958 judgement about what should go into pkgsrc, and bear in mind that 9980 judgement about what should go into pkgsrc, and bear in mind that
9959 stability is to be preferred above new and possibly untested features.</p> 9981 stability is to be preferred above new and possibly untested features.</p>
9960</div> 9982</div>
9961<div class="sect1"> 9983<div class="sect1">
9962<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 9984<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9963<a name="renaming-package"></a>23.7. Renaming a package in pkgsrc</h2></div></div></div> 9985<a name="renaming-package"></a>23.7. Renaming a package in pkgsrc</h2></div></div></div>
9964<p>Renaming packages is not recommended.</p> 9986<p>Renaming packages is not recommended.</p>
9965<p>When renaming packages, be sure to fix any references to the old name 9987<p>When renaming packages, be sure to fix any references to the old name
9966 in other Makefiles, options, buildlink files, etc.</p> 9988 in other Makefiles, options, buildlink files, etc.</p>
9967<p> 9989<p>
9968 Also, when renaming a package, please add 9990 Also, when renaming a package, please add
9969 the package name and version pattern(s) of the previous package 9991 the package name and version pattern(s) of the previous package
9970 to <code class="varname">SUPERSEDES</code>. 9992 to <code class="varname">SUPERSEDES</code>.
9971 This may be repeated for multiple renames. 9993 This may be repeated for multiple renames.
9972 The new package would be an exact replacement. 9994 The new package would be an exact replacement.
9973 Example: 9995 Example:
9974</p> 9996</p>
9975<pre class="programlisting"> 9997<pre class="programlisting">
9976SUPERSEDES+= p5-IO-Compress-Zlib&lt;2.017 9998SUPERSEDES+= p5-IO-Compress-Zlib&lt;2.017
9977SUPERSEDES+= optcomp-[0-9]* 9999SUPERSEDES+= optcomp-[0-9]*
9978</pre> 10000</pre>
9979<p>Note that <span class="quote">&#8220;<span class="quote">successor</span>&#8221;</span> in the 10001<p>Note that <span class="quote">&#8220;<span class="quote">successor</span>&#8221;</span> in the
9980 CHANGES-<em class="replaceable"><code>YYYY</code></em> file doesn't necessarily 10002 CHANGES-<em class="replaceable"><code>YYYY</code></em> file doesn't necessarily
9981 mean that it <span class="emphasis"><em>supersedes</em></span>, as that successor may 10003 mean that it <span class="emphasis"><em>supersedes</em></span>, as that successor may
9982 not be an exact replacement but is a suggestion for the replaced 10004 not be an exact replacement but is a suggestion for the replaced
9983 functionality.</p> 10005 functionality.</p>
9984</div> 10006</div>
9985<div class="sect1"> 10007<div class="sect1">
9986<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 10008<div class="titlepage"><div><div><h2 class="title" style="clear: both">
9987<a name="moving-package"></a>23.8. Moving a package in pkgsrc</h2></div></div></div> 10009<a name="moving-package"></a>23.8. Moving a package in pkgsrc</h2></div></div></div>
9988<p>It is preferred that packages are not renamed or moved, but if needed 10010<p>It is preferred that packages are not renamed or moved, but if needed
9989 please follow these steps. 10011 please follow these steps.
9990</p> 10012</p>
9991<div class="orderedlist"><ol class="orderedlist" type="1"> 10013<div class="orderedlist"><ol class="orderedlist" type="1">
9992<li class="listitem"><p>Make a copy of the directory somewhere else.</p></li> 10014<li class="listitem"><p>Make a copy of the directory somewhere else.</p></li>
9993<li class="listitem"> 10015<li class="listitem">
9994<p>Remove all CVS dirs.</p> 10016<p>Remove all CVS dirs.</p>
9995<p>Alternatively to the first two steps you can also do:</p> 10017<p>Alternatively to the first two steps you can also do:</p>
@@ -10803,4112 +10825,3976 @@ output_require "^[[:alpha:]+[[:space:]][ @@ -10803,4112 +10825,3976 @@ output_require "^[[:alpha:]+[[:space:]][
10803DISTNAME= bison-1.25 10825DISTNAME= bison-1.25
10804CATEGORIES= devel 10826CATEGORIES= devel
10805MASTER_SITES= ${MASTER_SITE_GNU:=bison/} 10827MASTER_SITES= ${MASTER_SITE_GNU:=bison/}
10806 10828
10807MAINTAINER= pkgsrc-users@NetBSD.org 10829MAINTAINER= pkgsrc-users@NetBSD.org
10808HOMEPAGE= https://www.gnu.org/software/bison/bison.html 10830HOMEPAGE= https://www.gnu.org/software/bison/bison.html
10809COMMENT= GNU yacc clone 10831COMMENT= GNU yacc clone
10810 10832
10811GNU_CONFIGURE= yes 10833GNU_CONFIGURE= yes
10812INFO_FILES= yes 10834INFO_FILES= yes
10813 10835
10814.include "../../mk/bsd.pkg.mk" 10836.include "../../mk/bsd.pkg.mk"
10815</pre> 10837</pre>
10816</div> 10838</div>
10817<div class="sect2"> 10839<div class="sect2">
10818<div class="titlepage"><div><div><h3 class="title"> 10840<div class="titlepage"><div><div><h3 class="title">
10819<a name="example-descr"></a>A.1.2. DESCR</h3></div></div></div> 10841<a name="example-descr"></a>A.1.2. DESCR</h3></div></div></div>
10820<pre class="programlisting"> 10842<pre class="programlisting">
10821GNU version of yacc. Can make re-entrant parsers, and numerous other 10843GNU version of yacc. Can make re-entrant parsers, and numerous other
10822improvements. Why you would want this when Berkeley <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/yacc.1"><span class="citerefentry"><span class="refentrytitle">yacc</span>(1)</span></a> is part 10844improvements. Why you would want this when Berkeley <a class="citerefentry" href="https://man.NetBSD.org/NetBSD-9.2/i386/yacc.1"><span class="citerefentry"><span class="refentrytitle">yacc</span>(1)</span></a> is part
10823of the NetBSD source tree is beyond me. 10845of the NetBSD source tree is beyond me.
10824</pre> 10846</pre>
10825</div> 10847</div>
10826<div class="sect2"> 10848<div class="sect2">
10827<div class="titlepage"><div><div><h3 class="title"> 10849<div class="titlepage"><div><div><h3 class="title">
10828<a name="example-plist"></a>A.1.3. PLIST</h3></div></div></div> 10850<a name="example-plist"></a>A.1.3. PLIST</h3></div></div></div>
10829<pre class="programlisting"> 10851<pre class="programlisting">
10830@comment $NetBSD$ 10852@comment $NetBSD$
10831bin/bison 10853bin/bison
10832man/man1/bison.1.gz 10854man/man1/bison.1.gz
10833share/bison.simple 10855share/bison.simple
10834share/bison.hairy 10856share/bison.hairy
10835</pre> 10857</pre>
10836</div> 10858</div>
10837<div class="sect2"> 10859<div class="sect2">
10838<div class="titlepage"><div><div><h3 class="title"> 10860<div class="titlepage"><div><div><h3 class="title">
10839<a name="checking-package-with-pkglint"></a>A.1.4. Checking a package with pkglint</h3></div></div></div> 10861<a name="checking-package-with-pkglint"></a>A.1.4. Checking a package with pkglint</h3></div></div></div>
10840<p>The NetBSD package system comes with 10862<p>The NetBSD package system comes with
10841 <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/index.html" target="_top"><code class="filename">pkgtools/pkglint</code></a> 10863 <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/index.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>
10842 which helps to check the contents of these 10864 which helps to check the contents of these
10843 files. After installation it is quite easy to use, just change to the 10865 files. After installation it is quite easy to use, just change to the
10844 directory of the package you wish to examine and run 10866 directory of the package you wish to examine and run
10845 <span class="command"><strong>pkglint</strong></span>:</p> 10867 <span class="command"><strong>pkglint</strong></span>:</p>
10846<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>pkglint</code></strong> 10868<pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code>pkglint</code></strong>
10847ERROR: Makefile: Each package must define its LICENSE. 10869ERROR: Makefile: Each package must define its LICENSE.
10848WARN: Makefile:9: HOMEPAGE should migrate from http to https. 10870WARN: Makefile:9: HOMEPAGE should migrate from http to https.
10849NOTE: PLIST:3: The .gz extension is unnecessary for manual pages. 10871NOTE: PLIST:3: The .gz extension is unnecessary for manual pages.
10850WARN: PLIST:5: "share/bison.hairy" should be sorted before "share/bison.simple". 10872WARN: PLIST:5: "share/bison.hairy" should be sorted before "share/bison.simple".
108511 error, 2 warnings and 1 note found. 108731 error, 2 warnings and 1 note found.
10852(Run "pkglint -e" to show explanations.) 10874(Run "pkglint -e" to show explanations.)
10853(Run "pkglint -fs" to show what can be fixed automatically.) 10875(Run "pkglint -fs" to show what can be fixed automatically.)
10854(Run "pkglint -F" to automatically fix some issues.)</pre> 10876(Run "pkglint -F" to automatically fix some issues.)</pre>
10855<p>Depending on the supplied command line arguments (see pkglint(1)), 10877<p>Depending on the supplied command line arguments (see pkglint(1)),
10856 more checks will be performed. Use e.g. <span class="command"><strong>pkglint 10878 more checks will be performed. Use e.g. <span class="command"><strong>pkglint
10857 -Wall</strong></span> for a very thorough check.</p> 10879 -Wall</strong></span> for a very thorough check.</p>
10858</div> 10880</div>
10859</div> 10881</div>
10860<div class="sect1"> 10882<div class="sect1">
10861<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 10883<div class="titlepage"><div><div><h2 class="title" style="clear: both">
10862<a name="steps-for-b-i-p"></a>A.2. Steps for building, installing, packaging</h2></div></div></div> 10884<a name="steps-for-b-i-p"></a>A.2. Steps for building, installing, packaging</h2></div></div></div>
10863<p>Create the directory where the package lives, 10885<p>Create the directory where the package lives,
10864 plus any auxiliary directories:</p> 10886 plus any auxiliary directories:</p>
10865<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>cd /usr/pkgsrc/lang</code></strong> 10887<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>cd /usr/pkgsrc/lang</code></strong>
10866<code class="prompt">#</code> <strong class="userinput"><code>mkdir bison</code></strong> 10888<code class="prompt">#</code> <strong class="userinput"><code>mkdir bison</code></strong>
10867<code class="prompt">#</code> <strong class="userinput"><code>cd bison</code></strong> 10889<code class="prompt">#</code> <strong class="userinput"><code>cd bison</code></strong>
10868<code class="prompt">#</code> <strong class="userinput"><code>mkdir patches</code></strong></pre> 10890<code class="prompt">#</code> <strong class="userinput"><code>mkdir patches</code></strong></pre>
10869<p>Create <code class="filename">Makefile</code>, <code class="filename">DESCR</code> and 10891<p>Create <code class="filename">Makefile</code>, <code class="filename">DESCR</code> and
10870 <code class="filename">PLIST</code> (see <a class="xref" href="#components" title="Chapter 12. Package components - files, directories and contents">Chapter 12, <i>Package components - files, directories and contents</i></a>) 10892 <code class="filename">PLIST</code> (see <a class="xref" href="#components" title="Chapter 12. Package components - files, directories and contents">Chapter 12, <i>Package components - files, directories and contents</i></a>)
10871 then continue with fetching the distfile:</p> 10893 then continue with fetching the distfile:</p>
10872<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make fetch</code></strong> 10894<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make fetch</code></strong>
10873&gt;&gt; bison-1.25.tar.gz doesn't seem to exist on this system. 10895&gt;&gt; bison-1.25.tar.gz doesn't seem to exist on this system.
10874&gt;&gt; Attempting to fetch from ftp://prep.ai.mit.edu/pub/gnu//. 10896&gt;&gt; Attempting to fetch from ftp://prep.ai.mit.edu/pub/gnu//.
10875Requesting ftp://prep.ai.mit.edu/pub/gnu//bison-1.25.tar.gz (via ftp://orpheus.amdahl.com:80/) 10897Requesting ftp://prep.ai.mit.edu/pub/gnu//bison-1.25.tar.gz (via ftp://orpheus.amdahl.com:80/)
10876ftp: Error retrieving file: 500 Internal error 10898ftp: Error retrieving file: 500 Internal error
10877 10899
10878&gt;&gt; Attempting to fetch from ftp://wuarchive.wustl.edu/systems/gnu//. 10900&gt;&gt; Attempting to fetch from ftp://wuarchive.wustl.edu/systems/gnu//.
10879Requesting ftp://wuarchive.wustl.edu/systems/gnu//bison-1.25.tar.gz (via ftp://orpheus.amdahl.com:80/) 10901Requesting ftp://wuarchive.wustl.edu/systems/gnu//bison-1.25.tar.gz (via ftp://orpheus.amdahl.com:80/)
10880ftp: Error retrieving file: 500 Internal error 10902ftp: Error retrieving file: 500 Internal error
10881 10903
10882&gt;&gt; Attempting to fetch from ftp://ftp.freebsd.org/pub/FreeBSD/distfiles//. 10904&gt;&gt; Attempting to fetch from ftp://ftp.freebsd.org/pub/FreeBSD/distfiles//.
10883Requesting ftp://ftp.freebsd.org/pub/FreeBSD/distfiles//bison-1.25.tar.gz (via ftp://orpheus.amdahl.com:80/) 10905Requesting ftp://ftp.freebsd.org/pub/FreeBSD/distfiles//bison-1.25.tar.gz (via ftp://orpheus.amdahl.com:80/)
10884Successfully retrieved file.</pre> 10906Successfully retrieved file.</pre>
10885<p>Generate the checksum of the distfile into 10907<p>Generate the checksum of the distfile into
10886 <code class="filename">distinfo</code>:</p> 10908 <code class="filename">distinfo</code>:</p>
10887<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make makedistinfo</code></strong></pre> 10909<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make makedistinfo</code></strong></pre>
10888<p>Now compile:</p> 10910<p>Now compile:</p>
10889<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make</code></strong> 10911<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make</code></strong>
10890&gt;&gt; Checksum OK for bison-1.25.tar.gz. 10912&gt;&gt; Checksum OK for bison-1.25.tar.gz.
10891===&gt; Extracting for bison-1.25 10913===&gt; Extracting for bison-1.25
10892===&gt; Patching for bison-1.25 10914===&gt; Patching for bison-1.25
10893===&gt; Ignoring empty patch directory 10915===&gt; Ignoring empty patch directory
10894===&gt; Configuring for bison-1.25 10916===&gt; Configuring for bison-1.25
10895creating cache ./config.cache 10917creating cache ./config.cache
10896checking for gcc... cc 10918checking for gcc... cc
10897checking whether we are using GNU C... yes 10919checking whether we are using GNU C... yes
10898checking for a BSD compatible install... /usr/bin/install -c -o bin -g bin 10920checking for a BSD compatible install... /usr/bin/install -c -o bin -g bin
10899checking how to run the C preprocessor... cc -E 10921checking how to run the C preprocessor... cc -E
10900checking for minix/config.h... no 10922checking for minix/config.h... no
10901checking for POSIXized ISC... no 10923checking for POSIXized ISC... no
10902checking whether cross-compiling... no 10924checking whether cross-compiling... no
10903checking for ANSI C header files... yes 10925checking for ANSI C header files... yes
10904checking for string.h... yes 10926checking for string.h... yes
10905checking for stdlib.h... yes 10927checking for stdlib.h... yes
10906checking for memory.h... yes 10928checking for memory.h... yes
10907checking for working const... yes 10929checking for working const... yes
10908checking for working alloca.h... no 10930checking for working alloca.h... no
10909checking for alloca... yes 10931checking for alloca... yes
10910checking for strerror... yes 10932checking for strerror... yes
10911updating cache ./config.cache 10933updating cache ./config.cache
10912creating ./config.status 10934creating ./config.status
10913creating Makefile 10935creating Makefile
10914===&gt; Building for bison-1.25 10936===&gt; Building for bison-1.25
10915cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g LR0.c 10937cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g LR0.c
10916cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g allocate.c 10938cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g allocate.c
10917cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g closure.c 10939cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g closure.c
10918cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g conflicts.c 10940cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g conflicts.c
10919cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g derives.c 10941cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g derives.c
10920cc -c -DXPFILE=\"/usr/pkg/share/bison.simple\" -DXPFILE1=\"/usr/pkg/share/bison.hairy\" -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -g ./files.c 10942cc -c -DXPFILE=\"/usr/pkg/share/bison.simple\" -DXPFILE1=\"/usr/pkg/share/bison.hairy\" -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -g ./files.c
10921cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g getargs.c 10943cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g getargs.c
10922cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g gram.c 10944cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g gram.c
10923cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g lalr.c 10945cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g lalr.c
10924cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g lex.c 10946cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g lex.c
10925cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g main.c 10947cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g main.c
10926cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g nullable.c 10948cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g nullable.c
10927cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g output.c 10949cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g output.c
10928cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g print.c 10950cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g print.c
10929cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g reader.c 10951cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g reader.c
10930cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g reduce.c 10952cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g reduce.c
10931cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g symtab.c 10953cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g symtab.c
10932cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g warshall.c 10954cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g warshall.c
10933cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g version.c 10955cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g version.c
10934cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g getopt.c 10956cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g getopt.c
10935cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g getopt1.c 10957cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g getopt1.c
10936cc -g -o bison LR0.o allocate.o closure.o conflicts.o derives.o files.o getargs.o gram.o lalr.o lex.o main.o nullable.o output.o print.o reader.o reduce.o symtab.o warshall.o version.o getopt.o getopt1.o 10958cc -g -o bison LR0.o allocate.o closure.o conflicts.o derives.o files.o getargs.o gram.o lalr.o lex.o main.o nullable.o output.o print.o reader.o reduce.o symtab.o warshall.o version.o getopt.o getopt1.o
10937./files.c:240: warning: mktemp() possibly used unsafely, consider using mkstemp() 10959./files.c:240: warning: mktemp() possibly used unsafely, consider using mkstemp()
10938rm -f bison.s1 10960rm -f bison.s1
10939sed -e "/^#line/ s|bison|/usr/pkg/share/bison|" &lt; ./bison.simple &gt; bison.s1</pre> 10961sed -e "/^#line/ s|bison|/usr/pkg/share/bison|" &lt; ./bison.simple &gt; bison.s1</pre>
10940<p>Everything seems OK, so install the files:</p> 10962<p>Everything seems OK, so install the files:</p>
10941<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make install</code></strong> 10963<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make install</code></strong>
10942&gt;&gt; Checksum OK for bison-1.25.tar.gz. 10964&gt;&gt; Checksum OK for bison-1.25.tar.gz.
10943===&gt; Installing for bison-1.25 10965===&gt; Installing for bison-1.25
10944sh ./mkinstalldirs /usr/pkg/bin /usr/pkg/share /usr/pkg/info /usr/pkg/man/man1 10966sh ./mkinstalldirs /usr/pkg/bin /usr/pkg/share /usr/pkg/info /usr/pkg/man/man1
10945rm -f /usr/pkg/bin/bison 10967rm -f /usr/pkg/bin/bison
10946cd /usr/pkg/share; rm -f bison.simple bison.hairy 10968cd /usr/pkg/share; rm -f bison.simple bison.hairy
10947rm -f /usr/pkg/man/man1/bison.1 /usr/pkg/info/bison.info* 10969rm -f /usr/pkg/man/man1/bison.1 /usr/pkg/info/bison.info*
10948install -c -o bin -g bin -m 555 bison /usr/pkg/bin/bison 10970install -c -o bin -g bin -m 555 bison /usr/pkg/bin/bison
10949/usr/bin/install -c -o bin -g bin -m 644 bison.s1 /usr/pkg/share/bison.simple 10971/usr/bin/install -c -o bin -g bin -m 644 bison.s1 /usr/pkg/share/bison.simple
10950/usr/bin/install -c -o bin -g bin -m 644 ./bison.hairy /usr/pkg/share/bison.hairy 10972/usr/bin/install -c -o bin -g bin -m 644 ./bison.hairy /usr/pkg/share/bison.hairy
10951cd .; for f in bison.info*; do /usr/bin/install -c -o bin -g bin -m 644 $f /usr/pkg/info/$f; done 10973cd .; for f in bison.info*; do /usr/bin/install -c -o bin -g bin -m 644 $f /usr/pkg/info/$f; done
10952/usr/bin/install -c -o bin -g bin -m 644 ./bison.1 /usr/pkg/man/man1/bison.1 10974/usr/bin/install -c -o bin -g bin -m 644 ./bison.1 /usr/pkg/man/man1/bison.1
10953===&gt; Registering installation for bison-1.25</pre> 10975===&gt; Registering installation for bison-1.25</pre>
10954<p>You can now use bison, and also - if you decide so - remove it with 10976<p>You can now use bison, and also - if you decide so - remove it with
10955 <span class="command"><strong>pkg_delete bison</strong></span>. Should you decide that you want a 10977 <span class="command"><strong>pkg_delete bison</strong></span>. Should you decide that you want a
10956 binary package, do this now:</p> 10978 binary package, do this now:</p>
10957<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make package</code></strong> 10979<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make package</code></strong>
10958&gt;&gt; Checksum OK for bison-1.25.tar.gz. 10980&gt;&gt; Checksum OK for bison-1.25.tar.gz.
10959===&gt; Building package for bison-1.25 10981===&gt; Building package for bison-1.25
10960Creating package bison-1.25.tgz 10982Creating package bison-1.25.tgz
10961Registering depends:. 10983Registering depends:.
10962Creating gzip'd tar ball in '/u/pkgsrc/lang/bison/bison-1.25.tgz'</pre> 10984Creating gzip'd tar ball in '/u/pkgsrc/lang/bison/bison-1.25.tgz'</pre>
10963<p>Now that you don't need the source and object files 10985<p>Now that you don't need the source and object files
10964 any more, clean up:</p> 10986 any more, clean up:</p>
10965<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make clean</code></strong> 10987<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make clean</code></strong>
10966===&gt; Cleaning for bison-1.25</pre> 10988===&gt; Cleaning for bison-1.25</pre>
10967</div> 10989</div>
10968</div> 10990</div>
10969<div class="appendix"> 10991<div class="appendix">
10970<div class="titlepage"><div><div><h1 class="title"> 10992<div class="titlepage"><div><div><h1 class="title">
10971<a name="hardening"></a>Appendix B. Security hardening</h1></div></div></div> 10993<a name="hardening"></a>Appendix B. Security hardening</h1></div></div></div>
10972<div class="toc"> 10994<div class="toc">
10973<p><b>Table of Contents</b></p> 10995<p><b>Table of Contents</b></p>
10974<dl class="toc"> 10996<dl class="toc">
10975<dt><span class="sect1"><a href="#hardening.mechanisms">B.1. Mechanisms</a></span></dt> 10997<dt><span class="sect1"><a href="#hardening.mechanisms">B.1. Mechanisms</a></span></dt>
10976<dd><dl> 10998<dd><dl>
10977<dt><span class="sect2"><a href="#hardening.mechanisms.enabled">B.1.1. Enabled by default</a></span></dt> 10999<dt><span class="sect2"><a href="#hardening.mechanisms.enabled">B.1.1. Enabled by default</a></span></dt>
10978<dt><span class="sect2"><a href="#hardening.mechanisms.disabled">B.1.2. Not enabled by default</a></span></dt> 11000<dt><span class="sect2"><a href="#hardening.mechanisms.disabled">B.1.2. Not enabled by default</a></span></dt>
10979</dl></dd> 11001</dl></dd>
10980<dt><span class="sect1"><a href="#hardening.caveats">B.2. Caveats</a></span></dt> 11002<dt><span class="sect1"><a href="#hardening.caveats">B.2. Caveats</a></span></dt>
10981<dd><dl> 11003<dd><dl>
10982<dt><span class="sect2"><a href="#hardening.caveats.pie">B.2.1. Problems with PKGSRC_MKPIE</a></span></dt> 11004<dt><span class="sect2"><a href="#hardening.caveats.pie">B.2.1. Problems with PKGSRC_MKPIE</a></span></dt>
10983<dt><span class="sect2"><a href="#hardening.caveats.fortify">B.2.2. Problems with PKGSRC_USE_FORTIFY</a></span></dt> 11005<dt><span class="sect2"><a href="#hardening.caveats.fortify">B.2.2. Problems with PKGSRC_USE_FORTIFY</a></span></dt>
10984<dt><span class="sect2"><a href="#hardening.caveats.relro">B.2.3. Problems with PKGSRC_USE_RELRO</a></span></dt> 11006<dt><span class="sect2"><a href="#hardening.caveats.relro">B.2.3. Problems with PKGSRC_USE_RELRO</a></span></dt>
10985<dt><span class="sect2"><a href="#hardening.caveats.ssp">B.2.4. Problems with PKGSRC_USE_SSP</a></span></dt> 11007<dt><span class="sect2"><a href="#hardening.caveats.ssp">B.2.4. Problems with PKGSRC_USE_SSP</a></span></dt>
10986</dl></dd> 11008</dl></dd>
10987<dt><span class="sect1"><a href="#hardening.audit">B.3. Auditing the system</a></span></dt> 11009<dt><span class="sect1"><a href="#hardening.audit">B.3. Auditing the system</a></span></dt>
10988<dd><dl> 11010<dd><dl>
10989<dt><span class="sect2"><a href="#hardening.audit.pie">B.3.1. Checking for PIE</a></span></dt> 11011<dt><span class="sect2"><a href="#hardening.audit.pie">B.3.1. Checking for PIE</a></span></dt>
10990<dt><span class="sect2"><a href="#hardening.audit.relropartial">B.3.2. Checking for partial RELRO</a></span></dt> 11012<dt><span class="sect2"><a href="#hardening.audit.relropartial">B.3.2. Checking for partial RELRO</a></span></dt>
10991<dt><span class="sect2"><a href="#hardening.audit.relrofull">B.3.3. Checking for full RELRO</a></span></dt> 11013<dt><span class="sect2"><a href="#hardening.audit.relrofull">B.3.3. Checking for full RELRO</a></span></dt>
10992<dt><span class="sect2"><a href="#hardening.audit.ssp">B.3.4. Checking for SSP</a></span></dt> 11014<dt><span class="sect2"><a href="#hardening.audit.ssp">B.3.4. Checking for SSP</a></span></dt>
10993</dl></dd> 11015</dl></dd>
10994</dl> 11016</dl>
10995</div> 11017</div>
10996<p> 11018<p>
10997A number of mechanisms are available in pkgsrc to improve the security of the 11019A number of mechanisms are available in pkgsrc to improve the security of the
10998resulting system. This page describes the mechanisms, and gives hints 11020resulting system. This page describes the mechanisms, and gives hints
10999about detecting and fixing problems. 11021about detecting and fixing problems.
11000</p> 11022</p>
11001<p> 11023<p>
11002Mechanisms can be enabled individually in 11024Mechanisms can be enabled individually in
11003<code class="filename">mk.conf</code>, and are 11025<code class="filename">mk.conf</code>, and are
11004individually described below. 11026individually described below.
11005</p> 11027</p>
11006<p> 11028<p>
11007Typically, a feature will cause some programs to fail to build or work 11029Typically, a feature will cause some programs to fail to build or work
11008when first enabled. This can be due to latent problems in the 11030when first enabled. This can be due to latent problems in the
11009program, and can be due to other reasons. After enough testing to 11031program, and can be due to other reasons. After enough testing to
11010have confidence that user problems will be quite rare, individual 11032have confidence that user problems will be quite rare, individual
11011mechanisms will be enabled by default. 11033mechanisms will be enabled by default.
11012</p> 11034</p>
11013<p> 11035<p>
11014For each mechanism, see the Caveats section below for an explanation 11036For each mechanism, see the Caveats section below for an explanation
11015of what might go wrong at compile time and at run time, and how to 11037of what might go wrong at compile time and at run time, and how to
11016notice and address these problems. 11038notice and address these problems.
11017</p> 11039</p>
11018<div class="sect1"> 11040<div class="sect1">
11019<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 11041<div class="titlepage"><div><div><h2 class="title" style="clear: both">
11020<a name="hardening.mechanisms"></a>B.1. Mechanisms</h2></div></div></div> 11042<a name="hardening.mechanisms"></a>B.1. Mechanisms</h2></div></div></div>
11021<div class="sect2"> 11043<div class="sect2">
11022<div class="titlepage"><div><div><h3 class="title"> 11044<div class="titlepage"><div><div><h3 class="title">
11023<a name="hardening.mechanisms.enabled"></a>B.1.1. Enabled by default</h3></div></div></div> 11045<a name="hardening.mechanisms.enabled"></a>B.1.1. Enabled by default</h3></div></div></div>
11024<div class="sect3"> 11046<div class="sect3">
11025<div class="titlepage"><div><div><h4 class="title"> 11047<div class="titlepage"><div><div><h4 class="title">
11026<a name="hardening.mechanisms.enabled.fortify"></a>B.1.1.1. PKGSRC_USE_FORTIFY</h4></div></div></div> 11048<a name="hardening.mechanisms.enabled.fortify"></a>B.1.1.1. PKGSRC_USE_FORTIFY</h4></div></div></div>
11027<p> 11049<p>
11028This allows substitute wrappers to be used for some commonly used 11050This allows substitute wrappers to be used for some commonly used
11029library functions that do not have built-in bounds checking - but 11051library functions that do not have built-in bounds checking - but
11030could in some cases. 11052could in some cases.
11031</p> 11053</p>
11032<p> 11054<p>
11033Two mitigation levels are available: 11055Two mitigation levels are available:
11034</p> 11056</p>
11035<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 11057<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
11036<li class="listitem"><p>"weak" only enables checks at compile-time.</p></li> 11058<li class="listitem"><p>"weak" only enables checks at compile-time.</p></li>
11037<li class="listitem"><p>"strong" enables checks at compile-time and runtime.</p></li> 11059<li class="listitem"><p>"strong" enables checks at compile-time and runtime.</p></li>
11038</ul></div> 11060</ul></div>
11039<p> 11061<p>
11040"strong" has been enabled by default since pkgsrc-2017Q3. 11062"strong" has been enabled by default since pkgsrc-2017Q3.
11041</p> 11063</p>
11042</div> 11064</div>
11043<div class="sect3"> 11065<div class="sect3">
11044<div class="titlepage"><div><div><h4 class="title"> 11066<div class="titlepage"><div><div><h4 class="title">
11045<a name="hardening.mechanisms.enabled.ssp"></a>B.1.1.2. PKGSRC_USE_SSP</h4></div></div></div> 11067<a name="hardening.mechanisms.enabled.ssp"></a>B.1.1.2. PKGSRC_USE_SSP</h4></div></div></div>
11046<p> 11068<p>
11047This enables a stack-smashing protection mitigation. It is done by adding a 11069This enables a stack-smashing protection mitigation. It is done by adding a
11048guard variable to functions with vulnerable objects. The guards are initialized 11070guard variable to functions with vulnerable objects. The guards are initialized
11049when a function is entered and then checked when the function exits. The guard 11071when a function is entered and then checked when the function exits. The guard
11050check will fail and the program forcibly exited if the variable was modified in 11072check will fail and the program forcibly exited if the variable was modified in
11051the meantime. This can happen in case of buffer overflows or memory corruption, 11073the meantime. This can happen in case of buffer overflows or memory corruption,
11052and therefore exposing these bugs. 11074and therefore exposing these bugs.
11053</p> 11075</p>
11054<p> 11076<p>
11055Different mitigation levels are available: 11077Different mitigation levels are available:
11056</p> 11078</p>
11057<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 11079<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
11058<li class="listitem"><p>"yes", which will only protect functions considered vulnerable 11080<li class="listitem"><p>"yes", which will only protect functions considered vulnerable
11059by the compiler;</p></li> 11081by the compiler;</p></li>
11060<li class="listitem"><p>"all", which will protect every function;</p></li> 11082<li class="listitem"><p>"all", which will protect every function;</p></li>
11061<li class="listitem"><p>"strong", the default, which will apply a better balance between the 11083<li class="listitem"><p>"strong", the default, which will apply a better balance between the
11062two settings above.</p></li> 11084two settings above.</p></li>
11063</ul></div> 11085</ul></div>
11064<p> 11086<p>
11065This mitigation is supported by both GCC and clang. It may be supported in 11087This mitigation is supported by both GCC and clang. It may be supported in
11066additional compilers, possibly under a different name. It is particularly useful 11088additional compilers, possibly under a different name. It is particularly useful
11067for unsafe programming languages, such as C/C++. 11089for unsafe programming languages, such as C/C++.
11068</p> 11090</p>
11069<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 11091<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
11070<li class="listitem"><p>"yes" is enabled by default where known supported since pkgsrc-2017Q3.</p></li> 11092<li class="listitem"><p>"yes" is enabled by default where known supported since pkgsrc-2017Q3.</p></li>
11071<li class="listitem"><p>"strong" is enabled by default where known supported since pkgsrc-2021Q4.</p></li> 11093<li class="listitem"><p>"strong" is enabled by default where known supported since pkgsrc-2021Q4.</p></li>
11072</ul></div> 11094</ul></div>
11073<p>More details can be found here:</p> 11095<p>More details can be found here:</p>
11074<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> 11096<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
11075<a class="ulink" href="https://en.wikipedia.org/wiki/Buffer_overflow_protection" target="_top">Buffer overflow protection on Wikipedia</a> 11097<a class="ulink" href="https://en.wikipedia.org/wiki/Buffer_overflow_protection" target="_top">Buffer overflow protection on Wikipedia</a>
11076</p></li></ul></div> 11098</p></li></ul></div>
11077</div> 11099</div>
11078<div class="sect3"> 11100<div class="sect3">
11079<div class="titlepage"><div><div><h4 class="title"> 11101<div class="titlepage"><div><div><h4 class="title">
11080<a name="hardening.mechanisms.enabled.pie"></a>B.1.1.3. PKGSRC_MKPIE</h4></div></div></div> 11102<a name="hardening.mechanisms.enabled.pie"></a>B.1.1.3. PKGSRC_MKPIE</h4></div></div></div>
11081<p> 11103<p>
11082This requests the creation of PIE (Position Independent Executables) for all 11104This requests the creation of PIE (Position Independent Executables) for all
11083executables. The PIE mechanism is normally used for shared libraries, so that 11105executables. The PIE mechanism is normally used for shared libraries, so that
11084they can be loaded at differing addresses at runtime. PIE itself does not have 11106they can be loaded at differing addresses at runtime. PIE itself does not have
11085useful security properties; however, it is necessary to fully leverage some, 11107useful security properties; however, it is necessary to fully leverage some,
11086such as ASLR. Some operating systems support Address Space Layout Randomization 11108such as ASLR. Some operating systems support Address Space Layout Randomization
11087(ASLR), which causes different addresses to be used each time a program is run. 11109(ASLR), which causes different addresses to be used each time a program is run.
11088This makes it more difficult for an attacker to guess addresses and thus makes 11110This makes it more difficult for an attacker to guess addresses and thus makes
11089exploits harder to construct. With PIE, ASLR can really be applied to the entire 11111exploits harder to construct. With PIE, ASLR can really be applied to the entire
11090program, instead of the stack and heap only. 11112program, instead of the stack and heap only.
11091</p> 11113</p>
11092<p> 11114<p>
11093PIE executables will only be built for toolchains that are known to support PIE. 11115PIE executables will only be built for toolchains that are known to support PIE.
11094Currently, this means NetBSD on x86, ARM, SPARC64, m68k, and MIPS. 11116Currently, this means NetBSD on x86, ARM, SPARC64, m68k, and MIPS.
11095</p> 11117</p>
11096<p> 11118<p>
11097<code class="varname">PKGSRC_MKPIE</code> was enabled by default after the pkgsrc-2021Q3 branch. 11119<code class="varname">PKGSRC_MKPIE</code> was enabled by default after the pkgsrc-2021Q3 branch.
11098</p> 11120</p>
11099</div> 11121</div>
11100<div class="sect3"> 11122<div class="sect3">
11101<div class="titlepage"><div><div><h4 class="title"> 11123<div class="titlepage"><div><div><h4 class="title">
11102<a name="hardening.mechanisms.enabled.relro"></a>B.1.1.4. PKGSRC_USE_RELRO</h4></div></div></div> 11124<a name="hardening.mechanisms.enabled.relro"></a>B.1.1.4. PKGSRC_USE_RELRO</h4></div></div></div>
11103<p> 11125<p>
11104This also makes the exploitation of some security vulnerabilities more 11126This also makes the exploitation of some security vulnerabilities more
11105difficult in some cases. 11127difficult in some cases.
11106</p> 11128</p>
11107<p>Two different mitigation levels are available:</p> 11129<p>Two different mitigation levels are available:</p>
11108<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 11130<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
11109<li class="listitem"><p> 11131<li class="listitem"><p>
11110partial (the default): the ELF sections are reordered so that internal data sections 11132partial (the default): the ELF sections are reordered so that internal data sections
11111precede the program's own data sections, and non-PLT GOT is read-only; 11133precede the program's own data sections, and non-PLT GOT is read-only;
11112</p></li> 11134</p></li>
11113<li class="listitem"><p> 11135<li class="listitem"><p>
11114full: in addition to partial RELRO, every relocation is performed immediately 11136full: in addition to partial RELRO, every relocation is performed immediately
11115when starting the program, allowing the entire GOT to be read-only. This 11137when starting the program, allowing the entire GOT to be read-only. This
11116can greatly slow down startup of large programs. 11138can greatly slow down startup of large programs.
11117</p></li> 11139</p></li>
11118</ul></div> 11140</ul></div>
11119<p> 11141<p>
11120This is currently supported by GCC. Many software distributions now enable this 11142This is currently supported by GCC. Many software distributions now enable this
11121feature by default, at the "partial" level. 11143feature by default, at the "partial" level.
11122</p> 11144</p>
11123<p> 11145<p>
11124More details can be found here: 11146More details can be found here:
11125</p> 11147</p>
11126<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> 11148<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
11127<a class="ulink" href="https://www.redhat.com/en/blog/hardening-elf-binaries-using-relocation-read-only-relro" target="_top">Hardening ELF binaries using Relocation Read-Only (RELRO)</a> 11149<a class="ulink" href="https://www.redhat.com/en/blog/hardening-elf-binaries-using-relocation-read-only-relro" target="_top">Hardening ELF binaries using Relocation Read-Only (RELRO)</a>
11128</p></li></ul></div> 11150</p></li></ul></div>
11129</div> 11151</div>
11130</div> 11152</div>
11131<div class="sect2"> 11153<div class="sect2">
11132<div class="titlepage"><div><div><h3 class="title"> 11154<div class="titlepage"><div><div><h3 class="title">
11133<a name="hardening.mechanisms.disabled"></a>B.1.2. Not enabled by default</h3></div></div></div> 11155<a name="hardening.mechanisms.disabled"></a>B.1.2. Not enabled by default</h3></div></div></div>
11134<div class="sect3"> 11156<div class="sect3">
11135<div class="titlepage"><div><div><h4 class="title"> 11157<div class="titlepage"><div><div><h4 class="title">
11136<a name="hardening.mechanisms.disabled.repro"></a>B.1.2.1. PKGSRC_MKREPRO</h4></div></div></div> 11158<a name="hardening.mechanisms.disabled.repro"></a>B.1.2.1. PKGSRC_MKREPRO</h4></div></div></div>
11137<p> 11159<p>
11138With this option, pkgsrc will try to build packages reproducibly. This allows 11160With this option, pkgsrc will try to build packages reproducibly. This allows
11139packages built from the same tree and with the same options, to produce 11161packages built from the same tree and with the same options, to produce
11140identical results bit by bit. This option should be combined with ASLR and 11162identical results bit by bit. This option should be combined with ASLR and
11141<code class="varname">PKGSRC_MKPIE</code> to avoid predictable address offsets for 11163<code class="varname">PKGSRC_MKPIE</code> to avoid predictable address offsets for
11142attackers attempting to exploit security vulnerabilities. 11164attackers attempting to exploit security vulnerabilities.
11143</p> 11165</p>
11144<p> 11166<p>
11145More details can be found here: 11167More details can be found here:
11146</p> 11168</p>
11147<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> 11169<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
11148<a class="ulink" href="https://reproducible-builds.org/" target="_top">Reproducible Builds - a set of software development practices that create an independently-verifiable path from source to binary code</a> 11170<a class="ulink" href="https://reproducible-builds.org/" target="_top">Reproducible Builds - a set of software development practices that create an independently-verifiable path from source to binary code</a>
11149</p></li></ul></div> 11171</p></li></ul></div>
11150<p> 11172<p>
11151More work likely needs to be done before pkgsrc is fully reproducible. 11173More work likely needs to be done before pkgsrc is fully reproducible.
11152</p> 11174</p>
11153</div> 11175</div>
11154<div class="sect3"> 11176<div class="sect3">
11155<div class="titlepage"><div><div><h4 class="title"> 11177<div class="titlepage"><div><div><h4 class="title">
11156<a name="hardening.mechanisms.disabled.stackcheck"></a>B.1.2.2. PKGSRC_USE_STACK_CHECK</h4></div></div></div> 11178<a name="hardening.mechanisms.disabled.stackcheck"></a>B.1.2.2. PKGSRC_USE_STACK_CHECK</h4></div></div></div>
11157<p> 11179<p>
11158This uses <code class="literal">-fstack-check</code> with GCC for 11180This uses <code class="literal">-fstack-check</code> with GCC for
11159another stack protection mitigation. 11181another stack protection mitigation.
11160</p> 11182</p>
11161<p> 11183<p>
11162It asks the compiler to generate code verifying that it does not corrupt the 11184It asks the compiler to generate code verifying that it does not corrupt the
11163stack. According to GCC's manual page, this is really only useful for 11185stack. According to GCC's manual page, this is really only useful for
11164multi-threaded programs. 11186multi-threaded programs.
11165</p> 11187</p>
11166</div> 11188</div>
11167</div> 11189</div>
11168</div> 11190</div>
11169<div class="sect1"> 11191<div class="sect1">
11170<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 11192<div class="titlepage"><div><div><h2 class="title" style="clear: both">
11171<a name="hardening.caveats"></a>B.2. Caveats</h2></div></div></div> 11193<a name="hardening.caveats"></a>B.2. Caveats</h2></div></div></div>
11172<div class="sect2"> 11194<div class="sect2">
11173<div class="titlepage"><div><div><h3 class="title"> 11195<div class="titlepage"><div><div><h3 class="title">
11174<a name="hardening.caveats.pie"></a>B.2.1. Problems with PKGSRC_MKPIE</h3></div></div></div> 11196<a name="hardening.caveats.pie"></a>B.2.1. Problems with PKGSRC_MKPIE</h3></div></div></div>
11175<div class="sect3"> 11197<div class="sect3">
11176<div class="titlepage"><div><div><h4 class="title"> 11198<div class="titlepage"><div><div><h4 class="title">
11177<a name="hardening.caveats.pie.build"></a>B.2.1.1. Packages failing to build</h4></div></div></div> 11199<a name="hardening.caveats.pie.build"></a>B.2.1.1. Packages failing to build</h4></div></div></div>
11178<p> 11200<p>
11179A number of packages may fail to build with this option enabled. The 11201A number of packages may fail to build with this option enabled. The
11180failures are often related to the absence of the <code class="literal">-fPIC</code> 11202failures are often related to the absence of the <code class="literal">-fPIC</code>
11181compilation flag when building libraries or executables (or ideally 11203compilation flag when building libraries or executables (or ideally
11182<code class="literal">-fPIE</code> in the latter case). This flag is added to the 11204<code class="literal">-fPIE</code> in the latter case). This flag is added to the
11183<code class="varname">CFLAGS</code> already, but requires the package to 11205<code class="varname">CFLAGS</code> already, but requires the package to
11184actually support it. 11206actually support it.
11185</p> 11207</p>
11186<div class="sect4"> 11208<div class="sect4">
11187<div class="titlepage"><div><div><h5 class="title"> 11209<div class="titlepage"><div><div><h5 class="title">
11188<a name="hardening.caveats.pie.build.fix"></a>B.2.1.1.1. How to fix</h5></div></div></div> 11210<a name="hardening.caveats.pie.build.fix"></a>B.2.1.1.1. How to fix</h5></div></div></div>
11189<p> 11211<p>
11190These instructions are meant as a reference only; they likely need to be adapted 11212These instructions are meant as a reference only; they likely need to be adapted
11191for many packages individually. 11213for many packages individually.
11192</p> 11214</p>
11193<p> 11215<p>
11194For packages using <code class="filename">Makefiles</code>: 11216For packages using <code class="filename">Makefiles</code>:
11195</p> 11217</p>
11196<pre class="programlisting"> 11218<pre class="programlisting">
11197MAKE_FLAGS+= CFLAGS=${CFLAGS:Q} 11219MAKE_FLAGS+= CFLAGS=${CFLAGS:Q}
11198MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q} 11220MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q}
11199</pre> 11221</pre>
11200<p> 11222<p>
11201For packages using <code class="filename">Imakefiles</code>: 11223For packages using <code class="filename">Imakefiles</code>:
11202</p> 11224</p>
11203<pre class="programlisting"> 11225<pre class="programlisting">
11204MAKE_FLAGS+= CCOPTIONS=${CFLAGS:Q} 11226MAKE_FLAGS+= CCOPTIONS=${CFLAGS:Q}
11205MAKE_FLAGS+= LOCAL_LDFLAGS=${LDFLAGS:Q} 11227MAKE_FLAGS+= LOCAL_LDFLAGS=${LDFLAGS:Q}
11206</pre> 11228</pre>
11207</div> 11229</div>
11208</div> 11230</div>
11209<div class="sect3"> 11231<div class="sect3">
11210<div class="titlepage"><div><div><h4 class="title"> 11232<div class="titlepage"><div><div><h4 class="title">
11211<a name="hardening.caveats.pie.crash"></a>B.2.1.2. Run-time crashes</h4></div></div></div> 11233<a name="hardening.caveats.pie.crash"></a>B.2.1.2. Run-time crashes</h4></div></div></div>
11212<p> 11234<p>
11213Some programs may fail to run, or crash at random times once built as PIE. Two 11235Some programs may fail to run, or crash at random times once built as PIE. Two
11214scenarios are essentially possible. This is nearly always due to a bug in 11236scenarios are essentially possible. This is nearly always due to a bug in
11215the program being exposed due to ASLR. 11237the program being exposed due to ASLR.
11216</p> 11238</p>
11217</div> 11239</div>
11218<div class="sect3"> 11240<div class="sect3">
11219<div class="titlepage"><div><div><h4 class="title"> 11241<div class="titlepage"><div><div><h4 class="title">
11220<a name="hardening.caveats.pie.disable"></a>B.2.1.3. Disabling PKGSRC_MKPIE on a per-package basis</h4></div></div></div> 11242<a name="hardening.caveats.pie.disable"></a>B.2.1.3. Disabling PKGSRC_MKPIE on a per-package basis</h4></div></div></div>
11221<p> 11243<p>
11222Ideally, packages should be fixed for compatibility with MKPIE. 11244Ideally, packages should be fixed for compatibility with MKPIE.
11223However, in some cases this is very difficult, due to complex build systems, 11245However, in some cases this is very difficult, due to complex build systems,
11224packages using non-standard toolchains, or programming languages with odd 11246packages using non-standard toolchains, or programming languages with odd
11225bootstrapping mechanisms. 11247bootstrapping mechanisms.
11226</p> 11248</p>
11227<p> 11249<p>
11228To disable <code class="varname">PKGSRC_MKPIE</code> on a per-package basis, set 11250To disable <code class="varname">PKGSRC_MKPIE</code> on a per-package basis, set
11229<code class="varname">MKPIE_SUPPORTED= no</code> in the package's Makefile before 11251<code class="varname">MKPIE_SUPPORTED= no</code> in the package's Makefile before
11230<code class="filename">bsd.prefs.mk</code> is included. 11252<code class="filename">bsd.prefs.mk</code> is included.
11231</p> 11253</p>
11232</div> 11254</div>
11233</div> 11255</div>
11234<div class="sect2"> 11256<div class="sect2">
11235<div class="titlepage"><div><div><h3 class="title"> 11257<div class="titlepage"><div><div><h3 class="title">
11236<a name="hardening.caveats.fortify"></a>B.2.2. Problems with PKGSRC_USE_FORTIFY</h3></div></div></div> 11258<a name="hardening.caveats.fortify"></a>B.2.2. Problems with PKGSRC_USE_FORTIFY</h3></div></div></div>
11237<div class="sect3"> 11259<div class="sect3">
11238<div class="titlepage"><div><div><h4 class="title"> 11260<div class="titlepage"><div><div><h4 class="title">
11239<a name="hardening.caveats.fortify.build"></a>B.2.2.1. Packages failing to build</h4></div></div></div> 11261<a name="hardening.caveats.fortify.build"></a>B.2.2.1. Packages failing to build</h4></div></div></div>
11240<p> 11262<p>
11241This feature makes use of pre-processing directives to look for hardened, 11263This feature makes use of pre-processing directives to look for hardened,
11242alternative implementations of essential library calls. Some programs may fail 11264alternative implementations of essential library calls. Some programs may fail
11243to build as a result; this usually happens for those trying too hard to be 11265to build as a result; this usually happens for those trying too hard to be
11244portable, or otherwise abusing definitions in the standard library. 11266portable, or otherwise abusing definitions in the standard library.
11245</p> 11267</p>
11246</div> 11268</div>
11247<div class="sect3"> 11269<div class="sect3">
11248<div class="titlepage"><div><div><h4 class="title"> 11270<div class="titlepage"><div><div><h4 class="title">
11249<a name="hardening.caveats.fortify.crash"></a>B.2.2.2. Run-time crashes</h4></div></div></div> 11271<a name="hardening.caveats.fortify.crash"></a>B.2.2.2. Run-time crashes</h4></div></div></div>
11250<p> 11272<p>
11251This feature may cause some programs to crash, usually indicating an 11273This feature may cause some programs to crash, usually indicating an
11252actual bug in the program. The fix will typically involve patching the 11274actual bug in the program. The fix will typically involve patching the
11253original program's source code. 11275original program's source code.
11254</p> 11276</p>
11255</div> 11277</div>
11256<div class="sect3"> 11278<div class="sect3">
11257<div class="titlepage"><div><div><h4 class="title"> 11279<div class="titlepage"><div><div><h4 class="title">
11258<a name="hardening.caveats.fortify.opt"></a>B.2.2.3. Optimization is required</h4></div></div></div> 11280<a name="hardening.caveats.fortify.opt"></a>B.2.2.3. Optimization is required</h4></div></div></div>
11259<p> 11281<p>
11260At least in the case of GCC, FORTIFY will only be applied if optimization is 11282At least in the case of GCC, FORTIFY will only be applied if optimization is
11261applied while compiling. This means that the <code class="varname">CFLAGS</code> should 11283applied while compiling. This means that the <code class="varname">CFLAGS</code> should
11262also contain <code class="literal">-O</code>, <code class="literal">-O2</code> or another 11284also contain <code class="literal">-O</code>, <code class="literal">-O2</code> or another
11263optimization level. This cannot easily be applied globally, as some packages 11285optimization level. This cannot easily be applied globally, as some packages
11264may require specific optimization levels. 11286may require specific optimization levels.
11265</p> 11287</p>
11266</div> 11288</div>
11267<div class="sect3"> 11289<div class="sect3">
11268<div class="titlepage"><div><div><h4 class="title"> 11290<div class="titlepage"><div><div><h4 class="title">
11269<a name="hardening.caveats.fortify.disable"></a>B.2.2.4. Disabling FORTIFY on a per-package basis</h4></div></div></div> 11291<a name="hardening.caveats.fortify.disable"></a>B.2.2.4. Disabling FORTIFY on a per-package basis</h4></div></div></div>
11270<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> 11292<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
11271<h3 class="title">Note</h3> 11293<h3 class="title">Note</h3>
11272<p>FORTIFY should not be disabled to work around runtime crashes in 11294<p>FORTIFY should not be disabled to work around runtime crashes in
11273the program! This is a very bad idea and will expose you to security 11295the program! This is a very bad idea and will expose you to security
11274vulnerabilities. 11296vulnerabilities.
11275</p> 11297</p>
11276</div> 11298</div>
11277<p> 11299<p>
11278To disable FORTIFY on a per-package basis, set the following 11300To disable FORTIFY on a per-package basis, set the following
11279in the package's <code class="filename">Makefile</code> 11301in the package's <code class="filename">Makefile</code>
11280before <code class="filename">bsd.prefs.mk</code> is included: 11302before <code class="filename">bsd.prefs.mk</code> is included:
11281</p> 11303</p>
11282<pre class="programlisting"> 11304<pre class="programlisting">
11283FORTIFY_SUPPORTED= no 11305FORTIFY_SUPPORTED= no
11284</pre> 11306</pre>
11285</div> 11307</div>
11286</div> 11308</div>
11287<div class="sect2"> 11309<div class="sect2">
11288<div class="titlepage"><div><div><h3 class="title"> 11310<div class="titlepage"><div><div><h3 class="title">
11289<a name="hardening.caveats.relro"></a>B.2.3. Problems with PKGSRC_USE_RELRO</h3></div></div></div> 11311<a name="hardening.caveats.relro"></a>B.2.3. Problems with PKGSRC_USE_RELRO</h3></div></div></div>
11290<div class="sect3"> 11312<div class="sect3">
11291<div class="titlepage"><div><div><h4 class="title"> 11313<div class="titlepage"><div><div><h4 class="title">
11292<a name="hardening.caveats.relro.performance"></a>B.2.3.1. Performance impact</h4></div></div></div> 11314<a name="hardening.caveats.relro.performance"></a>B.2.3.1. Performance impact</h4></div></div></div>
11293<p> 11315<p>
11294For better protection, full RELRO requires every symbol to be resolved when the 11316For better protection, full RELRO requires every symbol to be resolved when the
11295program starts, rather than simply when required at run-time. This will have 11317program starts, rather than simply when required at run-time. This will have
11296more impact on programs using a lot of symbols, or linked to libraries exposing 11318more impact on programs using a lot of symbols, or linked to libraries exposing
11297a lot of symbols. Therefore, daemons or programs otherwise running in 11319a lot of symbols. Therefore, daemons or programs otherwise running in
11298background are affected only when started. Programs loading plug-ins at 11320background are affected only when started. Programs loading plug-ins at
11299run-time are affected when loading the plug-ins. 11321run-time are affected when loading the plug-ins.
11300</p> 11322</p>
11301<p> 11323<p>
11302The impact is not expected to be noticeable on modern hardware, except in some 11324The impact is not expected to be noticeable on modern hardware, except in some
11303cases for big programs. 11325cases for big programs.
11304</p> 11326</p>
11305</div> 11327</div>
11306<div class="sect3"> 11328<div class="sect3">
11307<div class="titlepage"><div><div><h4 class="title"> 11329<div class="titlepage"><div><div><h4 class="title">
11308<a name="hardening.caveats.relro.crash"></a>B.2.3.2. Run-time crashes</h4></div></div></div> 11330<a name="hardening.caveats.relro.crash"></a>B.2.3.2. Run-time crashes</h4></div></div></div>
11309<p> 11331<p>
11310Some programs handle plug-ins and dependencies in a way that conflicts with 11332Some programs handle plug-ins and dependencies in a way that conflicts with
11311RELRO: for instance, with an initialization routine listing any other plug-in 11333RELRO: for instance, with an initialization routine listing any other plug-in
11312required. With full RELRO, the missing symbols are resolved before the 11334required. With full RELRO, the missing symbols are resolved before the
11313initialization routine can run, and the dynamic loader will not be able to find 11335initialization routine can run, and the dynamic loader will not be able to find
11314them directly and abort as a result. Unfortunately, this is how Xorg loads its 11336them directly and abort as a result. Unfortunately, this is how Xorg loads its
11315drivers. Partial RELRO can be applied instead in this case. 11337drivers. Partial RELRO can be applied instead in this case.
11316</p> 11338</p>
11317</div> 11339</div>
11318<div class="sect3"> 11340<div class="sect3">
11319<div class="titlepage"><div><div><h4 class="title"> 11341<div class="titlepage"><div><div><h4 class="title">
11320<a name="hardening.caveats.relro.disable"></a>B.2.3.3. Disabling RELRO on a per-package basis</h4></div></div></div> 11342<a name="hardening.caveats.relro.disable"></a>B.2.3.3. Disabling RELRO on a per-package basis</h4></div></div></div>
11321<p> 11343<p>
11322To disable RELRO on a per-package basis, set the following 11344To disable RELRO on a per-package basis, set the following
11323in the package's <code class="filename">Makefile</code> 11345in the package's <code class="filename">Makefile</code>
11324before <code class="filename">bsd.prefs.mk</code> is included: 11346before <code class="filename">bsd.prefs.mk</code> is included:
11325</p> 11347</p>
11326<pre class="programlisting"> 11348<pre class="programlisting">
11327RELRO_SUPPORTED= no 11349RELRO_SUPPORTED= no
11328</pre> 11350</pre>
11329<p> 11351<p>
11330It is also possible to at most enable partial RELRO, by 11352It is also possible to at most enable partial RELRO, by
11331setting <code class="varname">RELRO_SUPPORTED</code> to <code class="literal">partial</code>. 11353setting <code class="varname">RELRO_SUPPORTED</code> to <code class="literal">partial</code>.
11332</p> 11354</p>
11333</div> 11355</div>
11334</div> 11356</div>
11335<div class="sect2"> 11357<div class="sect2">
11336<div class="titlepage"><div><div><h3 class="title"> 11358<div class="titlepage"><div><div><h3 class="title">
11337<a name="hardening.caveats.ssp"></a>B.2.4. Problems with PKGSRC_USE_SSP</h3></div></div></div> 11359<a name="hardening.caveats.ssp"></a>B.2.4. Problems with PKGSRC_USE_SSP</h3></div></div></div>
11338<div class="sect3"> 11360<div class="sect3">
11339<div class="titlepage"><div><div><h4 class="title"> 11361<div class="titlepage"><div><div><h4 class="title">
11340<a name="hardening.caveats.ssp.build"></a>B.2.4.1. Packages failing to build</h4></div></div></div> 11362<a name="hardening.caveats.ssp.build"></a>B.2.4.1. Packages failing to build</h4></div></div></div>
11341<p> 11363<p>
11342The stack-smashing protection provided by this option does not work for some 11364The stack-smashing protection provided by this option does not work for some
11343programs. The most common situation in which this happens is when the program 11365programs. The most common situation in which this happens is when the program
11344allocates variables on the stack, with the size determined at run-time. 11366allocates variables on the stack, with the size determined at run-time.
11345</p> 11367</p>
11346</div> 11368</div>
11347<div class="sect3"> 11369<div class="sect3">
11348<div class="titlepage"><div><div><h4 class="title"> 11370<div class="titlepage"><div><div><h4 class="title">
11349<a name="hardening.caveats.ssp.crash"></a>B.2.4.2. Run-time crashes</h4></div></div></div> 11371<a name="hardening.caveats.ssp.crash"></a>B.2.4.2. Run-time crashes</h4></div></div></div>
11350<p> 11372<p>
11351Again, this feature may cause some programs to crash via a 11373Again, this feature may cause some programs to crash via a
11352<code class="varname">SIGABRT</code>, usually indicating an actual bug in the program. 11374<code class="varname">SIGABRT</code>, usually indicating an actual bug in the program.
11353</p> 11375</p>
11354<p> 11376<p>
11355On NetBSD <code class="varname">LOG_CRIT</code> level syslog 11377On NetBSD <code class="varname">LOG_CRIT</code> level syslog
11356messages are sent and - by default - 11378messages are sent and - by default -
11357appended to <code class="filename">/var/log/messages</code>, e.g.: 11379appended to <code class="filename">/var/log/messages</code>, e.g.:
11358</p> 11380</p>
11359<pre class="programlisting"> 11381<pre class="programlisting">
11360Jan 6 15:42:51 hostname -: hostname program - - - buffer overflow detected; terminated 11382Jan 6 15:42:51 hostname -: hostname program - - - buffer overflow detected; terminated
11361</pre> 11383</pre>
11362<p> 11384<p>
11363(where <code class="literal">hostname</code> is the hostname(1) and 11385(where <code class="literal">hostname</code> is the hostname(1) and
11364<code class="literal">program</code> is the basename(1) of the program crashed). 11386<code class="literal">program</code> is the basename(1) of the program crashed).
11365</p> 11387</p>
11366<p> 11388<p>
11367Patching the original program is then required. 11389Patching the original program is then required.
11368</p> 11390</p>
11369<p> 11391<p>
11370Rebuilding the package via: 11392Rebuilding the package via:
11371</p> 11393</p>
11372<pre class="programlisting"> 11394<pre class="programlisting">
11373<strong class="userinput"><code>% env CFLAGS=-g INSTALL_UNSTRIPPED=yes make replace</code></strong> 11395<strong class="userinput"><code>% env CFLAGS=-g INSTALL_UNSTRIPPED=yes make replace</code></strong>
11374</pre> 11396</pre>
11375<p> 11397<p>
11376and inspecting the backtrace of the coredump via the debugger 11398and inspecting the backtrace of the coredump via the debugger
11377should point out the problematic call by inspecting the frame 11399should point out the problematic call by inspecting the frame
11378calling the _chk() (SSP) function. 11400calling the _chk() (SSP) function.
11379</p> 11401</p>
11380</div> 11402</div>
11381<div class="sect3"> 11403<div class="sect3">
11382<div class="titlepage"><div><div><h4 class="title"> 11404<div class="titlepage"><div><div><h4 class="title">
11383<a name="hardening.caveats.ssp.performance"></a>B.2.4.3. Performance impact</h4></div></div></div> 11405<a name="hardening.caveats.ssp.performance"></a>B.2.4.3. Performance impact</h4></div></div></div>
11384<p> 11406<p>
11385The compiler emits extra code when using this feature: a check for buffer 11407The compiler emits extra code when using this feature: a check for buffer
11386overflows is performed when entering and exiting functions, requiring an extra 11408overflows is performed when entering and exiting functions, requiring an extra
11387variable on the stack. The level of protection can otherwise be adjusted to 11409variable on the stack. The level of protection can otherwise be adjusted to
11388affect only those functions considered more sensitive by the compiler (with 11410affect only those functions considered more sensitive by the compiler (with
11389-fstack-protector instead of -fstack-protector-all). 11411-fstack-protector instead of -fstack-protector-all).
11390</p> 11412</p>
11391<p> 11413<p>
11392The impact is not expected to be noticeable on modern hardware. However, 11414The impact is not expected to be noticeable on modern hardware. However,
11393programs with a hard requirement to run at the fastest possible speed should 11415programs with a hard requirement to run at the fastest possible speed should
11394avoid using this feature, or using libraries built with this feature. 11416avoid using this feature, or using libraries built with this feature.
11395</p> 11417</p>
11396</div> 11418</div>
11397<div class="sect3"> 11419<div class="sect3">
11398<div class="titlepage"><div><div><h4 class="title"> 11420<div class="titlepage"><div><div><h4 class="title">
11399<a name="hardening.caveats.ssp.disable"></a>B.2.4.4. Disabling SSP on a per-package basis</h4></div></div></div> 11421<a name="hardening.caveats.ssp.disable"></a>B.2.4.4. Disabling SSP on a per-package basis</h4></div></div></div>
11400<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> 11422<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
11401<h3 class="title">Note</h3> 11423<h3 class="title">Note</h3>
11402<p>SSP should not be disabled to work around runtime crashes in 11424<p>SSP should not be disabled to work around runtime crashes in
11403the program! This is a very bad idea and will expose you to security 11425the program! This is a very bad idea and will expose you to security
11404vulnerabilities.</p> 11426vulnerabilities.</p>
11405</div> 11427</div>
11406<p> 11428<p>
11407To disable SSP on a per-package basis, set the following 11429To disable SSP on a per-package basis, set the following
11408in the package's <code class="filename">Makefile</code> 11430in the package's <code class="filename">Makefile</code>
11409before <code class="filename">bsd.prefs.mk</code> is included: 11431before <code class="filename">bsd.prefs.mk</code> is included:
11410</p> 11432</p>
11411<pre class="programlisting"> 11433<pre class="programlisting">
11412SSP_SUPPORTED= no 11434SSP_SUPPORTED= no
11413</pre> 11435</pre>
11414</div> 11436</div>
11415</div> 11437</div>
11416</div> 11438</div>
11417<div class="sect1"> 11439<div class="sect1">
11418<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 11440<div class="titlepage"><div><div><h2 class="title" style="clear: both">
11419<a name="hardening.audit"></a>B.3. Auditing the system</h2></div></div></div> 11441<a name="hardening.audit"></a>B.3. Auditing the system</h2></div></div></div>
11420<p> 11442<p>
11421The illusion of security is worse than having no security at all. This section 11443The illusion of security is worse than having no security at all. This section
11422lists a number of ways to ensure the security features requested are actually 11444lists a number of ways to ensure the security features requested are actually
11423effective. 11445effective.
11424</p> 11446</p>
11425<p> 11447<p>
11426These instructions were obtained and tested on a system derived from NetBSD 7 11448These instructions were obtained and tested on a system derived from NetBSD 7
11427(amd64). YMMV. 11449(amd64). YMMV.
11428</p> 11450</p>
11429<div class="sect2"> 11451<div class="sect2">
11430<div class="titlepage"><div><div><h3 class="title"> 11452<div class="titlepage"><div><div><h3 class="title">
11431<a name="hardening.audit.pie"></a>B.3.1. Checking for PIE</h3></div></div></div> 11453<a name="hardening.audit.pie"></a>B.3.1. Checking for PIE</h3></div></div></div>
11432<p> 11454<p>
11433The ELF executable type in use changes for binaries built as PIE; without: 11455The ELF executable type in use changes for binaries built as PIE; without:
11434</p> 11456</p>
11435<pre class="programlisting"> 11457<pre class="programlisting">
11436<strong class="userinput"><code>$ file /path/to/bin/ary</code></strong> 11458<strong class="userinput"><code>$ file /path/to/bin/ary</code></strong>
11437/path/to/bin/ary: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for NetBSD 7.0, not stripped 11459/path/to/bin/ary: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for NetBSD 7.0, not stripped
11438</pre> 11460</pre>
11439<p>as opposed to the following binary, built as PIE:</p> 11461<p>as opposed to the following binary, built as PIE:</p>
11440<pre class="programlisting"> 11462<pre class="programlisting">
11441<strong class="userinput"><code>$ file /path/to/pie/bin/ary</code></strong> 11463<strong class="userinput"><code>$ file /path/to/pie/bin/ary</code></strong>
11442/path/to/pie/bin/ary: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for NetBSD 7.0, not stripped 11464/path/to/pie/bin/ary: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for NetBSD 7.0, not stripped
11443</pre> 11465</pre>
11444<p> 11466<p>
11445The latter result is then what is expected. 11467The latter result is then what is expected.
11446</p> 11468</p>
11447</div> 11469</div>
11448<div class="sect2"> 11470<div class="sect2">
11449<div class="titlepage"><div><div><h3 class="title"> 11471<div class="titlepage"><div><div><h3 class="title">
11450<a name="hardening.audit.relropartial"></a>B.3.2. Checking for partial RELRO</h3></div></div></div> 11472<a name="hardening.audit.relropartial"></a>B.3.2. Checking for partial RELRO</h3></div></div></div>
11451<p> 11473<p>
11452The following command should list a section called RELRO: 11474The following command should list a section called RELRO:
11453</p> 11475</p>
11454<pre class="programlisting"> 11476<pre class="programlisting">
11455<strong class="userinput"><code>$ objdump -p /path/to/bin/ary</code></strong> 11477<strong class="userinput"><code>$ objdump -p /path/to/bin/ary</code></strong>
11456 11478
11457/path/to/bin/ary: file format elf64-x86-64 11479/path/to/bin/ary: file format elf64-x86-64
11458 11480
11459Program Header: 11481Program Header:
11460[...] 11482[...]
11461 RELRO off 0x0000000000000d78 vaddr 0x0000000000600d78 paddr 0x0000000000600d78 align 2**0 11483 RELRO off 0x0000000000000d78 vaddr 0x0000000000600d78 paddr 0x0000000000600d78 align 2**0
11462</pre> 11484</pre>
11463<p> 11485<p>
11464This check is now performed automatically if 11486This check is now performed automatically if
11465<code class="varname">PKG_DEVELOPER</code> is set and RELRO is enabled. 11487<code class="varname">PKG_DEVELOPER</code> is set and RELRO is enabled.
11466</p> 11488</p>
11467</div> 11489</div>
11468<div class="sect2"> 11490<div class="sect2">
11469<div class="titlepage"><div><div><h3 class="title"> 11491<div class="titlepage"><div><div><h3 class="title">
11470<a name="hardening.audit.relrofull"></a>B.3.3. Checking for full RELRO</h3></div></div></div> 11492<a name="hardening.audit.relrofull"></a>B.3.3. Checking for full RELRO</h3></div></div></div>
11471<p> 11493<p>
11472The dynamic loader will apply RELRO immediately when detecting the presence of 11494The dynamic loader will apply RELRO immediately when detecting the presence of
11473the <code class="varname">BIND_NOW</code> flag: 11495the <code class="varname">BIND_NOW</code> flag:
11474</p> 11496</p>
11475<pre class="programlisting"> 11497<pre class="programlisting">
11476<strong class="userinput"><code>$ objdump -x /path/to/bin/ary</code></strong> 11498<strong class="userinput"><code>$ objdump -x /path/to/bin/ary</code></strong>
11477 11499
11478/path/to/bin/ary: file format elf64-x86-64 11500/path/to/bin/ary: file format elf64-x86-64
11479 11501
11480Dynamic Section: 11502Dynamic Section:
11481[...] 11503[...]
11482 BIND_NOW 0x0000000000000000 11504 BIND_NOW 0x0000000000000000
11483</pre> 11505</pre>
11484<p> 11506<p>
11485This has to be combined with partial RELRO (see above) to be fully efficient. 11507This has to be combined with partial RELRO (see above) to be fully efficient.
11486</p> 11508</p>
11487<p> 11509<p>
11488This check is now performed automatically (where supported) if 11510This check is now performed automatically (where supported) if
11489<code class="varname">PKG_DEVELOPER</code> is set. 11511<code class="varname">PKG_DEVELOPER</code> is set.
11490</p> 11512</p>
11491</div> 11513</div>
11492<div class="sect2"> 11514<div class="sect2">
11493<div class="titlepage"><div><div><h3 class="title"> 11515<div class="titlepage"><div><div><h3 class="title">
11494<a name="hardening.audit.ssp"></a>B.3.4. Checking for SSP</h3></div></div></div> 11516<a name="hardening.audit.ssp"></a>B.3.4. Checking for SSP</h3></div></div></div>
11495<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> 11517<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
11496<h3 class="title">Note</h3> 11518<h3 class="title">Note</h3>
11497<p> 11519<p>
11498Checking for SSP using this method only works where the operating system 11520Checking for SSP using this method only works where the operating system
11499uses <code class="literal">libssp</code>. <code class="literal">libssp</code> is not used 11521uses <code class="literal">libssp</code>. <code class="literal">libssp</code> is not used
11500on recent NetBSD/FreeBSD/Linux versions. 11522on recent NetBSD/FreeBSD/Linux versions.
11501</p> 11523</p>
11502</div> 11524</div>
11503<p> 11525<p>
11504Building objects, binaries and libraries with SSP will affect the presence of 11526Building objects, binaries and libraries with SSP will affect the presence of
11505additional symbols in the resulting file: 11527additional symbols in the resulting file:
11506</p> 11528</p>
11507<pre class="programlisting"> 11529<pre class="programlisting">
11508<strong class="userinput"><code>$ nm /path/to/bin/ary</code></strong> 11530<strong class="userinput"><code>$ nm /path/to/bin/ary</code></strong>
11509[...] 11531[...]
11510 U __stack_chk_fail 11532 U __stack_chk_fail
115110000000000600ea0 B __stack_chk_guard 115330000000000600ea0 B __stack_chk_guard
11512</pre> 11534</pre>
11513<p> 11535<p>
11514This is an indicator that the program was indeed built with support for SSP. 11536This is an indicator that the program was indeed built with support for SSP.
11515</p> 11537</p>
11516<p> 11538<p>
11517This check is now performed automatically (where supported) if 11539This check is now performed automatically (where supported) if
11518<code class="varname">PKG_DEVELOPER</code> is set and SSP is enabled. 11540<code class="varname">PKG_DEVELOPER</code> is set and SSP is enabled.
11519</p> 11541</p>
11520</div> 11542</div>
11521</div> 11543</div>
11522</div> 11544</div>
11523<div class="appendix"> 11545<div class="appendix">
11524<div class="titlepage"><div><div><h1 class="title"> 11546<div class="titlepage"><div><div><h1 class="title">
11525<a name="logs"></a>Appendix C. Build logs</h1></div></div></div> 11547<a name="logs"></a>Appendix C. Build logs</h1></div></div></div>
11526<div class="toc"> 11548<div class="toc">
11527<p><b>Table of Contents</b></p> 11549<p><b>Table of Contents</b></p>
11528<dl class="toc"> 11550<dl class="toc">
11529<dt><span class="sect1"><a href="#logs.building">C.1. Building figlet</a></span></dt> 11551<dt><span class="sect1"><a href="#logs.building">C.1. Building figlet</a></span></dt>
11530<dt><span class="sect1"><a href="#logs.package">C.2. Packaging figlet</a></span></dt> 11552<dt><span class="sect1"><a href="#logs.package">C.2. Packaging figlet</a></span></dt>
11531</dl> 11553</dl>
11532</div> 11554</div>
11533<div class="sect1"> 11555<div class="sect1">
11534<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 11556<div class="titlepage"><div><div><h2 class="title" style="clear: both">
11535<a name="logs.building"></a>C.1. Building figlet</h2></div></div></div> 11557<a name="logs.building"></a>C.1. Building figlet</h2></div></div></div>
11536<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make</code></strong> 11558<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make</code></strong>
11537===&gt; Checking for vulnerabilities in figlet-2.2.1nb2 11559===&gt; Checking for vulnerabilities in figlet-2.2.1nb2
11538=&gt; figlet221.tar.gz doesn't seem to exist on this system. 11560=&gt; figlet221.tar.gz doesn't seem to exist on this system.
11539=&gt; Attempting to fetch figlet221.tar.gz from ftp://ftp.figlet.org/pub/figlet/program/unix/. 11561=&gt; Attempting to fetch figlet221.tar.gz from ftp://ftp.figlet.org/pub/figlet/program/unix/.
11540=&gt; [172219 bytes] 11562=&gt; [172219 bytes]
11541Connected to ftp.plig.net. 11563Connected to ftp.plig.net.
11542220 ftp.plig.org NcFTPd Server (licensed copy) ready. 11564220 ftp.plig.org NcFTPd Server (licensed copy) ready.
11543331 Guest login ok, send your complete e-mail address as password. 11565331 Guest login ok, send your complete e-mail address as password.
11544230-You are user #5 of 500 simultaneous users allowed. 11566230-You are user #5 of 500 simultaneous users allowed.
11545230- 11567230-
11546230- ___ _ _ _ 11568230- ___ _ _ _
11547230- | _| |_ ___ ___| |_|___ ___ ___ ___ 11569230- | _| |_ ___ ___| |_|___ ___ ___ ___
11548230- | _| _| . |_| . | | | . |_| . | _| . | 11570230- | _| _| . |_| . | | | . |_| . | _| . |
11549230- |_| |_| | _|_| _|_|_|_ |_|___|_| |_ | 11571230- |_| |_| | _|_| _|_|_|_ |_|___|_| |_ |
11550230- |_| |_| |___| |___| 11572230- |_| |_| |___| |___|
11551230- 11573230-
11552230-** Welcome to ftp.plig.org ** 11574230-** Welcome to ftp.plig.org **
11553230- 11575230-
11554230-Please note that all transfers from this FTP site are logged. If you 11576230-Please note that all transfers from this FTP site are logged. If you
11555230-do not like this, please disconnect now. 11577230-do not like this, please disconnect now.
11556230- 11578230-
11557230-This archive is available via 11579230-This archive is available via
11558230- 11580230-
11559230-HTTP: http://ftp.plig.org/ 11581230-HTTP: http://ftp.plig.org/
11560230-FTP: ftp://ftp.plig.org/ (max 500 connections) 11582230-FTP: ftp://ftp.plig.org/ (max 500 connections)
11561230-RSYNC: rsync://ftp.plig.org/ (max 30 connections) 11583230-RSYNC: rsync://ftp.plig.org/ (max 30 connections)
11562230- 11584230-
11563230-Please email comments, bug reports and requests for packages to be 11585230-Please email comments, bug reports and requests for packages to be
11564230-mirrored to ftp-admin@plig.org. 11586230-mirrored to ftp-admin@plig.org.
11565230- 11587230-
11566230- 11588230-
11567230 Logged in anonymously. 11589230 Logged in anonymously.
11568Remote system type is UNIX. 11590Remote system type is UNIX.
11569Using binary mode to transfer files. 11591Using binary mode to transfer files.
11570200 Type okay. 11592200 Type okay.
11571250 "/pub" is new cwd. 11593250 "/pub" is new cwd.
11572250-"/pub/figlet" is new cwd. 11594250-"/pub/figlet" is new cwd.
11573250- 11595250-
11574250-Welcome to the figlet archive at ftp.figlet.org 11596250-Welcome to the figlet archive at ftp.figlet.org
11575250- 11597250-
11576250- ftp://ftp.figlet.org/pub/figlet/ 11598250- ftp://ftp.figlet.org/pub/figlet/
11577250- 11599250-
11578250-The official FIGlet web page is: 11600250-The official FIGlet web page is:
11579250- http://www.figlet.org/ 11601250- http://www.figlet.org/
11580250- 11602250-
11581250-If you have questions, please mailto:info@figlet.org. If you want to 11603250-If you have questions, please mailto:info@figlet.org. If you want to
11582250-contribute a font or something else, you can email us. 11604250-contribute a font or something else, you can email us.
11583250 11605250
11584250 "/pub/figlet/program" is new cwd. 11606250 "/pub/figlet/program" is new cwd.
11585250 "/pub/figlet/program/unix" is new cwd. 11607250 "/pub/figlet/program/unix" is new cwd.
11586local: figlet221.tar.gz remote: figlet221.tar.gz 11608local: figlet221.tar.gz remote: figlet221.tar.gz
11587502 Unimplemented command. 11609502 Unimplemented command.
11588227 Entering Passive Mode (195,40,6,41,246,104) 11610227 Entering Passive Mode (195,40,6,41,246,104)
11589150 Data connection accepted from 84.128.86.72:65131; transfer starting for figlet221.tar.gz (172219 bytes). 11611150 Data connection accepted from 84.128.86.72:65131; transfer starting for figlet221.tar.gz (172219 bytes).
1159038% |************** | 65800 64.16 KB/s 00:01 ETA 1161238% |************** | 65800 64.16 KB/s 00:01 ETA
11591226 Transfer completed. 11613226 Transfer completed.
11592172219 bytes received in 00:02 (75.99 KB/s) 11614172219 bytes received in 00:02 (75.99 KB/s)
11593221 Goodbye. 11615221 Goodbye.
11594=&gt; Checksum OK for figlet221.tar.gz. 11616=&gt; Checksum OK for figlet221.tar.gz.
11595===&gt; Extracting for figlet-2.2.1nb2 11617===&gt; Extracting for figlet-2.2.1nb2
11596===&gt; Required installed package ccache-[0-9]*: ccache-2.3nb1 found 11618===&gt; Required installed package ccache-[0-9]*: ccache-2.3nb1 found
11597===&gt; Patching for figlet-2.2.1nb2 11619===&gt; Patching for figlet-2.2.1nb2
11598===&gt; Applying pkgsrc patches for figlet-2.2.1nb2 11620===&gt; Applying pkgsrc patches for figlet-2.2.1nb2
11599===&gt; Overriding tools for figlet-2.2.1nb2 11621===&gt; Overriding tools for figlet-2.2.1nb2
11600===&gt; Creating toolchain wrappers for figlet-2.2.1nb2 11622===&gt; Creating toolchain wrappers for figlet-2.2.1nb2
11601===&gt; Configuring for figlet-2.2.1nb2 11623===&gt; Configuring for figlet-2.2.1nb2
11602===&gt; Building for figlet-2.2.1nb2 11624===&gt; Building for figlet-2.2.1nb2
11603gcc -O2 -DDEFAULTFONTDIR=\"/usr/pkg/share/figlet\" -DDEFAULTFONTFILE=\"standard.flf\" figlet.c zipio.c crc.c inflate.c -o figlet 11625gcc -O2 -DDEFAULTFONTDIR=\"/usr/pkg/share/figlet\" -DDEFAULTFONTFILE=\"standard.flf\" figlet.c zipio.c crc.c inflate.c -o figlet
11604chmod a+x figlet 11626chmod a+x figlet
11605gcc -O2 -o chkfont chkfont.c 11627gcc -O2 -o chkfont chkfont.c
11606=&gt; Unwrapping files-to-be-installed. 11628=&gt; Unwrapping files-to-be-installed.
11607<code class="prompt">#</code> 11629<code class="prompt">#</code>
11608<code class="prompt">#</code> <strong class="userinput"><code>make install</code></strong> 11630<code class="prompt">#</code> <strong class="userinput"><code>make install</code></strong>
11609===&gt; Checking for vulnerabilities in figlet-2.2.1nb2 11631===&gt; Checking for vulnerabilities in figlet-2.2.1nb2
11610===&gt; Installing for figlet-2.2.1nb2 11632===&gt; Installing for figlet-2.2.1nb2
11611install -d -o root -g wheel -m 755 /usr/pkg/bin 11633install -d -o root -g wheel -m 755 /usr/pkg/bin
11612install -d -o root -g wheel -m 755 /usr/pkg/man/man6 11634install -d -o root -g wheel -m 755 /usr/pkg/man/man6
11613mkdir -p /usr/pkg/share/figlet 11635mkdir -p /usr/pkg/share/figlet
11614cp figlet /usr/pkg/bin 11636cp figlet /usr/pkg/bin
11615cp chkfont /usr/pkg/bin 11637cp chkfont /usr/pkg/bin
11616chmod 555 figlist showfigfonts 11638chmod 555 figlist showfigfonts
11617cp figlist /usr/pkg/bin 11639cp figlist /usr/pkg/bin
11618cp showfigfonts /usr/pkg/bin 11640cp showfigfonts /usr/pkg/bin
11619cp fonts/*.flf /usr/pkg/share/figlet 11641cp fonts/*.flf /usr/pkg/share/figlet
11620cp fonts/*.flc /usr/pkg/share/figlet 11642cp fonts/*.flc /usr/pkg/share/figlet
11621cp figlet.6 /usr/pkg/man/man6 11643cp figlet.6 /usr/pkg/man/man6
11622===&gt; Registering installation for figlet-2.2.1nb2 11644===&gt; Registering installation for figlet-2.2.1nb2
11623<code class="prompt">#</code></pre> 11645<code class="prompt">#</code></pre>
11624</div> 11646</div>
11625<div class="sect1"> 11647<div class="sect1">
11626<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 11648<div class="titlepage"><div><div><h2 class="title" style="clear: both">
11627<a name="logs.package"></a>C.2. Packaging figlet</h2></div></div></div> 11649<a name="logs.package"></a>C.2. Packaging figlet</h2></div></div></div>
11628<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make package</code></strong> 11650<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>make package</code></strong>
11629===&gt; Checking for vulnerabilities in figlet-2.2.1nb2 11651===&gt; Checking for vulnerabilities in figlet-2.2.1nb2
11630===&gt; Packaging figlet-2.2.1nb2 11652===&gt; Packaging figlet-2.2.1nb2
11631===&gt; Building binary package for figlet-2.2.1nb2 11653===&gt; Building binary package for figlet-2.2.1nb2
11632Creating package /home/cvs/pkgsrc/packages/i386/All/figlet-2.2.1nb2.tgz 11654Creating package /home/cvs/pkgsrc/packages/i386/All/figlet-2.2.1nb2.tgz
11633Using SrcDir value of /usr/pkg 11655Using SrcDir value of /usr/pkg
11634Registering depends:. 11656Registering depends:.
11635<code class="prompt">#</code></pre> 11657<code class="prompt">#</code></pre>
11636</div> 11658</div>
11637</div> 11659</div>
11638<div class="appendix"> 11660<div class="appendix">
11639<div class="titlepage"><div><div><h1 class="title"> 11661<div class="titlepage"><div><div><h1 class="title">
11640<a name="ftp-layout"></a>Appendix D. Directory layout of the pkgsrc FTP server</h1></div></div></div> 11662<a name="ftp-layout"></a>Appendix D. Directory layout of the pkgsrc FTP server</h1></div></div></div>
11641<div class="toc"> 11663<div class="toc">
11642<p><b>Table of Contents</b></p> 11664<p><b>Table of Contents</b></p>
11643<dl class="toc"> 11665<dl class="toc">
11644<dt><span class="sect1"><a href="#ftp-distfiles">D.1. <code class="filename">distfiles</code>: The distributed source files</a></span></dt> 11666<dt><span class="sect1"><a href="#ftp-distfiles">D.1. <code class="filename">distfiles</code>: The distributed source files</a></span></dt>
11645<dt><span class="sect1"><a href="#ftp-misc">D.2. <code class="filename">misc</code>: Miscellaneous things</a></span></dt> 11667<dt><span class="sect1"><a href="#ftp-misc">D.2. <code class="filename">misc</code>: Miscellaneous things</a></span></dt>
11646<dt><span class="sect1"><a href="#ftp-packages">D.3. <code class="filename">packages</code>: Binary packages</a></span></dt> 11668<dt><span class="sect1"><a href="#ftp-packages">D.3. <code class="filename">packages</code>: Binary packages</a></span></dt>
11647<dt><span class="sect1"><a href="#ftp-reports">D.4. <code class="filename">reports</code>: Bulk build reports</a></span></dt> 11669<dt><span class="sect1"><a href="#ftp-reports">D.4. <code class="filename">reports</code>: Bulk build reports</a></span></dt>
11648<dt><span class="sect1"><a href="#ftp-source">D.5. <code class="filename">current</code>, 11670<dt><span class="sect1"><a href="#ftp-source">D.5. <code class="filename">current</code>,
11649<code class="filename">stable</code>, 11671<code class="filename">stable</code>,
11650<code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>: 11672<code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>:
11651source packages</a></span></dt> 11673source packages</a></span></dt>
11652</dl> 11674</dl>
11653</div> 11675</div>
11654<p>As in other big projects, the directory layout of pkgsrc 11676<p>As in other big projects, the directory layout of pkgsrc
11655 is quite complex for newbies. This chapter explains where you 11677 is quite complex for newbies. This chapter explains where you
11656 find things on the FTP server. The base directory on 11678 find things on the FTP server. The base directory on
11657 <code class="filename">ftp.NetBSD.org</code> is <a class="ulink" href="ftp://ftp.NetBSD.org/pub/pkgsrc/" target="_top"><code class="filename">/pub/pkgsrc/</code></a>. 11679 <code class="filename">ftp.NetBSD.org</code> is <a class="ulink" href="ftp://ftp.NetBSD.org/pub/pkgsrc/" target="_top"><code class="filename">/pub/pkgsrc/</code></a>.
11658 On other servers it may be different, but inside this directory, 11680 On other servers it may be different, but inside this directory,
11659 everything should look the same, no matter on which server you 11681 everything should look the same, no matter on which server you
11660 are. This directory contains some subdirectories, which are 11682 are. This directory contains some subdirectories, which are
11661 explained below.</p> 11683 explained below.</p>
11662<div class="sect1"> 11684<div class="sect1">
11663<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 11685<div class="titlepage"><div><div><h2 class="title" style="clear: both">
11664<a name="ftp-distfiles"></a>D.1. <code class="filename">distfiles</code>: The distributed source files</h2></div></div></div> 11686<a name="ftp-distfiles"></a>D.1. <code class="filename">distfiles</code>: The distributed source files</h2></div></div></div>
11665<p>The directory <code class="filename">distfiles</code> contains lots 11687<p>The directory <code class="filename">distfiles</code> contains lots
11666 of archive files from all pkgsrc packages, which are mirrored 11688 of archive files from all pkgsrc packages, which are mirrored
11667 here. The subdirectories are called after their package names 11689 here. The subdirectories are called after their package names
11668 and are used when the distributed files have names that don't 11690 and are used when the distributed files have names that don't
11669 explicitly contain a version number or are otherwise too generic 11691 explicitly contain a version number or are otherwise too generic
11670 (for example <code class="filename">release.tar.gz</code>).</p> 11692 (for example <code class="filename">release.tar.gz</code>).</p>
11671</div> 11693</div>
11672<div class="sect1"> 11694<div class="sect1">
11673<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 11695<div class="titlepage"><div><div><h2 class="title" style="clear: both">
11674<a name="ftp-misc"></a>D.2. <code class="filename">misc</code>: Miscellaneous things</h2></div></div></div> 11696<a name="ftp-misc"></a>D.2. <code class="filename">misc</code>: Miscellaneous things</h2></div></div></div>
11675<p>This directory contains things that individual pkgsrc 11697<p>This directory contains things that individual pkgsrc
11676 developers find worth publishing.</p> 11698 developers find worth publishing.</p>
11677</div> 11699</div>
11678<div class="sect1"> 11700<div class="sect1">
11679<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 11701<div class="titlepage"><div><div><h2 class="title" style="clear: both">
11680<a name="ftp-packages"></a>D.3. <code class="filename">packages</code>: Binary packages</h2></div></div></div> 11702<a name="ftp-packages"></a>D.3. <code class="filename">packages</code>: Binary packages</h2></div></div></div>
11681<p>This directory contains binary packages for the various 11703<p>This directory contains binary packages for the various
11682 platforms that are supported by pkgsrc. 11704 platforms that are supported by pkgsrc.
11683 Each subdirectory is of the form <em class="replaceable"><code>OPSYS</code></em>/<em class="replaceable"><code>ARCH</code></em>/<em class="replaceable"><code>OSVERSION_TAG</code></em>. The meaning of these variables is:</p> 11705 Each subdirectory is of the form <em class="replaceable"><code>OPSYS</code></em>/<em class="replaceable"><code>ARCH</code></em>/<em class="replaceable"><code>OSVERSION_TAG</code></em>. The meaning of these variables is:</p>
11684<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 11706<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
11685<li class="listitem"><p><code class="varname">OPSYS</code> is the name of the 11707<li class="listitem"><p><code class="varname">OPSYS</code> is the name of the
11686 operating system for which the packages have been built. The 11708 operating system for which the packages have been built. The
11687 name is taken from the output of the <span class="command"><strong>uname</strong></span> 11709 name is taken from the output of the <span class="command"><strong>uname</strong></span>
11688 command, so it may differ from the one you are used to 11710 command, so it may differ from the one you are used to
11689 hear.</p></li> 11711 hear.</p></li>
11690<li class="listitem"><p><code class="varname">ARCH</code> is the hardware 11712<li class="listitem"><p><code class="varname">ARCH</code> is the hardware
11691 architecture of the platform for which the packages have been 11713 architecture of the platform for which the packages have been
11692 built. It also includes the <code class="varname">ABI</code> (Application 11714 built. It also includes the <code class="varname">ABI</code> (Application
11693 Binary Interface) for platforms that have several of 11715 Binary Interface) for platforms that have several of
11694 them.</p></li> 11716 them.</p></li>
11695<li class="listitem"><p><code class="varname">OSVERSION</code> is the version of 11717<li class="listitem"><p><code class="varname">OSVERSION</code> is the version of
11696 the operating system. For version numbers that change often (for 11718 the operating system. For version numbers that change often (for
11697 example NetBSD-current), the often-changing part should be 11719 example NetBSD-current), the often-changing part should be
11698 replaced with an <code class="literal">x</code>, for example 11720 replaced with an <code class="literal">x</code>, for example
11699 <code class="literal">4.99.x</code>.</p></li> 11721 <code class="literal">4.99.x</code>.</p></li>
11700<li class="listitem"><p><code class="varname">TAG</code> is either 11722<li class="listitem"><p><code class="varname">TAG</code> is either
11701 <code class="literal">20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code> 11723 <code class="literal">20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>
11702 for a stable branch, or <code class="literal">head</code> for packages 11724 for a stable branch, or <code class="literal">head</code> for packages
11703 built from the HEAD branch. The latter should only be used when 11725 built from the HEAD branch. The latter should only be used when
11704 the packages are updated on a regular basis. Otherwise the date 11726 the packages are updated on a regular basis. Otherwise the date
11705 from checking out pkgsrc should be appended, for example 11727 from checking out pkgsrc should be appended, for example
11706 <code class="literal">head_20071015</code>.</p></li> 11728 <code class="literal">head_20071015</code>.</p></li>
11707</ul></div> 11729</ul></div>
11708<p>The rationale for exactly this scheme is that the pkgsrc users looking for binary packages 11730<p>The rationale for exactly this scheme is that the pkgsrc users looking for binary packages
11709 can quickly click through the directories on the 11731 can quickly click through the directories on the
11710 server and find the best binary packages for their machines. Since they 11732 server and find the best binary packages for their machines. Since they
11711 usually know the operating system and the hardware architecture, OPSYS 11733 usually know the operating system and the hardware architecture, OPSYS
11712 and ARCH are placed first. After these choices, they can select the 11734 and ARCH are placed first. After these choices, they can select the
11713 best combination of OSVERSION and TAG together, since it is usually the 11735 best combination of OSVERSION and TAG together, since it is usually the
11714 case that packages stay compatible between different version of the 11736 case that packages stay compatible between different version of the
11715 operating system.</p> 11737 operating system.</p>
11716<p>In each of these directories, there is a 11738<p>In each of these directories, there is a
11717 whole binary packages collection for a specific platform. It has a directory called 11739 whole binary packages collection for a specific platform. It has a directory called
11718 <code class="filename">All</code> which contains all binary packages. 11740 <code class="filename">All</code> which contains all binary packages.
11719 Besides that, there are various category directories that 11741 Besides that, there are various category directories that
11720 contain symbolic links to the real binary packages.</p> 11742 contain symbolic links to the real binary packages.</p>
11721</div> 11743</div>
11722<div class="sect1"> 11744<div class="sect1">
11723<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 11745<div class="titlepage"><div><div><h2 class="title" style="clear: both">
11724<a name="ftp-reports"></a>D.4. <code class="filename">reports</code>: Bulk build reports</h2></div></div></div> 11746<a name="ftp-reports"></a>D.4. <code class="filename">reports</code>: Bulk build reports</h2></div></div></div>
11725<p>Here are the reports from bulk builds, for those who want 11747<p>Here are the reports from bulk builds, for those who want
11726 to fix packages that didn't build on some of the platforms. The 11748 to fix packages that didn't build on some of the platforms. The
11727 structure of subdirectories should look like the one in <a class="xref" href="#ftp-packages" title="D.3. packages: Binary packages">Section D.3, &#8220;<code class="filename">packages</code>: Binary packages&#8221;</a>.</p> 11749 structure of subdirectories should look like the one in <a class="xref" href="#ftp-packages" title="D.3. packages: Binary packages">Section D.3, &#8220;<code class="filename">packages</code>: Binary packages&#8221;</a>.</p>
11728</div> 11750</div>
11729<div class="sect1"> 11751<div class="sect1">
11730<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 11752<div class="titlepage"><div><div><h2 class="title" style="clear: both">
11731<a name="ftp-source"></a>D.5. <code class="filename">current</code>, 11753<a name="ftp-source"></a>D.5. <code class="filename">current</code>,
11732<code class="filename">stable</code>, 11754<code class="filename">stable</code>,
11733<code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>: 11755<code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>:
11734source packages</h2></div></div></div> 11756source packages</h2></div></div></div>
11735<p>These directories contain the <span class="quote">&#8220;<span class="quote">real</span>&#8221;</span> pkgsrc, 11757<p>These directories contain the <span class="quote">&#8220;<span class="quote">real</span>&#8221;</span> pkgsrc,
11736 that is the files that define how to create binary packages from 11758 that is the files that define how to create binary packages from
11737 source archives.</p> 11759 source archives.</p>
11738<p>Each of the <code class="filename">current</code>, 11760<p>Each of the <code class="filename">current</code>,
11739 <code class="filename">stable</code> and 11761 <code class="filename">stable</code> and
11740 <code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code> 11762 <code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>
11741 directories share the same structure. They each contain a 11763 directories share the same structure. They each contain a
11742 <code class="filename">pkgsrc</code> directory and 11764 <code class="filename">pkgsrc</code> directory and
11743 <code class="filename">pkgsrc.tar.{bz,gz,xz}</code> file.</p> 11765 <code class="filename">pkgsrc.tar.{bz,gz,xz}</code> file.</p>
11744<p>The directory <code class="filename">pkgsrc</code> contains a 11766<p>The directory <code class="filename">pkgsrc</code> contains a
11745 snapshot of the CVS repository, which is updated regularly. The 11767 snapshot of the CVS repository, which is updated regularly. The
11746 file <code class="filename">pkgsrc.tar.{bz,gz,xz}</code> contains the same 11768 file <code class="filename">pkgsrc.tar.{bz,gz,xz}</code> contains the same
11747 as the directory, ready to be downloaded as a whole.</p> 11769 as the directory, ready to be downloaded as a whole.</p>
11748<p>The <code class="filename">current</code> directory contains files 11770<p>The <code class="filename">current</code> directory contains files
11749 related to the HEAD branch of the CVS repository. 11771 related to the HEAD branch of the CVS repository.
11750 In this directory there is an additional file called 11772 In this directory there is an additional file called
11751 <code class="filename">pkgsrc-readmes.tar.{bz,gz,xz}</code> that contains 11773 <code class="filename">pkgsrc-readmes.tar.{bz,gz,xz}</code> that contains
11752 all pkgsrc <code class="filename">README</code>s with information about 11774 all pkgsrc <code class="filename">README</code>s with information about
11753 categories and packages. 11775 categories and packages.
11754 </p> 11776 </p>
11755<p>The <code class="filename">stable</code> directory is a symlink to 11777<p>The <code class="filename">stable</code> directory is a symlink to
11756 the latest  11778 the latest
11757 <code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>. 11779 <code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>.
11758 </p> 11780 </p>
11759<p>The 11781<p>The
11760 <code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>. 11782 <code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>.
11761 directories contain files related to the  11783 directories contain files related to the
11762 <code class="filename">-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code> 11784 <code class="filename">-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em></code>
11763 stable branch of the CVS repository. In these directories there is 11785 stable branch of the CVS repository. In these directories there is
11764 an additional file called 11786 an additional file called
11765 <code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em>.tar.{bz,gz,xz}</code>, 11787 <code class="filename">pkgsrc-20<em class="replaceable"><code>xx</code></em>Q<em class="replaceable"><code>y</code></em>.tar.{bz,gz,xz}</code>,
11766 which contains the state of pkgsrc when it was branched.</p> 11788 which contains the state of pkgsrc when it was branched.</p>
11767</div> 11789</div>
11768</div> 11790</div>
11769<div class="appendix"> 11791<div class="appendix">
11770<div class="titlepage"><div><div><h1 class="title"> 11792<div class="titlepage"><div><div><h1 class="title">
11771<a name="help-topics"></a>Appendix E. Help topics</h1></div></div></div> 11793<a name="help-topics"></a>Appendix E. Help topics</h1></div></div></div>
11772<p> 11794<p>
11773 The following list contains all help topics that are available 11795 The following list contains all help topics that are available
11774 when running <span class="command"><strong>bmake help topic=:index</strong></span>. 11796 when running <span class="command"><strong>bmake help topic=:index</strong></span>.
11775</p> 11797</p>
11776<table border="0" summary="Simple list" class="simplelist"> 11798<table border="0" summary="Simple list" class="simplelist">
11777<tr> 11799<tr>
11778<td>#!</td> 11800<td>#!</td>
11779<td>-lintl</td> 11801<td>-lintl</td>
11780</tr> 11802</tr>
11781<tr> 11803<tr>
11782<td>32bit</td> 11804<td>32bit</td>
11783<td>64bit</td> 11805<td>64bit</td>
11784</tr> 11806</tr>
11785<tr> 11807<tr>
11786<td>ABI</td> 11808<td>ABI</td>
11787<td>ACCEPTABLE_LICENSES</td> 11809<td>ACCEPTABLE_LICENSES</td>
11788</tr> 11810</tr>
11789<tr> 11811<tr>
11790<td>ACROREAD_FONTPATH</td> 11812<td>ACROREAD_FONTPATH</td>
11791<td>ADDITIONAL</td> 11813<td>ADDITIONAL</td>
11792</tr> 11814</tr>
11793<tr> 11815<tr>
11794<td>AFAIK</td> 11816<td>AFAIK</td>
11795<td>AIX</td> 11817<td>AIX</td>
11796</tr> 11818</tr>
11797<tr> 11819<tr>
11798<td>ALLOW_VULNERABLE_PACKAGES</td> 11820<td>ALLOW_VULNERABLE_PACKAGES</td>
11799<td>ALL_ENV</td> 11821<td>ALL_ENV</td>
11800</tr> 11822</tr>
11801<tr> 11823<tr>
11802<td>ALSA_PC</td> 
11803<td>ALTERNATIVES_SRC</td> 11824<td>ALTERNATIVES_SRC</td>
11804</tr> 
11805<tr> 
11806<td>AMANDA_TMP</td> 11825<td>AMANDA_TMP</td>
11807<td>AMANDA_USER</td> 
11808</tr> 11826</tr>
11809<tr> 11827<tr>
 11828<td>AMANDA_USER</td>
11810<td>AMANDA_VAR</td> 11829<td>AMANDA_VAR</td>
11811<td>APACHE_GROUP</td> 
11812</tr> 11830</tr>
11813<tr> 11831<tr>
 11832<td>APACHE_GROUP</td>
11814<td>APACHE_MODULE_NAME</td> 11833<td>APACHE_MODULE_NAME</td>
11815<td>APACHE_MODULE_SRC</td> 
11816</tr> 11834</tr>
11817<tr> 11835<tr>
 11836<td>APACHE_MODULE_SRC</td>
11818<td>APACHE_MODULE_SRCDIR</td> 11837<td>APACHE_MODULE_SRCDIR</td>
11819<td>APACHE_PKG_PREFIX</td> 
11820</tr> 11838</tr>
11821<tr> 11839<tr>
 11840<td>APACHE_PKG_PREFIX</td>
11822<td>APACHE_SUEXEC_CONFIGURE_ARGS</td> 11841<td>APACHE_SUEXEC_CONFIGURE_ARGS</td>
11823<td>APACHE_SUEXEC_DOCROOT</td> 
11824</tr> 11842</tr>
11825<tr> 11843<tr>
 11844<td>APACHE_SUEXEC_DOCROOT</td>
11826<td>APACHE_USER</td> 11845<td>APACHE_USER</td>
11827<td>APPEND_ABI</td> 
11828</tr> 11846</tr>
11829<tr> 11847<tr>
 11848<td>APPEND_ABI</td>
11830<td>APPEND_ELF</td> 11849<td>APPEND_ELF</td>
11831<td>ARLA_CACHE</td> 
11832</tr> 11850</tr>
11833<tr> 11851<tr>
 11852<td>ARLA_CACHE</td>
11834<td>AUDIT_PACKAGES_FLAGS</td> 11853<td>AUDIT_PACKAGES_FLAGS</td>
11835<td>AUTOCONF_REQD</td> 
11836</tr> 11854</tr>
11837<tr> 11855<tr>
 11856<td>AUTOCONF_REQD</td>
11838<td>AUTOMAKE_OVERRIDE</td> 11857<td>AUTOMAKE_OVERRIDE</td>
11839<td>AUTOMAKE_REQD</td> 
11840</tr> 11858</tr>
11841<tr> 11859<tr>
 11860<td>AUTOMAKE_REQD</td>
11842<td>AUTO_MKDIRS</td> 11861<td>AUTO_MKDIRS</td>
11843<td>BDB185_DEFAULT</td> 
11844</tr> 11862</tr>
11845<tr> 11863<tr>
 11864<td>BDB185_DEFAULT</td>
11846<td>BDBBASE</td> 11865<td>BDBBASE</td>
11847<td>BDB_ACCEPTED</td> 
11848</tr> 11866</tr>
11849<tr> 11867<tr>
 11868<td>BDB_ACCEPTED</td>
11850<td>BDB_DEFAULT</td> 11869<td>BDB_DEFAULT</td>
11851<td>BDB_LIBS</td> 
11852</tr> 11870</tr>
11853<tr> 11871<tr>
 11872<td>BDB_LIBS</td>
11854<td>BDB_TYPE</td> 11873<td>BDB_TYPE</td>
11855<td>BINCIMAP_GROUP</td> 
11856</tr> 11874</tr>
11857<tr> 11875<tr>
 11876<td>BINCIMAP_GROUP</td>
11858<td>BINCIMAP_USER</td> 11877<td>BINCIMAP_USER</td>
11859<td>BIND_DIR</td> 
11860</tr> 11878</tr>
11861<tr> 11879<tr>
 11880<td>BIND_DIR</td>
11862<td>BIND_GROUP</td> 11881<td>BIND_GROUP</td>
11863<td>BIND_USER</td> 
11864</tr> 11882</tr>
11865<tr> 11883<tr>
 11884<td>BIND_USER</td>
11866<td>BINOWN</td> 11885<td>BINOWN</td>
11867<td>BINPKG_SITES</td> 
11868</tr> 11886</tr>
11869<tr> 11887<tr>
 11888<td>BINPKG_SITES</td>
11870<td>BIN_INSTALL_FLAGS</td> 11889<td>BIN_INSTALL_FLAGS</td>
11871<td>BISON_PKGDATADIR</td> 
11872</tr> 11890</tr>
11873<tr> 11891<tr>
 11892<td>BISON_PKGDATADIR</td>
11874<td>BLAS</td> 11893<td>BLAS</td>
11875<td>BLAS_ACCEPTED</td> 
11876</tr> 11894</tr>
11877<tr> 11895<tr>
 11896<td>BLAS_ACCEPTED</td>
11878<td>BLAS_C_INTERFACE</td> 11897<td>BLAS_C_INTERFACE</td>
11879<td>BLAS_INCLUDES</td> 
11880</tr> 11898</tr>
11881<tr> 11899<tr>
 11900<td>BLAS_INCLUDES</td>
11882<td>BLAS_INDEX64</td> 11901<td>BLAS_INDEX64</td>
11883<td>BLAS_LIBS</td> 
11884</tr> 11902</tr>
11885<tr> 11903<tr>
 11904<td>BLAS_LIBS</td>
11886<td>BLAS_TYPE</td> 11905<td>BLAS_TYPE</td>
11887<td>BOOTSTRAP_DEPENDS</td> 
11888</tr> 11906</tr>
11889<tr> 11907<tr>
 11908<td>BOOTSTRAP_DEPENDS</td>
11890<td>BROKEN</td> 11909<td>BROKEN</td>
11891<td>BROKEN_EXCEPT_ON_PLATFORM</td> 
11892</tr> 11910</tr>
11893<tr> 11911<tr>
 11912<td>BROKEN_EXCEPT_ON_PLATFORM</td>
11894<td>BROKEN_ON_PLATFORM</td> 11913<td>BROKEN_ON_PLATFORM</td>
11895<td>BSDSRCDIR</td> 
11896</tr> 11914</tr>
11897<tr> 11915<tr>
 11916<td>BSDSRCDIR</td>
11898<td>BSDXSRCDIR</td> 11917<td>BSDXSRCDIR</td>
11899<td>BSD_MAKE_ENV</td> 
11900</tr> 11918</tr>
11901<tr> 11919<tr>
 11920<td>BSD_MAKE_ENV</td>
11902<td>BUILDLINK_AUTO_DIRS</td> 11921<td>BUILDLINK_AUTO_DIRS</td>
11903<td>BUILDLINK_AUTO_VARS</td> 
11904</tr> 11922</tr>
11905<tr> 11923<tr>
 11924<td>BUILDLINK_AUTO_VARS</td>
11906<td>BUILDLINK_CFLAGS</td> 11925<td>BUILDLINK_CFLAGS</td>
11907<td>BUILDLINK_CONTENTS_FILTER</td> 
11908</tr> 11926</tr>
11909<tr> 11927<tr>
 11928<td>BUILDLINK_CONTENTS_FILTER</td>
11910<td>BUILDLINK_CPPFLAGS</td> 11929<td>BUILDLINK_CPPFLAGS</td>
11911<td>BUILDLINK_DEPMETHOD</td> 
11912</tr> 11930</tr>
11913<tr> 11931<tr>
11914<td>BUILDLINK_FILES</td> 11932<td>BUILDLINK_FILES</td>
11915<td>BUILDLINK_FILES_CMD</td> 11933<td>BUILDLINK_FILES_CMD</td>
11916</tr> 11934</tr>
11917<tr> 11935<tr>
11918<td>BUILDLINK_FNAME_TRANSFORM</td> 11936<td>BUILDLINK_FNAME_TRANSFORM</td>
11919<td>BUILDLINK_LDFLAGS</td> 11937<td>BUILDLINK_LDFLAGS</td>
11920</tr> 11938</tr>
11921<tr> 11939<tr>
11922<td>BUILDLINK_LIBS</td> 11940<td>BUILDLINK_LIBS</td>
11923<td>BUILDLINK_OPSYS_SUPPORT_PTHREAD</td> 11941<td>BUILDLINK_OPSYS_SUPPORT_PTHREAD</td>
11924</tr> 11942</tr>
11925<tr> 11943<tr>
11926<td>BUILDLINK_PKGNAME</td> 11944<td>BUILDLINK_PKGNAME</td>
11927<td>BUILDLINK_PREFIX</td> 11945<td>BUILDLINK_PREFIX</td>
11928</tr> 11946</tr>
11929<tr> 11947<tr>
11930<td>BUILDLINK_RPATHDIRS</td> 11948<td>BUILDLINK_RPATHDIRS</td>
11931<td>BUILDLINK_TREE</td> 11949<td>BUILDLINK_TREE</td>
11932</tr> 11950</tr>
11933<tr> 11951<tr>
11934<td>BUILD_DEFS</td> 11952<td>BUILD_DEFS</td>
11935<td>BUILD_DEFS_EFFECTS</td> 11953<td>BUILD_DEFS_EFFECTS</td>
11936</tr> 11954</tr>
11937<tr> 11955<tr>
11938<td>BUILD_DEPENDS</td> 11956<td>BUILD_DEPENDS</td>
11939<td>BUILD_DIRS</td> 11957<td>BUILD_DIRS</td>
11940</tr> 11958</tr>
11941<tr> 11959<tr>
11942<td>BUILD_ENV_SHELL</td> 11960<td>BUILD_ENV_SHELL</td>
11943<td>BUILD_MAKE_CMD</td> 11961<td>BUILD_MAKE_CMD</td>
11944</tr> 11962</tr>
11945<tr> 11963<tr>
11946<td>BUILD_MAKE_FLAGS</td> 11964<td>BUILD_MAKE_FLAGS</td>
11947<td>BUILD_TARGET</td> 11965<td>BUILD_TARGET</td>
11948</tr> 11966</tr>
11949<tr> 11967<tr>
11950<td>BUILTIN_FIND_FILES</td> 11968<td>BUILTIN_FIND_FILES</td>
11951<td>BUILTIN_FIND_FILES_VAR</td> 11969<td>BUILTIN_FIND_FILES_VAR</td>
11952</tr> 11970</tr>
11953<tr> 11971<tr>
11954<td>BUILTIN_FIND_GREP</td> 11972<td>BUILTIN_FIND_GREP</td>
11955<td>BUILTIN_FIND_HEADERS</td> 11973<td>BUILTIN_FIND_HEADERS</td>
11956</tr> 11974</tr>
11957<tr> 11975<tr>
11958<td>BUILTIN_FIND_HEADERS_VAR</td> 11976<td>BUILTIN_FIND_HEADERS_VAR</td>
11959<td>BUILTIN_FIND_PKGCONFIG</td> 11977<td>BUILTIN_FIND_PKGCONFIG</td>
11960</tr> 11978</tr>
11961<tr> 11979<tr>
11962<td>BUILTIN_FIND_PKGCONFIG_VAR</td> 11980<td>BUILTIN_FIND_PKGCONFIG_VAR</td>
11963<td>BUILTIN_PKG</td> 11981<td>BUILTIN_PKG</td>
11964</tr> 11982</tr>
11965<tr> 11983<tr>
11966<td>BUILTIN_TEST_CURSES_DEFINES</td> 11984<td>BUILTIN_TEST_CURSES_DEFINES</td>
11967<td>BUILTIN_TEST_CURSES_FUNCS</td> 11985<td>BUILTIN_TEST_CURSES_FUNCS</td>
11968</tr> 11986</tr>
11969<tr> 11987<tr>
11970<td>BUILTIN_VERSION_SCRIPT</td> 11988<td>BUILTIN_VERSION_SCRIPT</td>
11971<td>BUILTIN_X11_TYPE</td> 11989<td>BUILTIN_X11_TYPE</td>
11972</tr> 11990</tr>
11973<tr> 11991<tr>
11974<td>BUILTIN_X11_VERSION</td> 11992<td>BUILTIN_X11_VERSION</td>
11975<td>CACTI_GROUP</td> 11993<td>CACTI_GROUP</td>
11976</tr> 11994</tr>
11977<tr> 11995<tr>
11978<td>CACTI_USER</td> 11996<td>CACTI_USER</td>
11979<td>CANNA_GROUP</td> 11997<td>CANNA_GROUP</td>
11980</tr> 11998</tr>
11981<tr> 11999<tr>
11982<td>CANNA_USER</td> 12000<td>CANNA_USER</td>
11983<td>CAT</td> 12001<td>CAT</td>
11984</tr> 12002</tr>
11985<tr> 12003<tr>
11986<td>CBLAS_LIBS</td> 12004<td>CBLAS_LIBS</td>
11987<td>CCACHE_BASE</td> 12005<td>CCACHE_BASE</td>
11988</tr> 12006</tr>
11989<tr> 12007<tr>
11990<td>CCACHE_DIR</td> 12008<td>CCACHE_DIR</td>
11991<td>CCACHE_LOGFILE</td> 12009<td>CCACHE_LOGFILE</td>
11992</tr> 12010</tr>
11993<tr> 12011<tr>
11994<td>CC_VERSION</td> 12012<td>CC_VERSION</td>
11995<td>CC_VERSION_STRING</td> 12013<td>CC_VERSION_STRING</td>
11996</tr> 12014</tr>
11997<tr> 12015<tr>
11998<td>CDRECORD_CONF</td> 12016<td>CDRECORD_CONF</td>
11999<td>CDROM_PKG_URL_DIR</td> 12017<td>CDROM_PKG_URL_DIR</td>
12000</tr> 12018</tr>
12001<tr> 12019<tr>
12002<td>CDROM_PKG_URL_HOST</td> 12020<td>CDROM_PKG_URL_HOST</td>
12003<td>CHANGES</td> 12021<td>CHANGES</td>
12004</tr> 12022</tr>
12005<tr> 12023<tr>
12006<td>CHECKOUT_DATE</td> 
12007<td>CHECK_COMPILER</td> 12024<td>CHECK_COMPILER</td>
12008</tr> 
12009<tr> 
12010<td>CHECK_FAKEHOME</td> 12025<td>CHECK_FAKEHOME</td>
12011<td>CHECK_FILES</td> 
12012</tr> 12026</tr>
12013<tr> 12027<tr>
 12028<td>CHECK_FILES</td>
12014<td>CHECK_FILES_SKIP</td> 12029<td>CHECK_FILES_SKIP</td>
12015<td>CHECK_FILES_STRICT</td> 
12016</tr> 12030</tr>
12017<tr> 12031<tr>
 12032<td>CHECK_FILES_STRICT</td>
12018<td>CHECK_HEADERS</td> 12033<td>CHECK_HEADERS</td>
12019<td>CHECK_HEADERS_SKIP</td> 
12020</tr> 12034</tr>
12021<tr> 12035<tr>
 12036<td>CHECK_HEADERS_SKIP</td>
12022<td>CHECK_INTERPRETER</td> 12037<td>CHECK_INTERPRETER</td>
12023<td>CHECK_INTERPRETER_SKIP</td> 
12024</tr> 12038</tr>
12025<tr> 12039<tr>
 12040<td>CHECK_INTERPRETER_SKIP</td>
12026<td>CHECK_PERMS</td> 12041<td>CHECK_PERMS</td>
12027<td>CHECK_PERMS_AUTOFIX</td> 
12028</tr> 12042</tr>
12029<tr> 12043<tr>
 12044<td>CHECK_PERMS_AUTOFIX</td>
12030<td>CHECK_PERMS_SKIP</td> 12045<td>CHECK_PERMS_SKIP</td>
12031<td>CHECK_PIE</td> 
12032</tr> 12046</tr>
12033<tr> 12047<tr>
 12048<td>CHECK_PIE</td>
12034<td>CHECK_PIE_SKIP</td> 12049<td>CHECK_PIE_SKIP</td>
12035<td>CHECK_PIE_SUPPORTED</td> 
12036</tr> 12050</tr>
12037<tr> 12051<tr>
 12052<td>CHECK_PIE_SUPPORTED</td>
12038<td>CHECK_PORTABILITY</td> 12053<td>CHECK_PORTABILITY</td>
12039<td>CHECK_PORTABILITY_EXPERIMENTAL</td> 
12040</tr> 12054</tr>
12041<tr> 12055<tr>
 12056<td>CHECK_PORTABILITY_EXPERIMENTAL</td>
12042<td>CHECK_PORTABILITY_SKIP</td> 12057<td>CHECK_PORTABILITY_SKIP</td>
12043<td>CHECK_RELRO</td> 
12044</tr> 12058</tr>
12045<tr> 12059<tr>
 12060<td>CHECK_RELRO</td>
12046<td>CHECK_RELRO_SKIP</td> 12061<td>CHECK_RELRO_SKIP</td>
12047<td>CHECK_RELRO_SUPPORTED</td> 
12048</tr> 12062</tr>
12049<tr> 12063<tr>
 12064<td>CHECK_RELRO_SUPPORTED</td>
12050<td>CHECK_SHLIBS</td> 12065<td>CHECK_SHLIBS</td>
12051<td>CHECK_SHLIBS_SKIP</td> 
12052</tr> 12066</tr>
12053<tr> 12067<tr>
 12068<td>CHECK_SHLIBS_SKIP</td>
12054<td>CHECK_SHLIBS_SUPPORTED</td> 12069<td>CHECK_SHLIBS_SUPPORTED</td>
12055<td>CHECK_SHLIBS_TOXIC</td> 
12056</tr> 12070</tr>
12057<tr> 12071<tr>
 12072<td>CHECK_SHLIBS_TOXIC</td>
12058<td>CHECK_SSP</td> 12073<td>CHECK_SSP</td>
12059<td>CHECK_SSP_SKIP</td> 
12060</tr> 12074</tr>
12061<tr> 12075<tr>
 12076<td>CHECK_SSP_SKIP</td>
12062<td>CHECK_SSP_SUPPORTED</td> 12077<td>CHECK_SSP_SUPPORTED</td>
12063<td>CHECK_STRIPPED</td> 
12064</tr> 12078</tr>
12065<tr> 12079<tr>
 12080<td>CHECK_STRIPPED</td>
12066<td>CHECK_STRIPPED_SKIP</td> 12081<td>CHECK_STRIPPED_SKIP</td>
12067<td>CHECK_WRKREF</td> 
12068</tr> 12082</tr>
12069<tr> 12083<tr>
 12084<td>CHECK_WRKREF</td>
12070<td>CHECK_WRKREF_EXTRA_DIRS</td> 12085<td>CHECK_WRKREF_EXTRA_DIRS</td>
12071<td>CHECK_WRKREF_SKIP</td> 
12072</tr> 12086</tr>
12073<tr> 12087<tr>
 12088<td>CHECK_WRKREF_SKIP</td>
12074<td>CLAMAV_DBDIR</td> 12089<td>CLAMAV_DBDIR</td>
12075<td>CLAMAV_GROUP</td> 
12076</tr> 12090</tr>
12077<tr> 12091<tr>
 12092<td>CLAMAV_GROUP</td>
12078<td>CLAMAV_USER</td> 12093<td>CLAMAV_USER</td>
12079<td>CLANGBASE</td> 
12080</tr> 12094</tr>
12081<tr> 12095<tr>
 12096<td>CLANGBASE</td>
12082<td>CLEANDEPENDS</td> 12097<td>CLEANDEPENDS</td>
12083<td>CMAKE_DEPENDENCIES_REWRITE</td> 
12084</tr> 12098</tr>
12085<tr> 12099<tr>
 12100<td>CMAKE_DEPENDENCIES_REWRITE</td>
12086<td>CMAKE_INSTALL_NAME_DIR</td> 12101<td>CMAKE_INSTALL_NAME_DIR</td>
12087<td>CMAKE_INSTALL_PREFIX</td> 
12088</tr> 12102</tr>
12089<tr> 12103<tr>
 12104<td>CMAKE_INSTALL_PREFIX</td>
12090<td>CMAKE_MODULE_PATH_OVERRIDE</td> 12105<td>CMAKE_MODULE_PATH_OVERRIDE</td>
12091<td>CMAKE_PKGSRC_BUILD_FLAGS</td> 
12092</tr> 12106</tr>
12093<tr> 12107<tr>
 12108<td>CMAKE_PKGSRC_BUILD_FLAGS</td>
12094<td>CMAKE_PREFIX_PATH</td> 12109<td>CMAKE_PREFIX_PATH</td>
12095<td>CMAKE_USE_GNU_INSTALL_DIRS</td> 
12096</tr> 12110</tr>
12097<tr> 12111<tr>
12098<td>COMMON_LISP_DOCFILES</td> 12112<td>CMAKE_USE_GNU_INSTALL_DIRS</td>
12099<td>COMMON_LISP_EXAMPLES</td> 
12100</tr> 
12101<tr> 
12102<td>COMMON_LISP_EXTRAFILES</td> 
12103<td>COMMON_LISP_PACKAGES</td> 
12104</tr> 
12105<tr> 
12106<td>COMMON_LISP_SYSTEM</td> 
12107<td>COMPILER_RPATH_FLAG</td> 12113<td>COMPILER_RPATH_FLAG</td>
12108</tr> 12114</tr>
12109<tr> 12115<tr>
12110<td>COMPILER_USE_SYMLINKS</td> 12116<td>COMPILER_USE_SYMLINKS</td>
12111<td>CONFIGURE_ARGS</td> 12117<td>CONFIGURE_ARGS</td>
12112</tr> 12118</tr>
12113<tr> 12119<tr>
12114<td>CONFIGURE_DIRS</td> 12120<td>CONFIGURE_DIRS</td>
12115<td>CONFIGURE_ENV</td> 12121<td>CONFIGURE_ENV</td>
12116</tr> 12122</tr>
12117<tr> 12123<tr>
12118<td>CONFIGURE_ENV_SHELL</td> 12124<td>CONFIGURE_ENV_SHELL</td>
12119<td>CONFIGURE_HAS_INFODIR</td> 12125<td>CONFIGURE_HAS_INFODIR</td>
12120</tr> 12126</tr>
12121<tr> 12127<tr>
12122<td>CONFIGURE_HAS_MANDIR</td> 12128<td>CONFIGURE_HAS_MANDIR</td>
12123<td>CONFIGURE_SCRIPT</td> 12129<td>CONFIGURE_SCRIPT</td>
12124</tr> 12130</tr>
12125<tr> 12131<tr>
12126<td>CONFIG_SHELL</td> 12132<td>CONFIG_SHELL</td>
12127<td>CONFIG_SHELL_FLAGS</td> 12133<td>CONFIG_SHELL_FLAGS</td>
12128</tr> 12134</tr>
12129<tr> 12135<tr>
12130<td>CONF_FILES</td> 12136<td>CONF_FILES</td>
12131<td>CONF_FILES_MODE</td> 12137<td>CONF_FILES_MODE</td>
12132</tr> 12138</tr>
12133<tr> 12139<tr>
12134<td>CONF_FILES_PERMS</td> 12140<td>CONF_FILES_PERMS</td>
12135<td>CONSERVER_DEFAULTHOST</td> 12141<td>CONSERVER_DEFAULTHOST</td>
12136</tr> 12142</tr>
12137<tr> 12143<tr>
12138<td>CONSERVER_DEFAULTPORT</td> 12144<td>CONSERVER_DEFAULTPORT</td>
12139<td>CP</td> 12145<td>CP</td>
12140</tr> 12146</tr>
12141<tr> 12147<tr>
12142<td>CPP</td> 12148<td>CPP</td>
12143<td>CPP_PRECOMP_FLAGS</td> 12149<td>CPP_PRECOMP_FLAGS</td>
12144</tr> 12150</tr>
12145<tr> 12151<tr>
12146<td>CREATE_WRKDIR_SYMLINK</td> 12152<td>CREATE_WRKDIR_SYMLINK</td>
12147<td>CROSSBASE</td> 12153<td>CROSSBASE</td>
12148</tr> 12154</tr>
12149<tr> 12155<tr>
12150<td>CTFCONVERT</td> 12156<td>CTFCONVERT</td>
12151<td>CTF_FILES_SKIP</td> 12157<td>CTF_FILES_SKIP</td>
12152</tr> 12158</tr>
12153<tr> 12159<tr>
12154<td>CTF_SUPPORTED</td> 12160<td>CTF_SUPPORTED</td>
12155<td>CTYPE</td> 12161<td>CTYPE</td>
12156</tr> 12162</tr>
12157<tr> 12163<tr>
12158<td>CUPS_GROUP</td> 12164<td>CUPS_GROUP</td>
12159<td>CUPS_SYSTEM_GROUPS</td> 12165<td>CUPS_SYSTEM_GROUPS</td>
12160</tr> 12166</tr>
12161<tr> 12167<tr>
12162<td>CUPS_USER</td> 12168<td>CUPS_USER</td>
12163<td>CURSES_DEFAULT</td> 12169<td>CURSES_DEFAULT</td>
12164</tr> 12170</tr>
12165<tr> 12171<tr>
12166<td>CURSES_TYPE</td> 12172<td>CURSES_TYPE</td>
12167<td>CVS_EXTRACTDIR</td> 
12168</tr> 
12169<tr> 
12170<td>CVS_MODULE</td> 
12171<td>CVS_PROJECT</td> 
12172</tr> 
12173<tr> 
12174<td>CVS_REPOSITORIES</td> 
12175<td>CVS_ROOT</td> 
12176</tr> 
12177<tr> 
12178<td>CVS_ROOT_GNU</td> 
12179<td>CVS_ROOT_NONGNU</td> 
12180</tr> 
12181<tr> 
12182<td>CVS_ROOT_SOURCEFORGE</td> 
12183<td>CVS_TAG</td> 
12184</tr> 
12185<tr> 
12186<td>CXX</td> 12173<td>CXX</td>
12187<td>CYRUS_GROUP</td> 
12188</tr> 12174</tr>
12189<tr> 12175<tr>
 12176<td>CYRUS_GROUP</td>
12190<td>CYRUS_IDLE</td> 12177<td>CYRUS_IDLE</td>
12191<td>CYRUS_USER</td> 
12192</tr> 12178</tr>
12193<tr> 12179<tr>
 12180<td>CYRUS_USER</td>
12194<td>DAEMONTOOLS_GROUP</td> 12181<td>DAEMONTOOLS_GROUP</td>
12195<td>DAEMONTOOLS_LOG_USER</td> 
12196</tr> 12182</tr>
12197<tr> 12183<tr>
 12184<td>DAEMONTOOLS_LOG_USER</td>
12198<td>DARWIN_NO_SYSTEM_LIBS</td> 12185<td>DARWIN_NO_SYSTEM_LIBS</td>
12199<td>DARWIN_REQUIRES_FILTER</td> 
12200</tr> 12186</tr>
12201<tr> 12187<tr>
 12188<td>DARWIN_REQUIRES_FILTER</td>
12202<td>DBUS_GROUP</td> 12189<td>DBUS_GROUP</td>
12203<td>DBUS_USER</td> 
12204</tr> 12190</tr>
12205<tr> 12191<tr>
 12192<td>DBUS_USER</td>
12206<td>DEFANG_GROUP</td> 12193<td>DEFANG_GROUP</td>
12207<td>DEFANG_USER</td> 
12208</tr> 12194</tr>
12209<tr> 12195<tr>
 12196<td>DEFANG_USER</td>
12210<td>DEFAULT_ACCEPTABLE_LICENSES</td> 12197<td>DEFAULT_ACCEPTABLE_LICENSES</td>
12211<td>DEFAULT_DISTFILES</td> 
12212</tr> 12198</tr>
12213<tr> 12199<tr>
 12200<td>DEFAULT_DISTFILES</td>
12214<td>DEFAULT_IRC_SERVER</td> 12201<td>DEFAULT_IRC_SERVER</td>
12215<td>DEFAULT_SERIAL_DEVICE</td> 
12216</tr> 12202</tr>
12217<tr> 12203<tr>
 12204<td>DEFAULT_SERIAL_DEVICE</td>
12218<td>DEF_UMASK</td> 12205<td>DEF_UMASK</td>
12219<td>DEINSTALLDEPENDS</td> 
12220</tr> 12206</tr>
12221<tr> 12207<tr>
 12208<td>DEINSTALLDEPENDS</td>
12222<td>DEINSTALL_SRC</td> 12209<td>DEINSTALL_SRC</td>
12223<td>DEINSTALL_TEMPLATES</td> 
12224</tr> 12210</tr>
12225<tr> 12211<tr>
 12212<td>DEINSTALL_TEMPLATES</td>
12226<td>DELAYED_ERROR_MSG</td> 12213<td>DELAYED_ERROR_MSG</td>
12227<td>DELAYED_WARNING_MSG</td> 
12228</tr> 12214</tr>
12229<tr> 12215<tr>
 12216<td>DELAYED_WARNING_MSG</td>
12230<td>DEPENDS</td> 12217<td>DEPENDS</td>
12231<td>DEPENDS_TARGET</td> 
12232</tr> 12218</tr>
12233<tr> 12219<tr>
 12220<td>DEPENDS_TARGET</td>
12234<td>DEPENDS_TYPE</td> 12221<td>DEPENDS_TYPE</td>
12235<td>DESTDIR</td> 
12236</tr> 12222</tr>
12237<tr> 12223<tr>
 12224<td>DESTDIR</td>
12238<td>DESTDIR_VARNAME</td> 12225<td>DESTDIR_VARNAME</td>
12239<td>DIALER_GROUP</td> 
12240</tr> 12226</tr>
12241<tr> 12227<tr>
 12228<td>DIALER_GROUP</td>
12242<td>DIGEST_REQD</td> 12229<td>DIGEST_REQD</td>
12243<td>DISTDIR</td> 
12244</tr> 12230</tr>
12245<tr> 12231<tr>
 12232<td>DISTDIR</td>
12246<td>DISTFILES</td> 12233<td>DISTFILES</td>
12247<td>DISTINFO_FILE</td> 
12248</tr> 12234</tr>
12249<tr> 12235<tr>
 12236<td>DISTINFO_FILE</td>
12250<td>DISTNAME</td> 12237<td>DISTNAME</td>
12251<td>DIST_PATH</td> 
12252</tr> 12238</tr>
12253<tr> 12239<tr>
 12240<td>DIST_PATH</td>
12254<td>DIST_SUBDIR</td> 12241<td>DIST_SUBDIR</td>
12255<td>DJBDNS_AXFR_USER</td> 
12256</tr> 12242</tr>
12257<tr> 12243<tr>
 12244<td>DJBDNS_AXFR_USER</td>
12258<td>DJBDNS_CACHE_USER</td> 12245<td>DJBDNS_CACHE_USER</td>
12259<td>DJBDNS_DJBDNS_GROUP</td> 
12260</tr> 12246</tr>
12261<tr> 12247<tr>
 12248<td>DJBDNS_DJBDNS_GROUP</td>
12262<td>DJBDNS_LOG_USER</td> 12249<td>DJBDNS_LOG_USER</td>
12263<td>DJBDNS_RBL_USER</td> 
12264</tr> 12250</tr>
12265<tr> 12251<tr>
 12252<td>DJBDNS_RBL_USER</td>
12266<td>DJBDNS_TINY_USER</td> 12253<td>DJBDNS_TINY_USER</td>
12267<td>DLOPEN_REQUIRE_PTHREADS</td> 
12268</tr> 12254</tr>
12269<tr> 12255<tr>
 12256<td>DLOPEN_REQUIRE_PTHREADS</td>
12270<td>DL_AUTO_VARS</td> 12257<td>DL_AUTO_VARS</td>
12271<td>DL_CFLAGS</td> 
12272</tr> 12258</tr>
12273<tr> 12259<tr>
 12260<td>DL_CFLAGS</td>
12274<td>DL_LDFLAGS</td> 12261<td>DL_LDFLAGS</td>
12275<td>DL_LIBS</td> 
12276</tr> 12262</tr>
12277<tr> 12263<tr>
 12264<td>DL_LIBS</td>
12278<td>DNS</td> 12265<td>DNS</td>
12279<td>DOCOWN</td> 
12280</tr> 12266</tr>
12281<tr> 12267<tr>
 12268<td>DOCOWN</td>
12282<td>DOWNLOADED_DISTFILE</td> 12269<td>DOWNLOADED_DISTFILE</td>
12283<td>DQCACHE_GROUP</td> 
12284</tr> 12270</tr>
12285<tr> 12271<tr>
 12272<td>DQCACHE_GROUP</td>
12286<td>DQCACHE_USER</td> 12273<td>DQCACHE_USER</td>
12287<td>DT_LAYOUT</td> 
12288</tr> 12274</tr>
12289<tr> 12275<tr>
 12276<td>DT_LAYOUT</td>
12290<td>DYNAMIC_SITES_CMD</td> 12277<td>DYNAMIC_SITES_CMD</td>
12291<td>DYNAMIC_SITES_SCRIPT</td> 
12292</tr> 12278</tr>
12293<tr> 12279<tr>
 12280<td>DYNAMIC_SITES_SCRIPT</td>
12294<td>ECHO</td> 12281<td>ECHO</td>
12295<td>ECHO_N</td> 
12296</tr> 12282</tr>
12297<tr> 12283<tr>
 12284<td>ECHO_N</td>
12298<td>ELK_GUI</td> 12285<td>ELK_GUI</td>
12299<td>EMACS_TYPE</td> 
12300</tr> 12286</tr>
12301<tr> 12287<tr>
 12288<td>EMACS_TYPE</td>
12302<td>EMULDIR</td> 12289<td>EMULDIR</td>
12303<td>EMULSUBDIR</td> 
12304</tr> 12290</tr>
12305<tr> 12291<tr>
 12292<td>EMULSUBDIR</td>
12306<td>EMULSUBDIRSLASH</td> 12293<td>EMULSUBDIRSLASH</td>
12307<td>EMUL_ARCH</td> 
12308</tr> 12294</tr>
12309<tr> 12295<tr>
 12296<td>EMUL_ARCH</td>
12310<td>EMUL_DISTRO</td> 12297<td>EMUL_DISTRO</td>
12311<td>EMUL_EXEC_FMT</td> 
12312</tr> 12298</tr>
12313<tr> 12299<tr>
 12300<td>EMUL_EXEC_FMT</td>
12314<td>EMUL_IS_NATIVE</td> 12301<td>EMUL_IS_NATIVE</td>
12315<td>EMUL_MODULES</td> 
12316</tr> 12302</tr>
12317<tr> 12303<tr>
 12304<td>EMUL_MODULES</td>
12318<td>EMUL_OPSYS</td> 12305<td>EMUL_OPSYS</td>
12319<td>EMUL_PKG_FMT</td> 
12320</tr> 12306</tr>
12321<tr> 12307<tr>
 12308<td>EMUL_PKG_FMT</td>
12322<td>EMUL_PLATFORM</td> 12309<td>EMUL_PLATFORM</td>
12323<td>EMUL_PLATFORMS</td> 
12324</tr> 12310</tr>
12325<tr> 12311<tr>
 12312<td>EMUL_PLATFORMS</td>
12326<td>EMUL_PREFER</td> 12313<td>EMUL_PREFER</td>
12327<td>EMUL_REQD</td> 
12328</tr> 12314</tr>
12329<tr> 12315<tr>
 12316<td>EMUL_REQD</td>
12330<td>EMUL_TYPE</td> 12317<td>EMUL_TYPE</td>
12331<td>ERROR_MSG</td> 
12332</tr> 12318</tr>
12333<tr> 12319<tr>
 12320<td>ERROR_MSG</td>
12334<td>EXIM_GROUP</td> 12321<td>EXIM_GROUP</td>
12335<td>EXIM_USER</td> 
12336</tr> 12322</tr>
12337<tr> 12323<tr>
 12324<td>EXIM_USER</td>
12338<td>EXPORT_SYMBOLS_LDFLAGS</td> 12325<td>EXPORT_SYMBOLS_LDFLAGS</td>
12339<td>EXTRACTOR</td> 
12340</tr> 12326</tr>
12341<tr> 12327<tr>
 12328<td>EXTRACTOR</td>
12342<td>EXTRACT_CMD</td> 12329<td>EXTRACT_CMD</td>
12343<td>EXTRACT_CMD_DEFAULT</td> 
12344</tr> 12330</tr>
12345<tr> 12331<tr>
 12332<td>EXTRACT_CMD_DEFAULT</td>
12346<td>EXTRACT_DIR</td> 12333<td>EXTRACT_DIR</td>
12347<td>EXTRACT_ELEMENTS</td> 
12348</tr> 12334</tr>
12349<tr> 12335<tr>
 12336<td>EXTRACT_ELEMENTS</td>
12350<td>EXTRACT_ENV</td> 12337<td>EXTRACT_ENV</td>
12351<td>EXTRACT_ONLY</td> 
12352</tr> 12338</tr>
12353<tr> 12339<tr>
 12340<td>EXTRACT_ONLY</td>
12354<td>EXTRACT_OPTS</td> 12341<td>EXTRACT_OPTS</td>
12355<td>EXTRACT_SUFX</td> 
12356</tr> 12342</tr>
12357<tr> 12343<tr>
 12344<td>EXTRACT_SUFX</td>
12358<td>EXTRACT_USING</td> 12345<td>EXTRACT_USING</td>
12359<td>FAIL</td> 
12360</tr> 12346</tr>
12361<tr> 12347<tr>
 12348<td>FAIL</td>
12362<td>FAILOVER_FETCH</td> 12349<td>FAILOVER_FETCH</td>
12363<td>FAIL_MSG</td> 
12364</tr> 12350</tr>
12365<tr> 12351<tr>
 12352<td>FAIL_MSG</td>
12366<td>FAKE_NCURSES</td> 12353<td>FAKE_NCURSES</td>
12367<td>FAM</td> 
12368</tr> 12354</tr>
12369<tr> 12355<tr>
 12356<td>FAM</td>
12370<td>FAM_ACCEPTED</td> 12357<td>FAM_ACCEPTED</td>
12371<td>FAM_DEFAULT</td> 
12372</tr> 12358</tr>
12373<tr> 12359<tr>
 12360<td>FAM_DEFAULT</td>
12374<td>FAM_SERVER</td> 12361<td>FAM_SERVER</td>
12375<td>FCPATH</td> 
12376</tr> 12362</tr>
12377<tr> 12363<tr>
 12364<td>FCPATH</td>
12378<td>FEATURE_CPPFLAGS</td> 12365<td>FEATURE_CPPFLAGS</td>
12379<td>FEATURE_LDFLAGS</td> 
12380</tr> 12366</tr>
12381<tr> 12367<tr>
 12368<td>FEATURE_LDFLAGS</td>
12382<td>FEATURE_LIBS</td> 12369<td>FEATURE_LIBS</td>
12383<td>FETCH_AFTER_ARGS</td> 
12384</tr> 12370</tr>
12385<tr> 12371<tr>
 12372<td>FETCH_AFTER_ARGS</td>
12386<td>FETCH_BEFORE_ARGS</td> 12373<td>FETCH_BEFORE_ARGS</td>
12387<td>FETCH_CMD</td> 
12388</tr> 12374</tr>
12389<tr> 12375<tr>
 12376<td>FETCH_CMD</td>
12390<td>FETCH_OUTPUT_ARGS</td> 12377<td>FETCH_OUTPUT_ARGS</td>
12391<td>FETCH_PROXY</td> 
12392</tr> 12378</tr>
12393<tr> 12379<tr>
 12380<td>FETCH_PROXY</td>
12394<td>FETCH_RESUME_ARGS</td> 12381<td>FETCH_RESUME_ARGS</td>
12395<td>FETCH_TIMEOUT</td> 
12396</tr> 12382</tr>
12397<tr> 12383<tr>
 12384<td>FETCH_TIMEOUT</td>
12398<td>FETCH_USE_IPV4_ONLY</td> 12385<td>FETCH_USE_IPV4_ONLY</td>
12399<td>FETCH_USING</td> 
12400</tr> 12386</tr>
12401<tr> 12387<tr>
 12388<td>FETCH_USING</td>
12402<td>FILES_SUBST</td> 12389<td>FILES_SUBST</td>
12403<td>FILES_SUBST_SED</td> 
12404</tr> 12390</tr>
12405<tr> 12391<tr>
 12392<td>FILES_SUBST_SED</td>
12406<td>FIX_SYSTEM_HEADERS</td> 12393<td>FIX_SYSTEM_HEADERS</td>
12407<td>FONTDIR</td> 
12408</tr> 12394</tr>
12409<tr> 12395<tr>
12410<td>FONTS_DIRS</td> 12396<td>FONTS_DIRS</td>
12411<td>FONTS_VERBOSE</td> 12397<td>FONTS_VERBOSE</td>
12412</tr> 12398</tr>
12413<tr> 12399<tr>
12414<td>FOO_HACKS_MK</td> 12400<td>FOO_HACKS_MK</td>
12415<td>FOSSIL_EXTRACTDIR</td> 
12416</tr> 
12417<tr> 
12418<td>FOSSIL_REPO</td> 
12419<td>FOSSIL_REPOSITORIES</td> 
12420</tr> 
12421<tr> 
12422<td>FOSSIL_VERSION</td> 
12423<td>FOX_USE_XUNICODE</td> 12401<td>FOX_USE_XUNICODE</td>
12424</tr> 12402</tr>
12425<tr> 12403<tr>
12426<td>FREEWNN_GROUP</td> 12404<td>FREEWNN_GROUP</td>
12427<td>FREEWNN_USER</td> 12405<td>FREEWNN_USER</td>
12428</tr> 12406</tr>
12429<tr> 12407<tr>
12430<td>FTP_PKG_URL_DIR</td> 12408<td>FTP_PKG_URL_DIR</td>
12431<td>FTP_PKG_URL_HOST</td> 12409<td>FTP_PKG_URL_HOST</td>
12432</tr> 12410</tr>
12433<tr> 12411<tr>
12434<td>GAMEDATAMODE</td> 12412<td>GAMEDATAMODE</td>
12435<td>GAMEDATA_PERMS</td> 12413<td>GAMEDATA_PERMS</td>
12436</tr> 12414</tr>
12437<tr> 12415<tr>
12438<td>GAMEDIRMODE</td> 12416<td>GAMEDIRMODE</td>
12439<td>GAMEDIR_PERMS</td> 12417<td>GAMEDIR_PERMS</td>
12440</tr> 12418</tr>
12441<tr> 12419<tr>
12442<td>GAMEGRP</td> 12420<td>GAMEGRP</td>
12443<td>GAMEMODE</td> 12421<td>GAMEMODE</td>
12444</tr> 12422</tr>
12445<tr> 12423<tr>
12446<td>GAMEOWN</td> 12424<td>GAMEOWN</td>
12447<td>GAMES_GROUP</td> 12425<td>GAMES_GROUP</td>
12448</tr> 12426</tr>
12449<tr> 12427<tr>
12450<td>GAMES_USER</td> 12428<td>GAMES_USER</td>
12451<td>GCC</td> 12429<td>GCC</td>
12452</tr> 12430</tr>
12453<tr> 12431<tr>
12454<td>GCCBASE</td> 12432<td>GCCBASE</td>
12455<td>GCC_REQD</td> 12433<td>GCC_REQD</td>
12456</tr> 12434</tr>
12457<tr> 12435<tr>
12458<td>GCC_VERSION_SUFFIX</td> 12436<td>GCC_VERSION_SUFFIX</td>
12459<td>GEM_BUILD</td> 12437<td>GEM_BUILD</td>
12460</tr> 12438</tr>
12461<tr> 12439<tr>
12462<td>GEM_CLEANBUILD</td> 12440<td>GEM_CLEANBUILD</td>
12463<td>GEM_CLEANBUILD_EXTENSIONS</td> 12441<td>GEM_CLEANBUILD_EXTENSIONS</td>
12464</tr> 12442</tr>
12465<tr> 12443<tr>
12466<td>GEM_DOCDIR</td> 12444<td>GEM_DOCDIR</td>
12467<td>GEM_EXTSDIR</td> 12445<td>GEM_EXTSDIR</td>
12468</tr> 12446</tr>
12469<tr> 12447<tr>
12470<td>GEM_HOME</td> 12448<td>GEM_HOME</td>
12471<td>GEM_KEEPBUILD</td> 12449<td>GEM_KEEPBUILD</td>
12472</tr> 12450</tr>
12473<tr> 12451<tr>
12474<td>GEM_LIBDIR</td> 12452<td>GEM_LIBDIR</td>
12475<td>GEM_NAME</td> 12453<td>GEM_NAME</td>
12476</tr> 12454</tr>
12477<tr> 12455<tr>
12478<td>GEM_PATH</td> 12456<td>GEM_PATH</td>
12479<td>GEM_PLUGINSDIR</td> 12457<td>GEM_PLUGINSDIR</td>
12480</tr> 12458</tr>
12481<tr> 12459<tr>
12482<td>GEM_SPECFILE</td> 12460<td>GEM_SPECFILE</td>
12483<td>GENERATE_PLIST</td> 12461<td>GENERATE_PLIST</td>
12484</tr> 12462</tr>
12485<tr> 12463<tr>
12486<td>GHC</td> 12464<td>GHC</td>
12487<td>GHOSTSCRIPT_REQD</td> 12465<td>GHOSTSCRIPT_REQD</td>
12488</tr> 12466</tr>
12489<tr> 12467<tr>
12490<td>GITHUB_PROJECT</td> 12468<td>GITHUB_PROJECT</td>
12491<td>GITHUB_RELEASE</td> 12469<td>GITHUB_RELEASE</td>
12492</tr> 12470</tr>
12493<tr> 12471<tr>
12494<td>GITHUB_SUBMODULES</td> 12472<td>GITHUB_SUBMODULES</td>
12495<td>GITHUB_TAG</td> 12473<td>GITHUB_TAG</td>
12496</tr> 12474</tr>
12497<tr> 12475<tr>
12498<td>GITHUB_TYPE</td> 12476<td>GITHUB_TYPE</td>
12499<td>GITLAB_PROJECT</td> 12477<td>GITLAB_PROJECT</td>
12500</tr> 12478</tr>
12501<tr> 12479<tr>
12502<td>GITLAB_RELEASE</td> 12480<td>GITLAB_RELEASE</td>
12503<td>GITLAB_SUBMODULES</td> 12481<td>GITLAB_SUBMODULES</td>
12504</tr> 12482</tr>
12505<tr> 12483<tr>
12506<td>GITLAB_TAG</td> 12484<td>GITLAB_TAG</td>
12507<td>GITLAB_TYPE</td> 12485<td>GITLAB_TYPE</td>
12508</tr> 12486</tr>
12509<tr> 12487<tr>
12510<td>GIT_BRANCH</td> 
12511<td>GIT_ENV</td> 
12512</tr> 
12513<tr> 
12514<td>GIT_EXTRACTDIR</td> 
12515<td>GIT_REPO</td> 
12516</tr> 
12517<tr> 
12518<td>GIT_REPOSITORIES</td> 
12519<td>GIT_REVISION</td> 
12520</tr> 
12521<tr> 
12522<td>GIT_TAG</td> 
12523<td>GNU</td> 12488<td>GNU</td>
 12489<td>GNU_CONFIGURE</td>
12524</tr> 12490</tr>
12525<tr> 12491<tr>
12526<td>GNU_CONFIGURE</td> 
12527<td>GNU_CONFIGURE_INFODIR</td> 12492<td>GNU_CONFIGURE_INFODIR</td>
 12493<td>GNU_CONFIGURE_MANDIR</td>
12528</tr> 12494</tr>
12529<tr> 12495<tr>
12530<td>GNU_CONFIGURE_MANDIR</td> 
12531<td>GNU_CONFIGURE_QUIET</td> 12496<td>GNU_CONFIGURE_QUIET</td>
 12497<td>GNU_CONFIGURE_STRICT</td>
12532</tr> 12498</tr>
12533<tr> 12499<tr>
12534<td>GNU_CONFIGURE_STRICT</td> 
12535<td>GODEP_REDIRECTS</td> 12500<td>GODEP_REDIRECTS</td>
 12501<td>GO_BUILD_PATTERN</td>
12536</tr> 12502</tr>
12537<tr> 12503<tr>
12538<td>GO_BUILD_PATTERN</td> 
12539<td>GO_DEPS</td> 12504<td>GO_DEPS</td>
 12505<td>GO_DIST_BASE</td>
12540</tr> 12506</tr>
12541<tr> 12507<tr>
12542<td>GO_DIST_BASE</td> 
12543<td>GO_EXTRA_MOD_DIRS</td> 12508<td>GO_EXTRA_MOD_DIRS</td>
 12509<td>GO_MODULE_FILES</td>
12544</tr> 12510</tr>
12545<tr> 12511<tr>
12546<td>GO_MODULE_FILES</td> 
12547<td>GO_SRCPATH</td> 12512<td>GO_SRCPATH</td>
 12513<td>GO_VERSION_DEFAULT</td>
12548</tr> 12514</tr>
12549<tr> 12515<tr>
12550<td>GO_VERSION_DEFAULT</td> 
12551<td>GROUP_SPECIFIC_PKGS</td> 12516<td>GROUP_SPECIFIC_PKGS</td>
 12517<td>GRUB_NETWORK_CARDS</td>
12552</tr> 12518</tr>
12553<tr> 12519<tr>
12554<td>GRUB_NETWORK_CARDS</td> 
12555<td>GRUB_PRESET_COMMAND</td> 12520<td>GRUB_PRESET_COMMAND</td>
 12521<td>GRUB_SCAN_ARGS</td>
12556</tr> 12522</tr>
12557<tr> 12523<tr>
12558<td>GRUB_SCAN_ARGS</td> 
12559<td>GZIP</td> 12524<td>GZIP</td>
12560</tr> 
12561<tr> 
12562<td>HASKELL_COMPILER</td> 
12563<td>HASKELL_ENABLE_DYNAMIC_EXECUTABLE</td> 12525<td>HASKELL_ENABLE_DYNAMIC_EXECUTABLE</td>
12564</tr> 12526</tr>
12565<tr> 12527<tr>
12566<td>HASKELL_ENABLE_HADDOCK_DOCUMENTATION</td> 12528<td>HASKELL_ENABLE_HADDOCK_DOCUMENTATION</td>
12567<td>HASKELL_ENABLE_LIBRARY_PROFILING</td> 12529<td>HASKELL_ENABLE_LIBRARY_PROFILING</td>
12568</tr> 12530</tr>
12569<tr> 12531<tr>
12570<td>HASKELL_ENABLE_SHARED_LIBRARY</td> 12532<td>HASKELL_ENABLE_SHARED_LIBRARY</td>
12571<td>HASKELL_OPTIMIZATION_LEVEL</td> 12533<td>HASKELL_OPTIMIZATION_LEVEL</td>
12572</tr> 12534</tr>
12573<tr> 12535<tr>
12574<td>HAS_CONFIGURE</td> 12536<td>HAS_CONFIGURE</td>
12575<td>HEADER_TEMPLATES</td> 12537<td>HEADER_TEMPLATES</td>
12576</tr> 12538</tr>
12577<tr> 12539<tr>
12578<td>HG_REPO</td> 
12579<td>HG_REPOSITORIES</td> 
12580</tr> 
12581<tr> 
12582<td>HG_TAG</td> 
12583<td>HOMEPAGE</td> 12540<td>HOMEPAGE</td>
12584</tr> 
12585<tr> 
12586<td>HOST_PKGTOOLS_ARGS</td> 12541<td>HOST_PKGTOOLS_ARGS</td>
12587<td>HOST_SPECIFIC_PKGS</td> 
12588</tr> 12542</tr>
12589<tr> 12543<tr>
 12544<td>HOST_SPECIFIC_PKGS</td>
12590<td>HOWL_GROUP</td> 12545<td>HOWL_GROUP</td>
12591<td>HOWL_USER</td> 
12592</tr> 12546</tr>
12593<tr> 12547<tr>
 12548<td>HOWL_USER</td>
12594<td>ICCBASE</td> 12549<td>ICCBASE</td>
12595<td>ICECAST_CHROOTDIR</td> 
12596</tr> 12550</tr>
12597<tr> 12551<tr>
 12552<td>ICECAST_CHROOTDIR</td>
12598<td>ICON_THEMES</td> 12553<td>ICON_THEMES</td>
12599<td>IDOBASE</td> 
12600</tr> 12554</tr>
12601<tr> 12555<tr>
 12556<td>IDOBASE</td>
12602<td>IGNORE_CCACHE</td> 12557<td>IGNORE_CCACHE</td>
12603<td>IGNORE_INFO_DIRS</td> 
12604</tr> 12558</tr>
12605<tr> 12559<tr>
 12560<td>IGNORE_INFO_DIRS</td>
12606<td>IGNORE_INTERACTIVE_FETCH</td> 12561<td>IGNORE_INTERACTIVE_FETCH</td>
12607<td>IMAKE</td> 
12608</tr> 12562</tr>
12609<tr> 12563<tr>
 12564<td>IMAKE</td>
12610<td>IMAKEOPTS</td> 12565<td>IMAKEOPTS</td>
12611<td>IMAKE_MAKE</td> 
12612</tr> 12566</tr>
12613<tr> 12567<tr>
 12568<td>IMAKE_MAKE</td>
12614<td>IMAKE_MANINSTALL</td> 12569<td>IMAKE_MANINSTALL</td>
12615<td>IMAP_UW_CCLIENT_MBOX_FMT</td> 
12616</tr> 12570</tr>
12617<tr> 12571<tr>
 12572<td>IMAP_UW_CCLIENT_MBOX_FMT</td>
12618<td>IMDICTDIR</td> 12573<td>IMDICTDIR</td>
12619<td>INCOMPAT_CURSES</td> 
12620</tr> 12574</tr>
12621<tr> 12575<tr>
 12576<td>INCOMPAT_CURSES</td>
12622<td>INFO_DIR</td> 12577<td>INFO_DIR</td>
12623<td>INFO_FILES</td> 
12624</tr> 12578</tr>
12625<tr> 12579<tr>
 12580<td>INFO_FILES</td>
12626<td>INFO_FILES_VERBOSE</td> 12581<td>INFO_FILES_VERBOSE</td>
12627<td>INFO_MSG</td> 
12628</tr> 12582</tr>
12629<tr> 12583<tr>
 12584<td>INFO_MSG</td>
12630<td>INIT_SYSTEM</td> 12585<td>INIT_SYSTEM</td>
12631<td>INN_DATA_DIR</td> 
12632</tr> 12586</tr>
12633<tr> 12587<tr>
 12588<td>INN_DATA_DIR</td>
12634<td>INN_GROUP</td> 12589<td>INN_GROUP</td>
12635<td>INN_USER</td> 
12636</tr> 12590</tr>
12637<tr> 12591<tr>
 12592<td>INN_USER</td>
12638<td>INSTALLATION_DIRS</td> 12593<td>INSTALLATION_DIRS</td>
12639<td>INSTALLATION_DIRS_FROM_PLIST</td> 
12640</tr> 12594</tr>
12641<tr> 12595<tr>
 12596<td>INSTALLATION_DIRS_FROM_PLIST</td>
12642<td>INSTALL_ENV</td> 12597<td>INSTALL_ENV</td>
12643<td>INSTALL_SH_OVERRIDE</td> 
12644</tr> 12598</tr>
12645<tr> 12599<tr>
 12600<td>INSTALL_SH_OVERRIDE</td>
12646<td>INSTALL_SRC</td> 12601<td>INSTALL_SRC</td>
12647<td>INSTALL_TEMPLATES</td> 
12648</tr> 12602</tr>
12649<tr> 12603<tr>
 12604<td>INSTALL_TEMPLATES</td>
12650<td>INSTALL_UNSTRIPPED</td> 12605<td>INSTALL_UNSTRIPPED</td>
12651<td>IRCD_HYBRID_IRC_GROUP</td> 
12652</tr> 12606</tr>
12653<tr> 12607<tr>
 12608<td>IRCD_HYBRID_IRC_GROUP</td>
12654<td>IRCD_HYBRID_IRC_USER</td> 12609<td>IRCD_HYBRID_IRC_USER</td>
12655<td>IRCD_HYBRID_MAXCONN</td> 
12656</tr> 12610</tr>
12657<tr> 12611<tr>
 12612<td>IRCD_HYBRID_MAXCONN</td>
12658<td>IRCD_HYBRID_NICLEN</td> 12613<td>IRCD_HYBRID_NICLEN</td>
12659<td>IRCD_HYBRID_SYSLOG_EVENTS</td> 
12660</tr> 12614</tr>
12661<tr> 12615<tr>
 12616<td>IRCD_HYBRID_SYSLOG_EVENTS</td>
12662<td>IRCD_HYBRID_SYSLOG_FACILITY</td> 12617<td>IRCD_HYBRID_SYSLOG_FACILITY</td>
12663<td>IRCD_HYBRID_TOPICLEN</td> 
12664</tr> 12618</tr>
12665<tr> 12619<tr>
 12620<td>IRCD_HYBRID_TOPICLEN</td>
12666<td>IRIX</td> 12621<td>IRIX</td>
12667<td>IRRD_USE_PGP</td> 
12668</tr> 12622</tr>
12669<tr> 12623<tr>
 12624<td>IRRD_USE_PGP</td>
12670<td>JABBERD_GROUP</td> 12625<td>JABBERD_GROUP</td>
12671<td>JABBERD_LOGDIR</td> 
12672</tr> 12626</tr>
12673<tr> 12627<tr>
 12628<td>JABBERD_LOGDIR</td>
12674<td>JABBERD_PIDDIR</td> 12629<td>JABBERD_PIDDIR</td>
12675<td>JABBERD_SPOOLDIR</td> 
12676</tr> 12630</tr>
12677<tr> 12631<tr>
 12632<td>JABBERD_SPOOLDIR</td>
12678<td>JABBERD_USER</td> 12633<td>JABBERD_USER</td>
12679<td>JAVA_APP_PATH</td> 
12680</tr> 12634</tr>
12681<tr> 12635<tr>
12682<td>JAVA_APP_TARGETS</td> 
12683<td>JAVA_BINPREFIX</td> 12636<td>JAVA_BINPREFIX</td>
12684</tr> 
12685<tr> 
12686<td>JAVA_CLASSPATH</td> 12637<td>JAVA_CLASSPATH</td>
12687<td>JAVA_HOME</td> 
12688</tr> 12638</tr>
12689<tr> 12639<tr>
 12640<td>JAVA_HOME</td>
12690<td>JAVA_LD_LIBRARY_PATH</td> 12641<td>JAVA_LD_LIBRARY_PATH</td>
12691<td>JAVA_NAME</td> 
12692</tr> 12642</tr>
12693<tr> 12643<tr>
 12644<td>JAVA_NAME</td>
12694<td>JAVA_UNLIMIT</td> 12645<td>JAVA_UNLIMIT</td>
12695<td>JAVA_WRAPPERS</td> 
12696</tr> 12646</tr>
12697<tr> 12647<tr>
 12648<td>JAVA_WRAPPERS</td>
12698<td>JPEG_ACCEPTED</td> 12649<td>JPEG_ACCEPTED</td>
12699<td>JPEG_DEFAULT</td> 
12700</tr> 12650</tr>
12701<tr> 12651<tr>
 12652<td>JPEG_DEFAULT</td>
12702<td>KERBEROS</td> 12653<td>KERBEROS</td>
12703<td>KERMIT_SUID_UUCP</td> 
12704</tr> 12654</tr>
12705<tr> 12655<tr>
 12656<td>KERMIT_SUID_UUCP</td>
12706<td>KJS_USE_PCRE</td> 12657<td>KJS_USE_PCRE</td>
12707<td>KNEWS_DOMAIN_FILE</td> 
12708</tr> 12658</tr>
12709<tr> 12659<tr>
 12660<td>KNEWS_DOMAIN_FILE</td>
12710<td>KNEWS_DOMAIN_NAME</td> 12661<td>KNEWS_DOMAIN_NAME</td>
12711<td>KRB5_ACCEPTED</td> 
12712</tr> 12662</tr>
12713<tr> 12663<tr>
 12664<td>KRB5_ACCEPTED</td>
12714<td>KRB5_DEFAULT</td> 12665<td>KRB5_DEFAULT</td>
12715<td>LANGUAGES</td> 
12716</tr> 12666</tr>
12717<tr> 12667<tr>
 12668<td>LANGUAGES</td>
12718<td>LAPACKE_LIBS</td> 12669<td>LAPACKE_LIBS</td>
12719<td>LAPACK_LIBS</td> 
12720</tr> 12670</tr>
12721<tr> 12671<tr>
 12672<td>LAPACK_LIBS</td>
12722<td>LATEX2HTML_ICONPATH</td> 12673<td>LATEX2HTML_ICONPATH</td>
12723<td>LDCONFIG_ADD_CMD</td> 
12724</tr> 12674</tr>
12725<tr> 12675<tr>
 12676<td>LDCONFIG_ADD_CMD</td>
12726<td>LDCONFIG_REMOVE_CMD</td> 12677<td>LDCONFIG_REMOVE_CMD</td>
12727<td>LDD</td> 
12728</tr> 12678</tr>
12729<tr> 12679<tr>
 12680<td>LDD</td>
12730<td>LEAFNODE_DATA_DIR</td> 12681<td>LEAFNODE_DATA_DIR</td>
12731<td>LEAFNODE_GROUP</td> 
12732</tr> 12682</tr>
12733<tr> 12683<tr>
 12684<td>LEAFNODE_GROUP</td>
12734<td>LEAFNODE_USER</td> 12685<td>LEAFNODE_USER</td>
12735<td>LIBDVDCSS_HOMEPAGE</td> 
12736</tr> 12686</tr>
12737<tr> 12687<tr>
 12688<td>LIBDVDCSS_HOMEPAGE</td>
12738<td>LIBDVDCSS_MASTER_SITES</td> 12689<td>LIBDVDCSS_MASTER_SITES</td>
12739<td>LIBRSVG_TYPE</td> 
12740</tr> 12690</tr>
12741<tr> 12691<tr>
 12692<td>LIBRSVG_TYPE</td>
12742<td>LIBTOOL</td> 12693<td>LIBTOOL</td>
12743<td>LIBTOOLIZE_PLIST</td> 
12744</tr> 12694</tr>
12745<tr> 12695<tr>
 12696<td>LIBTOOLIZE_PLIST</td>
12746<td>LIBTOOL_M4_OVERRIDE</td> 12697<td>LIBTOOL_M4_OVERRIDE</td>
12747<td>LIBUSB_TYPE</td> 
12748</tr> 12698</tr>
12749<tr> 12699<tr>
 12700<td>LIBUSB_TYPE</td>
12750<td>LICENSE</td> 12701<td>LICENSE</td>
12751<td>LINKER_RPATH_FLAG</td> 
12752</tr> 12702</tr>
12753<tr> 12703<tr>
 12704<td>LINKER_RPATH_FLAG</td>
12754<td>LINK_RPATH_FLAG</td> 12705<td>LINK_RPATH_FLAG</td>
12755<td>LINUX_BASE_NODEPS</td> 
12756</tr> 
12757<tr> 
12758<td>LINUX_BASE_PREFERRED</td> 
12759<td>LINUX_BASE_REQUIRED</td> 
12760</tr> 12706</tr>
12761<tr> 12707<tr>
12762<td>LINUX_LOCALES</td> 12708<td>LINUX_LOCALES</td>
12763<td>LOCALBASE</td> 12709<td>LOCALBASE</td>
12764</tr> 12710</tr>
12765<tr> 12711<tr>
12766<td>LOCALBASE_LOCKTYPE</td> 12712<td>LOCALBASE_LOCKTYPE</td>
12767<td>LOCALPATCHES</td> 12713<td>LOCALPATCHES</td>
12768</tr> 12714</tr>
12769<tr> 12715<tr>
12770<td>LOVE_DATA</td> 12716<td>LOVE_DATA</td>
12771<td>LOVE_GAME</td> 12717<td>LOVE_GAME</td>
12772</tr> 12718</tr>
12773<tr> 12719<tr>
12774<td>LOVE_VERSION</td> 12720<td>LOVE_VERSION</td>
12775<td>LP32PLATFORMS</td> 12721<td>LP32PLATFORMS</td>
12776</tr> 12722</tr>
12777<tr> 12723<tr>
12778<td>LP64PLATFORMS</td> 12724<td>LP64PLATFORMS</td>
12779<td>LUA_BUSTED_ARGS</td> 12725<td>LUA_BUSTED_ARGS</td>
12780</tr> 12726</tr>
12781<tr> 12727<tr>
12782<td>LUA_CDIR</td> 12728<td>LUA_CDIR</td>
12783<td>LUA_COMPILER</td> 12729<td>LUA_COMPILER</td>
12784</tr> 12730</tr>
12785<tr> 12731<tr>
12786<td>LUA_DOCDIR</td> 12732<td>LUA_DOCDIR</td>
12787<td>LUA_EXAMPLESDIR</td> 12733<td>LUA_EXAMPLESDIR</td>
12788</tr> 12734</tr>
12789<tr> 12735<tr>
12790<td>LUA_INCDIR</td> 12736<td>LUA_INCDIR</td>
12791<td>LUA_INTERPRETER</td> 12737<td>LUA_INTERPRETER</td>
12792</tr> 12738</tr>
12793<tr> 12739<tr>
12794<td>LUA_LDIR</td> 12740<td>LUA_LDIR</td>
12795<td>LUA_LINKER_MAGIC</td> 12741<td>LUA_LINKER_MAGIC</td>
12796</tr> 12742</tr>
12797<tr> 12743<tr>
12798<td>LUA_PKGPREFIX</td> 12744<td>LUA_PKGPREFIX</td>
12799<td>LUA_SELF_CONFLICT</td> 12745<td>LUA_SELF_CONFLICT</td>
12800</tr> 12746</tr>
12801<tr> 12747<tr>
12802<td>LUA_USE_BUSTED</td> 12748<td>LUA_USE_BUSTED</td>
12803<td>LUA_VERSIONS_ACCEPTED</td> 12749<td>LUA_VERSIONS_ACCEPTED</td>
12804</tr> 12750</tr>
12805<tr> 12751<tr>
12806<td>LUA_VERSIONS_INCOMPATIBLE</td> 12752<td>LUA_VERSIONS_INCOMPATIBLE</td>
12807<td>LUA_VERSION_DEFAULT</td> 12753<td>LUA_VERSION_DEFAULT</td>
12808</tr> 12754</tr>
12809<tr> 12755<tr>
12810<td>LUA_VERSION_REQD</td> 12756<td>LUA_VERSION_REQD</td>
12811<td>Lua</td> 12757<td>Lua</td>
12812</tr> 12758</tr>
12813<tr> 12759<tr>
12814<td>MACHINE_PLATFORM</td> 12760<td>MACHINE_PLATFORM</td>
12815<td>MAILAGENT_DOMAIN</td> 12761<td>MAILAGENT_DOMAIN</td>
12816</tr> 12762</tr>
12817<tr> 12763<tr>
12818<td>MAILAGENT_EMAIL</td> 12764<td>MAILAGENT_EMAIL</td>
12819<td>MAILAGENT_FQDN</td> 12765<td>MAILAGENT_FQDN</td>
12820</tr> 12766</tr>
12821<tr> 12767<tr>
12822<td>MAILAGENT_ORGANIZATION</td> 12768<td>MAILAGENT_ORGANIZATION</td>
12823<td>MAJORDOMO_HOMEDIR</td> 12769<td>MAJORDOMO_HOMEDIR</td>
12824</tr> 12770</tr>
12825<tr> 12771<tr>
12826<td>MAJOR_OS_VERSION</td> 
12827<td>MAKEINFO_ARGS</td> 12772<td>MAKEINFO_ARGS</td>
12828</tr> 
12829<tr> 
12830<td>MAKE_DIRS</td> 12773<td>MAKE_DIRS</td>
12831<td>MAKE_DIRS_PERMS</td> 
12832</tr> 12774</tr>
12833<tr> 12775<tr>
 12776<td>MAKE_DIRS_PERMS</td>
12834<td>MAKE_ENV</td> 12777<td>MAKE_ENV</td>
12835<td>MAKE_FILE</td> 
12836</tr> 12778</tr>
12837<tr> 12779<tr>
 12780<td>MAKE_FILE</td>
12838<td>MAKE_FLAGS</td> 12781<td>MAKE_FLAGS</td>
12839<td>MAKE_JOBS</td> 
12840</tr> 12782</tr>
12841<tr> 12783<tr>
 12784<td>MAKE_JOBS</td>
12842<td>MAKE_JOBS_SAFE</td> 12785<td>MAKE_JOBS_SAFE</td>
12843<td>MAKE_PROGRAM</td> 
12844</tr> 12786</tr>
12845<tr> 12787<tr>
 12788<td>MAKE_PROGRAM</td>
12846<td>MANCOMPRESSED_IF_MANZ</td> 12789<td>MANCOMPRESSED_IF_MANZ</td>
12847<td>MANINSTALL</td> 
12848</tr> 12790</tr>
12849<tr> 12791<tr>
 12792<td>MANINSTALL</td>
12850<td>MANZ</td> 12793<td>MANZ</td>
12851<td>MASTER_SITES</td> 
12852</tr> 12794</tr>
12853<tr> 12795<tr>
 12796<td>MASTER_SITES</td>
12854<td>MASTER_SITE_BACKUP</td> 12797<td>MASTER_SITE_BACKUP</td>
12855<td>MASTER_SITE_LOCAL</td> 
12856</tr> 12798</tr>
12857<tr> 12799<tr>
 12800<td>MASTER_SITE_LOCAL</td>
12858<td>MASTER_SITE_MOZILLA</td> 12801<td>MASTER_SITE_MOZILLA</td>
12859<td>MASTER_SITE_OVERRIDE</td> 
12860</tr> 12802</tr>
12861<tr> 12803<tr>
 12804<td>MASTER_SITE_OVERRIDE</td>
12862<td>MASTER_SITE_PERL_CPAN</td> 12805<td>MASTER_SITE_PERL_CPAN</td>
12863<td>MASTER_SORT</td> 
12864</tr> 12806</tr>
12865<tr> 12807<tr>
 12808<td>MASTER_SORT</td>
12866<td>MASTER_SORT_RANDOM</td> 12809<td>MASTER_SORT_RANDOM</td>
12867<td>MASTER_SORT_REGEX</td> 
12868</tr> 12810</tr>
12869<tr> 12811<tr>
 12812<td>MASTER_SORT_REGEX</td>
12870<td>MECAB_CHARSET</td> 12813<td>MECAB_CHARSET</td>
12871<td>MEDIATOMB_GROUP</td> 
12872</tr> 12814</tr>
12873<tr> 12815<tr>
 12816<td>MEDIATOMB_GROUP</td>
12874<td>MEDIATOMB_USER</td> 12817<td>MEDIATOMB_USER</td>
12875<td>MIPSPROBASE</td> 
12876</tr> 12818</tr>
12877<tr> 12819<tr>
 12820<td>MIPSPROBASE</td>
12878<td>MIREDO_GROUP</td> 12821<td>MIREDO_GROUP</td>
12879<td>MIREDO_USER</td> 
12880</tr> 12822</tr>
12881<tr> 12823<tr>
 12824<td>MIREDO_USER</td>
12882<td>MISSING_FEATURES</td> 12825<td>MISSING_FEATURES</td>
12883<td>MKDIR</td> 
12884</tr> 12826</tr>
12885<tr> 12827<tr>
 12828<td>MKDIR</td>
12886<td>MKPIE_SUPPORTED</td> 12829<td>MKPIE_SUPPORTED</td>
12887<td>MLDONKEY_GROUP</td> 
12888</tr> 12830</tr>
12889<tr> 12831<tr>
 12832<td>MLDONKEY_GROUP</td>
12890<td>MLDONKEY_HOME</td> 12833<td>MLDONKEY_HOME</td>
12891<td>MLDONKEY_USER</td> 
12892</tr> 12834</tr>
12893<tr> 12835<tr>
 12836<td>MLDONKEY_USER</td>
12894<td>MONOTONE_GROUP</td> 12837<td>MONOTONE_GROUP</td>
12895<td>MONOTONE_USER</td> 
12896</tr> 12838</tr>
12897<tr> 12839<tr>
 12840<td>MONOTONE_USER</td>
12898<td>MOTIFBASE</td> 12841<td>MOTIFBASE</td>
12899<td>MOTIF_TYPE</td> 
12900</tr> 12842</tr>
12901<tr> 12843<tr>
 12844<td>MOTIF_TYPE</td>
12902<td>MOTIF_TYPE_DEFAULT</td> 12845<td>MOTIF_TYPE_DEFAULT</td>
12903<td>MPI_TYPE</td> 
12904</tr> 12846</tr>
12905<tr> 12847<tr>
 12848<td>MPI_TYPE</td>
12906<td>MSGFMT_STRIP_MSGCTXT</td> 12849<td>MSGFMT_STRIP_MSGCTXT</td>
12907<td>MSGFMT_STRIP_MSGID_PLURAL</td> 
12908</tr> 12850</tr>
12909<tr> 12851<tr>
 12852<td>MSGFMT_STRIP_MSGID_PLURAL</td>
12910<td>MTOOLS_ENABLE_FLOPPYD</td> 12853<td>MTOOLS_ENABLE_FLOPPYD</td>
12911<td>MUST</td> 
12912</tr> 12854</tr>
12913<tr> 12855<tr>
12914<td>MV</td> 12856<td>MV</td>
12915<td>MYSQL_CHARSET</td> 12857<td>MYSQL_CHARSET</td>
12916</tr> 12858</tr>
12917<tr> 12859<tr>
12918<td>MYSQL_DATADIR</td> 12860<td>MYSQL_DATADIR</td>
12919<td>MYSQL_EXTRA_CHARSET</td> 12861<td>MYSQL_EXTRA_CHARSET</td>
12920</tr> 12862</tr>
12921<tr> 12863<tr>
12922<td>MYSQL_GROUP</td> 12864<td>MYSQL_GROUP</td>
12923<td>MYSQL_USER</td> 12865<td>MYSQL_USER</td>
12924</tr> 12866</tr>
12925<tr> 12867<tr>
12926<td>MYSQL_VERSION</td> 12868<td>MYSQL_VERSION</td>
12927<td>MYSQL_VERSIONS_ACCEPTED</td> 12869<td>MYSQL_VERSIONS_ACCEPTED</td>
12928</tr> 12870</tr>
12929<tr> 12871<tr>
12930<td>MYSQL_VERSIONS_ALL</td> 12872<td>MYSQL_VERSIONS_ALL</td>
12931<td>MYSQL_VERSION_DEFAULT</td> 12873<td>MYSQL_VERSION_DEFAULT</td>
12932</tr> 12874</tr>
12933<tr> 12875<tr>
12934<td>NAGIOSCMD_GROUP</td> 12876<td>NAGIOSCMD_GROUP</td>
12935<td>NAGIOSDIR</td> 12877<td>NAGIOSDIR</td>
12936</tr> 12878</tr>
12937<tr> 12879<tr>
12938<td>NAGIOS_GROUP</td> 12880<td>NAGIOS_GROUP</td>
12939<td>NAGIOS_USER</td> 12881<td>NAGIOS_USER</td>
12940</tr> 12882</tr>
12941<tr> 12883<tr>
12942<td>NATIVE_APPEND_ABI</td> 12884<td>NATIVE_APPEND_ABI</td>
12943<td>NATIVE_APPEND_ELF</td> 12885<td>NATIVE_APPEND_ELF</td>
12944</tr> 12886</tr>
12945<tr> 12887<tr>
12946<td>NATIVE_EXEC_FMT</td> 12888<td>NATIVE_EXEC_FMT</td>
12947<td>NATIVE_MACHINE_PLATFORM</td> 12889<td>NATIVE_MACHINE_PLATFORM</td>
12948</tr> 12890</tr>
12949<tr> 12891<tr>
12950<td>NATIVE_OBJECT_FMT</td> 12892<td>NATIVE_OBJECT_FMT</td>
12951<td>NBPAX_PROGRAM_PREFIX</td> 12893<td>NBPAX_PROGRAM_PREFIX</td>
12952</tr> 12894</tr>
12953<tr> 12895<tr>
12954<td>NETBSD_LOGIN_NAME</td> 12896<td>NETBSD_LOGIN_NAME</td>
12955<td>NMH_EDITOR</td> 12897<td>NMH_EDITOR</td>
12956</tr> 12898</tr>
12957<tr> 12899<tr>
12958<td>NMH_MTA</td> 12900<td>NMH_MTA</td>
12959<td>NMH_PAGER</td> 12901<td>NMH_PAGER</td>
12960</tr> 12902</tr>
12961<tr> 12903<tr>
12962<td>NODE_VERSIONS_ACCEPTED</td> 12904<td>NODE_VERSIONS_ACCEPTED</td>
12963<td>NODE_VERSIONS_INCOMPATIBLE</td> 12905<td>NODE_VERSIONS_INCOMPATIBLE</td>
12964</tr> 12906</tr>
12965<tr> 12907<tr>
12966<td>NODE_VERSION_DEFAULT</td> 12908<td>NODE_VERSION_DEFAULT</td>
12967<td>NODE_VERSION_REQD</td> 12909<td>NODE_VERSION_REQD</td>
12968</tr> 12910</tr>
12969<tr> 12911<tr>
12970<td>NOLOGIN</td> 12912<td>NOLOGIN</td>
12971<td>NOTE</td> 12913<td>NOTE</td>
12972</tr> 12914</tr>
12973<tr> 12915<tr>
12974<td>NOT_FOR_PLATFORM</td> 12916<td>NOT_FOR_PLATFORM</td>
12975<td>NOT_PAX_ASLR_SAFE</td> 12917<td>NOT_PAX_ASLR_SAFE</td>
12976</tr> 12918</tr>
12977<tr> 12919<tr>
12978<td>NOT_PAX_MPROTECT_SAFE</td> 12920<td>NOT_PAX_MPROTECT_SAFE</td>
12979<td>NO_BUILD</td> 12921<td>NO_BUILD</td>
12980</tr> 12922</tr>
12981<tr> 12923<tr>
12982<td>NO_CHECKSUM</td> 12924<td>NO_CHECKSUM</td>
12983<td>NO_CONFIGURE</td> 12925<td>NO_CONFIGURE</td>
12984</tr> 12926</tr>
12985<tr> 12927<tr>
12986<td>NO_SKIP</td> 12928<td>NO_SKIP</td>
12987<td>NS_PREFERRED</td> 12929<td>NS_PREFERRED</td>
12988</tr> 12930</tr>
12989<tr> 12931<tr>
12990<td>NULLMAILER_GROUP</td> 12932<td>NULLMAILER_GROUP</td>
12991<td>NULLMAILER_USER</td> 12933<td>NULLMAILER_USER</td>
12992</tr> 12934</tr>
12993<tr> 12935<tr>
12994<td>OASIS</td> 12936<td>OASIS</td>
12995<td>OASIS_BUILD_ARGS</td> 12937<td>OASIS_BUILD_ARGS</td>
12996</tr> 12938</tr>
12997<tr> 12939<tr>
12998<td>OBJHOSTNAME</td> 12940<td>OBJHOSTNAME</td>
12999<td>OBJMACHINE</td> 12941<td>OBJMACHINE</td>
13000</tr> 12942</tr>
13001<tr> 12943<tr>
13002<td>OCAML_FINDLIB_DIRS</td> 12944<td>OCAML_FINDLIB_DIRS</td>
13003<td>OCAML_FINDLIB_REGISTER</td> 12945<td>OCAML_FINDLIB_REGISTER</td>
13004</tr> 12946</tr>
13005<tr> 12947<tr>
13006<td>OCAML_FINDLIB_REGISTER_VERBOSE</td> 12948<td>OCAML_FINDLIB_REGISTER_VERBOSE</td>
13007<td>OCAML_SITELIBDIR</td> 12949<td>OCAML_SITELIBDIR</td>
13008</tr> 12950</tr>
13009<tr> 12951<tr>
13010<td>OCAML_TOPKG_DOCDIR</td> 12952<td>OCAML_TOPKG_DOCDIR</td>
13011<td>OCAML_USE_DUNE</td> 12953<td>OCAML_USE_DUNE</td>
13012</tr> 12954</tr>
13013<tr> 12955<tr>
13014<td>OCAML_USE_FINDLIB</td> 12956<td>OCAML_USE_FINDLIB</td>
13015<td>OCAML_USE_OASIS</td> 12957<td>OCAML_USE_OASIS</td>
13016</tr> 12958</tr>
13017<tr> 12959<tr>
13018<td>OCAML_USE_OASIS_DYNRUN</td> 12960<td>OCAML_USE_OASIS_DYNRUN</td>
13019<td>OCAML_USE_OPAM</td> 12961<td>OCAML_USE_OPAM</td>
13020</tr> 12962</tr>
13021<tr> 12963<tr>
13022<td>OCAML_USE_TOPKG</td> 12964<td>OCAML_USE_TOPKG</td>
13023<td>OMF</td> 12965<td>OMF</td>
13024</tr> 12966</tr>
13025<tr> 12967<tr>
13026<td>ONLY_FOR_COMPILER</td> 12968<td>ONLY_FOR_COMPILER</td>
13027<td>ONLY_FOR_PLATFORM</td> 12969<td>ONLY_FOR_PLATFORM</td>
13028</tr> 12970</tr>
13029<tr> 12971<tr>
13030<td>OPENSSH_CHROOT</td> 12972<td>OPENSSH_CHROOT</td>
13031<td>OPENSSH_GROUP</td> 12973<td>OPENSSH_GROUP</td>
13032</tr> 12974</tr>
13033<tr> 12975<tr>
13034<td>OPENSSH_USER</td> 12976<td>OPENSSH_USER</td>
13035<td>OPSYS</td> 12977<td>OPSYS</td>
13036</tr> 12978</tr>
13037<tr> 12979<tr>
13038<td>OPSYS_EMULDIR</td> 12980<td>OPSYS_EMULDIR</td>
13039<td>OPSYS_VERSION</td> 12981<td>OPSYS_VERSION</td>
13040</tr> 12982</tr>
13041<tr> 12983<tr>
13042<td>OS</td> 12984<td>OS</td>
13043<td>OSS_TYPE</td> 12985<td>OSS_TYPE</td>
13044</tr> 12986</tr>
13045<tr> 12987<tr>
13046<td>OSX</td> 12988<td>OSX</td>
13047<td>OSX_TOLERATE_SDK_SKEW</td> 12989<td>OSX_TOLERATE_SDK_SKEW</td>
13048</tr> 12990</tr>
13049<tr> 12991<tr>
13050<td>OS_HAVE_ALSA</td> 
13051<td>OS_HAVE_RCD</td> 
13052</tr> 
13053<tr> 
13054<td>OS_VARIANT</td> 12992<td>OS_VARIANT</td>
13055<td>OS_VERSION</td> 12993<td>OS_VERSION</td>
13056</tr> 12994</tr>
13057<tr> 12995<tr>
13058<td>OTF_FONTS_DIR</td> 12996<td>OTF_FONTS_DIR</td>
13059<td>OVERRIDE_DIRDEPTH</td> 12997<td>OVERRIDE_DIRDEPTH</td>
13060</tr> 12998</tr>
13061<tr> 12999<tr>
13062<td>OVERRIDE_GEMSPEC</td> 13000<td>OVERRIDE_GEMSPEC</td>
13063<td>OVERRIDE_GNU_CONFIG_SCRIPTS</td> 13001<td>OVERRIDE_GNU_CONFIG_SCRIPTS</td>
13064</tr> 13002</tr>
13065<tr> 13003<tr>
13066<td>OVERRIDE_ROCKSPEC</td> 
13067<td>OWN_DIRS</td> 13004<td>OWN_DIRS</td>
13068</tr> 
13069<tr> 
13070<td>OWN_DIRS_PERMS</td> 13005<td>OWN_DIRS_PERMS</td>
13071<td>P4GROUP</td> 
13072</tr> 13006</tr>
13073<tr> 13007<tr>
 13008<td>P4GROUP</td>
13074<td>P4PORT</td> 13009<td>P4PORT</td>
13075<td>P4ROOT</td> 
13076</tr> 13010</tr>
13077<tr> 13011<tr>
 13012<td>P4ROOT</td>
13078<td>P4USER</td> 13013<td>P4USER</td>
13079<td>PACKAGES</td> 
13080</tr> 13014</tr>
13081<tr> 13015<tr>
 13016<td>PACKAGES</td>
13082<td>PALMOS_DEFAULT_SDK</td> 13017<td>PALMOS_DEFAULT_SDK</td>
13083<td>PAMBASE</td> 
13084</tr> 13018</tr>
13085<tr> 13019<tr>
 13020<td>PAMBASE</td>
13086<td>PAM_DEFAULT</td> 13021<td>PAM_DEFAULT</td>
13087<td>PAPERSIZE</td> 
13088</tr> 13022</tr>
13089<tr> 13023<tr>
 13024<td>PAPERSIZE</td>
13090<td>PASSIVE_FETCH</td> 13025<td>PASSIVE_FETCH</td>
13091<td>PATCHDIR</td> 
13092</tr> 13026</tr>
13093<tr> 13027<tr>
 13028<td>PATCHDIR</td>
13094<td>PATCHFILES</td> 13029<td>PATCHFILES</td>
13095<td>PATCH_ARGS</td> 
13096</tr> 13030</tr>
13097<tr> 13031<tr>
 13032<td>PATCH_ARGS</td>
13098<td>PATCH_DEBUG</td> 13033<td>PATCH_DEBUG</td>
13099<td>PATCH_DIST_ARGS</td> 
13100</tr> 13034</tr>
13101<tr> 13035<tr>
 13036<td>PATCH_DIST_ARGS</td>
13102<td>PATCH_DIST_CAT</td> 13037<td>PATCH_DIST_CAT</td>
13103<td>PATCH_DIST_STRIP</td> 
13104</tr> 13038</tr>
13105<tr> 13039<tr>
 13040<td>PATCH_DIST_STRIP</td>
13106<td>PATCH_FUZZ_FACTOR</td> 13041<td>PATCH_FUZZ_FACTOR</td>
13107<td>PATCH_STRIP</td> 
13108</tr> 13042</tr>
13109<tr> 13043<tr>
 13044<td>PATCH_STRIP</td>
13110<td>PATH</td> 13045<td>PATH</td>
13111<td>PCCBASE</td> 
13112</tr> 
13113<tr> 
13114<td>PEAR</td> 
13115<td>PEAR_CHANNEL</td> 
13116</tr> 13046</tr>
13117<tr> 13047<tr>
13118<td>PEAR_CHANNEL_ALIAS</td> 13048<td>PCCBASE</td>
13119<td>PEAR_CHANNEL_VERSION</td> 13049<td>PEAR_CMD</td>
13120</tr> 13050</tr>
13121<tr> 13051<tr>
13122<td>PEAR_CMD</td> 
13123<td>PEAR_LIB</td> 13052<td>PEAR_LIB</td>
 13053<td>PEAR_PACKAGE_XML</td>
13124</tr> 13054</tr>
13125<tr> 13055<tr>
13126<td>PEAR_PACKAGE_XML</td> 
13127<td>PERL5</td> 13056<td>PERL5</td>
 13057<td>PERL5_CONFIGURE</td>
13128</tr> 13058</tr>
13129<tr> 13059<tr>
13130<td>PERL5_CONFIGURE</td> 
13131<td>PERL5_CONFIGURE_DIRS</td> 13060<td>PERL5_CONFIGURE_DIRS</td>
 13061<td>PERL5_LDFLAGS</td>
13132</tr> 13062</tr>
13133<tr> 13063<tr>
13134<td>PERL5_LDFLAGS</td> 
13135<td>PERL5_LICENSE</td> 13064<td>PERL5_LICENSE</td>
 13065<td>PERL5_MODULE_TYPE</td>
13136</tr> 13066</tr>
13137<tr> 13067<tr>
13138<td>PERL5_MODULE_TYPE</td> 
13139<td>PERL5_PACKLIST</td> 13068<td>PERL5_PACKLIST</td>
 13069<td>PERL5_PACKLIST_DIR</td>
13140</tr> 13070</tr>
13141<tr> 13071<tr>
13142<td>PERL5_PACKLIST_DIR</td> 
13143<td>PERL5_PERLBASE</td> 13072<td>PERL5_PERLBASE</td>
 13073<td>PERL5_SITEBASE</td>
13144</tr> 13074</tr>
13145<tr> 13075<tr>
13146<td>PERL5_SITEBASE</td> 
13147<td>PERL5_USE_PACKLIST</td> 13076<td>PERL5_USE_PACKLIST</td>
 13077<td>PERL5_VENDORBASE</td>
13148</tr> 13078</tr>
13149<tr> 13079<tr>
13150<td>PERL5_VENDORBASE</td> 
13151<td>PFCTL</td> 13080<td>PFCTL</td>
 13081<td>PFVAR_H</td>
13152</tr> 13082</tr>
13153<tr> 13083<tr>
13154<td>PFVAR_H</td> 
13155<td>PF_VERSION</td> 13084<td>PF_VERSION</td>
 13085<td>PGGROUP</td>
13156</tr> 13086</tr>
13157<tr> 13087<tr>
13158<td>PGGROUP</td> 
13159<td>PGHOME</td> 13088<td>PGHOME</td>
 13089<td>PGPKGSRCDIR</td>
13160</tr> 13090</tr>
13161<tr> 13091<tr>
13162<td>PGPKGSRCDIR</td> 
13163<td>PGSQL_TYPE</td> 13092<td>PGSQL_TYPE</td>
 13093<td>PGSQL_VERSION</td>
13164</tr> 13094</tr>
13165<tr> 13095<tr>
13166<td>PGSQL_VERSION</td> 
13167<td>PGSQL_VERSIONS_ACCEPTED</td> 13096<td>PGSQL_VERSIONS_ACCEPTED</td>
 13097<td>PGSQL_VERSION_DEFAULT</td>
13168</tr> 13098</tr>
13169<tr> 13099<tr>
13170<td>PGSQL_VERSION_DEFAULT</td> 
13171<td>PGUSER</td> 13100<td>PGUSER</td>
 13101<td>PG_LIB_EXT</td>
13172</tr> 13102</tr>
13173<tr> 13103<tr>
13174<td>PG_LIB_EXT</td> 
13175<td>PHP</td> 13104<td>PHP</td>
 13105<td>PHPCOMMON_MK</td>
13176</tr> 13106</tr>
13177<tr> 13107<tr>
13178<td>PHPCOMMON_MK</td> 
13179<td>PHPPKGSRCDIR</td> 13108<td>PHPPKGSRCDIR</td>
 13109<td>PHP_BASE_VERS</td>
13180</tr> 13110</tr>
13181<tr> 13111<tr>
13182<td>PHP_BASE_VERS</td> 
13183<td>PHP_CHECK_INSTALLED</td> 13112<td>PHP_CHECK_INSTALLED</td>
 13113<td>PHP_EXTENSION_DIR</td>
13184</tr> 13114</tr>
13185<tr> 13115<tr>
13186<td>PHP_EXTENSION_DIR</td> 
13187<td>PHP_INITIAL_TEENY</td> 13116<td>PHP_INITIAL_TEENY</td>
 13117<td>PHP_PKG_PREFIX</td>
13188</tr> 13118</tr>
13189<tr> 13119<tr>
13190<td>PHP_PKG_PREFIX</td> 
13191<td>PHP_VERSION</td> 13120<td>PHP_VERSION</td>
 13121<td>PHP_VERSIONS_ACCEPTED</td>
13192</tr> 13122</tr>
13193<tr> 13123<tr>
13194<td>PHP_VERSIONS_ACCEPTED</td> 
13195<td>PHP_VERSIONS_INCOMPATIBLE</td> 13124<td>PHP_VERSIONS_INCOMPATIBLE</td>
 13125<td>PHP_VERSION_DEFAULT</td>
13196</tr> 13126</tr>
13197<tr> 13127<tr>
13198<td>PHP_VERSION_DEFAULT</td> 
13199<td>PHP_VERSION_REQD</td> 13128<td>PHP_VERSION_REQD</td>
 13129<td>PILRC_USE_GTK</td>
13200</tr> 13130</tr>
13201<tr> 13131<tr>
13202<td>PILRC_USE_GTK</td> 
13203<td>PKGCONFIG_BASE</td> 13132<td>PKGCONFIG_BASE</td>
 13133<td>PKGCONFIG_FILE</td>
13204</tr> 13134</tr>
13205<tr> 13135<tr>
13206<td>PKGCONFIG_FILE</td> 
13207<td>PKGCONFIG_OVERRIDE</td> 13136<td>PKGCONFIG_OVERRIDE</td>
 13137<td>PKGCONFIG_OVERRIDE_STAGE</td>
13208</tr> 13138</tr>
13209<tr> 13139<tr>
13210<td>PKGCONFIG_OVERRIDE_STAGE</td> 
13211<td>PKGDIR</td> 13140<td>PKGDIR</td>
 13141<td>PKGGNUDIR</td>
13212</tr> 13142</tr>
13213<tr> 13143<tr>
13214<td>PKGGNUDIR</td> 
13215<td>PKGINFODIR</td> 13144<td>PKGINFODIR</td>
 13145<td>PKGLOCALEDIR</td>
13216</tr> 13146</tr>
13217<tr> 13147<tr>
13218<td>PKGLOCALEDIR</td> 
13219<td>PKGMANDIR</td> 13148<td>PKGMANDIR</td>
 13149<td>PKGNAME</td>
13220</tr> 13150</tr>
13221<tr> 13151<tr>
13222<td>PKGNAME</td> 
13223<td>PKGNAME_REQD</td> 13152<td>PKGNAME_REQD</td>
 13153<td>PKGPATH</td>
13224</tr> 13154</tr>
13225<tr> 13155<tr>
13226<td>PKGPATH</td> 
13227<td>PKGREVISION</td> 13156<td>PKGREVISION</td>
 13157<td>PKGSRC_BLAS_TYPES</td>
13228</tr> 13158</tr>
13229<tr> 13159<tr>
13230<td>PKGSRC_BLAS_TYPES</td> 
13231<td>PKGSRC_CHANGES</td> 13160<td>PKGSRC_CHANGES</td>
 13161<td>PKGSRC_COMPILER</td>
13232</tr> 13162</tr>
13233<tr> 13163<tr>
13234<td>PKGSRC_COMPILER</td> 
13235<td>PKGSRC_KEEP_BIN_PKGS</td> 13164<td>PKGSRC_KEEP_BIN_PKGS</td>
 13165<td>PKGSRC_LOCKTYPE</td>
13236</tr> 13166</tr>
13237<tr> 13167<tr>
13238<td>PKGSRC_LOCKTYPE</td> 
13239<td>PKGSRC_MAKE_ENV</td> 13168<td>PKGSRC_MAKE_ENV</td>
 13169<td>PKGSRC_MESSAGE_RECIPIENTS</td>
13240</tr> 13170</tr>
13241<tr> 13171<tr>
13242<td>PKGSRC_MESSAGE_RECIPIENTS</td> 
13243<td>PKGSRC_MKPIE</td> 13172<td>PKGSRC_MKPIE</td>
 13173<td>PKGSRC_MKREPRO</td>
13244</tr> 13174</tr>
13245<tr> 13175<tr>
13246<td>PKGSRC_MKREPRO</td> 
13247<td>PKGSRC_OVERRIDE_MKPIE</td> 13176<td>PKGSRC_OVERRIDE_MKPIE</td>
 13177<td>PKGSRC_RUN_TEST</td>
13248</tr> 13178</tr>
13249<tr> 13179<tr>
13250<td>PKGSRC_RUN_TEST</td> 
13251<td>PKGSRC_SETENV</td> 13180<td>PKGSRC_SETENV</td>
 13181<td>PKGSRC_SLEEPSECS</td>
13252</tr> 13182</tr>
13253<tr> 13183<tr>
13254<td>PKGSRC_SLEEPSECS</td> 
13255<td>PKGSRC_TODO</td> 13184<td>PKGSRC_TODO</td>
 13185<td>PKGSRC_USE_CTF</td>
13256</tr> 13186</tr>
13257<tr> 13187<tr>
13258<td>PKGSRC_USE_CTF</td> 
13259<td>PKGSRC_USE_FORTIFY</td> 13188<td>PKGSRC_USE_FORTIFY</td>
 13189<td>PKGSRC_USE_MKTOOLS</td>
13260</tr> 13190</tr>
13261<tr> 13191<tr>
13262<td>PKGSRC_USE_MKTOOLS</td> 
13263<td>PKGSRC_USE_RELRO</td> 13192<td>PKGSRC_USE_RELRO</td>
 13193<td>PKGSRC_USE_SSP</td>
13264</tr> 13194</tr>
13265<tr> 13195<tr>
13266<td>PKGSRC_USE_SSP</td> 
13267<td>PKGSRC_USE_STACK_CHECK</td> 13196<td>PKGSRC_USE_STACK_CHECK</td>
 13197<td>PKGTASKS_DATAFILE</td>
13268</tr> 13198</tr>
13269<tr> 13199<tr>
13270<td>PKGTASKS_DATAFILE</td> 
13271<td>PKGTOOLS_ARGS</td> 13200<td>PKGTOOLS_ARGS</td>
 13201<td>PKGTOOLS_ENV</td>
13272</tr> 13202</tr>
13273<tr> 13203<tr>
13274<td>PKGTOOLS_ENV</td> 
13275<td>PKG_ALTERNATIVES</td> 13204<td>PKG_ALTERNATIVES</td>
 13205<td>PKG_APACHE</td>
13276</tr> 13206</tr>
13277<tr> 13207<tr>
13278<td>PKG_APACHE</td> 
13279<td>PKG_APACHE_ACCEPTED</td> 13208<td>PKG_APACHE_ACCEPTED</td>
 13209<td>PKG_APACHE_DEFAULT</td>
13280</tr> 13210</tr>
13281<tr> 13211<tr>
13282<td>PKG_APACHE_DEFAULT</td> 
13283<td>PKG_BEST_EXISTS</td> 13212<td>PKG_BEST_EXISTS</td>
 13213<td>PKG_BUILD_OPTIONS</td>
13284</tr> 13214</tr>
13285<tr> 13215<tr>
13286<td>PKG_BUILD_OPTIONS</td> 
13287<td>PKG_COMPRESSION</td> 13216<td>PKG_COMPRESSION</td>
 13217<td>PKG_CONFIG</td>
13288</tr> 13218</tr>
13289<tr> 13219<tr>
13290<td>PKG_CONFIG</td> 
13291<td>PKG_CONFIG_PERMS</td> 13220<td>PKG_CONFIG_PERMS</td>
 13221<td>PKG_CREATE_USERGROUP</td>
13292</tr> 13222</tr>
13293<tr> 13223<tr>
13294<td>PKG_CREATE_USERGROUP</td> 
13295<td>PKG_DB_TMPDIR</td> 13224<td>PKG_DB_TMPDIR</td>
 13225<td>PKG_DEBUG_LEVEL</td>
13296</tr> 13226</tr>
13297<tr> 13227<tr>
13298<td>PKG_DEBUG_LEVEL</td> 
13299<td>PKG_DEFAULT_OPTIONS</td> 13228<td>PKG_DEFAULT_OPTIONS</td>
 13229<td>PKG_DESTDIR_SUPPORT</td>
13300</tr> 13230</tr>
13301<tr> 13231<tr>
13302<td>PKG_DESTDIR_SUPPORT</td> 
13303<td>PKG_DEVELOPER</td> 13232<td>PKG_DEVELOPER</td>
 13233<td>PKG_DISABLED_OPTIONS</td>
13304</tr> 13234</tr>
13305<tr> 13235<tr>
13306<td>PKG_DISABLED_OPTIONS</td> 
13307<td>PKG_FATAL_ERRORS</td> 13236<td>PKG_FATAL_ERRORS</td>
 13237<td>PKG_FC</td>
13308</tr> 13238</tr>
13309<tr> 13239<tr>
13310<td>PKG_FC</td> 
13311<td>PKG_FILELIST_CMD</td> 13240<td>PKG_FILELIST_CMD</td>
13312</tr> 
13313<tr> 
13314<td>PKG_GECOS</td> 13241<td>PKG_GECOS</td>
13315<td>PKG_GID</td> 
13316</tr> 13242</tr>
13317<tr> 13243<tr>
 13244<td>PKG_GID</td>
13318<td>PKG_GROUPS</td> 13245<td>PKG_GROUPS</td>
13319<td>PKG_GROUPS_VARS</td> 
13320</tr> 13246</tr>
13321<tr> 13247<tr>
 13248<td>PKG_GROUPS_VARS</td>
13322<td>PKG_HOME</td> 13249<td>PKG_HOME</td>
13323<td>PKG_INIT_SCRIPTS</td> 
13324</tr> 13250</tr>
13325<tr> 13251<tr>
 13252<td>PKG_INIT_SCRIPTS</td>
13326<td>PKG_JAVA_HOME</td> 13253<td>PKG_JAVA_HOME</td>
13327<td>PKG_JVM</td> 
13328</tr> 13254</tr>
13329<tr> 13255<tr>
 13256<td>PKG_JVM</td>
13330<td>PKG_JVMS_ACCEPTED</td> 13257<td>PKG_JVMS_ACCEPTED</td>
13331<td>PKG_JVM_DEFAULT</td> 
13332</tr> 13258</tr>
13333<tr> 13259<tr>
 13260<td>PKG_JVM_DEFAULT</td>
13334<td>PKG_LEGACY_OPTIONS</td> 13261<td>PKG_LEGACY_OPTIONS</td>
13335<td>PKG_LIBTOOL</td> 
13336</tr> 13262</tr>
13337<tr> 13263<tr>
 13264<td>PKG_LIBTOOL</td>
13338<td>PKG_MKSYMLINKS</td> 13265<td>PKG_MKSYMLINKS</td>
13339<td>PKG_OPTIONS</td> 
13340</tr> 13266</tr>
13341<tr> 13267<tr>
 13268<td>PKG_OPTIONS</td>
13342<td>PKG_OPTIONS_DEPRECATED_WARNINGS</td> 13269<td>PKG_OPTIONS_DEPRECATED_WARNINGS</td>
13343<td>PKG_OPTIONS_LEGACY_OPTS</td> 
13344</tr> 13270</tr>
13345<tr> 13271<tr>
 13272<td>PKG_OPTIONS_LEGACY_OPTS</td>
13346<td>PKG_OPTIONS_LEGACY_VARS</td> 13273<td>PKG_OPTIONS_LEGACY_VARS</td>
13347<td>PKG_OPTIONS_NONEMPTY_SETS</td> 
13348</tr> 13274</tr>
13349<tr> 13275<tr>
 13276<td>PKG_OPTIONS_NONEMPTY_SETS</td>
13350<td>PKG_OPTIONS_OPTIONAL_GROUPS</td> 13277<td>PKG_OPTIONS_OPTIONAL_GROUPS</td>
13351<td>PKG_OPTIONS_REQUIRED_GROUPS</td> 
13352</tr> 13278</tr>
13353<tr> 13279<tr>
 13280<td>PKG_OPTIONS_REQUIRED_GROUPS</td>
13354<td>PKG_OPTIONS_VAR</td> 13281<td>PKG_OPTIONS_VAR</td>
13355<td>PKG_PHP</td> 
13356</tr> 13282</tr>
13357<tr> 13283<tr>
 13284<td>PKG_PHP</td>
13358<td>PKG_PHP_MAJOR_VERS</td> 13285<td>PKG_PHP_MAJOR_VERS</td>
13359<td>PKG_PHP_VERSION</td> 
13360</tr> 13286</tr>
13361<tr> 13287<tr>
 13288<td>PKG_PHP_VERSION</td>
13362<td>PKG_RCD_SCRIPTS</td> 13289<td>PKG_RCD_SCRIPTS</td>
13363<td>PKG_REFCOUNT_DBDIR</td> 
13364</tr> 13290</tr>
13365<tr> 13291<tr>
 13292<td>PKG_REFCOUNT_DBDIR</td>
13366<td>PKG_REGISTER_SHELLS</td> 13293<td>PKG_REGISTER_SHELLS</td>
13367<td>PKG_RESUME_TRANSFERS</td> 
13368</tr> 13294</tr>
13369<tr> 13295<tr>
 13296<td>PKG_RESUME_TRANSFERS</td>
13370<td>PKG_SHELL</td> 13297<td>PKG_SHELL</td>
13371<td>PKG_SUGGESTED_OPTIONS</td> 
13372</tr> 13298</tr>
13373<tr> 13299<tr>
 13300<td>PKG_SUGGESTED_OPTIONS</td>
13374<td>PKG_SUPPORTED_OPTIONS</td> 13301<td>PKG_SUPPORTED_OPTIONS</td>
13375<td>PKG_SYSCONFBASE</td> 
13376</tr> 13302</tr>
13377<tr> 13303<tr>
 13304<td>PKG_SYSCONFBASE</td>
13378<td>PKG_SYSCONFBASEDIR</td> 13305<td>PKG_SYSCONFBASEDIR</td>
13379<td>PKG_SYSCONFDIR</td> 
13380</tr> 13306</tr>
13381<tr> 13307<tr>
 13308<td>PKG_SYSCONFDIR</td>
13382<td>PKG_SYSCONFDIR_PERMS</td> 13309<td>PKG_SYSCONFDIR_PERMS</td>
13383<td>PKG_SYSCONFSUBDIR</td> 
13384</tr> 13310</tr>
13385<tr> 13311<tr>
 13312<td>PKG_SYSCONFSUBDIR</td>
13386<td>PKG_SYSCONFVAR</td> 13313<td>PKG_SYSCONFVAR</td>
13387<td>PKG_TOOLS_BIN</td> 
13388</tr> 13314</tr>
13389<tr> 13315<tr>
 13316<td>PKG_TOOLS_BIN</td>
13390<td>PKG_UID</td> 13317<td>PKG_UID</td>
13391<td>PKG_UPDATE_FONTS_DB</td> 
13392</tr> 13318</tr>
13393<tr> 13319<tr>
 13320<td>PKG_UPDATE_FONTS_DB</td>
13394<td>PKG_USERS</td> 13321<td>PKG_USERS</td>
13395<td>PKG_USERS_VARS</td> 
13396</tr> 13322</tr>
13397<tr> 13323<tr>
 13324<td>PKG_USERS_VARS</td>
13398<td>PKG_VERBOSE</td> 13325<td>PKG_VERBOSE</td>
13399<td>PLEASE</td> 
13400</tr> 13326</tr>
13401<tr> 13327<tr>
 13328<td>PLEASE</td>
13402<td>PLIST</td> 13329<td>PLIST</td>
13403<td>PLIST_AWK</td> 
13404</tr> 13330</tr>
13405<tr> 13331<tr>
 13332<td>PLIST_AWK</td>
13406<td>PLIST_AWK_ENV</td> 13333<td>PLIST_AWK_ENV</td>
13407<td>PLIST_SRC</td> 
13408</tr> 13334</tr>
13409<tr> 13335<tr>
 13336<td>PLIST_SRC</td>
13410<td>PLIST_SUBST</td> 13337<td>PLIST_SUBST</td>
13411<td>PLIST_TYPE</td> 
13412</tr> 13338</tr>
13413<tr> 13339<tr>
 13340<td>PLIST_TYPE</td>
13414<td>PLIST_VARS</td> 13341<td>PLIST_VARS</td>
13415<td>POPTOP_USE_MPPE</td> 
13416</tr> 13342</tr>
13417<tr> 13343<tr>
 13344<td>POPTOP_USE_MPPE</td>
13418<td>POSSIBLE_GFORTRAN_VERSION</td> 13345<td>POSSIBLE_GFORTRAN_VERSION</td>
13419<td>POST_FETCH_HOOK</td> 
13420</tr> 13346</tr>
13421<tr> 13347<tr>
 13348<td>POST_FETCH_HOOK</td>
13422<td>PREFER</td> 13349<td>PREFER</td>
13423<td>PREFER_NATIVE</td> 
13424</tr> 13350</tr>
13425<tr> 13351<tr>
 13352<td>PREFER_NATIVE</td>
13426<td>PREFER_NATIVE_PTHREADS</td> 13353<td>PREFER_NATIVE_PTHREADS</td>
13427<td>PREFER_PKGSRC</td> 
13428</tr> 13354</tr>
13429<tr> 13355<tr>
 13356<td>PREFER_PKGSRC</td>
13430<td>PREFIX</td> 13357<td>PREFIX</td>
13431<td>PREPEND_PATH</td> 
13432</tr> 13358</tr>
13433<tr> 13359<tr>
 13360<td>PREPEND_PATH</td>
13434<td>PRE_ROOT_CMD</td> 13361<td>PRE_ROOT_CMD</td>
13435<td>PRIVILEGED_STAGES</td> 
13436</tr> 13362</tr>
13437<tr> 13363<tr>
 13364<td>PRIVILEGED_STAGES</td>
13438<td>PS</td> 13365<td>PS</td>
13439<td>PTHREAD_AUTO_VARS</td> 
13440</tr> 13366</tr>
13441<tr> 13367<tr>
 13368<td>PTHREAD_AUTO_VARS</td>
13442<td>PTHREAD_CFLAGS</td> 13369<td>PTHREAD_CFLAGS</td>
13443<td>PTHREAD_LDFLAGS</td> 
13444</tr> 13370</tr>
13445<tr> 13371<tr>
 13372<td>PTHREAD_LDFLAGS</td>
13446<td>PTHREAD_LIBS</td> 13373<td>PTHREAD_LIBS</td>
13447<td>PTHREAD_OPTS</td> 
13448</tr> 13374</tr>
13449<tr> 13375<tr>
 13376<td>PTHREAD_OPTS</td>
13450<td>PTHREAD_TYPE</td> 13377<td>PTHREAD_TYPE</td>
13451<td>PVM_SSH</td> 
13452</tr> 13378</tr>
13453<tr> 13379<tr>
 13380<td>PVM_SSH</td>
13454<td>PYPKGPREFIX</td> 13381<td>PYPKGPREFIX</td>
13455<td>PYTHON_FOR_BUILD_ONLY</td> 
13456</tr> 13382</tr>
13457<tr> 13383<tr>
 13384<td>PYTHON_FOR_BUILD_ONLY</td>
13458<td>PYTHON_SELF_CONFLICT</td> 13385<td>PYTHON_SELF_CONFLICT</td>
13459<td>PYTHON_VERSIONED_DEPENDENCIES</td> 
13460</tr> 13386</tr>
13461<tr> 13387<tr>
 13388<td>PYTHON_VERSIONED_DEPENDENCIES</td>
13462<td>PYTHON_VERSIONS_ACCEPTED</td> 13389<td>PYTHON_VERSIONS_ACCEPTED</td>
13463<td>PYTHON_VERSIONS_INCOMPATIBLE</td> 
13464</tr> 13390</tr>
13465<tr> 13391<tr>
 13392<td>PYTHON_VERSIONS_INCOMPATIBLE</td>
13466<td>PYTHON_VERSION_DEFAULT</td> 13393<td>PYTHON_VERSION_DEFAULT</td>
13467<td>PYTHON_VERSION_REQD</td> 
13468</tr> 13394</tr>
13469<tr> 13395<tr>
 13396<td>PYTHON_VERSION_REQD</td>
13470<td>PYVERSSUFFIX</td> 13397<td>PYVERSSUFFIX</td>
13471<td>QMAILDIR</td> 
13472</tr> 13398</tr>
13473<tr> 13399<tr>
 13400<td>QMAILDIR</td>
13474<td>QMAIL_ALIAS_USER</td> 13401<td>QMAIL_ALIAS_USER</td>
13475<td>QMAIL_DAEMON_USER</td> 
13476</tr> 13402</tr>
13477<tr> 13403<tr>
 13404<td>QMAIL_DAEMON_USER</td>
13478<td>QMAIL_LOG_USER</td> 13405<td>QMAIL_LOG_USER</td>
13479<td>QMAIL_NOFILES_GROUP</td> 
13480</tr> 13406</tr>
13481<tr> 13407<tr>
 13408<td>QMAIL_NOFILES_GROUP</td>
13482<td>QMAIL_PASSWD_USER</td> 13409<td>QMAIL_PASSWD_USER</td>
13483<td>QMAIL_QMAIL_GROUP</td> 
13484</tr> 13410</tr>
13485<tr> 13411<tr>
 13412<td>QMAIL_QMAIL_GROUP</td>
13486<td>QMAIL_QUEUE_DIR</td> 13413<td>QMAIL_QUEUE_DIR</td>
13487<td>QMAIL_QUEUE_EXTRA</td> 
13488</tr> 13414</tr>
13489<tr> 13415<tr>
 13416<td>QMAIL_QUEUE_EXTRA</td>
13490<td>QMAIL_QUEUE_USER</td> 13417<td>QMAIL_QUEUE_USER</td>
13491<td>QMAIL_REMOTE_USER</td> 
13492</tr> 13418</tr>
13493<tr> 13419<tr>
 13420<td>QMAIL_REMOTE_USER</td>
13494<td>QMAIL_ROOT_USER</td> 13421<td>QMAIL_ROOT_USER</td>
13495<td>QMAIL_SEND_USER</td> 
13496</tr> 13422</tr>
13497<tr> 13423<tr>
 13424<td>QMAIL_SEND_USER</td>
13498<td>QORE_LATEST_MODULE_API</td> 13425<td>QORE_LATEST_MODULE_API</td>
13499<td>QORE_MODULE_API</td> 
13500</tr> 13426</tr>
13501<tr> 13427<tr>
 13428<td>QORE_MODULE_API</td>
13502<td>QORE_MODULE_DIR</td> 13429<td>QORE_MODULE_DIR</td>
13503<td>QORE_USER_MODULE_DIR</td> 
13504</tr> 13430</tr>
13505<tr> 13431<tr>
 13432<td>QORE_USER_MODULE_DIR</td>
13506<td>QORE_VERSION</td> 13433<td>QORE_VERSION</td>
13507<td>QPOPPER_FAC</td> 
13508</tr> 13434</tr>
13509<tr> 13435<tr>
 13436<td>QPOPPER_FAC</td>
13510<td>QPOPPER_SPOOL_DIR</td> 13437<td>QPOPPER_SPOOL_DIR</td>
13511<td>QPOPPER_USER</td> 
13512</tr> 13438</tr>
13513<tr> 13439<tr>
 13440<td>QPOPPER_USER</td>
13514<td>RAKE_NAME</td> 13441<td>RAKE_NAME</td>
13515<td>RASMOL_DEPTH</td> 
13516</tr> 
13517<tr> 
13518<td>RCD_DIR</td> 
13519<td>RCD_ORDER</td> 
13520</tr> 13442</tr>
13521<tr> 13443<tr>
 13444<td>RASMOL_DEPTH</td>
13522<td>RCD_SCRIPTS</td> 13445<td>RCD_SCRIPTS</td>
13523<td>RCD_SCRIPTS_DIR</td> 
13524</tr> 13446</tr>
13525<tr> 13447<tr>
 13448<td>RCD_SCRIPTS_DIR</td>
13526<td>RCD_SCRIPTS_EXAMPLEDIR</td> 13449<td>RCD_SCRIPTS_EXAMPLEDIR</td>
13527<td>RCD_SCRIPTS_MODE</td> 
13528</tr> 13450</tr>
13529<tr> 13451<tr>
 13452<td>RCD_SCRIPTS_MODE</td>
13530<td>RCD_SCRIPTS_SHELL</td> 13453<td>RCD_SCRIPTS_SHELL</td>
13531<td>RCD_SCRIPT_SRC</td> 
13532</tr> 13454</tr>
13533<tr> 13455<tr>
13534<td>RCD_SUBR</td> 13456<td>RCD_SCRIPT_SRC</td>
13535<td>RDOC</td> 13457<td>RDOC</td>
13536</tr> 13458</tr>
13537<tr> 13459<tr>
13538<td>READLINE_DEFAULT</td> 13460<td>READLINE_DEFAULT</td>
13539<td>READLINE_TYPE</td> 13461<td>READLINE_TYPE</td>
13540</tr> 13462</tr>
13541<tr> 13463<tr>
13542<td>REAL_ROOT_GROUP</td> 13464<td>REAL_ROOT_GROUP</td>
13543<td>REAL_ROOT_USER</td> 13465<td>REAL_ROOT_USER</td>
13544</tr> 13466</tr>
13545<tr> 13467<tr>
13546<td>RECURSIVE_MAKE</td> 13468<td>RECURSIVE_MAKE</td>
13547<td>RELAY_CTRL_DIR</td> 13469<td>RELAY_CTRL_DIR</td>
13548</tr> 13470</tr>
13549<tr> 13471<tr>
13550<td>RELRO_SUPPORTED</td> 13472<td>RELRO_SUPPORTED</td>
13551<td>REPLACE_AWK</td> 13473<td>REPLACE_AWK</td>
13552</tr> 13474</tr>
13553<tr> 13475<tr>
13554<td>REPLACE_BASH</td> 13476<td>REPLACE_BASH</td>
13555<td>REPLACE_CSH</td> 13477<td>REPLACE_CSH</td>
13556</tr> 13478</tr>
13557<tr> 13479<tr>
13558<td>REPLACE_KSH</td> 13480<td>REPLACE_KSH</td>
13559<td>REPLACE_LUA</td> 13481<td>REPLACE_LUA</td>
13560</tr> 13482</tr>
13561<tr> 13483<tr>
13562<td>REPLACE_NODEJS</td> 13484<td>REPLACE_NODEJS</td>
13563<td>REPLACE_OCTAVE</td> 13485<td>REPLACE_OCTAVE</td>
13564</tr> 13486</tr>
13565<tr> 13487<tr>
13566<td>REPLACE_PERL</td> 13488<td>REPLACE_PERL</td>
13567<td>REPLACE_PERL6</td> 13489<td>REPLACE_PERL6</td>
13568</tr> 13490</tr>
13569<tr> 13491<tr>
13570<td>REPLACE_PHP</td> 13492<td>REPLACE_PHP</td>
13571<td>REPLACE_PYTHON</td> 13493<td>REPLACE_PYTHON</td>
13572</tr> 13494</tr>
13573<tr> 13495<tr>
13574<td>REPLACE_QORE</td> 13496<td>REPLACE_QORE</td>
13575<td>REPLACE_R</td> 13497<td>REPLACE_R</td>
13576</tr> 13498</tr>
13577<tr> 13499<tr>
13578<td>REPLACE_RUBY</td> 13500<td>REPLACE_RUBY</td>
13579<td>REPLACE_RUBY_DIRS</td> 13501<td>REPLACE_RUBY_DIRS</td>
13580</tr> 13502</tr>
13581<tr> 13503<tr>
13582<td>REPLACE_RUBY_PAT</td> 13504<td>REPLACE_RUBY_PAT</td>
13583<td>REPLACE_SH</td> 13505<td>REPLACE_SH</td>
13584</tr> 13506</tr>
13585<tr> 13507<tr>
13586<td>REPLACE_TEXLUA</td> 13508<td>REPLACE_TEXLUA</td>
13587<td>REPLACE_WISH</td> 13509<td>REPLACE_WISH</td>
13588</tr> 13510</tr>
13589<tr> 13511<tr>
13590<td>REQD_DIRS</td> 13512<td>REQD_DIRS</td>
13591<td>REQD_DIRS_PERMS</td> 13513<td>REQD_DIRS_PERMS</td>
13592</tr> 13514</tr>
13593<tr> 13515<tr>
13594<td>REQD_FILES</td> 13516<td>REQD_FILES</td>
13595<td>REQD_FILES_MODE</td> 13517<td>REQD_FILES_MODE</td>
13596</tr> 13518</tr>
13597<tr> 13519<tr>
13598<td>REQD_FILES_PERMS</td> 13520<td>REQD_FILES_PERMS</td>
13599<td>RESOLV_AUTO_VARS</td> 13521<td>RESOLV_AUTO_VARS</td>
13600</tr> 13522</tr>
13601<tr> 13523<tr>
13602<td>RESOLV_LDFLAGS</td> 13524<td>RESOLV_LDFLAGS</td>
13603<td>RESOLV_LIBS</td> 13525<td>RESOLV_LIBS</td>
13604</tr> 13526</tr>
13605<tr> 13527<tr>
13606<td>RM</td> 13528<td>RM</td>
13607<td>ROCKSPEC_NAME</td> 
13608</tr> 
13609<tr> 
13610<td>ROCKSPEC_SPECFILE</td> 
13611<td>ROOT_CMD</td> 13529<td>ROOT_CMD</td>
13612</tr> 13530</tr>
13613<tr> 13531<tr>
13614<td>ROOT_GROUP</td> 13532<td>ROOT_GROUP</td>
13615<td>ROOT_USER</td> 13533<td>ROOT_USER</td>
13616</tr> 13534</tr>
13617<tr> 13535<tr>
13618<td>RPCGEN</td> 13536<td>RPCGEN</td>
13619<td>RPM</td> 13537<td>RPM</td>
13620</tr> 13538</tr>
13621<tr> 13539<tr>
13622<td>RPM2PKG_PLIST</td> 13540<td>RPM2PKG_PLIST</td>
13623<td>RPM2PKG_PREFIX</td> 13541<td>RPM2PKG_PREFIX</td>
13624</tr> 13542</tr>
13625<tr> 13543<tr>
13626<td>RPM2PKG_STAGE</td> 13544<td>RPM2PKG_STAGE</td>
13627<td>RPM2PKG_STRIP</td> 13545<td>RPM2PKG_STRIP</td>
13628</tr> 13546</tr>
13629<tr> 13547<tr>
13630<td>RPM2PKG_SUBPREFIX</td> 13548<td>RPM2PKG_SUBPREFIX</td>
13631<td>RPMFILES</td> 13549<td>RPMFILES</td>
13632</tr> 13550</tr>
13633<tr> 13551<tr>
13634<td>RPMIGNOREPATH</td> 13552<td>RPMIGNOREPATH</td>
13635<td>RPM_DB_PREFIX</td> 13553<td>RPM_DB_PREFIX</td>
13636</tr> 13554</tr>
13637<tr> 13555<tr>
13638<td>RSSH_CVS_PATH</td> 13556<td>RSSH_CVS_PATH</td>
13639<td>RSSH_RDIST_PATH</td> 13557<td>RSSH_RDIST_PATH</td>
13640</tr> 13558</tr>
13641<tr> 13559<tr>
13642<td>RSSH_RSYNC_PATH</td> 13560<td>RSSH_RSYNC_PATH</td>
13643<td>RSSH_SCP_PATH</td> 13561<td>RSSH_SCP_PATH</td>
13644</tr> 13562</tr>
13645<tr> 13563<tr>
13646<td>RSSH_SFTP_SERVER_PATH</td> 13564<td>RSSH_SFTP_SERVER_PATH</td>
13647<td>RUBY</td> 13565<td>RUBY</td>
13648</tr> 13566</tr>
13649<tr> 13567<tr>
13650<td>RUBYGEM</td> 13568<td>RUBYGEM</td>
13651<td>RUBYGEM_NAME</td> 13569<td>RUBYGEM_NAME</td>
13652</tr> 13570</tr>
13653<tr> 13571<tr>
13654<td>RUBYGEM_OPTIONS</td> 13572<td>RUBYGEM_OPTIONS</td>
13655<td>RUBYGEM_VERBOSE</td> 13573<td>RUBYGEM_VERBOSE</td>
13656</tr> 13574</tr>
13657<tr> 13575<tr>
13658<td>RUBY_ABI_VERSION</td> 13576<td>RUBY_ABI_VERSION</td>
13659<td>RUBY_ARCH</td> 13577<td>RUBY_ARCH</td>
13660</tr> 13578</tr>
13661<tr> 13579<tr>
13662<td>RUBY_ARCHINC</td> 13580<td>RUBY_ARCHINC</td>
13663<td>RUBY_ARCHLIB</td> 13581<td>RUBY_ARCHLIB</td>
13664</tr> 13582</tr>
13665<tr> 13583<tr>
13666<td>RUBY_BASE</td> 13584<td>RUBY_BASE</td>
13667<td>RUBY_BASERIDIR</td> 13585<td>RUBY_BASERIDIR</td>
13668</tr> 13586</tr>
13669<tr> 13587<tr>
13670<td>RUBY_BUILD_DOCUMENT</td> 13588<td>RUBY_BUILD_DOCUMENT</td>
13671<td>RUBY_DLEXT</td> 13589<td>RUBY_DLEXT</td>
13672</tr> 13590</tr>
13673<tr> 13591<tr>
13674<td>RUBY_DOC</td> 13592<td>RUBY_DOC</td>
13675<td>RUBY_DYNAMIC_DIRS</td> 13593<td>RUBY_DYNAMIC_DIRS</td>
13676</tr> 13594</tr>
13677<tr> 13595<tr>
13678<td>RUBY_EG</td> 13596<td>RUBY_EG</td>
13679<td>RUBY_ENCODING_ARG</td> 13597<td>RUBY_ENCODING_ARG</td>
13680</tr> 13598</tr>
13681<tr> 13599<tr>
13682<td>RUBY_EXTCONF</td> 13600<td>RUBY_EXTCONF</td>
13683<td>RUBY_EXTCONF_CHECK</td> 13601<td>RUBY_EXTCONF_CHECK</td>
13684</tr> 13602</tr>
13685<tr> 13603<tr>
13686<td>RUBY_EXTCONF_DEBUG</td> 13604<td>RUBY_EXTCONF_DEBUG</td>
13687<td>RUBY_EXTCONF_MAKEFILE</td> 13605<td>RUBY_EXTCONF_MAKEFILE</td>
13688</tr> 13606</tr>
13689<tr> 13607<tr>
13690<td>RUBY_GEM_ARCH</td> 13608<td>RUBY_GEM_ARCH</td>
13691<td>RUBY_GEM_BASE</td> 13609<td>RUBY_GEM_BASE</td>
13692</tr> 13610</tr>
13693<tr> 13611<tr>
13694<td>RUBY_INC</td> 13612<td>RUBY_INC</td>
13695<td>RUBY_LIB</td> 13613<td>RUBY_LIB</td>
13696</tr> 13614</tr>
13697<tr> 13615<tr>
13698<td>RUBY_LIB_BASE</td> 13616<td>RUBY_LIB_BASE</td>
13699<td>RUBY_NAME</td> 13617<td>RUBY_NAME</td>
13700</tr> 13618</tr>
13701<tr> 13619<tr>
13702<td>RUBY_NOVERSION</td> 13620<td>RUBY_NOVERSION</td>
13703<td>RUBY_PKGPREFIX</td> 13621<td>RUBY_PKGPREFIX</td>
13704</tr> 13622</tr>
13705<tr> 13623<tr>
13706<td>RUBY_RAILS</td> 13624<td>RUBY_RAILS</td>
13707<td>RUBY_RAILS52_VERSION</td> 13625<td>RUBY_RAILS52_VERSION</td>
13708</tr> 13626</tr>
13709<tr> 13627<tr>
13710<td>RUBY_RAILS60_VERSION</td> 13628<td>RUBY_RAILS60_VERSION</td>
13711<td>RUBY_RAILS61_VERSION</td> 13629<td>RUBY_RAILS61_VERSION</td>
13712</tr> 13630</tr>
13713<tr> 13631<tr>
13714<td>RUBY_RAILS70_VERSION</td> 13632<td>RUBY_RAILS70_VERSION</td>
13715<td>RUBY_RAILS_ACCEPTED</td> 13633<td>RUBY_RAILS_ACCEPTED</td>
13716</tr> 13634</tr>
13717<tr> 13635<tr>
13718<td>RUBY_RAILS_DEFAULT</td> 13636<td>RUBY_RAILS_DEFAULT</td>
13719<td>RUBY_RAILS_REQD</td> 13637<td>RUBY_RAILS_REQD</td>
13720</tr> 13638</tr>
13721<tr> 13639<tr>
13722<td>RUBY_RAILS_STRICT_DEP</td> 13640<td>RUBY_RAILS_STRICT_DEP</td>
13723<td>RUBY_RIDIR</td> 13641<td>RUBY_RIDIR</td>
13724</tr> 13642</tr>
13725<tr> 13643<tr>
13726<td>RUBY_SETUP</td> 13644<td>RUBY_SETUP</td>
13727<td>RUBY_SHLIB</td> 13645<td>RUBY_SHLIB</td>
13728</tr> 13646</tr>
13729<tr> 13647<tr>
13730<td>RUBY_SHLIBALIAS</td> 13648<td>RUBY_SHLIBALIAS</td>
13731<td>RUBY_SHLIBVER</td> 13649<td>RUBY_SHLIBVER</td>
13732</tr> 13650</tr>
13733<tr> 13651<tr>
13734<td>RUBY_SIMPLE_INSTALL</td> 13652<td>RUBY_SIMPLE_INSTALL</td>
13735<td>RUBY_SITEARCHLIB</td> 13653<td>RUBY_SITEARCHLIB</td>
13736</tr> 13654</tr>
13737<tr> 13655<tr>
13738<td>RUBY_SITELIB</td> 13656<td>RUBY_SITELIB</td>
13739<td>RUBY_SITELIB_BASE</td> 13657<td>RUBY_SITELIB_BASE</td>
13740</tr> 13658</tr>
13741<tr> 13659<tr>
13742<td>RUBY_SITERIDIR</td> 13660<td>RUBY_SITERIDIR</td>
13743<td>RUBY_SLEXT</td> 13661<td>RUBY_SLEXT</td>
13744</tr> 13662</tr>
13745<tr> 13663<tr>
13746<td>RUBY_SRCDIR</td> 13664<td>RUBY_SRCDIR</td>
13747<td>RUBY_STATICLIB</td> 13665<td>RUBY_STATICLIB</td>
13748</tr> 13666</tr>
13749<tr> 13667<tr>
13750<td>RUBY_SUFFIX</td> 13668<td>RUBY_SUFFIX</td>
13751<td>RUBY_SYSRIDIR</td> 13669<td>RUBY_SYSRIDIR</td>
13752</tr> 13670</tr>
13753<tr> 13671<tr>
13754<td>RUBY_USE_PTHREAD</td> 13672<td>RUBY_USE_PTHREAD</td>
13755<td>RUBY_VENDORARCHLIB</td> 13673<td>RUBY_VENDORARCHLIB</td>
13756</tr> 13674</tr>
13757<tr> 13675<tr>
13758<td>RUBY_VENDORLIB</td> 13676<td>RUBY_VENDORLIB</td>
13759<td>RUBY_VENDORLIB_BASE</td> 13677<td>RUBY_VENDORLIB_BASE</td>
13760</tr> 13678</tr>
13761<tr> 13679<tr>
13762<td>RUBY_VER</td> 13680<td>RUBY_VER</td>
13763<td>RUBY_VERSION</td> 13681<td>RUBY_VERSION</td>
13764</tr> 13682</tr>
13765<tr> 13683<tr>
13766<td>RUBY_VERSIONS_ACCEPTED</td> 13684<td>RUBY_VERSIONS_ACCEPTED</td>
13767<td>RUBY_VERSIONS_INCOMPATIBLE</td> 13685<td>RUBY_VERSIONS_INCOMPATIBLE</td>
13768</tr> 13686</tr>
13769<tr> 13687<tr>
13770<td>RUBY_VERSION_DEFAULT</td> 13688<td>RUBY_VERSION_DEFAULT</td>
13771<td>RUBY_VERSION_REQD</td> 13689<td>RUBY_VERSION_REQD</td>
13772</tr> 13690</tr>
13773<tr> 13691<tr>
13774<td>RUBY_VER_DIR</td> 13692<td>RUBY_VER_DIR</td>
13775<td>RUN</td> 13693<td>RUN</td>
13776</tr> 13694</tr>
13777<tr> 13695<tr>
13778<td>RUN_LDCONFIG</td> 13696<td>RUN_LDCONFIG</td>
13779<td>RUST_TYPE</td> 13697<td>RUST_TYPE</td>
13780</tr> 13698</tr>
13781<tr> 13699<tr>
13782<td>SCO</td> 13700<td>SCO</td>
13783<td>SCREWS_GROUP</td> 13701<td>SCREWS_GROUP</td>
13784</tr> 13702</tr>
13785<tr> 13703<tr>
13786<td>SCREWS_USER</td> 13704<td>SCREWS_USER</td>
13787<td>SCRIPTS_ENV</td> 13705<td>SCRIPTS_ENV</td>
13788</tr> 13706</tr>
13789<tr> 13707<tr>
13790<td>SCROLLKEEPER_DATADIR</td> 13708<td>SCROLLKEEPER_DATADIR</td>
13791<td>SCROLLKEEPER_REBUILDDB</td> 13709<td>SCROLLKEEPER_REBUILDDB</td>
13792</tr> 13710</tr>
13793<tr> 13711<tr>
13794<td>SCROLLKEEPER_UPDATEDB</td> 13712<td>SCROLLKEEPER_UPDATEDB</td>
13795<td>SDIST_PAWD</td> 13713<td>SDIST_PAWD</td>
13796</tr> 13714</tr>
13797<tr> 13715<tr>
13798<td>SDL12_TYPE</td> 13716<td>SDL12_TYPE</td>
13799<td>SERIAL_DEVICES</td> 13717<td>SERIAL_DEVICES</td>
13800</tr> 13718</tr>
13801<tr> 13719<tr>
13802<td>SETGIDGAME</td> 13720<td>SETGIDGAME</td>
13803<td>SETGID_GAMES_PERMS</td> 13721<td>SETGID_GAMES_PERMS</td>
13804</tr> 13722</tr>
13805<tr> 13723<tr>
13806<td>SETUID_ROOT_PERMS</td> 13724<td>SETUID_ROOT_PERMS</td>
13807<td>SH</td> 13725<td>SH</td>
13808</tr> 13726</tr>
13809<tr> 13727<tr>
13810<td>SHLIB</td> 13728<td>SHLIB</td>
13811<td>SHORTNAME</td> 
13812</tr> 
13813<tr> 
13814<td>SIGN_PACKAGES</td> 13729<td>SIGN_PACKAGES</td>
13815<td>SILC_CLIENT_WITH_PERL</td> 
13816</tr> 13730</tr>
13817<tr> 13731<tr>
 13732<td>SILC_CLIENT_WITH_PERL</td>
13818<td>SITE_SPECIFIC_PKGS</td> 13733<td>SITE_SPECIFIC_PKGS</td>
13819<td>SKIP_DEPENDS</td> 
13820</tr> 13734</tr>
13821<tr> 13735<tr>
 13736<td>SKIP_DEPENDS</td>
13822<td>SMF_INSTANCES</td> 13737<td>SMF_INSTANCES</td>
13823<td>SMF_MANIFEST</td> 
13824</tr> 13738</tr>
13825<tr> 13739<tr>
 13740<td>SMF_MANIFEST</td>
13826<td>SMF_METHODS</td> 13741<td>SMF_METHODS</td>
13827<td>SMF_METHOD_SHELL</td> 
13828</tr> 13742</tr>
13829<tr> 13743<tr>
 13744<td>SMF_METHOD_SHELL</td>
13830<td>SMF_METHOD_SRC</td> 13745<td>SMF_METHOD_SRC</td>
13831<td>SMF_NAME</td> 
13832</tr> 13746</tr>
13833<tr> 13747<tr>
 13748<td>SMF_NAME</td>
13834<td>SMF_PREFIX</td> 13749<td>SMF_PREFIX</td>
13835<td>SMF_SRCDIR</td> 
13836</tr> 13750</tr>
13837<tr> 13751<tr>
 13752<td>SMF_SRCDIR</td>
13838<td>SNIPROXY_GROUP</td> 13753<td>SNIPROXY_GROUP</td>
13839<td>SNIPROXY_USER</td> 
13840</tr> 13754</tr>
13841<tr> 13755<tr>
 13756<td>SNIPROXY_USER</td>
13842<td>SOURCE_BUFFSIZE</td> 13757<td>SOURCE_BUFFSIZE</td>
13843<td>SPECIAL_PERMS</td> 
13844</tr> 13758</tr>
13845<tr> 13759<tr>
 13760<td>SPECIAL_PERMS</td>
13846<td>SPECIFIC_PKGS</td> 13761<td>SPECIFIC_PKGS</td>
13847<td>SSH_SUID</td> 
13848</tr> 13762</tr>
13849<tr> 13763<tr>
 13764<td>SSH_SUID</td>
13850<td>SSP_SUPPORTED</td> 13765<td>SSP_SUPPORTED</td>
13851<td>SSYNC_PAWD</td> 
13852</tr> 13766</tr>
13853<tr> 13767<tr>
 13768<td>SSYNC_PAWD</td>
13854<td>STEP_MSG</td> 13769<td>STEP_MSG</td>
13855<td>STRIP</td> 
13856</tr> 13770</tr>
13857<tr> 13771<tr>
 13772<td>STRIP</td>
13858<td>STRIP_DBG</td> 13773<td>STRIP_DBG</td>
13859<td>STRIP_DEBUG</td> 
13860</tr> 13774</tr>
13861<tr> 13775<tr>
 13776<td>STRIP_DEBUG</td>
13862<td>STRIP_DEBUG_SUPPORTED</td> 13777<td>STRIP_DEBUG_SUPPORTED</td>
13863<td>STRIP_FILES_SKIP</td> 
13864</tr> 13778</tr>
13865<tr> 13779<tr>
 13780<td>STRIP_FILES_SKIP</td>
13866<td>SU</td> 13781<td>SU</td>
13867<td>SUBDIR</td> 
13868</tr> 13782</tr>
13869<tr> 13783<tr>
 13784<td>SUBDIR</td>
13870<td>SUBST</td> 13785<td>SUBST</td>
13871<td>SUBST_CLASSES</td> 
13872</tr> 13786</tr>
13873<tr> 13787<tr>
 13788<td>SUBST_CLASSES</td>
13874<td>SUBST_FILES</td> 13789<td>SUBST_FILES</td>
13875<td>SUBST_FILTER_CMD</td> 
13876</tr> 13790</tr>
13877<tr> 13791<tr>
 13792<td>SUBST_FILTER_CMD</td>
13878<td>SUBST_MESSAGE</td> 13793<td>SUBST_MESSAGE</td>
13879<td>SUBST_NOOP_OK</td> 
13880</tr> 13794</tr>
13881<tr> 13795<tr>
 13796<td>SUBST_NOOP_OK</td>
13882<td>SUBST_SED</td> 13797<td>SUBST_SED</td>
13883<td>SUBST_SHOW_DIFF</td> 
13884</tr> 13798</tr>
13885<tr> 13799<tr>
 13800<td>SUBST_SHOW_DIFF</td>
13886<td>SUBST_SKIP_TEXT_CHECK</td> 13801<td>SUBST_SKIP_TEXT_CHECK</td>
13887<td>SUBST_STAGE</td> 
13888</tr> 13802</tr>
13889<tr> 13803<tr>
 13804<td>SUBST_STAGE</td>
13890<td>SUBST_VARS</td> 13805<td>SUBST_VARS</td>
13891<td>SUNWSPROBASE</td> 
13892</tr> 13806</tr>
13893<tr> 13807<tr>
 13808<td>SUNWSPROBASE</td>
13894<td>SUSE_PREFER</td> 13809<td>SUSE_PREFER</td>
13895<td>SU_CMD</td> 
13896</tr> 
13897<tr> 
13898<td>SVN_EXTRACTDIR</td> 
13899<td>SVN_REPO</td> 
13900</tr> 
13901<tr> 
13902<td>SVN_REPOSITORIES</td> 
13903<td>SVN_REVISION</td> 
13904</tr> 13810</tr>
13905<tr> 13811<tr>
 13812<td>SU_CMD</td>
13906<td>SYSCONFBASE</td> 13813<td>SYSCONFBASE</td>
13907<td>TARGET_ARCH</td> 
13908</tr> 13814</tr>
13909<tr> 13815<tr>
 13816<td>TARGET_ARCH</td>
13910<td>TBL</td> 13817<td>TBL</td>
13911<td>TERMCAP_TYPE</td> 
13912</tr> 13818</tr>
13913<tr> 13819<tr>
 13820<td>TERMCAP_TYPE</td>
13914<td>TERMINFO_DEFAULT</td> 13821<td>TERMINFO_DEFAULT</td>
13915<td>TERMINFO_TYPE</td> 
13916</tr> 13822</tr>
13917<tr> 13823<tr>
 13824<td>TERMINFO_TYPE</td>
13918<td>TEST</td> 13825<td>TEST</td>
13919<td>TEST_DEPENDS</td> 
13920</tr> 13826</tr>
13921<tr> 13827<tr>
 13828<td>TEST_DEPENDS</td>
13922<td>TEST_DIRS</td> 13829<td>TEST_DIRS</td>
13923<td>TEST_ENV</td> 
13924</tr> 13830</tr>
13925<tr> 13831<tr>
 13832<td>TEST_ENV</td>
13926<td>TEST_ENV_SHELL</td> 13833<td>TEST_ENV_SHELL</td>
13927<td>TEST_MAKE_CMD</td> 
13928</tr> 13834</tr>
13929<tr> 13835<tr>
 13836<td>TEST_MAKE_CMD</td>
13930<td>TEST_MAKE_FLAGS</td> 13837<td>TEST_MAKE_FLAGS</td>
13931<td>TEST_TARGET</td> 
13932</tr> 13838</tr>
13933<tr> 13839<tr>
 13840<td>TEST_TARGET</td>
13934<td>TEXLIVE_IGNORE_PATTERNS</td> 13841<td>TEXLIVE_IGNORE_PATTERNS</td>
13935<td>TEXLIVE_REV</td> 
13936</tr> 13842</tr>
13937<tr> 13843<tr>
 13844<td>TEXLIVE_REV</td>
13938<td>TEXLIVE_UNVERSIONED</td> 13845<td>TEXLIVE_UNVERSIONED</td>
13939<td>TEXMFSITE</td> 
13940</tr> 13846</tr>
13941<tr> 13847<tr>
 13848<td>TEXMFSITE</td>
13942<td>TEX_FORMATS</td> 13849<td>TEX_FORMATS</td>
13943<td>TEX_HYPHEN_DAT</td> 
13944</tr> 13850</tr>
13945<tr> 13851<tr>
 13852<td>TEX_HYPHEN_DAT</td>
13946<td>TEX_HYPHEN_DEF</td> 13853<td>TEX_HYPHEN_DEF</td>
13947<td>TEX_TEXMF_DIRS</td> 
13948</tr> 13854</tr>
13949<tr> 13855<tr>
 13856<td>TEX_TEXMF_DIRS</td>
13950<td>THTTPD_LOG_FACILITY</td> 13857<td>THTTPD_LOG_FACILITY</td>
13951<td>TINYDYN_USER</td> 
13952</tr> 13858</tr>
13953<tr> 13859<tr>
 13860<td>TINYDYN_USER</td>
13954<td>TLSWRAPPER_CHROOT</td> 13861<td>TLSWRAPPER_CHROOT</td>
13955<td>TO</td> 
13956</tr> 13862</tr>
13957<tr> 13863<tr>
 13864<td>TO</td>
13958<td>TOOLS_ALIASES</td> 13865<td>TOOLS_ALIASES</td>
13959<td>TOOLS_ALWAYS_WRAP</td> 
13960</tr> 13866</tr>
13961<tr> 13867<tr>
 13868<td>TOOLS_ALWAYS_WRAP</td>
13962<td>TOOLS_ARGS</td> 13869<td>TOOLS_ARGS</td>
13963<td>TOOLS_BROKEN</td> 
13964</tr> 13870</tr>
13965<tr> 13871<tr>
 13872<td>TOOLS_BROKEN</td>
13966<td>TOOLS_CMD</td> 13873<td>TOOLS_CMD</td>
13967<td>TOOLS_CMDLINE_SED</td> 
13968</tr> 13874</tr>
13969<tr> 13875<tr>
 13876<td>TOOLS_CMDLINE_SED</td>
13970<td>TOOLS_CREATE</td> 13877<td>TOOLS_CREATE</td>
13971<td>TOOLS_CROSS_DESTDIR</td> 
13972</tr> 13878</tr>
13973<tr> 13879<tr>
 13880<td>TOOLS_CROSS_DESTDIR</td>
13974<td>TOOLS_DIR</td> 13881<td>TOOLS_DIR</td>
13975<td>TOOLS_FAIL</td> 
13976</tr> 13882</tr>
13977<tr> 13883<tr>
 13884<td>TOOLS_FAIL</td>
13978<td>TOOLS_GNU_MISSING</td> 13885<td>TOOLS_GNU_MISSING</td>
13979<td>TOOLS_LDCONFIG</td> 
13980</tr> 13886</tr>
13981<tr> 13887<tr>
 13888<td>TOOLS_LDCONFIG</td>
13982<td>TOOLS_NOOP</td> 13889<td>TOOLS_NOOP</td>
13983<td>TOOLS_PATH</td> 
13984</tr> 13890</tr>
13985<tr> 13891<tr>
 13892<td>TOOLS_PATH</td>
13986<td>TOOLS_SCRIPT</td> 13893<td>TOOLS_SCRIPT</td>
13987<td>TOOLS_USE_CROSS_COMPILE</td> 
13988</tr> 13894</tr>
13989<tr> 13895<tr>
 13896<td>TOOLS_USE_CROSS_COMPILE</td>
13990<td>TOOL_DEPENDS</td> 13897<td>TOOL_DEPENDS</td>
13991<td>TTF_FONTDIR</td> 
13992</tr> 13898</tr>
13993<tr> 13899<tr>
13994<td>TTF_FONTS_DIR</td> 13900<td>TTF_FONTS_DIR</td>
13995<td>TYPE</td> 13901<td>TYPE</td>
13996</tr> 13902</tr>
13997<tr> 13903<tr>
13998<td>UAC_REQD_EXECS</td> 13904<td>UAC_REQD_EXECS</td>
13999<td>UCSPI_SSL_GROUP</td> 13905<td>UCSPI_SSL_GROUP</td>
14000</tr> 13906</tr>
14001<tr> 13907<tr>
14002<td>UCSPI_SSL_USER</td> 13908<td>UCSPI_SSL_USER</td>
14003<td>UNLIMIT_RESOURCES</td> 13909<td>UNLIMIT_RESOURCES</td>
14004</tr> 13910</tr>
14005<tr> 13911<tr>
14006<td>UNPRIVILEGED</td> 13912<td>UNPRIVILEGED</td>
14007<td>UNPRIVILEGED_GROUP</td> 13913<td>UNPRIVILEGED_GROUP</td>
14008</tr> 13914</tr>
14009<tr> 13915<tr>
14010<td>UNPRIVILEGED_GROUPS</td> 13916<td>UNPRIVILEGED_GROUPS</td>
14011<td>UNPRIVILEGED_USER</td> 13917<td>UNPRIVILEGED_USER</td>
14012</tr> 13918</tr>
14013<tr> 13919<tr>
14014<td>UNWRAP_FILES</td> 13920<td>UNWRAP_FILES</td>
14015<td>UNWRAP_PATTERNS</td> 13921<td>UNWRAP_PATTERNS</td>
14016</tr> 13922</tr>
14017<tr> 13923<tr>
14018<td>UPDATE_GEMSPEC</td> 13924<td>UPDATE_GEMSPEC</td>
14019<td>UPDATE_TARGET</td> 13925<td>UPDATE_TARGET</td>
14020</tr> 13926</tr>
14021<tr> 13927<tr>
14022<td>URI</td> 13928<td>URI</td>
14023<td>USERGROUP_PHASE</td> 13929<td>USERGROUP_PHASE</td>
14024</tr> 13930</tr>
14025<tr> 13931<tr>
14026<td>USERPPP_GROUP</td> 13932<td>USERPPP_GROUP</td>
14027<td>USER_SPECIFIC_PKGS</td> 13933<td>USER_SPECIFIC_PKGS</td>
14028</tr> 13934</tr>
14029<tr> 13935<tr>
14030<td>USE_ABI_DEPENDS</td> 13936<td>USE_ABI_DEPENDS</td>
14031<td>USE_APR</td> 13937<td>USE_APR</td>
14032</tr> 13938</tr>
14033<tr> 13939<tr>
14034<td>USE_BSD_MAKEFILE</td> 13940<td>USE_BSD_MAKEFILE</td>
14035<td>USE_BUILTIN</td> 13941<td>USE_BUILTIN</td>
14036</tr> 13942</tr>
14037<tr> 13943<tr>
14038<td>USE_CROSS_COMPILE</td> 13944<td>USE_CROSS_COMPILE</td>
14039<td>USE_CURSES</td> 13945<td>USE_CURSES</td>
14040</tr> 13946</tr>
14041<tr> 13947<tr>
14042<td>USE_CWRAPPERS</td> 13948<td>USE_CWRAPPERS</td>
14043<td>USE_DB185</td> 13949<td>USE_DB185</td>
14044</tr> 13950</tr>
14045<tr> 13951<tr>
14046<td>USE_FEATURES</td> 13952<td>USE_FEATURES</td>
14047<td>USE_GAMESGROUP</td> 13953<td>USE_GAMESGROUP</td>
14048</tr> 13954</tr>
14049<tr> 13955<tr>
14050<td>USE_GCC_RUNTIME</td> 13956<td>USE_GCC_RUNTIME</td>
14051<td>USE_IMAKE</td> 13957<td>USE_IMAKE</td>
14052</tr> 13958</tr>
14053<tr> 13959<tr>
14054<td>USE_JAVA</td> 13960<td>USE_JAVA</td>
14055<td>USE_JAVA2</td> 13961<td>USE_JAVA2</td>
14056</tr> 13962</tr>
14057<tr> 13963<tr>
14058<td>USE_LANGUAGES</td> 13964<td>USE_LANGUAGES</td>
14059<td>USE_LIBTOOL</td> 13965<td>USE_LIBTOOL</td>
14060</tr> 13966</tr>
14061<tr> 13967<tr>
14062<td>USE_NATIVE_GCC</td> 13968<td>USE_NATIVE_GCC</td>
14063<td>USE_NETBSD_REPO</td> 13969<td>USE_NETBSD_REPO</td>
14064</tr> 13970</tr>
14065<tr> 13971<tr>
14066<td>USE_PKGSRC_GCC</td> 13972<td>USE_PKGSRC_GCC</td>
14067<td>USE_PKGSRC_GCC_RUNTIME</td> 13973<td>USE_PKGSRC_GCC_RUNTIME</td>
14068</tr> 13974</tr>
14069<tr> 13975<tr>
14070<td>USE_PKGTASKS</td> 13976<td>USE_PKGTASKS</td>
14071<td>USE_PKG_ADMIN_DIGEST</td> 13977<td>USE_PKG_ADMIN_DIGEST</td>
14072</tr> 13978</tr>
14073<tr> 13979<tr>
14074<td>USE_RUBY_EXTCONF</td> 13980<td>USE_RUBY_EXTCONF</td>
14075<td>USE_RUBY_INSTALL</td> 13981<td>USE_RUBY_INSTALL</td>
14076</tr> 13982</tr>
14077<tr> 13983<tr>
14078<td>USE_RUBY_SETUP</td> 13984<td>USE_RUBY_SETUP</td>
14079<td>USE_RUBY_SETUP_PKG</td> 13985<td>USE_RUBY_SETUP_PKG</td>
14080</tr> 13986</tr>
14081<tr> 13987<tr>
14082<td>USE_TOOLS</td> 13988<td>USE_TOOLS</td>
14083<td>UUCP_GROUP</td> 13989<td>UUCP_GROUP</td>
14084</tr> 13990</tr>
14085<tr> 13991<tr>
14086<td>UUCP_USER</td> 13992<td>UUCP_USER</td>
14087<td>VARBASE</td> 13993<td>VARBASE</td>
14088</tr> 13994</tr>
14089<tr> 13995<tr>
14090<td>VARNAME</td> 13996<td>VARNAME</td>
14091<td>VIM_EXTRA_OPTS</td> 13997<td>VIM_EXTRA_OPTS</td>
14092</tr> 13998</tr>
14093<tr> 13999<tr>
14094<td>WARNING_MSG</td> 14000<td>WARNING_MSG</td>
14095<td>WCALC_CGIDIR</td> 14001<td>WCALC_CGIDIR</td>
14096</tr> 14002</tr>
14097<tr> 14003<tr>
14098<td>WCALC_CGIPATH</td> 14004<td>WCALC_CGIPATH</td>
14099<td>WCALC_HTMLDIR</td> 14005<td>WCALC_HTMLDIR</td>
14100</tr> 14006</tr>
14101<tr> 14007<tr>
14102<td>WCALC_HTMLPATH</td> 14008<td>WCALC_HTMLPATH</td>
14103<td>WDM_MANAGERS</td> 14009<td>WDM_MANAGERS</td>
14104</tr> 14010</tr>
14105<tr> 14011<tr>
14106<td>WRAPPER_CC</td> 14012<td>WRAPPER_CC</td>
14107<td>WRAPPER_REORDER_CMDS</td> 14013<td>WRAPPER_REORDER_CMDS</td>
14108</tr> 14014</tr>
14109<tr> 14015<tr>
14110<td>WRKDIR</td> 14016<td>WRKDIR</td>
14111<td>WRKDIR_BASENAME</td> 14017<td>WRKDIR_BASENAME</td>
14112</tr> 14018</tr>
14113<tr> 14019<tr>
14114<td>WRKDIR_LOCKTYPE</td> 14020<td>WRKDIR_LOCKTYPE</td>
14115<td>WRKLOG</td> 14021<td>WRKLOG</td>
14116</tr> 14022</tr>
14117<tr> 14023<tr>
14118<td>WRKOBJDIR</td> 14024<td>WRKOBJDIR</td>
14119<td>WRKSRC</td> 14025<td>WRKSRC</td>
14120</tr> 14026</tr>
14121<tr> 14027<tr>
14122<td>X10_PORT</td> 14028<td>X10_PORT</td>
14123<td>X11</td> 14029<td>X11</td>
14124</tr> 14030</tr>
14125<tr> 14031<tr>
14126<td>X11BASE</td> 14032<td>X11BASE</td>
14127<td>X11_PKGSRCDIR</td> 14033<td>X11_PKGSRCDIR</td>
14128</tr> 14034</tr>
14129<tr> 14035<tr>
14130<td>X11_TYPE</td> 14036<td>X11_TYPE</td>
14131<td>X509_CERTIFICATE</td> 14037<td>X509_CERTIFICATE</td>
14132</tr> 14038</tr>
14133<tr> 14039<tr>
14134<td>X509_KEY</td> 14040<td>X509_KEY</td>
14135<td>XAW_TYPE</td> 14041<td>XAW_TYPE</td>
14136</tr> 14042</tr>
14137<tr> 14043<tr>
14138<td>XLOCK_DEFAULT_MODE</td> 14044<td>XLOCK_DEFAULT_MODE</td>
14139<td>XMKMF</td> 14045<td>XMKMF</td>
14140</tr> 14046</tr>
14141<tr> 14047<tr>
14142<td>XMKMF_FLAGS</td> 14048<td>XMKMF_FLAGS</td>
14143<td>XXX</td> 14049<td>XXX</td>
14144</tr> 14050</tr>
14145<tr> 14051<tr>
14146<td>XXXX</td> 
14147<td>YES</td> 14052<td>YES</td>
14148</tr> 
14149<tr> 
14150<td>ZSH_STATIC</td> 14053<td>ZSH_STATIC</td>
14151<td>__stdc__</td> 
14152</tr> 14054</tr>
14153<tr> 14055<tr>
 14056<td>__stdc__</td>
14154<td>_vargroups</td> 14057<td>_vargroups</td>
14155<td>accept</td> 
14156</tr> 14058</tr>
14157<tr> 14059<tr>
 14060<td>accept</td>
14158<td>acquire-localbase-lock</td> 14061<td>acquire-localbase-lock</td>
14159<td>acquire-lock</td> 
14160</tr> 14062</tr>
14161<tr> 14063<tr>
 14064<td>acquire-lock</td>
14162<td>add</td> 14065<td>add</td>
14163<td>added</td> 
14164</tr> 14066</tr>
14165<tr> 14067<tr>
 14068<td>added</td>
14166<td>administrator</td> 14069<td>administrator</td>
14167<td>alloca</td> 
14168</tr> 14070</tr>
14169<tr> 14071<tr>
 14072<td>alloca</td>
14170<td>alternatives</td> 14073<td>alternatives</td>
14171<td>aslr</td> 
14172</tr> 14074</tr>
14173<tr> 14075<tr>
 14076<td>aslr</td>
14174<td>asprintf</td> 14077<td>asprintf</td>
14175<td>atlas</td> 
14176</tr> 14078</tr>
14177<tr> 14079<tr>
 14080<td>atlas</td>
14178<td>autoconf</td> 14081<td>autoconf</td>
14179<td>automake</td> 
14180</tr> 14082</tr>
14181<tr> 14083<tr>
 14084<td>automake</td>
14182<td>autoreconf</td> 14085<td>autoreconf</td>
14183<td>awk</td> 
14184</tr> 14086</tr>
14185<tr> 14087<tr>
 14088<td>awk</td>
14186<td>bash</td> 14089<td>bash</td>
14187<td>big-endian</td> 
14188</tr> 14090</tr>
14189<tr> 14091<tr>
 14092<td>big-endian</td>
14190<td>bin-install</td> 14093<td>bin-install</td>
14191<td>bind</td> 
14192</tr> 14094</tr>
14193<tr> 14095<tr>
 14096<td>bind</td>
14194<td>binpkg-list</td> 14097<td>binpkg-list</td>
14195<td>blas</td> 
14196</tr> 14098</tr>
14197<tr> 14099<tr>
 14100<td>blas</td>
14198<td>bootstrap-depends</td> 14101<td>bootstrap-depends</td>
14199<td>broken</td> 
14200</tr> 14102</tr>
14201<tr> 14103<tr>
 14104<td>broken</td>
14202<td>broken_on_platform</td> 14105<td>broken_on_platform</td>
14203<td>bsd</td> 
14204</tr> 14106</tr>
14205<tr> 14107<tr>
 14108<td>bsd</td>
14206<td>bsd.prog.mk</td> 14109<td>bsd.prog.mk</td>
14207<td>build</td> 
14208</tr> 14110</tr>
14209<tr> 14111<tr>
 14112<td>build</td>
14210<td>build-env</td> 14113<td>build-env</td>
14211<td>buildlink-directories</td> 
14212</tr> 14114</tr>
14213<tr> 14115<tr>
 14116<td>buildlink-directories</td>
14214<td>buildlink-oss-soundcard-h</td> 14117<td>buildlink-oss-soundcard-h</td>
14215<td>c</td> 
14216</tr> 14118</tr>
14217<tr> 14119<tr>
 14120<td>c</td>
14218<td>c++</td> 14121<td>c++</td>
14219<td>ccache</td> 
14220</tr> 14122</tr>
14221<tr> 14123<tr>
 14124<td>ccache</td>
14222<td>cce</td> 14125<td>cce</td>
14223<td>cdefs</td> 
14224</tr> 14126</tr>
14225<tr> 14127<tr>
 14128<td>cdefs</td>
14226<td>ceil</td> 14129<td>ceil</td>
14227<td>changes</td> 
14228</tr> 14130</tr>
14229<tr> 14131<tr>
 14132<td>changes</td>
14230<td>changes-entry</td> 14133<td>changes-entry</td>
14231<td>changes-entry-noupdate</td> 
14232</tr> 14134</tr>
14233<tr> 14135<tr>
 14136<td>changes-entry-noupdate</td>
14234<td>check</td> 14137<td>check</td>
14235<td>check-clean</td> 
14236</tr> 14138</tr>
14237<tr> 14139<tr>
 14140<td>check-clean</td>
14238<td>check-files</td> 14141<td>check-files</td>
14239<td>check-files-clean</td> 
14240</tr> 14142</tr>
14241<tr> 14143<tr>
 14144<td>check-files-clean</td>
14242<td>check-vulnerable</td> 14145<td>check-vulnerable</td>
14243<td>checksum</td> 
14244</tr> 14146</tr>
14245<tr> 14147<tr>
 14148<td>checksum</td>
14246<td>checksum-phase</td> 14149<td>checksum-phase</td>
14247<td>clean</td> 
14248</tr> 14150</tr>
14249<tr> 14151<tr>
 14152<td>clean</td>
14250<td>clean-depends</td> 14153<td>clean-depends</td>
14251<td>cleandir</td> 
14252</tr> 14154</tr>
14253<tr> 14155<tr>
 14156<td>cleandir</td>
14254<td>commit</td> 14157<td>commit</td>
14255<td>commit-changes-entry</td> 
14256</tr> 14158</tr>
14257<tr> 14159<tr>
 14160<td>commit-changes-entry</td>
14258<td>compact</td> 14161<td>compact</td>
14259<td>compiler</td> 
14260</tr> 14162</tr>
14261<tr> 14163<tr>
 14164<td>compiler</td>
14262<td>conf</td> 14165<td>conf</td>
14263<td>config.guess</td> 
14264</tr> 14166</tr>
14265<tr> 14167<tr>
 14168<td>config.guess</td>
14266<td>config.sub</td> 14169<td>config.sub</td>
14267<td>configuration</td> 
14268</tr> 14170</tr>
14269<tr> 14171<tr>
 14172<td>configuration</td>
14270<td>configure</td> 14173<td>configure</td>
14271<td>configure-env</td> 
14272</tr> 14174</tr>
14273<tr> 14175<tr>
 14176<td>configure-env</td>
14274<td>configure-help</td> 14177<td>configure-help</td>
14275<td>configure_args</td> 
14276</tr> 14178</tr>
14277<tr> 14179<tr>
 14180<td>configure_args</td>
14278<td>connect</td> 14181<td>connect</td>
14279<td>cos</td> 
14280</tr> 14182</tr>
14281<tr> 14183<tr>
 14184<td>cos</td>
14282<td>cputime</td> 14185<td>cputime</td>
14283<td>create-usergroup</td> 
14284</tr> 14186</tr>
14285<tr> 14187<tr>
 14188<td>create-usergroup</td>
14286<td>csh</td> 14189<td>csh</td>
14287<td>ctf</td> 
14288</tr> 14190</tr>
14289<tr> 14191<tr>
14290<td>cvs</td> 14192<td>ctf</td>
14291<td>debug</td> 14193<td>debug</td>
14292</tr> 14194</tr>
14293<tr> 14195<tr>
14294<td>declaration</td> 14196<td>declaration</td>
14295<td>declare</td> 14197<td>declare</td>
14296</tr> 14198</tr>
14297<tr> 14199<tr>
14298<td>defined</td> 14200<td>defined</td>
14299<td>depend</td> 14201<td>depend</td>
14300</tr> 14202</tr>
14301<tr> 14203<tr>
14302<td>dependencies</td> 14204<td>dependencies</td>
14303<td>depends</td> 14205<td>depends</td>
14304</tr> 14206</tr>
14305<tr> 14207<tr>
14306<td>depends-checksum</td> 14208<td>depends-checksum</td>
14307<td>depends-fetch</td> 14209<td>depends-fetch</td>
14308</tr> 14210</tr>
14309<tr> 14211<tr>
14310<td>deps</td> 14212<td>deps</td>
14311<td>describe</td> 14213<td>describe</td>
14312</tr> 14214</tr>
14313<tr> 14215<tr>
14314<td>destdir</td> 14216<td>destdir</td>
14315<td>disable</td> 14217<td>disable</td>
14316</tr> 14218</tr>
14317<tr> 14219<tr>
14318<td>distclean</td> 14220<td>distclean</td>
14319<td>distinfo</td> 14221<td>distinfo</td>
14320</tr> 14222</tr>
14321<tr> 14223<tr>
14322<td>dl</td> 14224<td>dl</td>
14323<td>dlopen</td> 14225<td>dlopen</td>
14324</tr> 14226</tr>
14325<tr> 14227<tr>
14326<td>do-buildlink</td> 14228<td>do-buildlink</td>
14327<td>do-clean</td> 14229<td>do-clean</td>
14328</tr> 14230</tr>
14329<tr> 14231<tr>
14330<td>do-configure</td> 14232<td>do-configure</td>
14331<td>do-configure-post-hook</td> 14233<td>do-configure-post-hook</td>
14332</tr> 14234</tr>
14333<tr> 14235<tr>
14334<td>do-extract</td> 14236<td>do-extract</td>
14335<td>do-fetch</td> 14237<td>do-fetch</td>
14336</tr> 14238</tr>
14337<tr> 14239<tr>
14338<td>do-install</td> 14240<td>do-install</td>
14339<td>emul</td> 14241<td>emul</td>
14340</tr> 14242</tr>
14341<tr> 14243<tr>
14342<td>emul-distinfo</td> 14244<td>emul-distinfo</td>
14343<td>emul-fetch</td> 14245<td>emul-fetch</td>
14344</tr> 14246</tr>
14345<tr> 14247<tr>
14346<td>emulation</td> 14248<td>emulation</td>
14347<td>emulator</td> 14249<td>emulator</td>
14348</tr> 14250</tr>
14349<tr> 14251<tr>
14350<td>enable</td> 14252<td>enable</td>
14351<td>endian</td> 14253<td>endian</td>
14352</tr> 14254</tr>
14353<tr> 14255<tr>
14354<td>endif</td> 
14355<td>enomem</td> 14256<td>enomem</td>
14356</tr> 
14357<tr> 
14358<td>ensurepip</td> 14257<td>ensurepip</td>
14359<td>err</td> 
14360</tr> 14258</tr>
14361<tr> 14259<tr>
 14260<td>err</td>
14362<td>errx</td> 14261<td>errx</td>
14363<td>etc</td> 
14364</tr> 14262</tr>
14365<tr> 14263<tr>
 14264<td>etc</td>
14366<td>exp</td> 14265<td>exp</td>
14367<td>extract-rpm</td> 
14368</tr> 14266</tr>
14369<tr> 14267<tr>
 14268<td>extract-rpm</td>
14370<td>fabs</td> 14269<td>fabs</td>
14371<td>feature</td> 
14372</tr> 14270</tr>
14373<tr> 14271<tr>
 14272<td>feature</td>
14374<td>features</td> 14273<td>features</td>
14375<td>fetch</td> 
14376</tr> 14274</tr>
14377<tr> 14275<tr>
 14276<td>fetch</td>
14378<td>fetch-list</td> 14277<td>fetch-list</td>
14379<td>follows</td> 
14380</tr> 14278</tr>
14381<tr> 14279<tr>
 14280<td>follows</td>
14382<td>forbids</td> 14281<td>forbids</td>
14383<td>form</td> 
14384</tr> 14282</tr>
14385<tr> 14283<tr>
 14284<td>form</td>
14386<td>format</td> 14285<td>format</td>
14387<td>fortify</td> 
14388</tr> 14286</tr>
14389<tr> 14287<tr>
 14288<td>fortify</td>
14390<td>fortify_source</td> 14289<td>fortify_source</td>
14391<td>fossil</td> 
14392</tr> 14290</tr>
14393<tr> 14291<tr>
14394<td>friend</td> 14292<td>friend</td>
14395<td>fts</td> 14293<td>fts</td>
14396</tr> 14294</tr>
14397<tr> 14295<tr>
14398<td>fts_close</td> 14296<td>fts_close</td>
14399<td>fts_open</td> 14297<td>fts_open</td>
14400</tr> 14298</tr>
14401<tr> 14299<tr>
14402<td>fts_read</td> 14300<td>fts_read</td>
14403<td>fts_set</td> 14301<td>fts_set</td>
14404</tr> 14302</tr>
14405<tr> 14303<tr>
14406<td>gcc</td> 14304<td>gcc</td>
14407<td>gethostbyaddr</td> 14305<td>gethostbyaddr</td>
14408</tr> 14306</tr>
14409<tr> 14307<tr>
14410<td>gethostbyname</td> 14308<td>gethostbyname</td>
14411<td>gethostbyname2</td> 14309<td>gethostbyname2</td>
14412</tr> 14310</tr>
14413<tr> 14311<tr>
14414<td>getopt_long</td> 14312<td>getopt_long</td>
14415<td>getprogname</td> 14313<td>getprogname</td>
14416</tr> 14314</tr>
14417<tr> 14315<tr>
14418<td>getservbyname</td> 14316<td>getservbyname</td>
14419<td>getservbyport</td> 14317<td>getservbyport</td>
14420</tr> 14318</tr>
14421<tr> 14319<tr>
14422<td>getservent</td> 14320<td>getservent</td>
14423<td>gettext</td> 14321<td>gettext</td>
14424</tr> 14322</tr>
14425<tr> 14323<tr>
14426<td>git</td> 
14427<td>github</td> 14324<td>github</td>
14428</tr> 
14429<tr> 
14430<td>gitlab</td> 14325<td>gitlab</td>
14431<td>glob</td> 
14432</tr> 14326</tr>
14433<tr> 14327<tr>
 14328<td>glob</td>
14434<td>gnu</td> 14329<td>gnu</td>
14435<td>gnu_configure_strict</td> 
14436</tr> 14330</tr>
14437<tr> 14331<tr>
 14332<td>gnu_configure_strict</td>
14438<td>go</td> 14333<td>go</td>
14439<td>go-deps</td> 
14440</tr> 14334</tr>
14441<tr> 14335<tr>
 14336<td>go-deps</td>
14442<td>golang</td> 14337<td>golang</td>
14443<td>guess-license</td> 
14444</tr> 14338</tr>
14445<tr> 14339<tr>
 14340<td>guess-license</td>
14446<td>hashbang</td> 14341<td>hashbang</td>
14447<td>heimdal</td> 
14448</tr> 14342</tr>
14449<tr> 14343<tr>
 14344<td>heimdal</td>
14450<td>help</td> 14345<td>help</td>
14451<td>hg</td> 
14452</tr> 14346</tr>
14453<tr> 14347<tr>
14454<td>imake</td> 14348<td>imake</td>
14455<td>increment</td> 14349<td>increment</td>
14456</tr> 14350</tr>
14457<tr> 14351<tr>
14458<td>indirect</td> 14352<td>indirect</td>
14459<td>inet_aton</td> 14353<td>inet_aton</td>
14460</tr> 14354</tr>
14461<tr> 14355<tr>
14462<td>interp</td> 14356<td>interp</td>
14463<td>interpreter</td> 14357<td>interpreter</td>
14464</tr> 14358</tr>
14465<tr> 14359<tr>
14466<td>intl</td> 14360<td>intl</td>
14467<td>ip4</td> 14361<td>ip4</td>
14468</tr> 14362</tr>
14469<tr> 14363<tr>
14470<td>ip6</td> 14364<td>ip6</td>
14471<td>ipv4</td> 14365<td>ipv4</td>
14472</tr> 14366</tr>
14473<tr> 14367<tr>
14474<td>ipv6</td> 14368<td>ipv6</td>
14475<td>iso</td> 14369<td>iso</td>
14476</tr> 14370</tr>
14477<tr> 14371<tr>
14478<td>kerberos</td> 14372<td>kerberos</td>
14479<td>krb</td> 14373<td>krb</td>
14480</tr> 14374</tr>
14481<tr> 14375<tr>
14482<td>krb5</td> 14376<td>krb5</td>
14483<td>ksh</td> 14377<td>ksh</td>
14484</tr> 14378</tr>
14485<tr> 14379<tr>
14486<td>lapack</td> 14380<td>lapack</td>
14487<td>latex</td> 14381<td>latex</td>
14488</tr> 14382</tr>
14489<tr> 14383<tr>
14490<td>libintl_bindtextdomain</td> 14384<td>libintl_bindtextdomain</td>
14491<td>libintl_gettext</td> 14385<td>libintl_gettext</td>
14492</tr> 14386</tr>
14493<tr> 14387<tr>
14494<td>libintl_textdomain</td> 14388<td>libintl_textdomain</td>
14495<td>libnbcompat</td> 14389<td>libnbcompat</td>
14496</tr> 14390</tr>
14497<tr> 14391<tr>
14498<td>libs</td> 14392<td>libs</td>
14499<td>libtool</td> 14393<td>libtool</td>
14500</tr> 14394</tr>
14501<tr> 14395<tr>
14502<td>licence</td> 14396<td>licence</td>
14503<td>license</td> 14397<td>license</td>
14504</tr> 14398</tr>
14505<tr> 14399<tr>
14506<td>lintl</td> 14400<td>lintl</td>
14507<td>little-endian</td> 14401<td>little-endian</td>
14508</tr> 14402</tr>
14509<tr> 14403<tr>
14510<td>lock</td> 14404<td>lock</td>
14511<td>locking</td> 14405<td>locking</td>
14512</tr> 14406</tr>
14513<tr> 14407<tr>
14514<td>lua</td> 14408<td>lua</td>
14515<td>lvalue</td> 14409<td>lvalue</td>
14516</tr> 14410</tr>
14517<tr> 14411<tr>
14518<td>make</td> 14412<td>make</td>
14519<td>makesum</td> 14413<td>makesum</td>
14520</tr> 14414</tr>
14521<tr> 14415<tr>
14522<td>memory</td> 14416<td>memory</td>
14523<td>mercurial</td> 
14524</tr> 
14525<tr> 
14526<td>meta</td> 14417<td>meta</td>
14527<td>meta-package</td> 
14528</tr> 14418</tr>
14529<tr> 14419<tr>
 14420<td>meta-package</td>
14530<td>meta_package</td> 14421<td>meta_package</td>
14531<td>mit-krb5</td> 
14532</tr> 14422</tr>
14533<tr> 14423<tr>
 14424<td>mit-krb5</td>
14534<td>mk.conf</td> 14425<td>mk.conf</td>
14535<td>mkl</td> 
14536</tr> 14426</tr>
14537<tr> 14427<tr>
 14428<td>mkl</td>
14538<td>mount</td> 14429<td>mount</td>
14539<td>move</td> 
14540</tr> 14430</tr>
14541<tr> 14431<tr>
 14432<td>move</td>
14542<td>moved</td> 14433<td>moved</td>
14543<td>mprotect</td> 
14544</tr> 14434</tr>
14545<tr> 14435<tr>
 14436<td>mprotect</td>
14546<td>mremap</td> 14437<td>mremap</td>
14547<td>nb</td> 
14548</tr> 14438</tr>
14549<tr> 14439<tr>
 14440<td>nb</td>
14550<td>nbcompat</td> 14441<td>nbcompat</td>
14551<td>netlib</td> 
14552</tr> 14442</tr>
14553<tr> 14443<tr>
 14444<td>netlib</td>
14554<td>node</td> 14445<td>node</td>
14555<td>node.js</td> 
14556</tr> 14446</tr>
14557<tr> 14447<tr>
 14448<td>node.js</td>
14558<td>nodejs</td> 14449<td>nodejs</td>
14559<td>obstack</td> 
14560</tr> 14450</tr>
14561<tr> 14451<tr>
 14452<td>obstack</td>
14562<td>obstack_ptr_grow</td> 14453<td>obstack_ptr_grow</td>
14563<td>occurs</td> 
14564</tr> 14454</tr>
14565<tr> 14455<tr>
 14456<td>occurs</td>
14566<td>only</td> 14457<td>only</td>
14567<td>openblas</td> 
14568</tr> 14458</tr>
14569<tr> 14459<tr>
 14460<td>openblas</td>
14570<td>options</td> 14461<td>options</td>
14571<td>options.mk</td> 
14572</tr> 14462</tr>
14573<tr> 14463<tr>
 14464<td>options.mk</td>
14574<td>order</td> 14465<td>order</td>
14575<td>override</td> 
14576</tr> 14466</tr>
14577<tr> 14467<tr>
 14468<td>override</td>
14578<td>override-intltool</td> 14469<td>override-intltool</td>
14579<td>override-message-intltool</td> 
14580</tr> 14470</tr>
14581<tr> 14471<tr>
 14472<td>override-message-intltool</td>
14582<td>package</td> 14473<td>package</td>
14583<td>parallel</td> 
14584</tr> 14474</tr>
14585<tr> 14475<tr>
 14476<td>parallel</td>
14586<td>path</td> 14477<td>path</td>
14587<td>pax</td> 
14588</tr> 14478</tr>
14589<tr> 14479<tr>
 14480<td>pax</td>
14590<td>paxctl</td> 14481<td>paxctl</td>
14591<td>pbulk-index</td> 
14592</tr> 14482</tr>
14593<tr> 14483<tr>
 14484<td>pbulk-index</td>
14594<td>pc</td> 14485<td>pc</td>
14595<td>perl</td> 
14596</tr> 14486</tr>
14597<tr> 14487<tr>
 14488<td>perl</td>
14598<td>perl5</td> 14489<td>perl5</td>
14599<td>perms</td> 
14600</tr> 14490</tr>
14601<tr> 14491<tr>
 14492<td>perms</td>
14602<td>php</td> 14493<td>php</td>
14603<td>pkg-build-options</td> 
14604</tr> 14494</tr>
14605<tr> 14495<tr>
 14496<td>pkg-build-options</td>
14606<td>pkg-config</td> 14497<td>pkg-config</td>
14607<td>pkg_build_options</td> 
14608</tr> 14498</tr>
14609<tr> 14499<tr>
 14500<td>pkg_build_options</td>
14610<td>platform</td> 14501<td>platform</td>
14611<td>plist</td> 
14612</tr> 14502</tr>
14613<tr> 14503<tr>
 14504<td>plist</td>
14614<td>post-extract</td> 14505<td>post-extract</td>
14615<td>post-fetch</td> 
14616</tr> 14506</tr>
14617<tr> 14507<tr>
 14508<td>post-fetch</td>
14618<td>post-wrapper</td> 14509<td>post-wrapper</td>
14619<td>pre-build-checks-hook</td> 
14620</tr> 14510</tr>
14621<tr> 14511<tr>
 14512<td>pre-build-checks-hook</td>
14622<td>pre-configure</td> 14513<td>pre-configure</td>
14623<td>pre-configure-checks-hook</td> 
14624</tr> 14514</tr>
14625<tr> 14515<tr>
 14516<td>pre-configure-checks-hook</td>
14626<td>pre-extract</td> 14517<td>pre-extract</td>
14627<td>pre-fetch</td> 
14628</tr> 14518</tr>
14629<tr> 14519<tr>
 14520<td>pre-fetch</td>
14630<td>print-go-deps</td> 14521<td>print-go-deps</td>
14631<td>print-plist</td> 
14632</tr> 14522</tr>
14633<tr> 14523<tr>
 14524<td>print-plist</td>
14634<td>print-summary-data</td> 14525<td>print-summary-data</td>
14635<td>privileged-install-hook</td> 
14636</tr> 14526</tr>
14637<tr> 14527<tr>
 14528<td>privileged-install-hook</td>
14638<td>pypi</td> 14529<td>pypi</td>
14639<td>python</td> 
14640</tr> 14530</tr>
14641<tr> 14531<tr>
 14532<td>python</td>
14642<td>r</td> 14533<td>r</td>
14643<td>readme-all</td> 
14644</tr> 14534</tr>
14645<tr> 14535<tr>
 14536<td>readme-all</td>
14646<td>recursive</td> 14537<td>recursive</td>
14647<td>recv</td> 
14648</tr> 14538</tr>
14649<tr> 14539<tr>
 14540<td>recv</td>
14650<td>recvfrom</td> 14541<td>recvfrom</td>
14651<td>regcomp</td> 
14652</tr> 14542</tr>
14653<tr> 14543<tr>
 14544<td>regcomp</td>
14654<td>release-localbase-lock</td> 14545<td>release-localbase-lock</td>
14655<td>release-lock</td> 
14656</tr> 14546</tr>
14657<tr> 14547<tr>
 14548<td>release-lock</td>
14658<td>relro</td> 14549<td>relro</td>
14659<td>remove</td> 
14660</tr> 14550</tr>
14661<tr> 14551<tr>
 14552<td>remove</td>
14662<td>removed</td> 14553<td>removed</td>
14663<td>rename</td> 
14664</tr> 14554</tr>
14665<tr> 14555<tr>
 14556<td>rename</td>
14666<td>renamed</td> 14557<td>renamed</td>
14667<td>reorder</td> 
14668</tr> 14558</tr>
14669<tr> 14559<tr>
 14560<td>reorder</td>
14670<td>replace</td> 14561<td>replace</td>
14671<td>replace_interpreter</td> 
14672</tr> 14562</tr>
14673<tr> 14563<tr>
 14564<td>replace_interpreter</td>
14674<td>reproducible</td> 14565<td>reproducible</td>
14675<td>resolv</td> 
14676</tr> 14566</tr>
14677<tr> 14567<tr>
 14568<td>resolv</td>
14678<td>root</td> 14569<td>root</td>
14679<td>ruby</td> 
14680</tr> 14570</tr>
14681<tr> 14571<tr>
 14572<td>ruby</td>
14682<td>send</td> 14573<td>send</td>
14683<td>sendfile</td> 
14684</tr> 14574</tr>
14685<tr> 14575<tr>
 14576<td>sendfile</td>
14686<td>sendto</td> 14577<td>sendto</td>
14687<td>setenv</td> 
14688</tr> 14578</tr>
14689<tr> 14579<tr>
 14580<td>setenv</td>
14690<td>setgid</td> 14581<td>setgid</td>
14691<td>setprogname</td> 
14692</tr> 14582</tr>
14693<tr> 14583<tr>
 14584<td>setprogname</td>
14694<td>setuid</td> 14585<td>setuid</td>
14695<td>sh</td> 
14696</tr> 14586</tr>
14697<tr> 14587<tr>
 14588<td>sh</td>
14698<td>shebang</td> 14589<td>shebang</td>
14699<td>show</td> 
14700</tr> 14590</tr>
14701<tr> 14591<tr>
 14592<td>show</td>
14702<td>show-all</td> 14593<td>show-all</td>
14703<td>show-build-defs</td> 
14704</tr> 14594</tr>
14705<tr> 14595<tr>
 14596<td>show-build-defs</td>
14706<td>show-depends</td> 14597<td>show-depends</td>
14707<td>show-depends-dirs</td> 
14708</tr> 14598</tr>
14709<tr> 14599<tr>
 14600<td>show-depends-dirs</td>
14710<td>show-depends-pkgpaths</td> 14601<td>show-depends-pkgpaths</td>
14711<td>show-depends-recursive</td> 
14712</tr> 14602</tr>
14713<tr> 14603<tr>
 14604<td>show-depends-recursive</td>
14714<td>show-deps</td> 14605<td>show-deps</td>
14715<td>show-distfiles</td> 
14716</tr> 14606</tr>
14717<tr> 14607<tr>
 14608<td>show-distfiles</td>
14718<td>show-downlevel</td> 14609<td>show-downlevel</td>
14719<td>show-subdir-var</td> 
14720</tr> 14610</tr>
14721<tr> 14611<tr>
 14612<td>show-subdir-var</td>
14722<td>show-tools</td> 14613<td>show-tools</td>
14723<td>show-var</td> 
14724</tr> 14614</tr>
14725<tr> 14615<tr>
 14616<td>show-var</td>
14726<td>show-vars</td> 14617<td>show-vars</td>
14727<td>snprintf</td> 
14728</tr> 14618</tr>
14729<tr> 14619<tr>
 14620<td>snprintf</td>
14730<td>socket</td> 14621<td>socket</td>
14731<td>ssp</td> 
14732</tr> 14622</tr>
14733<tr> 14623<tr>
 14624<td>ssp</td>
14734<td>st_mode</td> 14625<td>st_mode</td>
14735<td>stage-install</td> 
14736</tr> 14626</tr>
14737<tr> 14627<tr>
 14628<td>stage-install</td>
14738<td>strcasestr</td> 14629<td>strcasestr</td>
14739<td>strict</td> 
14740</tr> 14630</tr>
14741<tr> 14631<tr>
 14632<td>strict</td>
14742<td>strip</td> 14633<td>strip</td>
14743<td>strndup</td> 
14744</tr> 14634</tr>
14745<tr> 14635<tr>
 14636<td>strndup</td>
14746<td>strnlen</td> 14637<td>strnlen</td>
14747<td>strsep</td> 
14748</tr> 14638</tr>
14749<tr> 14639<tr>
 14640<td>strsep</td>
14750<td>subst</td> 14641<td>subst</td>
14751<td>substitutions</td> 
14752</tr> 14642</tr>
14753<tr> 14643<tr>
14754<td>subversion</td> 14644<td>substitutions</td>
14755<td>sun</td> 14645<td>sun</td>
14756</tr> 14646</tr>
14757<tr> 14647<tr>
14758<td>sunpro</td> 14648<td>sunpro</td>
14759<td>sunwspro</td> 14649<td>sunwspro</td>
14760</tr> 14650</tr>
14761<tr> 14651<tr>
14762<td>svn</td> 
14763<td>symlink</td> 14652<td>symlink</td>
14764</tr> 
14765<tr> 
14766<td>test</td> 14653<td>test</td>
14767<td>test-env</td> 
14768</tr> 14654</tr>
14769<tr> 14655<tr>
 14656<td>test-env</td>
14770<td>tex</td> 14657<td>tex</td>
14771<td>texlive</td> 
14772</tr> 14658</tr>
14773<tr> 14659<tr>
 14660<td>texlive</td>
14774<td>tmp</td> 14661<td>tmp</td>
14775<td>todo</td> 
14776</tr> 14662</tr>
14777<tr> 14663<tr>
 14664<td>todo</td>
14778<td>tool</td> 14665<td>tool</td>
14779<td>tools</td> 
14780</tr> 14666</tr>
14781<tr> 14667<tr>
 14668<td>tools</td>
14782<td>tools-libtool-m4-override</td> 14669<td>tools-libtool-m4-override</td>
14783<td>transitive</td> 
14784</tr> 14670</tr>
14785<tr> 14671<tr>
 14672<td>transitive</td>
14786<td>type</td> 14673<td>type</td>
14787<td>ulimit</td> 
14788</tr> 14674</tr>
14789<tr> 14675<tr>
 14676<td>ulimit</td>
14790<td>undefined</td> 14677<td>undefined</td>
14791<td>undo-replace</td> 
14792</tr> 14678</tr>
14793<tr> 14679<tr>
 14680<td>undo-replace</td>
14794<td>unlimit</td> 14681<td>unlimit</td>
14795<td>unprivileged</td> 
14796</tr> 14682</tr>
14797<tr> 14683<tr>
 14684<td>unprivileged</td>
14798<td>unprivileged-install-hook</td> 14685<td>unprivileged-install-hook</td>
14799<td>unstripped</td> 
14800</tr> 14686</tr>
14801<tr> 14687<tr>
 14688<td>unstripped</td>
14802<td>update</td> 14689<td>update</td>
14803<td>updated</td> 
14804</tr> 14690</tr>
14805<tr> 14691<tr>
 14692<td>updated</td>
14806<td>upload</td> 14693<td>upload</td>
14807<td>upload-distfiles</td> 
14808</tr> 14694</tr>
14809<tr> 14695<tr>
 14696<td>upload-distfiles</td>
14810<td>use_tools</td> 14697<td>use_tools</td>
14811<td>user</td> 
14812</tr> 14698</tr>
14813<tr> 14699<tr>
 14700<td>user</td>
14814<td>utimes</td> 14701<td>utimes</td>
14815<td>vasprintf</td> 
14816</tr> 14702</tr>
14817<tr> 14703<tr>
 14704<td>vasprintf</td>
14818<td>verbose</td> 14705<td>verbose</td>
14819<td>vsnprintf</td> 
14820</tr> 14706</tr>
14821<tr> 14707<tr>
 14708<td>vsnprintf</td>
14822<td>warn</td> 14709<td>warn</td>
14823<td>warning</td> 
14824</tr> 14710</tr>
14825<tr> 14711<tr>
 14712<td>warning</td>
14826<td>warnings</td> 14713<td>warnings</td>
14827<td>warnx</td> 
14828</tr> 14714</tr>
14829<tr> 14715<tr>
 14716<td>warnx</td>
14830<td>wattr_off</td> 14717<td>wattr_off</td>
14831<td>wattr_on</td> 
14832</tr> 14718</tr>
14833<tr> 14719<tr>
 14720<td>wattr_on</td>
14834<td>work</td> 14721<td>work</td>
14835<td>wrapper</td> 
14836</tr> 14722</tr>
14837<tr> 14723<tr>
 14724<td>wrapper</td>
14838<td>wrkdir</td> 14725<td>wrkdir</td>
14839<td> </td> 
14840</tr> 14726</tr>
14841</table> 14727</table>
14842</div> 14728</div>
14843<div class="appendix"> 14729<div class="appendix">
14844<div class="titlepage"><div><div><h1 class="title"> 14730<div class="titlepage"><div><div><h1 class="title">
14845<a name="editing"></a>Appendix F. Editing guidelines for the pkgsrc guide</h1></div></div></div> 14731<a name="editing"></a>Appendix F. Editing guidelines for the pkgsrc guide</h1></div></div></div>
14846<div class="toc"> 14732<div class="toc">
14847<p><b>Table of Contents</b></p> 14733<p><b>Table of Contents</b></p>
14848<dl class="toc"> 14734<dl class="toc">
14849<dt><span class="sect1"><a href="#targets">F.1. Make targets</a></span></dt> 14735<dt><span class="sect1"><a href="#targets">F.1. Make targets</a></span></dt>
14850<dt><span class="sect1"><a href="#procedure">F.2. Procedure</a></span></dt> 14736<dt><span class="sect1"><a href="#procedure">F.2. Procedure</a></span></dt>
14851</dl> 14737</dl>
14852</div> 14738</div>
14853<p>This section contains information on editing the pkgsrc 14739<p>This section contains information on editing the pkgsrc
14854 guide itself.</p> 14740 guide itself.</p>
14855<div class="sect1"> 14741<div class="sect1">
14856<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 14742<div class="titlepage"><div><div><h2 class="title" style="clear: both">
14857<a name="targets"></a>F.1. Make targets</h2></div></div></div> 14743<a name="targets"></a>F.1. Make targets</h2></div></div></div>
14858<p>The pkgsrc guide's source code is stored in 14744<p>The pkgsrc guide's source code is stored in
14859 <code class="filename">pkgsrc/doc/guide/files</code>, and several files 14745 <code class="filename">pkgsrc/doc/guide/files</code>, and several files
14860 are created from it:</p> 14746 are created from it:</p>
14861<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 14747<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
14862<li class="listitem"><p><code class="filename">pkgsrc/doc/pkgsrc.txt</code></p></li> 14748<li class="listitem"><p><code class="filename">pkgsrc/doc/pkgsrc.txt</code></p></li>
14863<li class="listitem"><p><code class="filename">pkgsrc/doc/pkgsrc.html</code></p></li> 14749<li class="listitem"><p><code class="filename">pkgsrc/doc/pkgsrc.html</code></p></li>
14864<li class="listitem"><p><a class="ulink" href="https://www.NetBSD.org/docs/pkgsrc/" target="_top">https://www.NetBSD.org/docs/pkgsrc/</a></p></li> 14750<li class="listitem"><p><a class="ulink" href="https://www.NetBSD.org/docs/pkgsrc/" target="_top">https://www.NetBSD.org/docs/pkgsrc/</a></p></li>
14865<li class="listitem"><p><a class="ulink" href="https://www.NetBSD.org/docs/pkgsrc/pkgsrc.pdf" target="_top">https://www.NetBSD.org/docs/pkgsrc/pkgsrc.pdf</a>: 14751<li class="listitem"><p><a class="ulink" href="https://www.NetBSD.org/docs/pkgsrc/pkgsrc.pdf" target="_top">https://www.NetBSD.org/docs/pkgsrc/pkgsrc.pdf</a>:
14866 The PDF version of the pkgsrc guide.</p></li> 14752 The PDF version of the pkgsrc guide.</p></li>
14867<li class="listitem"><p><a class="ulink" href="https://www.NetBSD.org/docs/pkgsrc/pkgsrc.ps" target="_top">https://www.NetBSD.org/docs/pkgsrc/pkgsrc.ps</a>: 14753<li class="listitem"><p><a class="ulink" href="https://www.NetBSD.org/docs/pkgsrc/pkgsrc.ps" target="_top">https://www.NetBSD.org/docs/pkgsrc/pkgsrc.ps</a>:
14868 PostScript version of the pkgsrc guide.</p></li> 14754 PostScript version of the pkgsrc guide.</p></li>
14869</ul></div> 14755</ul></div>
14870</div> 14756</div>
14871<div class="sect1"> 14757<div class="sect1">
14872<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 14758<div class="titlepage"><div><div><h2 class="title" style="clear: both">
14873<a name="procedure"></a>F.2. Procedure</h2></div></div></div> 14759<a name="procedure"></a>F.2. Procedure</h2></div></div></div>
14874<p>The procedure to edit the pkgsrc guide is:</p> 14760<p>The procedure to edit the pkgsrc guide is:</p>
14875<div class="procedure"><ol class="procedure" type="1"> 14761<div class="procedure"><ol class="procedure" type="1">
14876<li class="step"><p>Make sure you have checked out the htdocs repository 14762<li class="step"><p>Make sure you have checked out the htdocs repository
14877 into a sibling directory of your pkgsrc directory. You will need 14763 into a sibling directory of your pkgsrc directory. You will need
14878 the ability to commit from both pkgsrc and htdocs.</p></li> 14764 the ability to commit from both pkgsrc and htdocs.</p></li>
14879<li class="step"><p>Make sure you have the packages needed to 14765<li class="step"><p>Make sure you have the packages needed to
14880 regenerate the pkgsrc guide (and other XML-based NetBSD 14766 regenerate the pkgsrc guide (and other XML-based NetBSD
14881 documentation) installed. These are automatically installed when 14767 documentation) installed. These are automatically installed when
14882 you install the <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/pkgsrc-guide-tools/index.html" target="_top"><code class="filename">meta-pkgs/pkgsrc-guide-tools</code></a> package.</p></li> 14768 you install the <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/pkgsrc-guide-tools/index.html" target="_top"><code class="filename">meta-pkgs/pkgsrc-guide-tools</code></a> package.</p></li>
14883<li class="step"><p>Run <span class="command"><strong>cd doc/guide</strong></span> to get to the 14769<li class="step"><p>Run <span class="command"><strong>cd doc/guide</strong></span> to get to the
14884 right directory. All further steps will take place 14770 right directory. All further steps will take place
14885 here.</p></li> 14771 here.</p></li>
14886<li class="step"><p>Edit the XML file(s) in 14772<li class="step"><p>Edit the XML file(s) in
14887 <code class="filename">files/</code>.</p></li> 14773 <code class="filename">files/</code>.</p></li>
14888<li class="step"><p>Run <span class="command"><strong>bmake</strong></span> to check the pkgsrc 14774<li class="step"><p>Run <span class="command"><strong>bmake</strong></span> to check the pkgsrc
14889 guide for valid XML and to build the final output files. If you 14775 guide for valid XML and to build the final output files. If you
14890 get any errors at this stage, you can just edit the files, as 14776 get any errors at this stage, you can just edit the files, as
14891 there are only symbolic links in the working directory, pointing 14777 there are only symbolic links in the working directory, pointing
14892 to the files in <code class="filename">files/</code>.</p></li> 14778 to the files in <code class="filename">files/</code>.</p></li>
14893<li class="step"><p><span class="command"><strong>(cd files &amp;&amp; cvs 14779<li class="step"><p><span class="command"><strong>(cd files &amp;&amp; cvs
14894 commit)</strong></span></p></li> 14780 commit)</strong></span></p></li>
14895<li class="step"><p>Run <span class="command"><strong>bmake clean &amp;&amp; bmake</strong></span> to 14781<li class="step"><p>Run <span class="command"><strong>bmake clean &amp;&amp; bmake</strong></span> to
14896 regenerate the output files with the proper RCS 14782 regenerate the output files with the proper RCS
14897 Ids.</p></li> 14783 Ids.</p></li>
14898<li class="step"> 14784<li class="step">
14899<p>Run <span class="command"><strong>bmake regen</strong></span> to install and 14785<p>Run <span class="command"><strong>bmake regen</strong></span> to install and
14900 commit the files in both <code class="filename">pkgsrc/doc</code> and 14786 commit the files in both <code class="filename">pkgsrc/doc</code> and
14901 <code class="filename">htdocs</code>.</p> 14787 <code class="filename">htdocs</code>.</p>
14902<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> 14788<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
14903<h3 class="title">Note</h3> 14789<h3 class="title">Note</h3>
14904<p>If you have added, removed or renamed some chapters, 14790<p>If you have added, removed or renamed some chapters,
14905 you need to synchronize them using <span class="command"><strong>cvs add</strong></span> or 14791 you need to synchronize them using <span class="command"><strong>cvs add</strong></span> or
14906 <span class="command"><strong>cvs delete</strong></span> in the htdocs 14792 <span class="command"><strong>cvs delete</strong></span> in the htdocs
14907 directory.</p> 14793 directory.</p>
14908</div> 14794</div>
14909</li> 14795</li>
14910</ol></div> 14796</ol></div>
14911</div> 14797</div>
14912</div> 14798</div>
14913</div></body> 14799</div></body>
14914</html> 14800</html>

cvs diff -r1.340 -r1.341 pkgsrc/doc/pkgsrc.txt (switch to unified diff)

--- pkgsrc/doc/pkgsrc.txt 2022/07/23 06:51:09 1.340
+++ pkgsrc/doc/pkgsrc.txt 2022/08/08 01:56:37 1.341
@@ -2526,1999 +2526,2006 @@ running: @@ -2526,1999 +2526,2006 @@ running:
2526If you even decide to ignore NO_{SRC,BIN}_ON_{FTP,CDROM}, then you can get 2526If you even decide to ignore NO_{SRC,BIN}_ON_{FTP,CDROM}, then you can get
2527everything by running: 2527everything by running:
2528 2528
2529% make fetch NO_SKIP=yes 2529% make fetch NO_SKIP=yes
2530 2530
253110.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean? 253110.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean?
2532 2532
2533When compiling the pkgtools/pkg_install package, you get the error from make 2533When compiling the pkgtools/pkg_install package, you get the error from make
2534that it doesn't know how to make /usr/share/tmac/tmac.andoc? This indicates 2534that it doesn't know how to make /usr/share/tmac/tmac.andoc? This indicates
2535that you don't have installed the "text" set (nroff, ...) from the NetBSD base 2535that you don't have installed the "text" set (nroff, ...) from the NetBSD base
2536distribution on your machine. It is recommended to do that to format man pages. 2536distribution on your machine. It is recommended to do that to format man pages.
2537 2537
2538In the case of the pkgtools/pkg_install package, you can get away with setting 2538In the case of the pkgtools/pkg_install package, you can get away with setting
2539NOMAN=YES either in the environment or in mk.conf. 2539NOMAN=YES either in the environment or in mk.conf.
2540 2540
254110.11. What does "Could not find bsd.own.mk" mean? 254110.11. What does "Could not find bsd.own.mk" mean?
2542 2542
2543You didn't install the compiler set, comp.tgz, when you installed your NetBSD 2543You didn't install the compiler set, comp.tgz, when you installed your NetBSD
2544machine. Please get and install it, by extracting it in /: 2544machine. Please get and install it, by extracting it in /:
2545 2545
2546# cd / 2546# cd /
2547# tar --unlink -zxvpf .../comp.tgz 2547# tar --unlink -zxvpf .../comp.tgz
2548 2548
2549comp.tgz is part of every NetBSD release. Get the one that corresponds to your 2549comp.tgz is part of every NetBSD release. Get the one that corresponds to your
2550release (determine via uname -r). 2550release (determine via uname -r).
2551 2551
255210.12. Using 'sudo' or `priv` with pkgsrc 255210.12. Using 'sudo' or `priv` with pkgsrc
2553 2553
2554When installing packages as non-root user and using the just-in-time su(1) 2554When installing packages as non-root user and using the just-in-time su(1)
2555feature of pkgsrc, it can become annoying to type in the root password for each 2555feature of pkgsrc, it can become annoying to type in the root password for each
2556required package installed. To avoid this, the sudo package can be used, which 2556required package installed. To avoid this, the sudo package can be used, which
2557does password caching over a limited time. To use it, install sudo or priv 2557does password caching over a limited time. To use it, install sudo or priv
2558(either as binary package, from security/priv, or security/sudo) and then put 2558(either as binary package, from security/priv, or security/sudo) and then put
2559the following into your mk.conf, somewhere after the definition of the 2559the following into your mk.conf, somewhere after the definition of the
2560LOCALBASE variable: 2560LOCALBASE variable:
2561 2561
2562.if exists(${LOCALBASE}/bin/sudo) 2562.if exists(${LOCALBASE}/bin/sudo)
2563SU_CMD= ${LOCALBASE}/bin/sudo /bin/sh -c 2563SU_CMD= ${LOCALBASE}/bin/sudo /bin/sh -c
2564.endif 2564.endif
2565 2565
256610.13. How do I change the location of configuration files? 256610.13. How do I change the location of configuration files?
2567 2567
2568As the system administrator, you can choose where configuration files are 2568As the system administrator, you can choose where configuration files are
2569installed. The default settings make all these files go into ${PREFIX}/etc or 2569installed. The default settings make all these files go into ${PREFIX}/etc or
2570some of its subdirectories; this may be suboptimal depending on your 2570some of its subdirectories; this may be suboptimal depending on your
2571expectations (e.g., a read-only, NFS-exported PREFIX with a need of per-machine 2571expectations (e.g., a read-only, NFS-exported PREFIX with a need of per-machine
2572configuration of the provided packages). 2572configuration of the provided packages).
2573 2573
2574In order to change the defaults, you can modify the PKG_SYSCONFBASE variable 2574In order to change the defaults, you can modify the PKG_SYSCONFBASE variable
2575(in mk.conf) to point to your preferred configuration directory; some common 2575(in mk.conf) to point to your preferred configuration directory; some common
2576examples include /etc or /etc/pkg. 2576examples include /etc or /etc/pkg.
2577 2577
2578Furthermore, you can change this value on a per-package basis by setting the 2578Furthermore, you can change this value on a per-package basis by setting the
2579PKG_SYSCONFDIR.${PKG_SYSCONFVAR} variable. PKG_SYSCONFVAR's value usually 2579PKG_SYSCONFDIR.${PKG_SYSCONFVAR} variable. PKG_SYSCONFVAR's value usually
2580matches the name of the package you would like to modify, that is, the contents 2580matches the name of the package you would like to modify, that is, the contents
2581of PKGBASE. 2581of PKGBASE.
2582 2582
2583Note that after changing these settings, you must rebuild and reinstall any 2583Note that after changing these settings, you must rebuild and reinstall any
2584affected packages. 2584affected packages.
2585 2585
258610.14. Automated security checks 258610.14. Automated security checks
2587 2587
2588Please be aware that there can often be bugs in third-party software, and some 2588Please be aware that there can often be bugs in third-party software, and some
2589of these bugs can leave a machine vulnerable to exploitation by attackers. In 2589of these bugs can leave a machine vulnerable to exploitation by attackers. In
2590an effort to lessen the exposure, the NetBSD packages team maintains a database 2590an effort to lessen the exposure, the NetBSD packages team maintains a database
2591of known-exploits to packages which have at one time been included in pkgsrc. 2591of known-exploits to packages which have at one time been included in pkgsrc.
2592The database can be downloaded automatically, and a security audit of all 2592The database can be downloaded automatically, and a security audit of all
2593packages installed on a system can take place. To do this, refer to the 2593packages installed on a system can take place. To do this, refer to the
2594following two tools (installed as part of the pkgtools/pkg_install package): 2594following two tools (installed as part of the pkgtools/pkg_install package):
2595 2595
2596 1. pkg_admin fetch-pkg-vulnerabilities, an easy way to download a list of the 2596 1. pkg_admin fetch-pkg-vulnerabilities, an easy way to download a list of the
2597 security vulnerabilities information. This list is kept up to date by the 2597 security vulnerabilities information. This list is kept up to date by the
2598 pkgsrc security team, and is distributed from the NetBSD ftp server: 2598 pkgsrc security team, and is distributed from the NetBSD ftp server:
2599 2599
2600 https://ftp.NetBSD.org/pub/NetBSD/packages/vulns/pkg-vulnerabilities 2600 https://ftp.NetBSD.org/pub/NetBSD/packages/vulns/pkg-vulnerabilities
2601 2601
2602 2. pkg_admin audit, an easy way to audit the current machine, checking each 2602 2. pkg_admin audit, an easy way to audit the current machine, checking each
2603 known vulnerability. If a vulnerable package is installed, it will be shown 2603 known vulnerability. If a vulnerable package is installed, it will be shown
2604 by output to stdout, including a description of the type of vulnerability, 2604 by output to stdout, including a description of the type of vulnerability,
2605 and a URL containing more information. 2605 and a URL containing more information.
2606 2606
2607Use of these tools is strongly recommended! See Section 5.1.6, "Checking for 2607Use of these tools is strongly recommended! See Section 5.1.6, "Checking for
2608security vulnerabilities in installed packages" for instructions on how to 2608security vulnerabilities in installed packages" for instructions on how to
2609automate checking and reporting. 2609automate checking and reporting.
2610 2610
2611If this database is installed, pkgsrc builds will use it to perform a security 2611If this database is installed, pkgsrc builds will use it to perform a security
2612check before building any package. 2612check before building any package.
2613 2613
261410.15. Why do some packages ignore my CFLAGS? 261410.15. Why do some packages ignore my CFLAGS?
2615 2615
2616When you add your own preferences to the CFLAGS variable in your mk.conf, these 2616When you add your own preferences to the CFLAGS variable in your mk.conf, these
2617flags are passed in environment variables to the ./configure scripts and to 2617flags are passed in environment variables to the ./configure scripts and to
2618make(1). Some package authors ignore the CFLAGS from the environment variable 2618make(1). Some package authors ignore the CFLAGS from the environment variable
2619by overriding them in the Makefiles of their package. 2619by overriding them in the Makefiles of their package.
2620 2620
2621Currently there is no solution to this problem. If you really need the package 2621Currently there is no solution to this problem. If you really need the package
2622to use your CFLAGS you should run make patch in the package directory and then 2622to use your CFLAGS you should run make patch in the package directory and then
2623inspect any Makefile and Makefile.in for whether they define CFLAGS explicitly. 2623inspect any Makefile and Makefile.in for whether they define CFLAGS explicitly.
2624Usually you can remove these lines. But be aware that some "smart" programmers 2624Usually you can remove these lines. But be aware that some "smart" programmers
2625write so bad code that it only works for the specific combination of CFLAGS 2625write so bad code that it only works for the specific combination of CFLAGS
2626they have chosen. 2626they have chosen.
2627 2627
2628To find out where the CFLAGS are ignored, add the following lines to mk.conf: 2628To find out where the CFLAGS are ignored, add the following lines to mk.conf:
2629 2629
2630CPPFLAGS+= -Dpkgsrc___CPPFLAGS 2630CPPFLAGS+= -Dpkgsrc___CPPFLAGS
2631CFLAGS+= -Dpkgsrc___CFLAGS 2631CFLAGS+= -Dpkgsrc___CFLAGS
2632CXXFLAGS+= -Dpkgsrc___CXXFLAGS 2632CXXFLAGS+= -Dpkgsrc___CXXFLAGS
2633 2633
2634Then run bmake show-all-configure show-all-build to see whether the above flags 2634Then run bmake show-all-configure show-all-build to see whether the above flags
2635are passed to the actual build commands in general. 2635are passed to the actual build commands in general.
2636 2636
2637To find out whether the flags are passed to individual compiler commands, have 2637To find out whether the flags are passed to individual compiler commands, have
2638a look at the file work/.work.log. In most cases, the flags from the original 2638a look at the file work/.work.log. In most cases, the flags from the original
2639command lines (the lines starting with [*]) are passed unmodified to the actual 2639command lines (the lines starting with [*]) are passed unmodified to the actual
2640compiler (the lines starting with <.>). If the flag is missing from the actual 2640compiler (the lines starting with <.>). If the flag is missing from the actual
2641compiler command, it must have been removed by the pkgsrc compiler wrappers. 2641compiler command, it must have been removed by the pkgsrc compiler wrappers.
2642 2642
264310.16. A package does not build. What shall I do? 264310.16. A package does not build. What shall I do?
2644 2644
2645 1. Make sure that your copy of pkgsrc is consistent. A case that occurs often 2645 1. Make sure that your copy of pkgsrc is consistent. A case that occurs often
2646 is that people only update pkgsrc in parts, because of performance reasons. 2646 is that people only update pkgsrc in parts, because of performance reasons.
2647 Since pkgsrc is one large system, not a collection of many small systems, 2647 Since pkgsrc is one large system, not a collection of many small systems,
2648 there are sometimes changes that only work when the whole pkgsrc tree is 2648 there are sometimes changes that only work when the whole pkgsrc tree is
2649 updated. 2649 updated.
2650 2650
2651 2. Make sure that you don't have any CVS conflicts. Search for "<<<<<<" or " 2651 2. Make sure that you don't have any CVS conflicts. Search for "<<<<<<" or "
2652 >>>>>>" in all your pkgsrc files. 2652 >>>>>>" in all your pkgsrc files.
2653 2653
2654 3. Make sure that you don't have old copies of the packages extracted. Run  2654 3. Make sure that you don't have old copies of the packages extracted. Run
2655 make clean clean-depends to verify this. 2655 make clean clean-depends to verify this.
2656 2656
2657 4. If you are a package developer who wants to invest some work, have a look 2657 4. If you are a package developer who wants to invest some work, have a look
2658 at Chapter 21, Making your package work. 2658 at Chapter 21, Making your package work.
2659 2659
2660 5. If the problem still exists, write a mail to the pkgsrc-users mailing list. 2660 5. If the problem still exists, write a mail to the pkgsrc-users mailing list.
2661 2661
266210.17. What does "Makefile appears to contain unresolved cvs/rcs/??? merge 266210.17. What does "Makefile appears to contain unresolved cvs/rcs/??? merge
2663conflicts" mean? 2663conflicts" mean?
2664 2664
2665You have modified a file from pkgsrc, and someone else has modified that same 2665You have modified a file from pkgsrc, and someone else has modified that same
2666file afterwards in the CVS repository. Both changes are in the same region of 2666file afterwards in the CVS repository. Both changes are in the same region of
2667the file, so when you updated pkgsrc, the cvs command marked the conflicting 2667the file, so when you updated pkgsrc, the cvs command marked the conflicting
2668changes in the file. Because of these markers, the file is no longer a valid 2668changes in the file. Because of these markers, the file is no longer a valid
2669Makefile. 2669Makefile.
2670 2670
2671Have a look at that file, and if you don't need your local changes anymore, you 2671Have a look at that file, and if you don't need your local changes anymore, you
2672can remove that file and run cvs -q update -dP in that directory to download 2672can remove that file and run cvs -q update -dP in that directory to download
2673the current version. 2673the current version.
2674 2674
2675Part II. The pkgsrc developer's guide 2675Part II. The pkgsrc developer's guide
2676 2676
2677This part of the book deals with creating and modifying packages. It starts 2677This part of the book deals with creating and modifying packages. It starts
2678with a "HOWTO"-like guide on creating a new package. The remaining chapters are 2678with a "HOWTO"-like guide on creating a new package. The remaining chapters are
2679more like a reference manual for pkgsrc. 2679more like a reference manual for pkgsrc.
2680 2680
2681Table of Contents 2681Table of Contents
2682 2682
268311. Getting help 268311. Getting help
268412. Package components - files, directories and contents 268412. Package components - files, directories and contents
2685 2685
2686 12.1. Makefile 2686 12.1. Makefile
2687 12.2. distinfo 2687 12.2. distinfo
2688 12.3. patches/* 2688 12.3. patches/*
2689 2689
2690 12.3.1. Structure of a single patch file 2690 12.3.1. Structure of a single patch file
2691 12.3.2. Creating patch files 2691 12.3.2. Creating patch files
2692 12.3.3. Sources where the patch files come from 2692 12.3.3. Sources where the patch files come from
2693 12.3.4. Patching guidelines 2693 12.3.4. Patching guidelines
2694 12.3.5. Feedback to the author 2694 12.3.5. Feedback to the author
2695 2695
2696 12.4. Other mandatory files 2696 12.4. Other mandatory files
2697 12.5. Optional files 2697 12.5. Optional files
2698 2698
2699 12.5.1. Files affecting the binary package 2699 12.5.1. Files affecting the binary package
2700 12.5.2. Files affecting the build process 2700 12.5.2. Files affecting the build process
2701 12.5.3. Files affecting nothing at all 2701 12.5.3. Files affecting nothing at all
2702 2702
2703 12.6. work* 2703 12.6. work*
2704 12.7. files/* 2704 12.7. files/*
2705 2705
270613. The build process 270613. The build process
2707 2707
2708 13.1. Introduction 2708 13.1. Introduction
2709 13.2. Program location 2709 13.2. Program location
2710 13.3. Directories used during the build process 2710 13.3. Directories used during the build process
2711 13.4. Running a phase 2711 13.4. Running a phase
2712 13.5. The fetch phase 2712 13.5. The fetch phase
2713 2713
2714 13.5.1. What to fetch and where to get it from 2714 13.5.1. What to fetch and where to get it from
2715 13.5.2. How are the files fetched? 2715 13.5.2. How are the files fetched?
2716 2716
2717 13.6. The checksum phase 2717 13.6. The checksum phase
2718 13.7. The extract phase 2718 13.7. The extract phase
2719 13.8. The patch phase 2719 13.8. The patch phase
2720 13.9. The tools phase 2720 13.9. The tools phase
2721 13.10. The wrapper phase 2721 13.10. The wrapper phase
2722 13.11. The configure phase 2722 13.11. The configure phase
2723 13.12. The build phase 2723 13.12. The build phase
2724 13.13. The test phase 2724 13.13. The test phase
2725 13.14. The install phase 2725 13.14. The install phase
2726 13.15. The package phase 2726 13.15. The package phase
2727 13.16. Cleaning up 2727 13.16. Cleaning up
2728 13.17. Other helpful targets 2728 13.17. Other helpful targets
2729 2729
273014. Creating a new pkgsrc package from scratch 273014. Creating a new pkgsrc package from scratch
2731 2731
2732 14.1. Common types of packages 2732 14.1. Common types of packages
2733 2733
2734 14.1.1. Python modules and programs 2734 14.1.1. Python modules and programs
2735 14.1.2. R packages 2735 14.1.2. R packages
2736 14.1.3. TeXlive packages 2736 14.1.3. TeXlive packages
2737 2737
2738 14.2. Examples 2738 14.2. Examples
2739 2739
2740 14.2.1. How the www/nvu package came into pkgsrc 2740 14.2.1. How the www/nvu package came into pkgsrc
2741 2741
274215. Programming in Makefiles 274215. Programming in Makefiles
2743 2743
2744 15.1. Caveats 2744 15.1. Caveats
2745 15.2. Makefile variables 2745 15.2. Makefile variables
2746 2746
2747 15.2.1. Naming conventions 2747 15.2.1. Naming conventions
2748 2748
2749 15.3. Code snippets 2749 15.3. Code snippets
2750 2750
2751 15.3.1. Adding things to a list 2751 15.3.1. Adding things to a list
2752 15.3.2. Echoing a string exactly as-is 2752 15.3.2. Echoing a string exactly as-is
2753 15.3.3. Passing CFLAGS to GNU configure scripts 2753 15.3.3. Passing CFLAGS to GNU configure scripts
2754 15.3.4. Handling possibly empty variables 2754 15.3.4. Handling possibly empty variables
2755 2755
275616. Options handling 275616. Options handling
2757 2757
2758 16.1. Global default options 2758 16.1. Global default options
2759 16.2. Converting packages to use bsd.options.mk 2759 16.2. Converting packages to use bsd.options.mk
2760 16.3. Option Names 2760 16.3. Option Names
2761 16.4. Determining the options of dependencies 2761 16.4. Determining the options of dependencies
2762 2762
276317. Tools needed for building or running 276317. Tools needed for building or running
2764 2764
2765 17.1. Tools for pkgsrc builds 2765 17.1. Tools for pkgsrc builds
2766 17.2. Tools needed by packages 2766 17.2. Tools needed by packages
2767 17.3. Tools provided by platforms 2767 17.3. Tools provided by platforms
2768 2768
276918. Buildlink methodology 276918. Buildlink methodology
2770 2770
2771 18.1. Converting packages to use buildlink3 2771 18.1. Converting packages to use buildlink3
2772 18.2. Writing buildlink3.mk files 2772 18.2. Writing buildlink3.mk files
2773 2773
2774 18.2.1. Anatomy of a buildlink3.mk file 2774 18.2.1. Anatomy of a buildlink3.mk file
2775 18.2.2. Updating BUILDLINK_API_DEPENDS.pkg and BUILDLINK_ABI_DEPENDS. 2775 18.2.2. Updating BUILDLINK_API_DEPENDS.pkg and BUILDLINK_ABI_DEPENDS.
2776 pkg in buildlink3.mk files 2776 pkg in buildlink3.mk files
2777 2777
2778 18.3. Writing builtin.mk files 2778 18.3. Writing builtin.mk files
2779 2779
2780 18.3.1. Anatomy of a builtin.mk file 2780 18.3.1. Anatomy of a builtin.mk file
2781 18.3.2. Global preferences for native or pkgsrc software 2781 18.3.2. Global preferences for native or pkgsrc software
2782 2782
278319. PLIST issues 278319. PLIST issues
2784 2784
2785 19.1. RCS ID 2785 19.1. RCS ID
2786 19.2. Semi-automatic PLIST generation 2786 19.2. Semi-automatic PLIST generation
2787 19.3. Tweaking output of make print-PLIST 2787 19.3. Tweaking output of make print-PLIST
2788 19.4. Variable substitution in PLIST 2788 19.4. Variable substitution in PLIST
2789 19.5. Man page compression 2789 19.5. Man page compression
2790 19.6. Changing PLIST source with PLIST_SRC 2790 19.6. Changing PLIST source with PLIST_SRC
2791 19.7. Platform-specific and differing PLISTs 2791 19.7. Platform-specific and differing PLISTs
2792 19.8. Build-specific PLISTs 2792 19.8. Build-specific PLISTs
2793 19.9. Sharing directories between packages 2793 19.9. Sharing directories between packages
2794 2794
279520. The pkginstall framework 279520. The pkginstall framework
2796 2796
2797 20.1. Files and directories outside the installation prefix 2797 20.1. Files and directories outside the installation prefix
2798 2798
2799 20.1.1. Directory manipulation 2799 20.1.1. Directory manipulation
2800 20.1.2. File manipulation 2800 20.1.2. File manipulation
2801 2801
2802 20.2. Configuration files 2802 20.2. Configuration files
2803 2803
2804 20.2.1. How PKG_SYSCONFDIR is set 2804 20.2.1. How PKG_SYSCONFDIR is set
2805 20.2.2. Telling the software where configuration files are 2805 20.2.2. Telling the software where configuration files are
2806 20.2.3. Patching installations 2806 20.2.3. Patching installations
2807 20.2.4. Disabling handling of configuration files 2807 20.2.4. Disabling handling of configuration files
2808 2808
2809 20.3. System startup scripts 2809 20.3. System startup scripts
2810 2810
2811 20.3.1. Disabling handling of system startup scripts 2811 20.3.1. Disabling handling of system startup scripts
2812 2812
2813 20.4. System users and groups 2813 20.4. System users and groups
2814 20.5. System shells 2814 20.5. System shells
2815 2815
2816 20.5.1. Disabling shell registration 2816 20.5.1. Disabling shell registration
2817 2817
2818 20.6. Fonts 2818 20.6. Fonts
2819 2819
2820 20.6.1. Disabling automatic update of the fonts databases 2820 20.6.1. Disabling automatic update of the fonts databases
2821 2821
282221. Making your package work 282221. Making your package work
2823 2823
2824 21.1. General operation 2824 21.1. General operation
2825 2825
2826 21.1.1. How to pull in user-settable variables from mk.conf 2826 21.1.1. How to pull in user-settable variables from mk.conf
2827 21.1.2. User interaction 2827 21.1.2. User interaction
2828 21.1.3. Handling licenses 2828 21.1.3. Handling licenses
2829 21.1.4. Restricted packages 2829 21.1.4. Restricted packages
2830 21.1.5. Handling dependencies 2830 21.1.5. Handling dependencies
2831 21.1.6. Handling conflicts with other packages 2831 21.1.6. Handling conflicts with other packages
2832 21.1.7. Packages that cannot or should not be built 2832 21.1.7. Packages that cannot or should not be built
2833 21.1.8. Packages which should not be deleted, once installed 2833 21.1.8. Packages which should not be deleted, once installed
2834 21.1.9. Handling packages with security problems 2834 21.1.9. Handling packages with security problems
2835 21.1.10. How to handle incrementing versions when fixing an existing 2835 21.1.10. How to handle incrementing versions when fixing an existing
2836 package 2836 package
2837 21.1.11. Substituting variable text in the package files (the SUBST 2837 21.1.11. Substituting variable text in the package files (the SUBST
2838 framework) 2838 framework)
2839 2839
2840 21.2. The fetch phase 2840 21.2. The fetch phase
2841 2841
2842 21.2.1. Packages whose distfiles aren't available for plain downloading 2842 21.2.1. Packages whose distfiles aren't available for plain downloading
2843 21.2.2. How to handle modified distfiles with the 'old' name 2843 21.2.2. How to handle modified distfiles with the 'old' name
2844 21.2.3. Packages hosted on github.com 2844 21.2.3. Packages hosted on github.com
2845 2845
2846 21.3. The configure phase 2846 21.3. The configure phase
2847 2847
2848 21.3.1. Shared libraries - libtool 2848 21.3.1. Shared libraries - libtool
2849 21.3.2. Using libtool on GNU packages that already support libtool 2849 21.3.2. Using libtool on GNU packages that already support libtool
2850 21.3.3. GNU Autoconf/Automake 2850 21.3.3. GNU Autoconf/Automake
2851 21.3.4. Meson / ninja 2851 21.3.4. Meson / ninja
2852 2852
2853 21.4. Programming languages 2853 21.4. Programming languages
2854 2854
2855 21.4.1. C, C++, and Fortran 2855 21.4.1. C, C++, and Fortran
2856 21.4.2. Java 2856 21.4.2. Java
2857 21.4.3. Go 2857 21.4.3. Go
2858 21.4.4. Rust 2858 21.4.4. Rust
2859 21.4.5. Packages containing Perl scripts 2859 21.4.5. Packages containing Perl scripts
2860 21.4.6. Packages containing shell scripts 2860 21.4.6. Packages containing shell scripts
2861 21.4.7. Other programming languages 2861 21.4.7. Other programming languages
2862 2862
2863 21.5. The build phase 2863 21.5. The build phase
2864 2864
2865 21.5.1. Compiling C and C++ code conditionally 2865 21.5.1. Compiling C and C++ code conditionally
2866 21.5.2. How to handle compiler bugs 2866 21.5.2. How to handle compiler bugs
2867 21.5.3. No such file or directory 2867 21.5.3. No such file or directory
2868 21.5.4. Undefined reference to "..." 2868 21.5.4. Undefined reference to "..."
2869 21.5.5. Running out of memory 2869 21.5.5. Running out of memory
2870 2870
2871 21.6. The install phase 2871 21.6. The install phase
2872 2872
2873 21.6.1. Creating needed directories 2873 21.6.1. Creating needed directories
2874 21.6.2. Where to install documentation 2874 21.6.2. Where to install documentation
2875 21.6.3. Installing highscore files 2875 21.6.3. Installing highscore files
2876 21.6.4. Adding DESTDIR support to packages 2876 21.6.4. Adding DESTDIR support to packages
2877 21.6.5. Packages with hardcoded paths to other interpreters 2877 21.6.5. Packages with hardcoded paths to other interpreters
2878 21.6.6. Packages installing Perl modules 2878 21.6.6. Packages installing Perl modules
2879 21.6.7. Packages installing info files 2879 21.6.7. Packages installing info files
2880 21.6.8. Packages installing man pages 2880 21.6.8. Packages installing man pages
2881 21.6.9. Packages installing X11 fonts 2881 21.6.9. Packages installing X11 fonts
2882 21.6.10. Packages installing SGML or XML data 2882 21.6.10. Packages installing SGML or XML data
2883 21.6.11. Packages installing extensions to the MIME database 2883 21.6.11. Packages installing extensions to the MIME database
2884 21.6.12. Packages using intltool 2884 21.6.12. Packages using intltool
2885 21.6.13. Packages installing startup scripts 2885 21.6.13. Packages installing startup scripts
2886 21.6.14. Packages installing TeX modules 2886 21.6.14. Packages installing TeX modules
2887 21.6.15. Packages supporting running binaries in emulation 2887 21.6.15. Packages supporting running binaries in emulation
2888 21.6.16. Packages installing hicolor icons 2888 21.6.16. Packages installing hicolor icons
2889 21.6.17. Packages installing desktop files 2889 21.6.17. Packages installing desktop files
2890 2890
2891 21.7. Marking packages as having problems 2891 21.7. Marking packages as having problems
2892 2892
289322. GNOME packaging and porting 289322. GNOME packaging and porting
2894 2894
2895 22.1. Meta packages 2895 22.1. Meta packages
2896 22.2. Packaging a GNOME application 2896 22.2. Packaging a GNOME application
2897 22.3. Updating GNOME to a newer version 2897 22.3. Updating GNOME to a newer version
2898 22.4. Patching guidelines 2898 22.4. Patching guidelines
2899 2899
290023. Submitting and Committing 290023. Submitting and Committing
2901 2901
2902 23.1. Submitting binary packages 2902 23.1. Submitting binary packages
2903 23.2. Submitting source packages (for non-NetBSD-developers) 2903 23.2. Submitting source packages (for non-NetBSD-developers)
2904 23.3. General notes when adding, updating, or removing packages 2904 23.3. General notes when adding, updating, or removing packages
2905 23.4. Commit Messages 2905 23.4. Commit Messages
2906 23.5. Committing: Adding a package to CVS 2906 23.5. Committing: Adding a package to CVS
2907 23.6. Updating a package to a newer version 2907 23.6. Updating a package to a newer version
2908 23.7. Renaming a package in pkgsrc 2908 23.7. Renaming a package in pkgsrc
2909 23.8. Moving a package in pkgsrc 2909 23.8. Moving a package in pkgsrc
2910 2910
291124. Frequently Asked Questions 291124. Frequently Asked Questions
2912 2912
2913Chapter 11. Getting help 2913Chapter 11. Getting help
2914 2914
2915To get help when developing pkgsrc, the definitive source is this document, the 2915To get help when developing pkgsrc, the definitive source is this document, the
2916pkgsrc guide. If you don't find anything here, there are alternatives: 2916pkgsrc guide. If you don't find anything here, there are alternatives:
2917 2917
2918 * The built-in pkgsrc help, which is available after bootstrapping pkgsrc. 2918 * The built-in pkgsrc help, which is available after bootstrapping pkgsrc.
2919 Run bmake help topic=? to get help for any topic, such as a variable name 2919 Run bmake help topic=? to get help for any topic, such as a variable name
2920 like BUILD_DEFS, a make target like do-build, a missing C or C++ function 2920 like BUILD_DEFS, a make target like do-build, a missing C or C++ function
2921 like strcasecmp or any other topic. 2921 like strcasecmp or any other topic.
2922 2922
2923 The available help topics are listed in Appendix E, Help topics. 2923 The available help topics are listed in Appendix E, Help topics.
2924 2924
2925 * To see the value of a single variable, run bmake show-var VARNAME=X. 2925 * To see the value of a single variable, run bmake show-var VARNAME=X.
2926 2926
2927 * To see the values of the most common variables, run bmake show-all. These 2927 * To see the values of the most common variables, run bmake show-all. These
2928 variables are grouped by topic. To see the variables for a single topic, 2928 variables are grouped by topic. To see the variables for a single topic,
2929 run bmake show-all-topic, for example bmake show-all-fetch. 2929 run bmake show-all-topic, for example bmake show-all-fetch.
2930 2930
2931 * The tech-pkg mailing list, to which you can subscribe and then ask your 2931 * The tech-pkg mailing list, to which you can subscribe and then ask your
2932 questions. 2932 questions.
2933 2933
2934 * The #pkgsrc IRC channel, which is accessible via a web browser or by using 2934 * The #pkgsrc IRC channel, which is accessible via a web browser or by using
2935 a specialized chat program such as XChat. Pick any user name and join the 2935 a specialized chat program such as XChat. Pick any user name and join the
2936 channel #pkgsrc. 2936 channel #pkgsrc.
2937 2937
2938Chapter 12. Package components - files, directories and contents 2938Chapter 12. Package components - files, directories and contents
2939 2939
2940Table of Contents 2940Table of Contents
2941 2941
294212.1. Makefile 294212.1. Makefile
294312.2. distinfo 294312.2. distinfo
294412.3. patches/* 294412.3. patches/*
2945 2945
2946 12.3.1. Structure of a single patch file 2946 12.3.1. Structure of a single patch file
2947 12.3.2. Creating patch files 2947 12.3.2. Creating patch files
2948 12.3.3. Sources where the patch files come from 2948 12.3.3. Sources where the patch files come from
2949 12.3.4. Patching guidelines 2949 12.3.4. Patching guidelines
2950 12.3.5. Feedback to the author 2950 12.3.5. Feedback to the author
2951 2951
295212.4. Other mandatory files 295212.4. Other mandatory files
295312.5. Optional files 295312.5. Optional files
2954 2954
2955 12.5.1. Files affecting the binary package 2955 12.5.1. Files affecting the binary package
2956 12.5.2. Files affecting the build process 2956 12.5.2. Files affecting the build process
2957 12.5.3. Files affecting nothing at all 2957 12.5.3. Files affecting nothing at all
2958 2958
295912.6. work* 295912.6. work*
296012.7. files/* 296012.7. files/*
2961 2961
2962Whenever you're preparing a package, there are a number of files involved which 2962Whenever you're preparing a package, there are a number of files involved which
2963are described in the following sections. 2963are described in the following sections.
2964 2964
296512.1. Makefile 296512.1. Makefile
2966 2966
2967Building, installation and creation of a binary package are all controlled by 2967Building, installation and creation of a binary package are all controlled by
2968the package's Makefile. The Makefile describes various things about a package, 2968the package's Makefile. The Makefile describes various things about a package,
2969for example from where to get it, how to configure, build, and install it. 2969for example from where to get it, how to configure, build, and install it.
2970 2970
2971A package Makefile contains several sections that describe the package. 2971A package Makefile contains several sections that describe the package.
2972 2972
2973In the first section there are the following variables, which should appear 2973In the first section there are the following variables, which should appear
2974exactly in the order given here. The order and grouping of the variables is 2974exactly in the order given here. The order and grouping of the variables is
2975mostly historical and has no further meaning. 2975mostly historical and has no further meaning.
2976 2976
2977 * DISTNAME is the basename of the distribution file to be downloaded from the 2977 * DISTNAME is the basename of the distribution file to be downloaded from the
2978 package's website. 2978 package's website.
2979 2979
2980 * PKGNAME is the name of the package, as used by pkgsrc. You need to provide 2980 * PKGNAME is the name of the package, as used by pkgsrc. You need to provide
2981 it if DISTNAME (which is the default) is not a good name for the package in 2981 it if DISTNAME (which is the default) is not a good name for the package in
2982 pkgsrc or DISTNAME is not provided (no distribution file is required). 2982 pkgsrc or DISTNAME is not provided (no distribution file is required).
2983 Usually it is the pkgsrc directory name together with the version number. 2983 Usually it is the pkgsrc directory name together with the version number.
2984 It must match the regular expression ^[A-Za-z0-9][A-Za-z0-9-_.+]*$, that 2984 It must match the regular expression ^[A-Za-z0-9][A-Za-z0-9-_.+]*$, that
2985 is, it starts with a letter or digit, and contains only letters, digits, 2985 is, it starts with a letter or digit, and contains only letters, digits,
2986 dashes, underscores, dots and plus signs. New packages should have entirely 2986 dashes, underscores, dots and plus signs. New packages should have entirely
2987 lower-case names, with the exception of some that must follow pre-existing 2987 lower-case names, with the exception of some that must follow pre-existing
2988 conventions (e.g. R packages begin with R-). You can use the :tl variable 2988 conventions (e.g. R packages begin with R-). You can use the :tl variable
2989 modifier to lower-case the package name. 2989 modifier to lower-case the package name.
2990 2990
2991 * CATEGORIES is a list of categories which the package fits in. You can 2991 * CATEGORIES is a list of categories which the package fits in. You can
2992 choose any of the top-level directories of pkgsrc for it. 2992 choose any of the top-level directories of pkgsrc for it.
2993 2993
2994 Currently the following values are available for CATEGORIES. If more than 2994 Currently the following values are available for CATEGORIES. If more than
2995 one is used, they need to be separated by spaces: 2995 one is used, they need to be separated by spaces:
2996 2996
2997 archivers cross geography meta-pkgs security 2997 archivers cross geography meta-pkgs security
2998 audio databases graphics misc shells 2998 audio databases graphics misc shells
2999 benchmarks devel ham multimedia sysutils 2999 benchmarks devel ham multimedia sysutils
3000 biology editors inputmethod net textproc 3000 biology editors inputmethod net textproc
3001 cad emulators lang news time 3001 cad emulators lang news time
3002 chat finance mail parallel wm 3002 chat finance mail parallel wm
3003 comms fonts math pkgtools www 3003 comms fonts math pkgtools www
3004 converters games mbone print x11 3004 converters games mbone print x11
3005 3005
3006 * MASTER_SITES, DYNAMIC_MASTER_SITES, DIST_SUBDIR, EXTRACT_SUFX and DISTFILES 3006 * MASTER_SITES, DYNAMIC_MASTER_SITES, DIST_SUBDIR, EXTRACT_SUFX and DISTFILES
3007 are discussed in detail in Section 13.5, "The fetch phase". 3007 are discussed in detail in Section 13.5, "The fetch phase".
3008 3008
3009The second section contains information about separately downloaded patches, if 3009The second section contains information about separately downloaded patches, if
3010any. 3010any.
3011 3011
3012 * PATCHFILES: Name(s) of additional files that contain distribution patches. 3012 * PATCHFILES: Name(s) of additional files that contain distribution patches.
3013 There is no default. pkgsrc will look for them at PATCH_SITES. They will 3013 There is no default. pkgsrc will look for them at PATCH_SITES. They will
3014 automatically be uncompressed before patching if the names end with .gz or 3014 automatically be uncompressed before patching if the names end with .gz or
3015 .Z. 3015 .Z.
3016 3016
3017 * PATCH_SITES: Primary location(s) for distribution patch files (see 3017 * PATCH_SITES: Primary location(s) for distribution patch files (see
3018 PATCHFILES above) if not found locally. 3018 PATCHFILES above) if not found locally.
3019 3019
3020 * PATCH_DIST_STRIP: an argument to patch(1) that sets the pathname strip 3020 * PATCH_DIST_STRIP: an argument to patch(1) that sets the pathname strip
3021 count to help find the correct files to patch. It defaults to -p0. 3021 count to help find the correct files to patch. It defaults to -p0.
3022 3022
3023The third section contains the following variables. 3023The third section contains the following variables.
3024 3024
3025 * MAINTAINER is the email address of the person who feels responsible for 3025 * MAINTAINER is the email address of the person who feels responsible for
3026 this package, and who is most likely to look at problems or questions 3026 this package, and who is most likely to look at problems or questions
3027 regarding this package which have been reported with send-pr(1). Other 3027 regarding this package which have been reported with send-pr(1). Other
3028 developers may contact the MAINTAINER before making changes to the package, 3028 developers may contact the MAINTAINER before making changes to the package,
3029 but are not required to do so. When packaging a new program, set MAINTAINER 3029 but are not required to do so. When packaging a new program, set MAINTAINER
3030 to yourself. If you really can't maintain the package for future updates, 3030 to yourself. If you really can't maintain the package for future updates,
3031 set it to <pkgsrc-users@NetBSD.org>. 3031 set it to <pkgsrc-users@NetBSD.org>.
3032 3032
3033 * OWNER should be used instead of MAINTAINER when you do not want other 3033 * OWNER should be used instead of MAINTAINER when you do not want other
3034 developers to update or change the package without contacting you first. A 3034 developers to update or change the package without contacting you first. A
3035 package Makefile should contain one of MAINTAINER or OWNER, but not both. 3035 package Makefile should contain one of MAINTAINER or OWNER, but not both.
3036 3036
3037 * HOMEPAGE is a URL where users can find more information about the package. 3037 * HOMEPAGE is a URL where users can find more information about the package.
3038 3038
3039 * COMMENT is a one-line description of the package (should not include the 3039 * COMMENT is a one-line description of the package (should not include the
3040 package name). 3040 package name).
3041 3041
3042 * LICENSE indicates the license(s) applicable for the package. See 3042 * LICENSE indicates the license(s) applicable for the package. See
3043 Section 21.1.3, "Handling licenses" for further details. 3043 Section 21.1.3, "Handling licenses" for further details.
3044 3044
3045Other variables that affect the build: 3045Other variables that affect the build:
3046 3046
3047 * WRKSRC: The directory where the interesting distribution files of the 3047 * WRKSRC: The directory where the interesting distribution files of the
3048 package are found. The default is ${WRKDIR}/${DISTNAME}, which works for 3048 package are found. The default is ${WRKDIR}/${DISTNAME}, which works for
3049 most packages. 3049 most packages.
3050 3050
3051 If a package doesn't create a subdirectory for itself (most GNU software 3051 If a package doesn't create a subdirectory for itself (most GNU software
3052 does, for instance), but extracts itself in the current directory, you 3052 does, for instance), but extracts itself in the current directory, you
3053 should set WRKSRC=${WRKDIR}. 3053 should set WRKSRC=${WRKDIR}.
3054 3054
3055 If a package doesn't create a subdirectory with the name of DISTNAME but 3055 If a package doesn't create a subdirectory with the name of DISTNAME but
3056 some different name, set WRKSRC to point to the proper name in ${WRKDIR}, 3056 some different name, set WRKSRC to point to the proper name in ${WRKDIR},
3057 for example WRKSRC=${WRKDIR}/${DISTNAME}/unix. See lang/tcl and x11/tk for 3057 for example WRKSRC=${WRKDIR}/${DISTNAME}/unix. See lang/tcl and x11/tk for
3058 other examples. 3058 other examples.
3059 3059
3060 The name of the working directory created by pkgsrc is taken from the 3060 The name of the working directory created by pkgsrc is taken from the
3061 WRKDIR_BASENAME variable. By default, its value is work. If you want to use 3061 WRKDIR_BASENAME variable. By default, its value is work. If you want to use
3062 the same pkgsrc tree for building different kinds of binary packages, you 3062 the same pkgsrc tree for building different kinds of binary packages, you
3063 can change the variable according to your needs. Two other variables handle 3063 can change the variable according to your needs. Two other variables handle
3064 common cases of setting WRKDIR_BASENAME individually. If OBJHOSTNAME is 3064 common cases of setting WRKDIR_BASENAME individually. If OBJHOSTNAME is
3065 defined in mk.conf, the first component of the host's name is attached to 3065 defined in mk.conf, the first component of the host's name is attached to
3066 the directory name. If OBJMACHINE is defined, the platform name is 3066 the directory name. If OBJMACHINE is defined, the platform name is
3067 attached, which might look like work.i386 or work.sparc. 3067 attached, which might look like work.i386 or work.sparc.
3068 3068
3069Please pay attention to the following gotchas: 3069Please pay attention to the following gotchas:
3070 3070
3071 * Add MANCOMPRESSED if man pages are installed in compressed form by the 3071 * Add MANCOMPRESSED if man pages are installed in compressed form by the
3072 package. For packages using BSD-style makefiles which honor MANZ, there is 3072 package. For packages using BSD-style makefiles which honor MANZ, there is
3073 MANCOMPRESSED_IF_MANZ. 3073 MANCOMPRESSED_IF_MANZ.
3074 3074
3075 * Replace /usr/local with "${PREFIX}" in all files (see patches, below). 3075 * Replace /usr/local with "${PREFIX}" in all files (see patches, below).
3076 3076
3077 * If the package installs any info files, see Section 21.6.7, "Packages 3077 * If the package installs any info files, see Section 21.6.7, "Packages
3078 installing info files". 3078 installing info files".
3079 3079
308012.2. distinfo 308012.2. distinfo
3081 3081
3082The distinfo file contains the message digest, or checksum, of each distfile 3082The distinfo file contains the message digest, or checksum, of each distfile
3083needed for the package. This ensures that the distfiles retrieved from the 3083needed for the package. This ensures that the distfiles retrieved from the
3084Internet have not been corrupted during transfer or altered by a malign force 3084Internet have not been corrupted during transfer or altered by a malign force
3085to introduce a security hole. To provide maximum security, all distfiles are 3085to introduce a security hole. To provide maximum security, all distfiles are
3086protected using three different message digest algorithms (SHA1, RMD160, 3086protected using three different message digest algorithms (SHA1, RMD160,
3087SHA512), as well as the file size. 3087SHA512), as well as the file size.
3088 3088
3089The distinfo file also contains the checksums for all the patches found in the 3089The distinfo file also contains the checksums for all the patches found in the
3090patches directory (see Section 12.3, "patches/*"). These checksums ensure that 3090patches directory (see Section 12.3, "patches/*"). These checksums ensure that
3091patches are only applied intentionally and that they don't accidentally change, 3091patches are only applied intentionally and that they don't accidentally change,
3092e.g. when merging different changes together. They also make sure that new 3092e.g. when merging different changes together. They also make sure that new
3093patches are actually added to CVS and old ones are removed. Too see whether the 3093patches are actually added to CVS and old ones are removed. Too see whether the
3094patches and the distinfo file match, run pkglint after changing the patches. 3094patches and the distinfo file match, run pkglint after changing the patches.
3095 3095
3096To regenerate the distinfo file, use the make distinfo command. 3096To regenerate the distinfo file, use the make distinfo command.
3097 3097
3098Some packages have different sets of distfiles depending on the platform, for 3098Some packages have different sets of distfiles depending on the platform, for
3099example lang/openjdk8. These are kept in the same distinfo file and care should 3099example lang/openjdk8. These are kept in the same distinfo file and care should
3100be taken when upgrading such a package to ensure distfile information is not 3100be taken when upgrading such a package to ensure distfile information is not
3101lost. 3101lost.
3102 3102
310312.3. patches/* 310312.3. patches/*
3104 3104
3105Some packages don't work out-of-the box on the various platforms that are 3105Some packages don't work out-of-the box on the various platforms that are
3106supported by pkgsrc. These packages need to be patched to make them work. The 3106supported by pkgsrc. These packages need to be patched to make them work. The
3107patch files can be found in the patches/ directory. 3107patch files can be found in the patches/ directory.
3108 3108
3109In the patch phase, these patches are applied to the files in WRKSRC directory 3109In the patch phase, these patches are applied to the files in WRKSRC directory
3110after extracting them, in alphabetic order. 3110after extracting them, in alphabetic order.
3111 3111
311212.3.1. Structure of a single patch file 311212.3.1. Structure of a single patch file
3113 3113
3114The patch-* files should be in diff -bu format, and apply without a fuzz to 3114The patch-* files should be in diff -bu format, and apply without a fuzz to
3115avoid problems. (To force patches to apply with fuzz you can set 3115avoid problems. (To force patches to apply with fuzz you can set
3116PATCH_FUZZ_FACTOR=-F2). Furthermore, each patch should contain only changes for 3116PATCH_FUZZ_FACTOR=-F2). Furthermore, each patch should contain only changes for
3117a single file, and no file should be patched by more than one patch file. This 3117a single file, and no file should be patched by more than one patch file. This
3118helps to keep future modifications simple. 3118helps to keep future modifications simple.
3119 3119
3120Each patch file is structured as follows: In the first line, there is the RCS 3120Each patch file is structured as follows: In the first line, there is the RCS
3121Id of the patch itself. The second line should be empty for aesthetic reasons. 3121Id of the patch itself. The second line should be empty for aesthetic reasons.
3122After that, there should be a comment for each change that the patch does. 3122After that, there should be a comment for each change that the patch does.
3123There are a number of standard cases: 3123There are a number of standard cases:
3124 3124
3125 * Patches for commonly known vulnerabilities should mention the vulnerability 3125 * Patches for commonly known vulnerabilities should mention the vulnerability
3126 ID (CAN, CVE). 3126 ID (CAN, CVE).
3127 3127
3128 * Patches that change source code should mention the platform and other 3128 * Patches that change source code should mention the platform and other
3129 environment (for example, the compiler) that the patch is needed for. 3129 environment (for example, the compiler) that the patch is needed for.
3130 3130
3131The patch should be commented so that any developer who knows the code of the 3131The patch should be commented so that any developer who knows the code of the
3132application can make some use of the patch. Special care should be taken for 3132application can make some use of the patch. Special care should be taken for
3133the upstream developers, since we generally want that they accept our patches, 3133the upstream developers, since we generally want that they accept our patches,
3134so we have less work in the future. 3134so we have less work in the future.
3135 3135
313612.3.2. Creating patch files 313612.3.2. Creating patch files
3137 3137
3138One important thing to mention is to pay attention that no RCS IDs get stored 3138One important thing to mention is to pay attention that no RCS IDs get stored
3139in the patch files, as these will cause problems when later checked into the 3139in the patch files, as these will cause problems when later checked into the
3140NetBSD CVS tree. Use the pkgdiff command from the pkgtools/pkgdiff package to 3140NetBSD CVS tree. Use the pkgdiff command from the pkgtools/pkgdiff package to
3141avoid these problems. 3141avoid these problems.
3142 3142
3143For even more automation, we recommend using mkpatches from the same package to 3143For even more automation, we recommend using mkpatches from the same package to
3144make a whole set of patches. You just have to back up files before you edit 3144make a whole set of patches. You just have to back up files before you edit
3145them to filename.orig, e.g., with cp -p filename filename.orig or, easier, by 3145them to filename.orig, e.g., with cp -p filename filename.orig or, easier, by
3146using pkgvi again from the same package. If you upgrade a package this way, you 3146using pkgvi again from the same package. If you upgrade a package this way, you
3147can easily compare the new set of patches with the previously existing one with 3147can easily compare the new set of patches with the previously existing one with
3148patchdiff. The files in patches are replaced by new files, so carefully check 3148patchdiff. The files in patches are replaced by new files, so carefully check
3149if you want to take all the changes. 3149if you want to take all the changes.
3150 3150
3151When you have finished a package, remember to generate the checksums for the 3151When you have finished a package, remember to generate the checksums for the
3152patch files by using the make makepatchsum command, see Section 12.2, 3152patch files by using the make makepatchsum command, see Section 12.2,
3153"distinfo". 3153"distinfo".
3154 3154
3155When adding a patch that corrects a problem in the distfile (rather than e.g. 3155When adding a patch that corrects a problem in the distfile (rather than e.g.
3156enforcing pkgsrc's view of where man pages should go), send the patch as a bug 3156enforcing pkgsrc's view of where man pages should go), send the patch as a bug
3157report to the maintainer. This benefits non-pkgsrc users of the package, and 3157report to the maintainer. This benefits non-pkgsrc users of the package, and
3158usually makes it possible to remove the patch in future version. 3158usually makes it possible to remove the patch in future version.
3159 3159
3160The file names of the patch files are usually of the form patch- 3160The file names of the patch files are usually of the form patch-
3161path_to_file__with__underscores.c. Many packages still use the previous 3161path_to_file__with__underscores.c. Many packages still use the previous
3162convention patch-[a-z][a-z], but new patches should be of the form containing 3162convention patch-[a-z][a-z], but new patches should be of the form containing
3163the filename. mkpatches included in pkgtools/pkgdiff takes care of the name 3163the filename. mkpatches included in pkgtools/pkgdiff takes care of the name
3164automatically. 3164automatically.
3165 3165
3166When updating pre-existing patch files, if a file uses the old patch-[a-z][a-z] 3166When updating pre-existing patch files, if a file uses the old patch-[a-z][a-z]
3167convention, it's best not to change it to the new form, as that will just cause 3167convention, it's best not to change it to the new form, as that will just cause
3168churn that makes it harder to track changes to patching over time. Similarly, 3168churn that makes it harder to track changes to patching over time. Similarly,
3169if a patch now applies at different line offsets, but still applies cleanly 3169if a patch now applies at different line offsets, but still applies cleanly
3170as-is, there's no need to update it, as that also unnecessarily complicates the 3170as-is, there's no need to update it, as that also unnecessarily complicates the
3171patch history. 3171patch history.
3172 3172
317312.3.3. Sources where the patch files come from 317312.3.3. Sources where the patch files come from
3174 3174
3175If you want to share patches between multiple packages in pkgsrc, e.g. because 3175If you want to share patches between multiple packages in pkgsrc, e.g. because
3176they use the same distfiles, set PATCHDIR to the path where the patch files can 3176they use the same distfiles, set PATCHDIR to the path where the patch files can
3177be found, e.g.: 3177be found, e.g.:
3178 3178
3179PATCHDIR= ../../editors/xemacs/patches 3179PATCHDIR= ../../editors/xemacs/patches
3180 3180
3181Patch files that are distributed by the author or other maintainers can be 3181Patch files that are distributed by the author or other maintainers can be
3182listed in PATCHFILES. 3182listed in PATCHFILES.
3183 3183
3184If it is desired to store any patches that should not be committed into pkgsrc, 3184If it is desired to store any patches that should not be committed into pkgsrc,
3185they can be kept outside the pkgsrc tree in the $LOCALPATCHES directory. The 3185they can be kept outside the pkgsrc tree in the $LOCALPATCHES directory. The
3186directory tree there is expected to have the same "category/package" structure 3186directory tree there is expected to have the same "category/package" structure
3187as pkgsrc, and patches are expected to be stored inside these dirs (also known 3187as pkgsrc, and patches are expected to be stored inside these dirs (also known
3188as $LOCALPATCHES/$PKGPATH). For example, if you want to keep a private patch 3188as $LOCALPATCHES/$PKGPATH). For example, if you want to keep a private patch
3189for pkgsrc/graphics/png, keep it in $LOCALPATCHES/graphics/png/mypatch. All 3189for pkgsrc/graphics/png, keep it in $LOCALPATCHES/graphics/png/mypatch. All
3190files in the named directory are expected to be patch files, and they are 3190files in the named directory are expected to be patch files, and they are
3191applied after pkgsrc patches are applied. 3191applied after pkgsrc patches are applied.
3192 3192
319312.3.4. Patching guidelines 319312.3.4. Patching guidelines
3194 3194
3195When fixing a portability issue in the code do not use preprocessor magic to 3195When fixing a portability issue in the code do not use preprocessor magic to
3196check for the current operating system nor platform. Doing so hurts portability 3196check for the current operating system nor platform. Doing so hurts portability
3197to other platforms because the OS-specific details are not abstracted 3197to other platforms because the OS-specific details are not abstracted
3198appropriately. 3198appropriately.
3199 3199
3200The general rule to follow is: instead of checking for the operating system the 3200The general rule to follow is: instead of checking for the operating system the
3201application is being built on, check for the specific features you need. For 3201application is being built on, check for the specific features you need. For
3202example, instead of assuming that kqueue is available under NetBSD and using 3202example, instead of assuming that kqueue is available under NetBSD and using
3203the __NetBSD__ macro to conditionalize kqueue support, add a check that detects 3203the __NetBSD__ macro to conditionalize kqueue support, add a check that detects
3204kqueue itself -- yes, this generally involves patching the configure script. 3204kqueue itself -- yes, this generally involves patching the configure script.
3205There is absolutely nothing that prevents some OSes from adopting interfaces 3205There is absolutely nothing that prevents some OSes from adopting interfaces
3206from other OSes (e.g. Linux implementing kqueue), something that the above 3206from other OSes (e.g. Linux implementing kqueue), something that the above
3207checks cannot take into account. 3207checks cannot take into account.
3208 3208
3209Of course, checking for features generally involves more work on the 3209Of course, checking for features generally involves more work on the
3210developer's side, but the resulting changes are cleaner and there are chances 3210developer's side, but the resulting changes are cleaner and there are chances
3211they will work on many other platforms. Not to mention that there are higher 3211they will work on many other platforms. Not to mention that there are higher
3212chances of being later integrated into the mainstream sources. Remember: It 3212chances of being later integrated into the mainstream sources. Remember: It
3213doesn't work unless it is right! 3213doesn't work unless it is right!
3214 3214
3215Some typical examples: 3215Some typical examples:
3216 3216
3217Table 12.1. Patching examples 3217Table 12.1. Patching examples
3218 3218
3219+-------------------------------------------------------------------------------------------+ 3219+-------------------------------------------------------------------------------------------+
3220| Where | Incorrect | Correct | 3220| Where | Incorrect | Correct |
3221|---------+--------------------------+------------------------------------------------------| 3221|---------+--------------------------+------------------------------------------------------|
3222| |case ${target_os} in | | 3222| |case ${target_os} in | |
3223|configure|netbsd*) have_kvm=yes ;; |AC_CHECK_LIB(kvm, kvm_open, have_kvm=yes, have_kvm=no)| 3223|configure|netbsd*) have_kvm=yes ;; |AC_CHECK_LIB(kvm, kvm_open, have_kvm=yes, have_kvm=no)|
3224|script |*) have_kvm=no ;; | | 3224|script |*) have_kvm=no ;; | |
3225| |esac | | 3225| |esac | |
3226|---------+--------------------------+------------------------------------------------------| 3226|---------+--------------------------+------------------------------------------------------|
3227|C source |#if defined(__NetBSD__) |#if defined(HAVE_SYS_EVENT_H) | 3227|C source |#if defined(__NetBSD__) |#if defined(HAVE_SYS_EVENT_H) |
3228|file |# include <sys/event.h> |# include <sys/event.h> | 3228|file |# include <sys/event.h> |# include <sys/event.h> |
3229| |#endif |#endif | 3229| |#endif |#endif |
3230|---------+--------------------------+------------------------------------------------------| 3230|---------+--------------------------+------------------------------------------------------|
3231| |int |int | 3231| |int |int |
3232| |monitor_file(...) |monitor_file(...) | 3232| |monitor_file(...) |monitor_file(...) |
3233| |{ |{ | 3233| |{ |{ |
3234| |#if defined(__NetBSD__) |#if defined(HAVE_KQUEUE) | 3234| |#if defined(__NetBSD__) |#if defined(HAVE_KQUEUE) |
3235|C source | int fd = kqueue();| int fd = kqueue(); | 3235|C source | int fd = kqueue();| int fd = kqueue(); |
3236|file | ... | ... | 3236|file | ... | ... |
3237| |#else |#else | 3237| |#else |#else |
3238| | ... | ... | 3238| | ... | ... |
3239| |#endif |#endif | 3239| |#endif |#endif |
3240| |} |} | 3240| |} |} |
3241+-------------------------------------------------------------------------------------------+ 3241+-------------------------------------------------------------------------------------------+
3242 3242
3243 3243
324412.3.5. Feedback to the author 324412.3.5. Feedback to the author
3245 3245
3246Always, always, always feed back any portability fixes or improvements you do 3246Always, always, always feed back any portability fixes or improvements you do
3247to a package to the mainstream developers. This is the only way to get their 3247to a package to the mainstream developers. This is the only way to get their
3248attention on portability issues and to ensure that future versions can be built 3248attention on portability issues and to ensure that future versions can be built
3249out-of-the box on NetBSD. Furthermore, any user that gets newer distfiles will 3249out-of-the box on NetBSD. Furthermore, any user that gets newer distfiles will
3250get the fixes straight from the packaged code. 3250get the fixes straight from the packaged code.
3251 3251
3252This generally involves cleaning up the patches (because sometimes the patches 3252This generally involves cleaning up the patches (because sometimes the patches
3253that are added to pkgsrc are quick hacks), filing bug reports in the 3253that are added to pkgsrc are quick hacks), filing bug reports in the
3254appropriate trackers for the projects and working with the mainstream authors 3254appropriate trackers for the projects and working with the mainstream authors
3255to accept your changes. It is extremely important that you do it so that the 3255to accept your changes. It is extremely important that you do it so that the
3256packages in pkgsrc are kept simple and thus further changes can be done without 3256packages in pkgsrc are kept simple and thus further changes can be done without
3257much hassle. 3257much hassle.
3258 3258
3259When you have done this, please add a URL to the upstream bug report to the 3259When you have done this, please add a URL to the upstream bug report to the
3260patch comment. 3260patch comment.
3261 3261
3262Support the idea of free software! 3262Support the idea of free software!
3263 3263
326412.4. Other mandatory files 326412.4. Other mandatory files
3265 3265
3266DESCR 3266DESCR
3267 3267
3268 A multi-line description of the piece of software. This should include any 3268 A multi-line description of the piece of software. This should include any
3269 credits where they are due. Please bear in mind that others do not share 3269 credits where they are due. Please bear in mind that others do not share
3270 your sense of humour (or spelling idiosyncrasies), and that others will 3270 your sense of humour (or spelling idiosyncrasies), and that others will
3271 read everything that you write here. 3271 read everything that you write here.
3272 3272
3273PLIST 3273PLIST
3274 3274
3275 This file governs the files that are installed on your system: all the 3275 This file governs the files that are installed on your system: all the
3276 binaries, manual pages, etc. There are other directives which may be 3276 binaries, manual pages, etc. There are other directives which may be
3277 entered in this file, to control the creation and deletion of directories, 3277 entered in this file, to control the creation and deletion of directories,
3278 and the location of inserted files. See Chapter 19, PLIST issues for more 3278 and the location of inserted files. See Chapter 19, PLIST issues for more
3279 information. 3279 information.
3280 3280
328112.5. Optional files 328112.5. Optional files
3282 3282
328312.5.1. Files affecting the binary package 328312.5.1. Files affecting the binary package
3284 3284
3285INSTALL 3285INSTALL
3286 3286
3287 This shell script is invoked twice by pkg_add(1). First time after package 3287 This shell script is invoked twice by pkg_add(1). First time after package
3288 extraction and before files are moved in place, the second time after the 3288 extraction and before files are moved in place, the second time after the
3289 files to install are moved in place. This can be used to do any custom 3289 files to install are moved in place. This can be used to do any custom
3290 procedures not possible with @exec commands in PLIST. See pkg_add(1) and 3290 procedures not possible with @exec commands in PLIST. See pkg_add(1) and
3291 pkg_create(1) for more information. See also Section 20.1, "Files and 3291 pkg_create(1) for more information. See also Section 20.1, "Files and
3292 directories outside the installation prefix". Please note that you can 3292 directories outside the installation prefix". Please note that you can
3293 modify variables in it easily by using FILES_SUBST in the package's 3293 modify variables in it easily by using FILES_SUBST in the package's
3294 Makefile: 3294 Makefile:
3295 3295
3296 FILES_SUBST+= SOMEVAR="somevalue" 3296 FILES_SUBST+= SOMEVAR="somevalue"
3297 3297
3298 replaces "@SOMEVAR@" with "somevalue" in the INSTALL. By default, 3298 replaces "@SOMEVAR@" with "somevalue" in the INSTALL. By default,
3299 substitution is performed for PREFIX, LOCALBASE, X11BASE, VARBASE, and a 3299 substitution is performed for PREFIX, LOCALBASE, X11BASE, VARBASE, and a
3300 few others, type make help topic=FILES_SUBST for a complete list. 3300 few others, type make help topic=FILES_SUBST for a complete list.
3301 3301
3302DEINSTALL 3302DEINSTALL
3303 3303
3304 This script is executed before and after any files are removed. It is this 3304 This script is executed before and after any files are removed. It is this
3305 script's responsibility to clean up any additional messy details around the 3305 script's responsibility to clean up any additional messy details around the
3306 package's installation, since all pkg_delete knows is how to delete the 3306 package's installation, since all pkg_delete knows is how to delete the
3307 files created in the original distribution. See pkg_delete(1) and 3307 files created in the original distribution. See pkg_delete(1) and
3308 pkg_create(1) for more information. The same methods to replace variables 3308 pkg_create(1) for more information. The same methods to replace variables
3309 can be used as for the INSTALL file. 3309 can be used as for the INSTALL file.
3310 3310
3311MESSAGE 3311MESSAGE
3312 3312
3313 This file is displayed after installation of the package. While this was 3313 This file is displayed after installation of the package. While this was
3314 used often in the past, it has two problems: the display will be missed if 3314 used often in the past, it has two problems: the display will be missed if
3315 many packages are intalled at once, and the person installing the package 3315 many packages are intalled at once, and the person installing the package
3316 and the one using or configuring it may be different. It should therefore 3316 and the one using or configuring it may be different. It should therefore
3317 be used only in exceptional circumstances where lasting negative 3317 be used only in exceptional circumstances where lasting negative
3318 consequences would result from someone not reading it. 3318 consequences would result from someone not reading it.
3319 3319
3320 MESSAGE should not be used for: 3320 MESSAGE should not be used for:
3321 3321
3322 + exhortations to read the documentation 3322 + exhortations to read the documentation
3323 3323
3324 + reminders to install rc.d files and set variables 3324 + reminders to install rc.d files and set variables
3325 3325
3326 + anything that should be explained in the installation/configuration 3326 + anything that should be explained in the installation/configuration
3327 documentation that should come with the package 3327 documentation that should come with the package
3328 3328
3329 If the documentation provided by upstream needs enhancing, create e.g. 3329 If the documentation provided by upstream needs enhancing, create e.g.
3330 files/README.pkgsrc and install it in the package's documentation 3330 files/README.pkgsrc and install it in the package's documentation
3331 directory. 3331 directory.
3332 3332
3333 Note that MESSAGE is shown for all operating systems and all init systems. 3333 Note that MESSAGE is shown for all operating systems and all init systems.
3334 If a MESSAGE is necessary, it should be narrowed to only those operating 3334 If a MESSAGE is necessary, it should be narrowed to only those operating
3335 systems and init systems to which it applies. 3335 systems and init systems to which it applies.
3336 3336
3337 Note that you can modify variables in it easily by using MESSAGE_SUBST in 3337 Note that you can modify variables in it easily by using MESSAGE_SUBST in
3338 the package's Makefile: 3338 the package's Makefile:
3339 3339
3340 MESSAGE_SUBST+= SOMEVAR="somevalue" 3340 MESSAGE_SUBST+= SOMEVAR="somevalue"
3341 3341
3342 replaces "${SOMEVAR}" with "somevalue" in MESSAGE. By default, substitution 3342 replaces "${SOMEVAR}" with "somevalue" in MESSAGE. By default, substitution
3343 is performed for PKGNAME, PKGBASE, PREFIX, LOCALBASE, X11BASE, 3343 is performed for PKGNAME, PKGBASE, PREFIX, LOCALBASE, X11BASE,
3344 PKG_SYSCONFDIR, ROOT_GROUP, and ROOT_USER. 3344 PKG_SYSCONFDIR, ROOT_GROUP, and ROOT_USER.
3345 3345
3346 You can display a different or additional files by setting the MESSAGE_SRC 3346 You can display a different or additional files by setting the MESSAGE_SRC
3347 variable. Its default is MESSAGE, if the file exists. 3347 variable. Its default is MESSAGE, if the file exists.
3348 3348
3349ALTERNATIVES 3349ALTERNATIVES
3350 3350
3351 This file is used by the alternatives framework. It creates, configures, 3351 This file is used by the alternatives framework. It creates, configures,
3352 and destroys generic wrappers used to run programs with similar interfaces. 3352 and destroys generic wrappers used to run programs with similar interfaces.
3353 See pkg_alternatives(8) from pkgtools/pkg_alternatives for more 3353 See pkg_alternatives(8) from pkgtools/pkg_alternatives for more
3354 information. 3354 information.
3355 3355
3356 Each line of the file contains two filenames, first the wrapper and then 3356 Each line of the file contains two filenames, first the wrapper and then
3357 the alternative provided by the package. Both paths are relative to PREFIX. 3357 the alternative provided by the package. Both paths are relative to PREFIX.
3358 3358
335912.5.2. Files affecting the build process 335912.5.2. Files affecting the build process
3360 3360
3361Makefile.common 3361Makefile.common
3362 3362
3363 This file contains arbitrary things that could also go into a Makefile, but 3363 This file contains arbitrary things that could also go into a Makefile, but
3364 its purpose is to be used by more than one package. This file should only 3364 its purpose is to be used by more than one package. This file should only
3365 be used when the packages that will use the file are known in advance. For 3365 be used when the packages that will use the file are known in advance. For
3366 other purposes it is often better to write a *.mk file and give it a good 3366 other purposes it is often better to write a *.mk file and give it a good
3367 name that describes what it does. 3367 name that describes what it does.
3368 3368
3369buildlink3.mk 3369buildlink3.mk
3370 3370
3371 This file contains the dependency information for the buildlink3 framework 3371 This file contains the dependency information for the buildlink3 framework
3372 (see Chapter 18, Buildlink methodology). 3372 (see Chapter 18, Buildlink methodology).
3373 3373
3374hacks.mk 3374hacks.mk
3375 3375
3376 This file contains workarounds for compiler bugs and similar things. It is 3376 This file contains workarounds for compiler bugs and similar things. It is
3377 included automatically by the pkgsrc infrastructure, so you don't need an 3377 included automatically by the pkgsrc infrastructure, so you don't need an
3378 extra .include line for it. 3378 extra .include line for it.
3379 3379
3380options.mk 3380options.mk
3381 3381
3382 This file contains the code for the package-specific options (see 3382 This file contains the code for the package-specific options (see
3383 Chapter 16, Options handling) that can be selected by the user. If a 3383 Chapter 16, Options handling) that can be selected by the user. If a
3384 package has only one or two options, it is equally acceptable to put the 3384 package has only one or two options, it is equally acceptable to put the
3385 code directly into the Makefile. 3385 code directly into the Makefile.
3386 3386
338712.5.3. Files affecting nothing at all 338712.5.3. Files affecting nothing at all
3388 3388
3389README* 3389README*
3390 3390
3391 These files do not take place in the creation of a package and thus are 3391 These files do not take place in the creation of a package and thus are
3392 purely informative to the package developer. 3392 purely informative to the package developer.
3393 3393
3394TODO 3394TODO
3395 3395
3396 This file contains things that need to be done to make the package even 3396 This file contains things that need to be done to make the package even
3397 better. 3397 better.
3398 3398
339912.6. work* 339912.6. work*
3400 3400
3401When you type make, the distribution files are unpacked into the directory 3401When you type make, the distribution files are unpacked into the directory
3402denoted by WRKDIR. It can be removed by running make clean. Besides the 3402denoted by WRKDIR. It can be removed by running make clean. Besides the
3403sources, this directory is also used to keep various timestamp files. The 3403sources, this directory is also used to keep various timestamp files. The
3404directory gets removed completely on clean. The default is ${.CURDIR}/work or $ 3404directory gets removed completely on clean. The default is ${.CURDIR}/work or $
3405{.CURDIR}/work.${MACHINE_ARCH} if OBJMACHINE is set. 3405{.CURDIR}/work.${MACHINE_ARCH} if OBJMACHINE is set.
3406 3406
340712.7. files/* 340712.7. files/*
3408 3408
3409If you have any files that you wish to be placed in the package prior to 3409If you have any files that you wish to be placed in the package prior to
3410configuration or building, you can place these files here and use a ${CP} 3410configuration or building, you can place these files here and use a ${CP}
3411command in the "post-extract" target to achieve this. 3411command in the "post-extract" target to achieve this.
3412 3412
3413If you want to share files in this way with other packages, set the FILESDIR 3413If you want to share files in this way with other packages, set the FILESDIR
3414variable to point to the other package's files directory, e.g.: 3414variable to point to the other package's files directory, e.g.:
3415 3415
3416FILESDIR= ../../editors/xemacs/files 3416FILESDIR= ../../editors/xemacs/files
3417 3417
3418Chapter 13. The build process 3418Chapter 13. The build process
3419 3419
3420Table of Contents 3420Table of Contents
3421 3421
342213.1. Introduction 342213.1. Introduction
342313.2. Program location 342313.2. Program location
342413.3. Directories used during the build process 342413.3. Directories used during the build process
342513.4. Running a phase 342513.4. Running a phase
342613.5. The fetch phase 342613.5. The fetch phase
3427 3427
3428 13.5.1. What to fetch and where to get it from 3428 13.5.1. What to fetch and where to get it from
3429 13.5.2. How are the files fetched? 3429 13.5.2. How are the files fetched?
3430 3430
343113.6. The checksum phase 343113.6. The checksum phase
343213.7. The extract phase 343213.7. The extract phase
343313.8. The patch phase 343313.8. The patch phase
343413.9. The tools phase 343413.9. The tools phase
343513.10. The wrapper phase 343513.10. The wrapper phase
343613.11. The configure phase 343613.11. The configure phase
343713.12. The build phase 343713.12. The build phase
343813.13. The test phase 343813.13. The test phase
343913.14. The install phase 343913.14. The install phase
344013.15. The package phase 344013.15. The package phase
344113.16. Cleaning up 344113.16. Cleaning up
344213.17. Other helpful targets 344213.17. Other helpful targets
3443 3443
344413.1. Introduction 344413.1. Introduction
3445 3445
3446This chapter gives a detailed description on how a package is built. Building a 3446This chapter gives a detailed description on how a package is built. Building a
3447package is separated into different phases (for example fetch, build, install), 3447package is separated into different phases (for example fetch, build, install),
3448all of which are described in the following sections. Each phase is split into 3448all of which are described in the following sections. Each phase is split into
3449so-called stages, which take the name of the containing phase, prefixed by one 3449so-called stages, which take the name of the containing phase, prefixed by one
3450of pre-, do- or post-. (Examples are pre-configure, post-build.) Most of the 3450of pre-, do- or post-. (Examples are pre-configure, post-build.) Most of the
3451actual work is done in the do-* stages. 3451actual work is done in the do-* stages.
3452 3452
3453Never override the regular targets (like fetch), if you have to, override the 3453Never override the regular targets (like fetch), if you have to, override the
3454do-* ones instead. 3454do-* ones instead.
3455 3455
3456The basic steps for building a program are always the same. First the program's 3456The basic steps for building a program are always the same. First the program's
3457source (distfile) must be brought to the local system and then extracted. After 3457source (distfile) must be brought to the local system and then extracted. After
3458any pkgsrc-specific patches to compile properly are applied, the software can 3458any pkgsrc-specific patches to compile properly are applied, the software can
3459be configured, then built (usually by compiling), and finally the generated 3459be configured, then built (usually by compiling), and finally the generated
3460binaries, etc. can be put into place on the system. 3460binaries, etc. can be put into place on the system.
3461 3461
3462To get more details about what is happening at each step, you can set the 3462To get more details about what is happening at each step, you can set the
3463PKG_VERBOSE variable, or the PATCH_DEBUG variable if you are just interested in 3463PKG_VERBOSE variable, or the PATCH_DEBUG variable if you are just interested in
3464more details about the patch step. 3464more details about the patch step.
3465 3465
346613.2. Program location 346613.2. Program location
3467 3467
3468Before outlining the process performed by the NetBSD package system in the next 3468Before outlining the process performed by the NetBSD package system in the next
3469section, here's a brief discussion on where programs are installed, and which 3469section, here's a brief discussion on where programs are installed, and which
3470variables influence this. 3470variables influence this.
3471 3471
3472The automatic variable PREFIX indicates where all files of the final program 3472The automatic variable PREFIX indicates where all files of the final program
3473shall be installed. It is usually set to LOCALBASE (/usr/pkg), or CROSSBASE for 3473shall be installed. It is usually set to LOCALBASE (/usr/pkg), or CROSSBASE for
3474pkgs in the cross category. The value of PREFIX needs to be put into the 3474pkgs in the cross category. The value of PREFIX needs to be put into the
3475various places in the program's source where paths to these files are encoded. 3475various places in the program's source where paths to these files are encoded.
3476See Section 12.3, "patches/*" and Section 21.3.1, "Shared libraries - libtool" 3476See Section 12.3, "patches/*" and Section 21.3.1, "Shared libraries - libtool"
3477for more details. 3477for more details.
3478 3478
3479When choosing which of these variables to use, follow the following rules: 3479When choosing which of these variables to use, follow the following rules:
3480 3480
3481 * PREFIX always points to the location where the current pkg will be 3481 * PREFIX always points to the location where the current pkg will be
3482 installed. When referring to a pkg's own installation path, use "${PREFIX}" 3482 installed. When referring to a pkg's own installation path, use "${PREFIX}"
3483 . 3483 .
3484 3484
3485 * LOCALBASE is where all pkgs are installed. If you need to construct a -I or 3485 * LOCALBASE is where all pkgs are installed. If you need to construct a -I or
3486 -L argument to the compiler to find includes and libraries installed by 3486 -L argument to the compiler to find includes and libraries installed by
3487 another pkg, use "${LOCALBASE}". The name LOCALBASE stems from FreeBSD, 3487 another pkg, use "${LOCALBASE}". The name LOCALBASE stems from FreeBSD,
3488 which installed all packages in /usr/local. As pkgsrc leaves /usr/local for 3488 which installed all packages in /usr/local. As pkgsrc leaves /usr/local for
3489 the system administrator, this variable is a misnomer. 3489 the system administrator, this variable is a misnomer.
3490 3490
3491 * X11BASE is where the actual X11 distribution (from xsrc, etc.) is 3491 * X11BASE is where the actual X11 distribution (from xsrc, etc.) is
3492 installed. When looking for standard X11 includes (not those installed by a 3492 installed. When looking for standard X11 includes (not those installed by a
3493 package), use "${X11BASE}". 3493 package), use "${X11BASE}".
3494 3494
3495 * X11-based packages using imake must set USE_IMAKE to be installed correctly 3495 * X11-based packages using imake must set USE_IMAKE to be installed correctly
3496 under LOCALBASE. 3496 under LOCALBASE.
3497 3497
3498 * Within ${PREFIX}, packages should install files according to hier(7), with 3498 * Within ${PREFIX}, packages should install files according to hier(7), with
3499 the exception that manual pages go into ${PREFIX}/man, not ${PREFIX}/share/ 3499 the exception that manual pages go into ${PREFIX}/man, not ${PREFIX}/share/
3500 man. 3500 man.
3501 3501
350213.3. Directories used during the build process 350213.3. Directories used during the build process
3503 3503
3504When building a package, various directories are used to store source files, 3504When building a package, various directories are used to store source files,
3505temporary files, pkgsrc-internal files, and so on. These directories are 3505temporary files, pkgsrc-internal files, and so on. These directories are
3506explained here. 3506explained here.
3507 3507
3508Some of the directory variables contain relative pathnames. There are two 3508Some of the directory variables contain relative pathnames. There are two
3509common base directories for these relative directories: PKGSRCDIR/PKGPATH is 3509common base directories for these relative directories: PKGSRCDIR/PKGPATH is
3510used for directories that are pkgsrc-specific. WRKSRC is used for directories 3510used for directories that are pkgsrc-specific. WRKSRC is used for directories
3511inside the package itself. 3511inside the package itself.
3512 3512
3513PKGSRCDIR 3513PKGSRCDIR
3514 3514
3515 This is an absolute pathname that points to the pkgsrc root directory. 3515 This is an absolute pathname that points to the pkgsrc root directory.
3516 Generally, you don't need it. 3516 Generally, you don't need it.
3517 3517
3518PKGDIR 3518PKGDIR
3519 3519
3520 This is an absolute pathname that points to the current package. 3520 This is an absolute pathname that points to the current package.
3521 3521
3522PKGPATH 3522PKGPATH
3523 3523
3524 This is a pathname relative to PKGSRCDIR that points to the current 3524 This is a pathname relative to PKGSRCDIR that points to the current
3525 package. 3525 package. It is defined after including bsd.prefs.mk and can be used in
 3526 makefile fragments that are used by several packages to distinguish between
 3527 these packages. Other variables that would serve the same purpose are
 3528 PKGBASE and PKGNAME, but these are only defined after including bsd.pkg.mk,
 3529 which is too late.
 3530
 3531 In mk.conf, the pkgsrc user can use PKGPATH to tweak variables like
 3532 MAKE_JOBS and CFLAGS.
3526 3533
3527WRKDIR 3534WRKDIR
3528 3535
3529 This is an absolute pathname pointing to the directory where all work takes 3536 This is an absolute pathname pointing to the directory where all work takes
3530 place. The distfiles are extracted to this directory. It also contains 3537 place. The distfiles are extracted to this directory. It also contains
3531 temporary directories and log files used by the various pkgsrc frameworks, 3538 temporary directories and log files used by the various pkgsrc frameworks,
3532 like buildlink or the wrappers. 3539 like buildlink or the wrappers.
3533 3540
3534WRKSRC 3541WRKSRC
3535 3542
3536 This is an absolute pathname pointing to the directory where the distfiles 3543 This is an absolute pathname pointing to the directory where the distfiles
3537 are extracted. It is usually a direct subdirectory of WRKDIR, and often 3544 are extracted. It is usually a direct subdirectory of WRKDIR, and often
3538 it's the only directory entry that isn't hidden. This variable may be 3545 it's the only directory entry that isn't hidden. This variable may be
3539 changed by a package Makefile. 3546 changed by a package Makefile.
3540 3547
3541The CREATE_WRKDIR_SYMLINK definition takes either the value yes or no and 3548The CREATE_WRKDIR_SYMLINK definition takes either the value yes or no and
3542defaults to no. It indicates whether a symbolic link to the WRKDIR is to be 3549defaults to no. It indicates whether a symbolic link to the WRKDIR is to be
3543created in the pkgsrc entry's directory. If users would like to have their 3550created in the pkgsrc entry's directory. If users would like to have their
3544pkgsrc trees behave in a read-only manner, then the value of 3551pkgsrc trees behave in a read-only manner, then the value of
3545CREATE_WRKDIR_SYMLINK should be set to no. 3552CREATE_WRKDIR_SYMLINK should be set to no.
3546 3553
354713.4. Running a phase 355413.4. Running a phase
3548 3555
3549You can run a particular phase by typing make phase, where phase is the name of 3556You can run a particular phase by typing make phase, where phase is the name of
3550the phase. This will automatically run all phases that are required for this 3557the phase. This will automatically run all phases that are required for this
3551phase. The default phase is build, that is, when you run make without 3558phase. The default phase is build, that is, when you run make without
3552parameters in a package directory, the package will be built, but not 3559parameters in a package directory, the package will be built, but not
3553installed. 3560installed.
3554 3561
355513.5. The fetch phase 356213.5. The fetch phase
3556 3563
3557The first step in building a package is to fetch the distribution files 3564The first step in building a package is to fetch the distribution files
3558(distfiles) from the sites that are providing them. This is the task of the  3565(distfiles) from the sites that are providing them. This is the task of the
3559fetch phase. 3566fetch phase.
3560 3567
356113.5.1. What to fetch and where to get it from 356813.5.1. What to fetch and where to get it from
3562 3569
3563In simple cases, MASTER_SITES defines all URLs from where the distfile, whose 3570In simple cases, MASTER_SITES defines all URLs from where the distfile, whose
3564name is derived from the DISTNAME variable, is fetched. The more complicated 3571name is derived from the DISTNAME variable, is fetched. The more complicated
3565cases are described below. 3572cases are described below.
3566 3573
3567The variable DISTFILES specifies the list of distfiles that have to be fetched. 3574The variable DISTFILES specifies the list of distfiles that have to be fetched.
3568Its value defaults to ${DEFAULT_DISTFILES} and its value is ${DISTNAME}$ 3575Its value defaults to ${DEFAULT_DISTFILES} and its value is ${DISTNAME}$
3569{EXTRACT_SUFX}, so that most packages don't need to define it at all. 3576{EXTRACT_SUFX}, so that most packages don't need to define it at all.
3570EXTRACT_SUFX is .tar.gz by default, but can be changed freely. Note that if 3577EXTRACT_SUFX is .tar.gz by default, but can be changed freely. Note that if
3571your package requires additional distfiles to the default one, you cannot just 3578your package requires additional distfiles to the default one, you cannot just
3572append the additional filenames using the += operator, but you have write for 3579append the additional filenames using the += operator, but you have write for
3573example: 3580example:
3574 3581
3575DISTFILES= ${DEFAULT_DISTFILES} additional-files.tar.gz 3582DISTFILES= ${DEFAULT_DISTFILES} additional-files.tar.gz
3576 3583
3577Each distfile is fetched from a list of sites, usually MASTER_SITES. If the 3584Each distfile is fetched from a list of sites, usually MASTER_SITES. If the
3578package has multiple DISTFILES or multiple PATCHFILES from different sites, you 3585package has multiple DISTFILES or multiple PATCHFILES from different sites, you
3579can set SITES.distfile to the list of URLs where the file distfile (including 3586can set SITES.distfile to the list of URLs where the file distfile (including
3580the suffix) can be found. 3587the suffix) can be found.
3581 3588
3582DISTFILES= ${DISTNAME}${EXTRACT_SUFX} 3589DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
3583DISTFILES+= foo-file.tar.gz 3590DISTFILES+= foo-file.tar.gz
3584SITES.foo-file.tar.gz= \ 3591SITES.foo-file.tar.gz= \
3585https://www.somewhere.com/somehow/ \ 3592https://www.somewhere.com/somehow/ \
3586https://www.somewhereelse.com/mirror/somehow/ 3593https://www.somewhereelse.com/mirror/somehow/
3587 3594
3588When actually fetching the distfiles, each item from MASTER_SITES or SITES.* 3595When actually fetching the distfiles, each item from MASTER_SITES or SITES.*
3589gets the name of each distfile appended to it, without an intermediate slash. 3596gets the name of each distfile appended to it, without an intermediate slash.
3590Therefore, all site values have to end with a slash or other separator 3597Therefore, all site values have to end with a slash or other separator
3591character. This allows for example to set MASTER_SITES to a URL of a CGI script 3598character. This allows for example to set MASTER_SITES to a URL of a CGI script
3592that gets the name of the distfile as a parameter. In this case, the definition 3599that gets the name of the distfile as a parameter. In this case, the definition
3593would look like: 3600would look like:
3594 3601
3595MASTER_SITES= https://www.example.com/download.cgi?file= 3602MASTER_SITES= https://www.example.com/download.cgi?file=
3596 3603
3597The exception to this rule are URLs starting with a dash. In that case the URL 3604The exception to this rule are URLs starting with a dash. In that case the URL
3598is taken as is, fetched and the result stored under the name of the distfile. 3605is taken as is, fetched and the result stored under the name of the distfile.
3599You can use this style for the case when the download URL style does not match 3606You can use this style for the case when the download URL style does not match
3600the above common case. For example, if permanent download URL is a redirector 3607the above common case. For example, if permanent download URL is a redirector
3601to the real download URL, or the download file name is offered by an HTTP 3608to the real download URL, or the download file name is offered by an HTTP
3602Content-Disposition header. In the following example, foo-1.0.0.tar.gz will be 3609Content-Disposition header. In the following example, foo-1.0.0.tar.gz will be
3603created instead of the default v1.0.0.tar.gz. 3610created instead of the default v1.0.0.tar.gz.
3604 3611
3605DISTNAME= foo-1.0.0 3612DISTNAME= foo-1.0.0
3606MASTER_SITES= -https://www.example.com/archive/v1.0.0.tar.gz 3613MASTER_SITES= -https://www.example.com/archive/v1.0.0.tar.gz
3607 3614
3608There are some predefined values for MASTER_SITES, which can be used in 3615There are some predefined values for MASTER_SITES, which can be used in
3609packages. The names of the variables should speak for themselves. 3616packages. The names of the variables should speak for themselves.
3610 3617
3611MASTER_SITE_APACHE MASTER_SITE_BACKUP 3618MASTER_SITE_APACHE MASTER_SITE_BACKUP
3612MASTER_SITE_CRATESIO MASTER_SITE_CYGWIN 3619MASTER_SITE_CRATESIO MASTER_SITE_CYGWIN
3613MASTER_SITE_DEBIAN MASTER_SITE_FREEBSD 3620MASTER_SITE_DEBIAN MASTER_SITE_FREEBSD
3614MASTER_SITE_FREEBSD_LOCAL MASTER_SITE_GENTOO 3621MASTER_SITE_FREEBSD_LOCAL MASTER_SITE_GENTOO
3615MASTER_SITE_GITHUB MASTER_SITE_GITLAB 3622MASTER_SITE_GITHUB MASTER_SITE_GITLAB
3616MASTER_SITE_GNOME MASTER_SITE_GNU 3623MASTER_SITE_GNOME MASTER_SITE_GNU
3617MASTER_SITE_GNUSTEP MASTER_SITE_HASKELL_HACKAGE 3624MASTER_SITE_GNUSTEP MASTER_SITE_HASKELL_HACKAGE
3618MASTER_SITE_IFARCHIVE MASTER_SITE_KDE 3625MASTER_SITE_IFARCHIVE MASTER_SITE_KDE
3619MASTER_SITE_MOZILLA MASTER_SITE_MOZILLA_ALL 3626MASTER_SITE_MOZILLA MASTER_SITE_MOZILLA_ALL
3620MASTER_SITE_MYSQL MASTER_SITE_NETLIB 3627MASTER_SITE_MYSQL MASTER_SITE_NETLIB
3621MASTER_SITE_OPENBSD MASTER_SITE_OPENOFFICE 3628MASTER_SITE_OPENBSD MASTER_SITE_OPENOFFICE
3622MASTER_SITE_OSDN MASTER_SITE_PERL_CPAN 3629MASTER_SITE_OSDN MASTER_SITE_PERL_CPAN
3623MASTER_SITE_PGSQL MASTER_SITE_PYPI 3630MASTER_SITE_PGSQL MASTER_SITE_PYPI
3624MASTER_SITE_RUBYGEMS MASTER_SITE_R_CRAN 3631MASTER_SITE_RUBYGEMS MASTER_SITE_R_CRAN
3625MASTER_SITE_SOURCEFORGE MASTER_SITE_SUNSITE 3632MASTER_SITE_SOURCEFORGE MASTER_SITE_SUNSITE
3626MASTER_SITE_SUSE MASTER_SITE_TEX_CTAN 3633MASTER_SITE_SUSE MASTER_SITE_TEX_CTAN
3627MASTER_SITE_XCONTRIB MASTER_SITE_XEMACS 3634MASTER_SITE_XCONTRIB MASTER_SITE_XEMACS
3628MASTER_SITE_XORG  3635MASTER_SITE_XORG
3629 3636
3630Some explanations for the less self-explaining ones: MASTER_SITE_BACKUP 3637Some explanations for the less self-explaining ones: MASTER_SITE_BACKUP
3631contains backup sites for packages that are maintained in ftp://ftp.NetBSD.org/ 3638contains backup sites for packages that are maintained in ftp://ftp.NetBSD.org/
3632pub/pkgsrc/distfiles/${DIST_SUBDIR}. MASTER_SITE_LOCAL contains local package 3639pub/pkgsrc/distfiles/${DIST_SUBDIR}. MASTER_SITE_LOCAL contains local package
3633source distributions that are maintained in ftp://ftp.NetBSD.org/pub/pkgsrc/ 3640source distributions that are maintained in ftp://ftp.NetBSD.org/pub/pkgsrc/
3634distfiles/LOCAL_PORTS/. 3641distfiles/LOCAL_PORTS/.
3635 3642
3636If you choose one of these predefined sites, you may want to specify a 3643If you choose one of these predefined sites, you may want to specify a
3637subdirectory of that site. Since these macros may expand to more than one 3644subdirectory of that site. Since these macros may expand to more than one
3638actual site, you must use the following construct to specify a subdirectory: 3645actual site, you must use the following construct to specify a subdirectory:
3639 3646
3640MASTER_SITES= ${MASTER_SITE_GNU:=subdirectory/name/} 3647MASTER_SITES= ${MASTER_SITE_GNU:=subdirectory/name/}
3641MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=project_name/} 3648MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=project_name/}
3642 3649
3643Note the trailing slash after the subdirectory name. 3650Note the trailing slash after the subdirectory name.
3644 3651
364513.5.2. How are the files fetched? 365213.5.2. How are the files fetched?
3646 3653
3647The fetch phase makes sure that all the distfiles exist in a local directory 3654The fetch phase makes sure that all the distfiles exist in a local directory
3648(DISTDIR, which can be set by the pkgsrc user). If the files do not exist, they 3655(DISTDIR, which can be set by the pkgsrc user). If the files do not exist, they
3649are fetched using commands of the form 3656are fetched using commands of the form
3650 3657
3651${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS} 3658${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}
3652 3659
3653where ${site} varies through several possibilities in turn: first, 3660where ${site} varies through several possibilities in turn: first,
3654MASTER_SITE_OVERRIDE is tried, then the sites specified in either SITES.file if 3661MASTER_SITE_OVERRIDE is tried, then the sites specified in either SITES.file if
3655defined, else MASTER_SITES or PATCH_SITES, as applies, then finally the value 3662defined, else MASTER_SITES or PATCH_SITES, as applies, then finally the value
3656of MASTER_SITE_BACKUP. The order of all except the first and the last can be 3663of MASTER_SITE_BACKUP. The order of all except the first and the last can be
3657optionally sorted by the user, via setting either MASTER_SORT_RANDOM, and 3664optionally sorted by the user, via setting either MASTER_SORT_RANDOM, and
3658MASTER_SORT_AWK or MASTER_SORT_REGEX. 3665MASTER_SORT_AWK or MASTER_SORT_REGEX.
3659 3666
3660The specific command and arguments used depend on the FETCH_USING parameter. 3667The specific command and arguments used depend on the FETCH_USING parameter.
3661The example above is for FETCH_USING=custom. 3668The example above is for FETCH_USING=custom.
3662 3669
3663The distfiles mirror run by the NetBSD Foundation uses the mirror-distfiles 3670The distfiles mirror run by the NetBSD Foundation uses the mirror-distfiles
3664target to mirror the distfiles, if they are freely distributable. Packages 3671target to mirror the distfiles, if they are freely distributable. Packages
3665setting NO_SRC_ON_FTP (usually to "${RESTRICTED}") will not have their 3672setting NO_SRC_ON_FTP (usually to "${RESTRICTED}") will not have their
3666distfiles mirrored. 3673distfiles mirrored.
3667 3674
366813.6. The checksum phase 367513.6. The checksum phase
3669 3676
3670After the distfile(s) are fetched, their checksum is generated and compared 3677After the distfile(s) are fetched, their checksum is generated and compared
3671with the checksums stored in the distinfo file. If the checksums don't match, 3678with the checksums stored in the distinfo file. If the checksums don't match,
3672the build is aborted. This is to ensure the same distfile is used for building, 3679the build is aborted. This is to ensure the same distfile is used for building,
3673and that the distfile wasn't changed, e.g. by some malign force, deliberately 3680and that the distfile wasn't changed, e.g. by some malign force, deliberately
3674changed distfiles on the master distribution site or network lossage. 3681changed distfiles on the master distribution site or network lossage.
3675 3682
367613.7. The extract phase 368313.7. The extract phase
3677 3684
3678When the distfiles are present on the local system, they need to be extracted, 3685When the distfiles are present on the local system, they need to be extracted,
3679as they usually come in the form of some compressed archive format. 3686as they usually come in the form of some compressed archive format.
3680 3687
3681By default, all DISTFILES are extracted. If you only need some of them, you can 3688By default, all DISTFILES are extracted. If you only need some of them, you can
3682set the EXTRACT_ONLY variable to the list of those files. 3689set the EXTRACT_ONLY variable to the list of those files.
3683 3690
3684Extracting the files is usually done by a little program, mk/extract/extract, 3691Extracting the files is usually done by a little program, mk/extract/extract,
3685which already knows how to extract various archive formats, so most likely you 3692which already knows how to extract various archive formats, so most likely you
3686will not need to change anything here. But if you need, the following variables 3693will not need to change anything here. But if you need, the following variables
3687may help you: 3694may help you:
3688 3695
3689EXTRACT_OPTS_{BIN,LHA,PAX,RAR,TAR,ZIP,ZOO} 3696EXTRACT_OPTS_{BIN,LHA,PAX,RAR,TAR,ZIP,ZOO}
3690 3697
3691 Use these variables to override the default options for an extract command, 3698 Use these variables to override the default options for an extract command,
3692 which are defined in mk/extract/extract. 3699 which are defined in mk/extract/extract.
3693 3700
3694EXTRACT_USING 3701EXTRACT_USING
3695 3702
3696 This variable can be set to bsdtar, gtar, nbtar (which is the default 3703 This variable can be set to bsdtar, gtar, nbtar (which is the default
3697 value), pax, or an absolute pathname pointing to the command with which tar 3704 value), pax, or an absolute pathname pointing to the command with which tar
3698 archives should be extracted. It is preferred to choose bsdtar over gtar if 3705 archives should be extracted. It is preferred to choose bsdtar over gtar if
3699 NetBSD's pax-as-tar is not good enough. 3706 NetBSD's pax-as-tar is not good enough.
3700 3707
3701If the extract program doesn't serve your needs, you can also override the 3708If the extract program doesn't serve your needs, you can also override the
3702EXTRACT_CMD variable, which holds the command used for extracting the files. 3709EXTRACT_CMD variable, which holds the command used for extracting the files.
3703This command is executed in the ${WRKSRC} directory. During execution of this 3710This command is executed in the ${WRKSRC} directory. During execution of this
3704command, the shell variable extract_file holds the absolute pathname of the 3711command, the shell variable extract_file holds the absolute pathname of the
3705file that is going to be extracted. 3712file that is going to be extracted.
3706 3713
3707And if that still does not suffice, you can override the do-extract target in 3714And if that still does not suffice, you can override the do-extract target in
3708the package Makefile. 3715the package Makefile.
3709 3716
371013.8. The patch phase 371713.8. The patch phase
3711 3718
3712After extraction, all the patches named by the PATCHFILES, those present in the 3719After extraction, all the patches named by the PATCHFILES, those present in the
3713patches subdirectory of the package as well as in $LOCALPATCHES/$PKGPATH (e.g. 3720patches subdirectory of the package as well as in $LOCALPATCHES/$PKGPATH (e.g.
3714/usr/local/patches/graphics/png) are applied. Patchfiles ending in .Z or .gz 3721/usr/local/patches/graphics/png) are applied. Patchfiles ending in .Z or .gz
3715are uncompressed before they are applied, files ending in .orig or .rej are 3722are uncompressed before they are applied, files ending in .orig or .rej are
3716ignored. Any special options to patch(1) can be handed in PATCH_DIST_ARGS. See 3723ignored. Any special options to patch(1) can be handed in PATCH_DIST_ARGS. See
3717Section 12.3, "patches/*" for more details. 3724Section 12.3, "patches/*" for more details.
3718 3725
3719By default patch(1) is given special arguments to make it fail if the expected 3726By default patch(1) is given special arguments to make it fail if the expected
3720text from the patch context is not found in the patched file. If that happens, 3727text from the patch context is not found in the patched file. If that happens,
3721fix the patch file by comparing it with the actual text in the file to be 3728fix the patch file by comparing it with the actual text in the file to be
3722patched. 3729patched.
3723 3730
372413.9. The tools phase 373113.9. The tools phase
3725 3732
3726This is covered in Chapter 17, Tools needed for building or running. 3733This is covered in Chapter 17, Tools needed for building or running.
3727 3734
372813.10. The wrapper phase 373513.10. The wrapper phase
3729 3736
3730This phase creates wrapper programs for the compilers and linkers. The 3737This phase creates wrapper programs for the compilers and linkers. The
3731following variables can be used to tweak the wrappers. 3738following variables can be used to tweak the wrappers.
3732 3739
3733ECHO_WRAPPER_MSG 3740ECHO_WRAPPER_MSG
3734 3741
3735 The command used to print progress messages. Does nothing by default. Set 3742 The command used to print progress messages. Does nothing by default. Set
3736 to ${ECHO} to see the progress messages. 3743 to ${ECHO} to see the progress messages.
3737 3744
3738WRAPPER_DEBUG 3745WRAPPER_DEBUG
3739 3746
3740 This variable can be set to yes (default) or no, depending on whether you 3747 This variable can be set to yes (default) or no, depending on whether you
3741 want additional information in the wrapper log file. 3748 want additional information in the wrapper log file.
3742 3749
3743WRAPPER_UPDATE_CACHE 3750WRAPPER_UPDATE_CACHE
3744 3751
3745 This variable can be set to yes or no, depending on whether the wrapper 3752 This variable can be set to yes or no, depending on whether the wrapper
3746 should use its cache, which will improve the speed. The default value is 3753 should use its cache, which will improve the speed. The default value is
3747 yes, but is forced to no if the platform does not support it. 3754 yes, but is forced to no if the platform does not support it.
3748 3755
3749WRAPPER_REORDER_CMDS 3756WRAPPER_REORDER_CMDS
3750 3757
3751 A list of reordering commands. A reordering command has the form reorder:l: 3758 A list of reordering commands. A reordering command has the form reorder:l:
3752 lib1:lib2. It ensures that that -llib1 occurs before -llib2. 3759 lib1:lib2. It ensures that that -llib1 occurs before -llib2.
3753 3760
375413.11. The configure phase 376113.11. The configure phase
3755 3762
3756Most pieces of software need information on the header files, system calls, and 3763Most pieces of software need information on the header files, system calls, and
3757library routines which are available on the platform they run on. The process 3764library routines which are available on the platform they run on. The process
3758of determining this information is known as configuration, and is usually 3765of determining this information is known as configuration, and is usually
3759automated. In most cases, a script is supplied with the distfiles, and its 3766automated. In most cases, a script is supplied with the distfiles, and its
3760invocation results in generation of header files, Makefiles, etc. 3767invocation results in generation of header files, Makefiles, etc.
3761 3768
3762If the package contains a configure script, this can be invoked by setting 3769If the package contains a configure script, this can be invoked by setting
3763HAS_CONFIGURE to "yes". If the configure script is a GNU autoconf script, you 3770HAS_CONFIGURE to "yes". If the configure script is a GNU autoconf script, you
3764should set GNU_CONFIGURE to "yes" instead. 3771should set GNU_CONFIGURE to "yes" instead.
3765 3772
3766In the do-configure stage, a rough equivalent of the following command is run. 3773In the do-configure stage, a rough equivalent of the following command is run.
3767See mk/configure/configure.mk, target do-configure-script for the exact 3774See mk/configure/configure.mk, target do-configure-script for the exact
3768definition. 3775definition.
3769 3776
3770.for dir in ${CONFIGURE_DIRS} 3777.for dir in ${CONFIGURE_DIRS}
3771 cd ${WRKSRC} && cd ${dir} \ 3778 cd ${WRKSRC} && cd ${dir} \
3772 && env ${CONFIGURE_ENV} \ 3779 && env ${CONFIGURE_ENV} \
3773 ${CONFIG_SHELL} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} 3780 ${CONFIG_SHELL} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
3774.endfor 3781.endfor
3775 3782
3776CONFIGURE_DIRS (default: ".") is a list of pathnames relative to WRKSRC. In 3783CONFIGURE_DIRS (default: ".") is a list of pathnames relative to WRKSRC. In
3777each of these directories, the configure script is run with the environment 3784each of these directories, the configure script is run with the environment
3778CONFIGURE_ENV and arguments CONFIGURE_ARGS. The variables CONFIGURE_ENV, 3785CONFIGURE_ENV and arguments CONFIGURE_ARGS. The variables CONFIGURE_ENV,
3779CONFIGURE_SCRIPT (default: "./configure") and CONFIGURE_ARGS may all be changed 3786CONFIGURE_SCRIPT (default: "./configure") and CONFIGURE_ARGS may all be changed
3780by the package. 3787by the package.
3781 3788
3782If the program uses the Perl way of configuration (mainly Perl modules, but not 3789If the program uses the Perl way of configuration (mainly Perl modules, but not
3783only), i.e. a file called Makefile.PL, it should include ../../lang/perl5/ 3790only), i.e. a file called Makefile.PL, it should include ../../lang/perl5/
3784module.mk. To set any parameter for Makefile.PL use the MAKE_PARAMS variable 3791module.mk. To set any parameter for Makefile.PL use the MAKE_PARAMS variable
3785(e.g., MAKE_PARAMS+=foo=bar 3792(e.g., MAKE_PARAMS+=foo=bar
3786 3793
3787If the program uses an Imakefile for configuration, the appropriate steps can 3794If the program uses an Imakefile for configuration, the appropriate steps can
3788be invoked by setting USE_IMAKE to "yes". If you only need xmkmf, add it to 3795be invoked by setting USE_IMAKE to "yes". If you only need xmkmf, add it to
3789USE_TOOLS. You can add variables to xmkmf's environment by adding them to the 3796USE_TOOLS. You can add variables to xmkmf's environment by adding them to the
3790SCRIPTS_ENV variable. 3797SCRIPTS_ENV variable.
3791 3798
3792If the program uses cmake for configuration, the appropriate steps can be 3799If the program uses cmake for configuration, the appropriate steps can be
3793invoked by setting USE_CMAKE to "yes". You can add variables to cmake's 3800invoked by setting USE_CMAKE to "yes". You can add variables to cmake's
3794environment by adding them to the CONFIGURE_ENV variable and arguments to cmake 3801environment by adding them to the CONFIGURE_ENV variable and arguments to cmake
3795by adding them to the CMAKE_ARGS variable. The top directory argument is given 3802by adding them to the CMAKE_ARGS variable. The top directory argument is given
3796by the CMAKE_ARG_PATH variable, that defaults to "." (relative to 3803by the CMAKE_ARG_PATH variable, that defaults to "." (relative to
3797CONFIGURE_DIRS) 3804CONFIGURE_DIRS)
3798 3805
3799If there is no configure step at all, set NO_CONFIGURE to "yes". 3806If there is no configure step at all, set NO_CONFIGURE to "yes".
3800 3807
380113.12. The build phase 380813.12. The build phase
3802 3809
3803For building a package, a rough equivalent of the following code is executed; 3810For building a package, a rough equivalent of the following code is executed;
3804see mk/build/build.mk, target do-build for the exact definition. 3811see mk/build/build.mk, target do-build for the exact definition.
3805 3812
3806.for dir in ${BUILD_DIRS} 3813.for dir in ${BUILD_DIRS}
3807 cd ${WRKSRC} && cd ${dir} \ 3814 cd ${WRKSRC} && cd ${dir} \
3808 && env ${MAKE_ENV} \ 3815 && env ${MAKE_ENV} \
3809 ${MAKE_PROGRAM} ${MAKE_FLAGS} ${BUILD_MAKE_FLAGS} \ 3816 ${MAKE_PROGRAM} ${MAKE_FLAGS} ${BUILD_MAKE_FLAGS} \
3810 -f ${MAKE_FILE} \ 3817 -f ${MAKE_FILE} \
3811 ${BUILD_TARGET} 3818 ${BUILD_TARGET}
3812.endfor 3819.endfor
3813 3820
3814BUILD_DIRS (default: ".") is a list of pathnames relative to WRKSRC. In each of 3821BUILD_DIRS (default: ".") is a list of pathnames relative to WRKSRC. In each of
3815these directories, MAKE_PROGRAM is run with the environment MAKE_ENV and 3822these directories, MAKE_PROGRAM is run with the environment MAKE_ENV and
3816arguments BUILD_MAKE_FLAGS. The variables MAKE_ENV, BUILD_MAKE_FLAGS, MAKE_FILE 3823arguments BUILD_MAKE_FLAGS. The variables MAKE_ENV, BUILD_MAKE_FLAGS, MAKE_FILE
3817and BUILD_TARGET may all be changed by the package. 3824and BUILD_TARGET may all be changed by the package.
3818 3825
3819The default value of MAKE_PROGRAM is "gmake" if USE_TOOLS contains "gmake", " 3826The default value of MAKE_PROGRAM is "gmake" if USE_TOOLS contains "gmake", "
3820make" otherwise. The default value of MAKE_FILE is "Makefile", and BUILD_TARGET 3827make" otherwise. The default value of MAKE_FILE is "Makefile", and BUILD_TARGET
3821defaults to "all". 3828defaults to "all".
3822 3829
3823If there is no build step at all, set NO_BUILD to "yes". 3830If there is no build step at all, set NO_BUILD to "yes".
3824 3831
382513.13. The test phase 383213.13. The test phase
3826 3833
3827[TODO] 3834[TODO]
3828 3835
382913.14. The install phase 383613.14. The install phase
3830 3837
3831Once the build stage has completed, the final step is to install the software 3838Once the build stage has completed, the final step is to install the software
3832in public directories, so users can access the programs and files. 3839in public directories, so users can access the programs and files.
3833 3840
3834In the install phase, a rough equivalent of the following code is executed; see 3841In the install phase, a rough equivalent of the following code is executed; see
3835mk/install/install.mk, target do-install for the exact definition. 3842mk/install/install.mk, target do-install for the exact definition.
3836Additionally, before and after this code, several consistency checks are run 3843Additionally, before and after this code, several consistency checks are run
3837against the files-to-be-installed, see mk/check/*.mk for details. 3844against the files-to-be-installed, see mk/check/*.mk for details.
3838 3845
3839.for dir in ${INSTALL_DIRS} 3846.for dir in ${INSTALL_DIRS}
3840 cd ${WRKSRC} && cd ${dir} \ 3847 cd ${WRKSRC} && cd ${dir} \
3841 && env ${INSTALL_ENV} ${MAKE_ENV} \ 3848 && env ${INSTALL_ENV} ${MAKE_ENV} \
3842 ${MAKE_PROGRAM} ${MAKE_FLAGS} ${INSTALL_MAKE_FLAGS} \ 3849 ${MAKE_PROGRAM} ${MAKE_FLAGS} ${INSTALL_MAKE_FLAGS} \
3843 -f ${MAKE_FILE} ${INSTALL_TARGET} 3850 -f ${MAKE_FILE} ${INSTALL_TARGET}
3844.endfor 3851.endfor
3845 3852
3846The variable's meanings are analogous to the ones in the build phase. 3853The variable's meanings are analogous to the ones in the build phase.
3847INSTALL_DIRS defaults to BUILD_DIRS. INSTALL_TARGET is "install" by default, 3854INSTALL_DIRS defaults to BUILD_DIRS. INSTALL_TARGET is "install" by default,
3848plus "install.man" if USE_IMAKE is defined and NO_INSTALL_MANPAGES is not 3855plus "install.man" if USE_IMAKE is defined and NO_INSTALL_MANPAGES is not
3849defined. 3856defined.
3850 3857
3851In the install phase, the following variables are useful. They are all 3858In the install phase, the following variables are useful. They are all
3852variations of the install(1) command that have the owner, group and permissions 3859variations of the install(1) command that have the owner, group and permissions
3853preset. INSTALL is the plain install command. The specialized variants, 3860preset. INSTALL is the plain install command. The specialized variants,
3854together with their intended use, are: 3861together with their intended use, are:
3855 3862
3856INSTALL_PROGRAM_DIR 3863INSTALL_PROGRAM_DIR
3857 3864
3858 directories that contain binaries 3865 directories that contain binaries
3859 3866
3860INSTALL_SCRIPT_DIR 3867INSTALL_SCRIPT_DIR
3861 3868
3862 directories that contain scripts 3869 directories that contain scripts
3863 3870
3864INSTALL_LIB_DIR 3871INSTALL_LIB_DIR
3865 3872
3866 directories that contain shared and static libraries 3873 directories that contain shared and static libraries
3867 3874
3868INSTALL_DATA_DIR 3875INSTALL_DATA_DIR
3869 3876
3870 directories that contain data files 3877 directories that contain data files
3871 3878
3872INSTALL_MAN_DIR 3879INSTALL_MAN_DIR
3873 3880
3874 directories that contain man pages 3881 directories that contain man pages
3875 3882
3876INSTALL_GAME_DIR 3883INSTALL_GAME_DIR
3877 3884
3878 directories that contain data files for games 3885 directories that contain data files for games
3879 3886
3880INSTALL_PROGRAM 3887INSTALL_PROGRAM
3881 3888
3882 binaries that can be stripped from debugging symbols 3889 binaries that can be stripped from debugging symbols
3883 3890
3884INSTALL_SCRIPT 3891INSTALL_SCRIPT
3885 3892
3886 binaries that cannot be stripped 3893 binaries that cannot be stripped
3887 3894
3888INSTALL_GAME 3895INSTALL_GAME
3889 3896
3890 game binaries 3897 game binaries
3891 3898
3892INSTALL_LIB 3899INSTALL_LIB
3893 3900
3894 shared and static libraries 3901 shared and static libraries
3895 3902
3896INSTALL_DATA 3903INSTALL_DATA
3897 3904
3898 data files 3905 data files
3899 3906
3900INSTALL_GAME_DATA 3907INSTALL_GAME_DATA
3901 3908
3902 data files for games 3909 data files for games
3903 3910
3904INSTALL_MAN 3911INSTALL_MAN
3905 3912
3906 man pages 3913 man pages
3907 3914
3908Some other variables are: 3915Some other variables are:
3909 3916
3910INSTALL_UNSTRIPPED 3917INSTALL_UNSTRIPPED
3911 3918
3912 If set to yes, do not run strip(1) when installing binaries. Any debugging 3919 If set to yes, do not run strip(1) when installing binaries. Any debugging
3913 sections and symbols present in binaries will be preserved. 3920 sections and symbols present in binaries will be preserved.
3914 3921
3915INSTALLATION_DIRS 3922INSTALLATION_DIRS
3916 3923
3917 A list of directories relative to PREFIX that are created by pkgsrc at the 3924 A list of directories relative to PREFIX that are created by pkgsrc at the
3918 beginning of the install phase. The package is supposed to create all 3925 beginning of the install phase. The package is supposed to create all
3919 needed directories itself before installing files to it and list all other 3926 needed directories itself before installing files to it and list all other
3920 directories here. 3927 directories here.
3921 3928
3922In the rare cases that a package shouldn't install anything, set NO_INSTALL to  3929In the rare cases that a package shouldn't install anything, set NO_INSTALL to
3923"yes". This is mostly relevant for packages in the regress category. 3930"yes". This is mostly relevant for packages in the regress category.
3924 3931
392513.15. The package phase 393213.15. The package phase
3926 3933
3927Once the install stage has completed, a binary package of the installed files 3934Once the install stage has completed, a binary package of the installed files
3928can be built. These binary packages can be used for quick installation without 3935can be built. These binary packages can be used for quick installation without
3929previous compilation, e.g. by the make bin-install or by using pkg_add. 3936previous compilation, e.g. by the make bin-install or by using pkg_add.
3930 3937
3931By default, the binary packages are created in ${PACKAGES}/All and symlinks are 3938By default, the binary packages are created in ${PACKAGES}/All and symlinks are
3932created in ${PACKAGES}/category, one for each category in the CATEGORIES 3939created in ${PACKAGES}/category, one for each category in the CATEGORIES
3933variable. PACKAGES defaults to pkgsrc/packages. 3940variable. PACKAGES defaults to pkgsrc/packages.
3934 3941
393513.16. Cleaning up 394213.16. Cleaning up
3936 3943
3937Once you're finished with a package, you can clean the work directory by 3944Once you're finished with a package, you can clean the work directory by
3938running make clean. If you want to clean the work directories of all 3945running make clean. If you want to clean the work directories of all
3939dependencies too, use make clean-depends. 3946dependencies too, use make clean-depends.
3940 3947
394113.17. Other helpful targets 394813.17. Other helpful targets
3942 3949
3943pre/post-* 3950pre/post-*
3944 3951
3945 For any of the main targets described in the previous section (configure, 3952 For any of the main targets described in the previous section (configure,
3946 build, install, etc.), two auxiliary targets exist with "pre-" and "post-" 3953 build, install, etc.), two auxiliary targets exist with "pre-" and "post-"
3947 used as a prefix for the main target's name. These targets are invoked 3954 used as a prefix for the main target's name. These targets are invoked
3948 before and after the main target is called, allowing extra configuration or 3955 before and after the main target is called, allowing extra configuration or
3949 installation steps be performed from a package's Makefile, for example, 3956 installation steps be performed from a package's Makefile, for example,
3950 which a program's configure script or install target omitted. 3957 which a program's configure script or install target omitted.
3951 3958
3952 About 5% of the pkgsrc packages define their custom post-extract target, 3959 About 5% of the pkgsrc packages define their custom post-extract target,
3953 another 5% define pre-configure, and 10% define post-install. The other pre 3960 another 5% define pre-configure, and 10% define post-install. The other pre
3954 /post-* targets are defined even less often. 3961 /post-* targets are defined even less often.
3955 3962
3956do-* 3963do-*
3957 3964
3958 Should one of the main targets do the wrong thing, and should there be no 3965 Should one of the main targets do the wrong thing, and should there be no
3959 variable to fix this, you can redefine it with the do-* target. (Note that 3966 variable to fix this, you can redefine it with the do-* target. (Note that
3960 redefining the target itself instead of the do-* target is a bad idea, as 3967 redefining the target itself instead of the do-* target is a bad idea, as
3961 the pre-* and post-* targets won't be called anymore, etc.) 3968 the pre-* and post-* targets won't be called anymore, etc.)
3962 3969
3963 About 15% of the pkgsrc packages override the default do-install, the other 3970 About 15% of the pkgsrc packages override the default do-install, the other
3964 do-* targets are overridden even less often. 3971 do-* targets are overridden even less often.
3965 3972
3966reinstall 3973reinstall
3967 3974
3968 If you did a make install and you noticed some file was not installed 3975 If you did a make install and you noticed some file was not installed
3969 properly, you can repeat the installation with this target, which will 3976 properly, you can repeat the installation with this target, which will
3970 ignore the "already installed" flag. 3977 ignore the "already installed" flag.
3971 3978
3972 This is the default value of DEPENDS_TARGET except in the case of make 3979 This is the default value of DEPENDS_TARGET except in the case of make
3973 update and make package, where the defaults are "package" and "update", 3980 update and make package, where the defaults are "package" and "update",
3974 respectively. 3981 respectively.
3975 3982
3976deinstall 3983deinstall
3977 3984
3978 This target does a pkg_delete(1) in the current directory, effectively 3985 This target does a pkg_delete(1) in the current directory, effectively
3979 de-installing the package. The following variables can be used to tune the 3986 de-installing the package. The following variables can be used to tune the
3980 behaviour: 3987 behaviour:
3981 3988
3982 PKG_VERBOSE 3989 PKG_VERBOSE
3983 3990
3984 Add a "-v" to the pkg_delete(1) command. 3991 Add a "-v" to the pkg_delete(1) command.
3985 3992
3986 DEINSTALLDEPENDS 3993 DEINSTALLDEPENDS
3987 3994
3988 Remove all packages that require (depend on) the given package. This 3995 Remove all packages that require (depend on) the given package. This
3989 can be used to remove any packages that may have been pulled in by a 3996 can be used to remove any packages that may have been pulled in by a
3990 given package, e.g. if make deinstall DEINSTALLDEPENDS=1 is done in 3997 given package, e.g. if make deinstall DEINSTALLDEPENDS=1 is done in
3991 pkgsrc/x11/kde, this is likely to remove whole KDE. Works by adding "-R 3998 pkgsrc/x11/kde, this is likely to remove whole KDE. Works by adding "-R
3992 " to the pkg_delete(1) command line. 3999 " to the pkg_delete(1) command line.
3993 4000
3994bin-install 4001bin-install
3995 4002
3996 Install a binary package from local disk and via FTP from a list of sites 4003 Install a binary package from local disk and via FTP from a list of sites
3997 (see the BINPKG_SITES variable), and do a make package if no binary package 4004 (see the BINPKG_SITES variable), and do a make package if no binary package
3998 is available anywhere. The arguments given to pkg_add can be set via 4005 is available anywhere. The arguments given to pkg_add can be set via
3999 BIN_INSTALL_FLAGS e.g., to do verbose operation, etc. 4006 BIN_INSTALL_FLAGS e.g., to do verbose operation, etc.
4000 4007
4001install-clean 4008install-clean
4002 4009
4003 This target removes the state files for the "install" and later phases so 4010 This target removes the state files for the "install" and later phases so
4004 that the "install" target may be re-invoked. This can be used after editing 4011 that the "install" target may be re-invoked. This can be used after editing
4005 the PLIST to install the package without rebuilding it. 4012 the PLIST to install the package without rebuilding it.
4006 4013
4007build-clean 4014build-clean
4008 4015
4009 This target removes the state files for the "build" and later phases so 4016 This target removes the state files for the "build" and later phases so
4010 that the "build" target may be re-invoked. 4017 that the "build" target may be re-invoked.
4011 4018
4012update 4019update
4013 4020
4014 This target causes the current package to be updated to the latest version. 4021 This target causes the current package to be updated to the latest version.
4015 The package and all depending packages first get de-installed, then current 4022 The package and all depending packages first get de-installed, then current
4016 versions of the corresponding packages get compiled and installed. This is 4023 versions of the corresponding packages get compiled and installed. This is
4017 similar to manually noting which packages are currently installed, then 4024 similar to manually noting which packages are currently installed, then
4018 performing a series of make deinstall and make install (or whatever 4025 performing a series of make deinstall and make install (or whatever
4019 UPDATE_TARGET is set to) for these packages. 4026 UPDATE_TARGET is set to) for these packages.
4020 4027
4021 You can use the "update" target to resume package updating in case a 4028 You can use the "update" target to resume package updating in case a
4022 previous make update was interrupted for some reason. However, in this 4029 previous make update was interrupted for some reason. However, in this
4023 case, make sure you don't call make clean or otherwise remove the list of 4030 case, make sure you don't call make clean or otherwise remove the list of
4024 dependent packages in WRKDIR. Otherwise, you lose the ability to 4031 dependent packages in WRKDIR. Otherwise, you lose the ability to
4025 automatically update the current package along with the dependent packages 4032 automatically update the current package along with the dependent packages
4026 you have installed. 4033 you have installed.
4027 4034
4028 Resuming an interrupted make update will only work as long as the package 4035 Resuming an interrupted make update will only work as long as the package
4029 tree remains unchanged. If the source code for one of the packages to be 4036 tree remains unchanged. If the source code for one of the packages to be
4030 updated has been changed, resuming make update will most certainly fail! 4037 updated has been changed, resuming make update will most certainly fail!
4031 4038
4032 The following variables can be used either on the command line or in 4039 The following variables can be used either on the command line or in
4033 mk.conf to alter the behaviour of make update: 4040 mk.conf to alter the behaviour of make update:
4034 4041
4035 UPDATE_TARGET 4042 UPDATE_TARGET
4036 4043
4037 Install target to recursively use for the updated package and the 4044 Install target to recursively use for the updated package and the
4038 dependent packages. Defaults to DEPENDS_TARGET if set, "install" 4045 dependent packages. Defaults to DEPENDS_TARGET if set, "install"
4039 otherwise for make update. Other good targets are "package" or " 4046 otherwise for make update. Other good targets are "package" or "
4040 bin-install". Do not set this to "update" or you will get stuck in an 4047 bin-install". Do not set this to "update" or you will get stuck in an
4041 endless loop! 4048 endless loop!
4042 4049
4043 NOCLEAN 4050 NOCLEAN
4044 4051
4045 Don't clean up after updating. Useful if you want to leave the work 4052 Don't clean up after updating. Useful if you want to leave the work
4046 sources of the updated packages around for inspection or other 4053 sources of the updated packages around for inspection or other
4047 purposes. Be sure you eventually clean up the source tree (see the " 4054 purposes. Be sure you eventually clean up the source tree (see the "
4048 clean-update" target below) or you may run into troubles with old 4055 clean-update" target below) or you may run into troubles with old
4049 source code still lying around on your next make or make update. 4056 source code still lying around on your next make or make update.
4050 4057
4051 REINSTALL 4058 REINSTALL
4052 4059
4053 Deinstall each package before installing (making DEPENDS_TARGET). This 4060 Deinstall each package before installing (making DEPENDS_TARGET). This
4054 may be necessary if the "clean-update" target (see below) was called 4061 may be necessary if the "clean-update" target (see below) was called
4055 after interrupting a running make update. 4062 after interrupting a running make update.
4056 4063
4057 DEPENDS_TARGET 4064 DEPENDS_TARGET
4058 4065
4059 Allows you to disable recursion and hardcode the target for packages. 4066 Allows you to disable recursion and hardcode the target for packages.
4060 The default is "update" for the update target, facilitating a recursive 4067 The default is "update" for the update target, facilitating a recursive
4061 update of prerequisite packages. Only set DEPENDS_TARGET if you want to 4068 update of prerequisite packages. Only set DEPENDS_TARGET if you want to
4062 disable recursive updates. Use UPDATE_TARGET instead to just set a 4069 disable recursive updates. Use UPDATE_TARGET instead to just set a
4063 specific target for each package to be installed during make update 4070 specific target for each package to be installed during make update
4064 (see above). 4071 (see above).
4065 4072
4066clean-update 4073clean-update
4067 4074
4068 Clean the source tree for all packages that would get updated if make 4075 Clean the source tree for all packages that would get updated if make
4069 update was called from the current directory. This target should not be 4076 update was called from the current directory. This target should not be
4070 used if the current package (or any of its depending packages) have already 4077 used if the current package (or any of its depending packages) have already
4071 been de-installed (e.g., after calling make update) or you may lose some 4078 been de-installed (e.g., after calling make update) or you may lose some
4072 packages you intended to update. As a rule of thumb: only use this target  4079 packages you intended to update. As a rule of thumb: only use this target
4073 before the first time you run make update and only if you have a dirty 4080 before the first time you run make update and only if you have a dirty
4074 package tree (e.g., if you used NOCLEAN). 4081 package tree (e.g., if you used NOCLEAN).
4075 4082
4076 If you are unsure about whether your tree is clean, you can either perform 4083 If you are unsure about whether your tree is clean, you can either perform
4077 a make clean at the top of the tree, or use the following sequence of 4084 a make clean at the top of the tree, or use the following sequence of
4078 commands from the directory of the package you want to update (before 4085 commands from the directory of the package you want to update (before
4079 running make update for the first time, otherwise you lose all the packages 4086 running make update for the first time, otherwise you lose all the packages
4080 you wanted to update!): 4087 you wanted to update!):
4081 4088
4082 # make clean-update 4089 # make clean-update
4083 # make clean CLEANDEPENDS=YES 4090 # make clean CLEANDEPENDS=YES
4084 # make update 4091 # make update
4085 4092
4086 4093
4087 The following variables can be used either on the command line or in 4094 The following variables can be used either on the command line or in
4088 mk.conf to alter the behaviour of make clean-update: 4095 mk.conf to alter the behaviour of make clean-update:
4089 4096
4090 CLEAR_DIRLIST 4097 CLEAR_DIRLIST
4091 4098
4092 After make clean, do not reconstruct the list of directories to update 4099 After make clean, do not reconstruct the list of directories to update
4093 for this package. Only use this if make update successfully installed 4100 for this package. Only use this if make update successfully installed
4094 all packages you wanted to update. Normally, this is done automatically 4101 all packages you wanted to update. Normally, this is done automatically
4095 on make update, but may have been suppressed by the NOCLEAN variable 4102 on make update, but may have been suppressed by the NOCLEAN variable
4096 (see above). 4103 (see above).
4097 4104
4098replace 4105replace
4099 4106
4100 Update the installation of the current package. This differs from update in 4107 Update the installation of the current package. This differs from update in
4101 that it does not replace dependent packages. You will need to install 4108 that it does not replace dependent packages. You will need to install
4102 pkgtools/pkg_tarup for this target to work. 4109 pkgtools/pkg_tarup for this target to work.
4103 4110
4104 Be careful when using this target! There are no guarantees that dependent 4111 Be careful when using this target! There are no guarantees that dependent
4105 packages will still work, in particular they will most certainly break if 4112 packages will still work, in particular they will most certainly break if
4106 you make replace a library package whose shared library major version 4113 you make replace a library package whose shared library major version
4107 changed between your installed version and the new one. For this reason, 4114 changed between your installed version and the new one. For this reason,
4108 this target is not officially supported and only recommended for advanced 4115 this target is not officially supported and only recommended for advanced
4109 users. 4116 users.
4110 4117
4111info 4118info
4112 4119
4113 This target invokes pkg_info(1) for the current package. You can use this 4120 This target invokes pkg_info(1) for the current package. You can use this
4114 to check which version of a package is installed. 4121 to check which version of a package is installed.
4115 4122
4116index 4123index
4117 4124
4118 This is a top-level command, i.e. it should be used in the pkgsrc 4125 This is a top-level command, i.e. it should be used in the pkgsrc
4119 directory. It creates a database of all packages in the local pkgsrc tree, 4126 directory. It creates a database of all packages in the local pkgsrc tree,
4120 including dependencies, comment, maintainer, and some other useful 4127 including dependencies, comment, maintainer, and some other useful
4121 information. Individual entries are created by running make describe in the 4128 information. Individual entries are created by running make describe in the
4122 packages' directories. This index file is saved as pkgsrc/INDEX. It can be 4129 packages' directories. This index file is saved as pkgsrc/INDEX. It can be
4123 displayed in verbose format by running make print-index. You can search in 4130 displayed in verbose format by running make print-index. You can search in
4124 it with make search key=something. You can extract a list of all packages 4131 it with make search key=something. You can extract a list of all packages
4125 that depend on a particular one by running make show-deps PKG=somepackage. 4132 that depend on a particular one by running make show-deps PKG=somepackage.
4126 4133
4127 Running this command takes a very long time, some hours even on fast 4134 Running this command takes a very long time, some hours even on fast
4128 machines! 4135 machines!
4129 4136
4130readme 4137readme
4131 4138
4132 This target generates a index.html file, which can be viewed using a 4139 This target generates a index.html file, which can be viewed using a
4133 browser such as www/firefox or www/links. The generated files contain 4140 browser such as www/firefox or www/links. The generated files contain
4134 references to any packages which are in the PACKAGES directory on the local 4141 references to any packages which are in the PACKAGES directory on the local
4135 host. The generated files can be made to refer to URLs based on 4142 host. The generated files can be made to refer to URLs based on
4136 FTP_PKG_URL_HOST and FTP_PKG_URL_DIR. For example, if I wanted to generate 4143 FTP_PKG_URL_HOST and FTP_PKG_URL_DIR. For example, if I wanted to generate
4137 index.html files which pointed to binary packages on the local machine, in 4144 index.html files which pointed to binary packages on the local machine, in
4138 the directory /usr/packages, set FTP_PKG_URL_HOST=file://localhost and 4145 the directory /usr/packages, set FTP_PKG_URL_HOST=file://localhost and
4139 FTP_PKG_URL_DIR=/usr/packages. The ${PACKAGES} directory and its 4146 FTP_PKG_URL_DIR=/usr/packages. The ${PACKAGES} directory and its
4140 subdirectories will be searched for all the binary packages. 4147 subdirectories will be searched for all the binary packages.
4141 4148
4142 The target can be run at the toplevel or in category directories, in which 4149 The target can be run at the toplevel or in category directories, in which
4143 case it descends recursively. 4150 case it descends recursively.
4144 4151
4145readme-all 4152readme-all
4146 4153
4147 This is a top-level command, run it in pkgsrc. Use this target to create a 4154 This is a top-level command, run it in pkgsrc. Use this target to create a
4148 file README-all.html which contains a list of all packages currently 4155 file README-all.html which contains a list of all packages currently
4149 available in the NetBSD Packages Collection, together with the category 4156 available in the NetBSD Packages Collection, together with the category
4150 they belong to and a short description. This file is compiled from the 4157 they belong to and a short description. This file is compiled from the
4151 pkgsrc/*/index.html files, so be sure to run this after a make readme. 4158 pkgsrc/*/index.html files, so be sure to run this after a make readme.
4152 4159
4153cdrom-readme 4160cdrom-readme
4154 4161
4155 This is very much the same as the "readme" target (see above), but is to be 4162 This is very much the same as the "readme" target (see above), but is to be
4156 used when generating a pkgsrc tree to be written to a CD-ROM. This target 4163 used when generating a pkgsrc tree to be written to a CD-ROM. This target
4157 also produces index.html files, and can be made to refer to URLs based on 4164 also produces index.html files, and can be made to refer to URLs based on
4158 CDROM_PKG_URL_HOST and CDROM_PKG_URL_DIR. 4165 CDROM_PKG_URL_HOST and CDROM_PKG_URL_DIR.
4159 4166
4160show-distfiles 4167show-distfiles
4161 4168
4162 This target shows which distfiles and patchfiles are needed to build the 4169 This target shows which distfiles and patchfiles are needed to build the
4163 package (ALLFILES, which contains all DISTFILES and PATCHFILES, but not 4170 package (ALLFILES, which contains all DISTFILES and PATCHFILES, but not
4164 patches/*). 4171 patches/*).
4165 4172
4166show-downlevel 4173show-downlevel
4167 4174
4168 This target shows nothing if the package is not installed. If a version of 4175 This target shows nothing if the package is not installed. If a version of
4169 this package is installed, but is not the version provided in this version 4176 this package is installed, but is not the version provided in this version
4170 of pkgsrc, then a warning message is displayed. This target can be used to 4177 of pkgsrc, then a warning message is displayed. This target can be used to
4171 show which of your installed packages are downlevel, and so the old 4178 show which of your installed packages are downlevel, and so the old
4172 versions can be deleted, and the current ones added. 4179 versions can be deleted, and the current ones added.
4173 4180
4174show-pkgsrc-dir 4181show-pkgsrc-dir
4175 4182
4176 This target shows the directory in the pkgsrc hierarchy from which the 4183 This target shows the directory in the pkgsrc hierarchy from which the
4177 package can be built and installed. This may not be the same directory as 4184 package can be built and installed. This may not be the same directory as
4178 the one from which the package was installed. This target is intended to be 4185 the one from which the package was installed. This target is intended to be
4179 used by people who may wish to upgrade many packages on a single host, and 4186 used by people who may wish to upgrade many packages on a single host, and
4180 can be invoked from the top-level pkgsrc Makefile by using the " 4187 can be invoked from the top-level pkgsrc Makefile by using the "
4181 show-host-specific-pkgs" target. 4188 show-host-specific-pkgs" target.
4182 4189
4183show-installed-depends 4190show-installed-depends
4184 4191
4185 This target shows which installed packages match the current package's 4192 This target shows which installed packages match the current package's
4186 DEPENDS. Useful if out of date dependencies are causing build problems. 4193 DEPENDS. Useful if out of date dependencies are causing build problems.
4187 4194
4188print-build-depends-list 4195print-build-depends-list
4189 4196
4190 This target shows the list of packages that the current package depends on 4197 This target shows the list of packages that the current package depends on
4191 for building. 4198 for building.
4192 4199
4193print-run-depends-list 4200print-run-depends-list
4194 4201
4195 This target shows the list of packages that the current package depends on 4202 This target shows the list of packages that the current package depends on
4196 for running. 4203 for running.
4197 4204
4198check-shlibs 4205check-shlibs
4199 4206
4200 After a package is installed, check all its binaries and (on ELF platforms) 4207 After a package is installed, check all its binaries and (on ELF platforms)
4201 shared libraries to see if they find the shared libs they need. Run by 4208 shared libraries to see if they find the shared libs they need. Run by
4202 default if PKG_DEVELOPER is set in mk.conf. 4209 default if PKG_DEVELOPER is set in mk.conf.
4203 4210
4204print-PLIST 4211print-PLIST
4205 4212
4206 After a "make install" from a new or upgraded pkg, this prints out an 4213 After a "make install" from a new or upgraded pkg, this prints out an
4207 attempt to generate a new PLIST from a find -newer work/.extract_done. An 4214 attempt to generate a new PLIST from a find -newer work/.extract_done. An
4208 attempt is made to care for shared libs etc., but it is strongly 4215 attempt is made to care for shared libs etc., but it is strongly
4209 recommended to review the result before putting it into PLIST. On upgrades, 4216 recommended to review the result before putting it into PLIST. On upgrades,
4210 it's useful to diff the output of this command against an already existing 4217 it's useful to diff the output of this command against an already existing
4211 PLIST file. 4218 PLIST file.
4212 4219
4213 If the package installs files via tar(1) or other methods that don't update 4220 If the package installs files via tar(1) or other methods that don't update
4214 file access times, be sure to add these files manually to your PLIST, as 4221 file access times, be sure to add these files manually to your PLIST, as
4215 the "find -newer" command used by this target won't catch them! 4222 the "find -newer" command used by this target won't catch them!
4216 4223
4217 See Section 19.3, "Tweaking output of make print-PLIST" for more 4224 See Section 19.3, "Tweaking output of make print-PLIST" for more
4218 information on this target. 4225 information on this target.
4219 4226
4220Chapter 14. Creating a new pkgsrc package from scratch 4227Chapter 14. Creating a new pkgsrc package from scratch
4221 4228
4222Table of Contents 4229Table of Contents
4223 4230
422414.1. Common types of packages 423114.1. Common types of packages
4225 4232
4226 14.1.1. Python modules and programs 4233 14.1.1. Python modules and programs
4227 14.1.2. R packages 4234 14.1.2. R packages
4228 14.1.3. TeXlive packages 4235 14.1.3. TeXlive packages
4229 4236
423014.2. Examples 423714.2. Examples
4231 4238
4232 14.2.1. How the www/nvu package came into pkgsrc 4239 14.2.1. How the www/nvu package came into pkgsrc
4233 4240
4234When you find a package that is not yet in pkgsrc, you most likely have a URL 4241When you find a package that is not yet in pkgsrc, you most likely have a URL
4235from where you can download the source code. Starting with this URL, creating a 4242from where you can download the source code. Starting with this URL, creating a
4236package involves only a few steps. 4243package involves only a few steps.
4237 4244
4238 1. In your mk.conf, set PKG_DEVELOPER=yes to enable the basic quality checks. 4245 1. In your mk.conf, set PKG_DEVELOPER=yes to enable the basic quality checks.
4239 4246
4240 2. Install the package meta-pkgs/pkg_developer, which among others will 4247 2. Install the package meta-pkgs/pkg_developer, which among others will
4241 install the utilities url2pkg, pkglint, pkgvi and mkpatches: 4248 install the utilities url2pkg, pkglint, pkgvi and mkpatches:
4242 4249
4243 $ cd /usr/pkgsrc 4250 $ cd /usr/pkgsrc
4244 $ (cd meta-pkgs/pkg_developer && bmake update) 4251 $ (cd meta-pkgs/pkg_developer && bmake update)
4245 4252
4246 3. Choose one of the top-level directories as the category in which you want 4253 3. Choose one of the top-level directories as the category in which you want
4247 to place your package. You can also create a directory of your own (maybe 4254 to place your package. You can also create a directory of your own (maybe
4248 called local). Change into that category directory: 4255 called local). Change into that category directory:
4249 4256
4250 $ cd category 4257 $ cd category
4251 4258
4252 4. Run the program url2pkg, passing as argument the URL of the distribution 4259 4. Run the program url2pkg, passing as argument the URL of the distribution
4253 file (in most cases a .tar.gz file). This will download the distribution 4260 file (in most cases a .tar.gz file). This will download the distribution
4254 file and create the necessary files of the package, based on what's in the 4261 file and create the necessary files of the package, based on what's in the
4255 distribution file: 4262 distribution file:
4256 4263
4257 $ url2pkg https://www.example.org/packages/package-1.0.tar.gz 4264 $ url2pkg https://www.example.org/packages/package-1.0.tar.gz
4258 4265
4259 5. Examine the extracted files to determine the dependencies of your package. 4266 5. Examine the extracted files to determine the dependencies of your package.
4260 Ideally, this is mentioned in some README file, but things may differ. For 4267 Ideally, this is mentioned in some README file, but things may differ. For
4261 each of these dependencies, look where it exists in pkgsrc, and if there is 4268 each of these dependencies, look where it exists in pkgsrc, and if there is
4262 a file called buildlink3.mk in that directory, add a line to your package 4269 a file called buildlink3.mk in that directory, add a line to your package
4263 Makefile which includes that file just before the last line. If the 4270 Makefile which includes that file just before the last line. If the
4264 buildlink3.mk file does not exist, it must be created first. The 4271 buildlink3.mk file does not exist, it must be created first. The
4265 buildlink3.mk file makes sure that the package's include files and 4272 buildlink3.mk file makes sure that the package's include files and
4266 libraries are provided. 4273 libraries are provided.
4267 4274
4268 If you just need binaries from a dependent package, add a DEPENDS line to 4275 If you just need binaries from a dependent package, add a DEPENDS line to
4269 the Makefile, which specifies the version of the dependency and where it 4276 the Makefile, which specifies the version of the dependency and where it
4270 can be found in pkgsrc. This line should be placed in the third paragraph. 4277 can be found in pkgsrc. This line should be placed in the third paragraph.
4271 If the dependency is only needed for building the package, but not when 4278 If the dependency is only needed for building the package, but not when
4272 using it, use TOOL_DEPENDS or BUILD_DEPENDS instead of DEPENDS. The 4279 using it, use TOOL_DEPENDS or BUILD_DEPENDS instead of DEPENDS. The
4273 difference between TOOL_DEPENDS and BUILD_DEPENDS occurs when 4280 difference between TOOL_DEPENDS and BUILD_DEPENDS occurs when
4274 cross-compiling: TOOL_DEPENDS are native packages, i.e. packages for the 4281 cross-compiling: TOOL_DEPENDS are native packages, i.e. packages for the
4275 platform where the package is built; BUILD_DEPENDS are target packages, 4282 platform where the package is built; BUILD_DEPENDS are target packages,
4276 i.e. packages for the platform for which the package is built. There is 4283 i.e. packages for the platform for which the package is built. There is
4277 also TEST_DEPENDS, which specifies a dependency used only for testing the 4284 also TEST_DEPENDS, which specifies a dependency used only for testing the
4278 resulting package built, using the upstream project's included test suite, 4285 resulting package built, using the upstream project's included test suite,
4279 on the native platform. Your package may then look like this: 4286 on the native platform. Your package may then look like this:
4280 4287
4281 [...] 4288 [...]
4282 4289
4283 TOOL_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt 4290 TOOL_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt
4284 DEPENDS+= screen-[0-9]*:../../misc/screen 4291 DEPENDS+= screen-[0-9]*:../../misc/screen
4285 DEPENDS+= screen>=4.0:../../misc/screen 4292 DEPENDS+= screen>=4.0:../../misc/screen
4286 4293
4287 [...] 4294 [...]
4288 4295
4289 .include "../../category/package/buildlink3.mk" 4296 .include "../../category/package/buildlink3.mk"
4290 .include "../../devel/glib2/buildlink3.mk" 4297 .include "../../devel/glib2/buildlink3.mk"
4291 .include "../../mk/bsd.pkg.mk" 4298 .include "../../mk/bsd.pkg.mk"
4292 4299
4293 6. Run pkglint to see what things still need to be done to make your package a 4300 6. Run pkglint to see what things still need to be done to make your package a
4294 "good" one. If you don't know what pkglint's warnings want to tell you, try 4301 "good" one. If you don't know what pkglint's warnings want to tell you, try
4295 pkglint --explain or pkglint -e, which outputs additional explanations. 4302 pkglint --explain or pkglint -e, which outputs additional explanations.
4296 4303
4297 7. In many cases the package is not yet ready to build. You can find 4304 7. In many cases the package is not yet ready to build. You can find
4298 instructions for the most common cases in the next section, Section 14.1, 4305 instructions for the most common cases in the next section, Section 14.1,
4299 "Common types of packages". After you have followed the instructions over 4306 "Common types of packages". After you have followed the instructions over
4300 there, you can hopefully continue here. 4307 there, you can hopefully continue here.
4301 4308
4302 8. Run bmake clean to clean the working directory from the extracted files. 4309 8. Run bmake clean to clean the working directory from the extracted files.
4303 Besides these files, a lot of cache files and other system information have 4310 Besides these files, a lot of cache files and other system information have
4304 been saved in the working directory, which may have become outdated after 4311 been saved in the working directory, which may have become outdated after
4305 you edited the Makefile. 4312 you edited the Makefile.
4306 4313
4307 9. Now, run bmake to build the package. For the various things that can go 4314 9. Now, run bmake to build the package. For the various things that can go
4308 wrong in this phase, consult Chapter 21, Making your package work. 4315 wrong in this phase, consult Chapter 21, Making your package work.
4309 4316
4310 If the extracted files from the package need to be fixed, run multiple 4317 If the extracted files from the package need to be fixed, run multiple
4311 rounds of these commands: 4318 rounds of these commands:
4312 4319
4313 $ bmake 4320 $ bmake
4314 $ pkgvi ${WRKSRC}/some/file/that/does/not/compile 4321 $ pkgvi ${WRKSRC}/some/file/that/does/not/compile
4315 $ mkpatches 4322 $ mkpatches
4316 $ bmake mps 4323 $ bmake mps
4317 $ bmake clean 4324 $ bmake clean
4318 4325
431910. When the package builds fine, the next step is to install the package. Run  432610. When the package builds fine, the next step is to install the package. Run
4320 bmake install and hope that everything works. 4327 bmake install and hope that everything works.
4321 4328
432211. Up to now, the file PLIST, which contains a list of the files that are 432911. Up to now, the file PLIST, which contains a list of the files that are
4323 installed by the package, is nearly empty. Run bmake print-PLIST >PLIST to 4330 installed by the package, is nearly empty. Run bmake print-PLIST >PLIST to
4324 generate a probably correct list. Check the file using your preferred text 4331 generate a probably correct list. Check the file using your preferred text
4325 editor to see if the list of files looks plausible. 4332 editor to see if the list of files looks plausible.
4326 4333
432712. Run pkglint again to see if the generated PLIST contains garbage or not. 433412. Run pkglint again to see if the generated PLIST contains garbage or not.
4328 4335
432913. When you ran bmake install, the package had been registered in the database 433613. When you ran bmake install, the package had been registered in the database
4330 of installed files, but with an empty list of files. To fix this, run bmake 4337 of installed files, but with an empty list of files. To fix this, run bmake
4331 deinstall and bmake install again. Now the package is registered with the 4338 deinstall and bmake install again. Now the package is registered with the
4332 list of files from PLIST. 4339 list of files from PLIST.
4333 4340
433414. Run bmake clean update to run everything from above again in a single step, 434114. Run bmake clean update to run everything from above again in a single step,
4335 making sure that the PLIST is correct and the whole package is created as 4342 making sure that the PLIST is correct and the whole package is created as
4336 intended. 4343 intended.
4337 4344
433815. Run pkglint to see if there's anything left to do. 434515. Run pkglint to see if there's anything left to do.
4339 4346
434016. Commit the package to pkgsrc-wip or main pkgsrc; see Chapter 23, Submitting 434716. Commit the package to pkgsrc-wip or main pkgsrc; see Chapter 23, Submitting
4341 and Committing. 4348 and Committing.
4342 4349
434314.1. Common types of packages 435014.1. Common types of packages
4344 4351
434514.1.1. Python modules and programs 435214.1.1. Python modules and programs
4346 4353
4347Python modules and programs packages are easily created using a set of 4354Python modules and programs packages are easily created using a set of
4348predefined variables. 4355predefined variables.
4349 4356
4350If some Python versions are not supported by the software, set the 4357If some Python versions are not supported by the software, set the
4351PYTHON_VERSIONS_INCOMPATIBLE variable to the Python versions that are not 4358PYTHON_VERSIONS_INCOMPATIBLE variable to the Python versions that are not
4352supported, e.g. 4359supported, e.g.
4353 4360
4354PYTHON_VERSIONS_INCOMPATIBLE= 27 4361PYTHON_VERSIONS_INCOMPATIBLE= 27
4355 4362
4356If the packaged software is a Python module, include one of ../../lang/python/ 4363If the packaged software is a Python module, include one of ../../lang/python/
4357egg.mk or ../../lang/python/extension.mk. 4364egg.mk or ../../lang/python/extension.mk.
4358 4365
4359Most Python packages use setuptools ("eggs"). If the packaged software is using 4366Most Python packages use setuptools ("eggs"). If the packaged software is using
4360setuptools, you only need to include "../../lang/python/egg.mk". 4367setuptools, you only need to include "../../lang/python/egg.mk".
4361 4368
4362Either way, the package directory should be called "py-software" and PKGNAME 4369Either way, the package directory should be called "py-software" and PKGNAME
4363should be set to "${PYPKGPREFIX}-${DISTNAME}", e.g. 4370should be set to "${PYPKGPREFIX}-${DISTNAME}", e.g.
4364 4371
4365DISTNAME= foopymodule-1.2.10 4372DISTNAME= foopymodule-1.2.10
4366PKGNAME= ${PYPKGPREFIX}-${DISTNAME} 4373PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
4367 4374
4368For software in PyPi, the name should match what PyPi specifies for "pip 4375For software in PyPi, the name should match what PyPi specifies for "pip
4369install software". 4376install software".
4370 4377
4371If it is an application, include "../../lang/python/application.mk". In order 4378If it is an application, include "../../lang/python/application.mk". In order
4372to correctly set the path to the Python interpreter, use the REPLACE_PYTHON 4379to correctly set the path to the Python interpreter, use the REPLACE_PYTHON
4373variable and set it to the list of files (paths relative to WRKSRC) that must 4380variable and set it to the list of files (paths relative to WRKSRC) that must
4374be corrected. For example: 4381be corrected. For example:
4375 4382
4376REPLACE_PYTHON= *.py 4383REPLACE_PYTHON= *.py
4377 4384
4378Some Python modules have separate distributions for Python-2.x and Python-3.x 4385Some Python modules have separate distributions for Python-2.x and Python-3.x
4379support. In pkgsrc this is handled by the versioned_dependencies.mk file. Set 4386support. In pkgsrc this is handled by the versioned_dependencies.mk file. Set
4380PYTHON_VERSIONED_DEPENDENCIES to the list of packages that should be depended 4387PYTHON_VERSIONED_DEPENDENCIES to the list of packages that should be depended
4381upon and include "../../lang/python/versioned_dependencies.mk", then the pkgsrc 4388upon and include "../../lang/python/versioned_dependencies.mk", then the pkgsrc
4382infrastructure will depend on the appropriate package version. For example: 4389infrastructure will depend on the appropriate package version. For example:
4383 4390
4384PYTHON_VERSIONED_DEPENDENCIES=dialog 4391PYTHON_VERSIONED_DEPENDENCIES=dialog
4385 4392
4386Look inside versioned_dependencies.mk for a list of supported packages. 4393Look inside versioned_dependencies.mk for a list of supported packages.
4387 4394
438814.1.2. R packages 439514.1.2. R packages
4389 4396
4390Simple R packages from CRAN are handled automatically by R2pkg, which is 4397Simple R packages from CRAN are handled automatically by R2pkg, which is
4391available in pkgtools/R2pkg. Individual packages (and optionally their 4398available in pkgtools/R2pkg. Individual packages (and optionally their
4392dependencies) may be created and updated. R packages generally follow the same 4399dependencies) may be created and updated. R packages generally follow the same
4393form, and most of the relevant information needed is contained in a DESCRIPTION 4400form, and most of the relevant information needed is contained in a DESCRIPTION
4394file as part of each R package on CRAN. Consequently, R2pkg downloads that 4401file as part of each R package on CRAN. Consequently, R2pkg downloads that
4395information and creates or updates a package in the canonical form. The 4402information and creates or updates a package in the canonical form. The
4396resulting package should be reviewed for correctness. 4403resulting package should be reviewed for correctness.
4397 4404
439814.1.3. TeXlive packages 440514.1.3. TeXlive packages
4399 4406
4400TeXlive packages from CTAN are handled automatically by texlive2pkg, which is 4407TeXlive packages from CTAN are handled automatically by texlive2pkg, which is
4401available in pkgtools/texlive2pkg. 4408available in pkgtools/texlive2pkg.
4402 4409
4403If the TeXlive package name is not known, it may be useful to search CTAN. A " 4410If the TeXlive package name is not known, it may be useful to search CTAN. A "
4404Contained in" field on the package page typically identifies the basename of 4411Contained in" field on the package page typically identifies the basename of
4405the package file in the TeXlive archive. 4412the package file in the TeXlive archive.
4406 4413
4407If the TeXlive package name is known, download the files from the TeXlive 4414If the TeXlive package name is known, download the files from the TeXlive
4408archive. For package foo, you will need to download foo.tar.xz. Most TeXlive 4415archive. For package foo, you will need to download foo.tar.xz. Most TeXlive
4409packages also have associated documentation packages, so download 4416packages also have associated documentation packages, so download
4410foo.doc.tar.xz at the same time. These files should be placed in the 4417foo.doc.tar.xz at the same time. These files should be placed in the
4411appropriate category directory, which is often but not always print. Then run 4418appropriate category directory, which is often but not always print. Then run
4412the following command in the category directory. 4419the following command in the category directory.
4413 4420
4414texlive2pkg foo.tar.xz foo.doc.tar.xz 4421texlive2pkg foo.tar.xz foo.doc.tar.xz
4415 4422
4416This will create two packages, tex-foo and tex-foo-doc. Be sure to check that 4423This will create two packages, tex-foo and tex-foo-doc. Be sure to check that
4417both packages are correct. 4424both packages are correct.
4418 4425
4419Finally, CTAN currently does not include version information in package 4426Finally, CTAN currently does not include version information in package
4420filenames and changes their contents periodically when updates occur. 4427filenames and changes their contents periodically when updates occur.
4421Consequently, pkgsrc avoids downloading distfiles directly from CTAN and 4428Consequently, pkgsrc avoids downloading distfiles directly from CTAN and
4422instead relies on the pkgsrc archives. For each new or updated TeXlive package, 4429instead relies on the pkgsrc archives. For each new or updated TeXlive package,
4423e.g., the main one and the corresponding documentation, upload the distfiles 4430e.g., the main one and the corresponding documentation, upload the distfiles
4424with the following command in each package directory. 4431with the following command in each package directory.
4425 4432
4426make upload-distfiles 4433make upload-distfiles
4427 4434
442814.2. Examples 443514.2. Examples
4429 4436
443014.2.1. How the www/nvu package came into pkgsrc 443714.2.1. How the www/nvu package came into pkgsrc
4431 4438
443214.2.1.1. The initial package 443914.2.1.1. The initial package
4433 4440
4434Looking at the file pkgsrc/doc/TODO, I saw that the "nvu" package has not yet 4441Looking at the file pkgsrc/doc/TODO, I saw that the "nvu" package has not yet
4435been imported into pkgsrc. As the description says it has to do with the web, 4442been imported into pkgsrc. As the description says it has to do with the web,
4436the obvious choice for the category is "www". 4443the obvious choice for the category is "www".
4437 4444
4438$ mkdir www/nvu 4445$ mkdir www/nvu
4439$ cd www/nvu 4446$ cd www/nvu
4440 4447
4441The web site says that the sources are available as a tar file, so I fed that 4448The web site says that the sources are available as a tar file, so I fed that
4442URL to the url2pkg program: 4449URL to the url2pkg program:
4443 4450
4444$ url2pkg http://cvs.nvu.com/download/nvu-1.0-sources.tar.bz2 4451$ url2pkg http://cvs.nvu.com/download/nvu-1.0-sources.tar.bz2
4445 4452
4446My editor popped up, and I added a PKGNAME line below the DISTNAME line, as the 4453My editor popped up, and I added a PKGNAME line below the DISTNAME line, as the
4447package name should not have the word "sources" in it. I also filled in the 4454package name should not have the word "sources" in it. I also filled in the
4448MAINTAINER, HOMEPAGE and COMMENT fields. Then the package Makefile looked like 4455MAINTAINER, HOMEPAGE and COMMENT fields. Then the package Makefile looked like
4449that: 4456that:
4450 4457
4451# $NetBSD $ 4458# $NetBSD $
4452# 4459#
4453 4460
4454DISTNAME= nvu-1.0-sources 4461DISTNAME= nvu-1.0-sources
4455PKGNAME= nvu-1.0 4462PKGNAME= nvu-1.0
4456CATEGORIES= www 4463CATEGORIES= www
4457MASTER_SITES= http://cvs.nvu.com/download/ 4464MASTER_SITES= http://cvs.nvu.com/download/
4458EXTRACT_SUFX= .tar.bz2 4465EXTRACT_SUFX= .tar.bz2
4459 4466
4460MAINTAINER= rillig@NetBSD.org 4467MAINTAINER= rillig@NetBSD.org
4461HOMEPAGE= http://cvs.nvu.com/ 4468HOMEPAGE= http://cvs.nvu.com/
4462COMMENT= Web Authoring System 4469COMMENT= Web Authoring System
4463 4470
4464# url2pkg-marker (please do not remove this line.) 4471# url2pkg-marker (please do not remove this line.)
4465.include "../../mk/bsd.pkg.mk" 4472.include "../../mk/bsd.pkg.mk"
4466 4473
4467On the first line of output above, an artificial space has been added between 4474On the first line of output above, an artificial space has been added between
4468NetBSD and $, this is a workaround to prevent CVS expanding to the filename of 4475NetBSD and $, this is a workaround to prevent CVS expanding to the filename of
4469the guide. 4476the guide.
4470 4477
4471Then, I quit the editor and watched pkgsrc downloading a large source archive: 4478Then, I quit the editor and watched pkgsrc downloading a large source archive:
4472 4479
4473url2pkg> Running "make makesum" ... 4480url2pkg> Running "make makesum" ...
4474=> Required installed package digest>=20010302: digest-20060826 found 4481=> Required installed package digest>=20010302: digest-20060826 found
4475=> Fetching nvu-1.0-sources.tar.bz2 4482=> Fetching nvu-1.0-sources.tar.bz2
4476Requesting http://cvs.nvu.com/download/nvu-1.0-sources.tar.bz2 4483Requesting http://cvs.nvu.com/download/nvu-1.0-sources.tar.bz2
4477100% |*************************************| 28992 KB 150.77 KB/s00:00 ETA 4484100% |*************************************| 28992 KB 150.77 KB/s00:00 ETA
447829687976 bytes retrieved in 03:12 (150.77 KB/s) 448529687976 bytes retrieved in 03:12 (150.77 KB/s)
4479url2pkg> Running "make extract" ... 4486url2pkg> Running "make extract" ...
4480=> Required installed package digest>=20010302: digest-20060826 found 4487=> Required installed package digest>=20010302: digest-20060826 found
4481=> Checksum SHA1 OK for nvu-1.0-sources.tar.bz2 4488=> Checksum SHA1 OK for nvu-1.0-sources.tar.bz2
4482=> Checksum RMD160 OK for nvu-1.0-sources.tar.bz2 4489=> Checksum RMD160 OK for nvu-1.0-sources.tar.bz2
4483work.bacc -> /tmp/roland/pkgsrc/www/nvu/work.bacc 4490work.bacc -> /tmp/roland/pkgsrc/www/nvu/work.bacc
4484===> Installing dependencies for nvu-1.0 4491===> Installing dependencies for nvu-1.0
4485===> Overriding tools for nvu-1.0 4492===> Overriding tools for nvu-1.0
4486===> Extracting for nvu-1.0 4493===> Extracting for nvu-1.0
4487url2pkg> Adjusting the Makefile. 4494url2pkg> Adjusting the Makefile.
4488 4495
4489Remember to correct CATEGORIES, HOMEPAGE, COMMENT, and DESCR when you're done! 4496Remember to correct CATEGORIES, HOMEPAGE, COMMENT, and DESCR when you're done!
4490 4497
4491Good luck! (See pkgsrc/doc/pkgsrc.txt for some more help :-) 4498Good luck! (See pkgsrc/doc/pkgsrc.txt for some more help :-)
4492 4499
449314.2.1.2. Fixing all kinds of problems to make the package work 450014.2.1.2. Fixing all kinds of problems to make the package work
4494 4501
4495Now that the package has been extracted, let's see what's inside it. The 4502Now that the package has been extracted, let's see what's inside it. The
4496package has a README.txt, but that only says something about mozilla, so it's 4503package has a README.txt, but that only says something about mozilla, so it's
4497probably useless for seeing what dependencies this package has. But since there 4504probably useless for seeing what dependencies this package has. But since there
4498is a GNU configure script in the package, let's hope that it will complain 4505is a GNU configure script in the package, let's hope that it will complain
4499about everything it needs. 4506about everything it needs.
4500 4507
4501$ bmake 4508$ bmake
4502=> Required installed package digest>=20010302: digest-20060826 found 4509=> Required installed package digest>=20010302: digest-20060826 found
4503=> Checksum SHA1 OK for nvu-1.0-sources.tar.bz2 4510=> Checksum SHA1 OK for nvu-1.0-sources.tar.bz2
4504=> Checksum RMD160 OK for nvu-1.0-sources.tar.bz2 4511=> Checksum RMD160 OK for nvu-1.0-sources.tar.bz2
4505===> Patching for nvu-1.0 4512===> Patching for nvu-1.0
4506===> Creating toolchain wrappers for nvu-1.0 4513===> Creating toolchain wrappers for nvu-1.0
4507===> Configuring for nvu-1.0 4514===> Configuring for nvu-1.0
4508[...] 4515[...]
4509configure: error: Perl 5.004 or higher is required. 4516configure: error: Perl 5.004 or higher is required.
4510[...] 4517[...]
4511WARNING: Please add USE_TOOLS+=perl to the package Makefile. 4518WARNING: Please add USE_TOOLS+=perl to the package Makefile.
4512[...] 4519[...]
4513 4520
4514That worked quite well. So I opened the package Makefile in my editor, and 4521That worked quite well. So I opened the package Makefile in my editor, and
4515since it already has a USE_TOOLS line, I just appended "perl" to it. Since the 4522since it already has a USE_TOOLS line, I just appended "perl" to it. Since the
4516dependencies of the package have changed now, and since a perl wrapper is 4523dependencies of the package have changed now, and since a perl wrapper is
4517automatically installed in the "tools" phase, I need to build the package from 4524automatically installed in the "tools" phase, I need to build the package from
4518scratch. 4525scratch.
4519 4526
4520$ bmake clean 4527$ bmake clean
4521===> Cleaning for nvu-1.0 4528===> Cleaning for nvu-1.0
4522$ bmake 4529$ bmake
4523[...] 4530[...]
4524*** /tmp/roland/pkgsrc/www/nvu/work.bacc/.tools/bin/make is not \ 4531*** /tmp/roland/pkgsrc/www/nvu/work.bacc/.tools/bin/make is not \
@@ -6426,1998 +6433,2005 @@ Both BROKEN_ON_PLATFORM and BROKEN_EXCEP @@ -6426,1998 +6433,2005 @@ Both BROKEN_ON_PLATFORM and BROKEN_EXCEP
6426(OS-version-platform) that can use glob-style wildcards. 6433(OS-version-platform) that can use glob-style wildcards.
6427 6434
6428If a package is not appropriate for some platforms (as opposed to merely 6435If a package is not appropriate for some platforms (as opposed to merely
6429broken), a different set of variables should be used as this affects failure 6436broken), a different set of variables should be used as this affects failure
6430reporting and statistics. If the package is appropriate for most platforms, the 6437reporting and statistics. If the package is appropriate for most platforms, the
6431exceptions should be noted with NOT_FOR_PLATFORM. If the package is appropriate 6438exceptions should be noted with NOT_FOR_PLATFORM. If the package is appropriate
6432for only a small handful of platforms (often exactly one), set 6439for only a small handful of platforms (often exactly one), set
6433ONLY_FOR_PLATFORM instead. Both ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM are OS 6440ONLY_FOR_PLATFORM instead. Both ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM are OS
6434triples (OS-version-platform) that can use glob-style wildcards. 6441triples (OS-version-platform) that can use glob-style wildcards.
6435 6442
6436Some packages are tightly bound to a specific version of an operating system, 6443Some packages are tightly bound to a specific version of an operating system,
6437e.g. LKMs or sysutils/lsof. Such binary packages are not backwards compatible 6444e.g. LKMs or sysutils/lsof. Such binary packages are not backwards compatible
6438with other versions of the OS, and should be uploaded to a version specific 6445with other versions of the OS, and should be uploaded to a version specific
6439directory on the FTP server. Mark these packages by setting OSVERSION_SPECIFIC 6446directory on the FTP server. Mark these packages by setting OSVERSION_SPECIFIC
6440to "yes". This variable is not currently used by any of the package system 6447to "yes". This variable is not currently used by any of the package system
6441internals, but may be used in the future. 6448internals, but may be used in the future.
6442 6449
6443If the package should be skipped (for example, because it provides 6450If the package should be skipped (for example, because it provides
6444functionality already provided by the system), set PKG_SKIP_REASON to a 6451functionality already provided by the system), set PKG_SKIP_REASON to a
6445descriptive message. If the package should fail because some preconditions are 6452descriptive message. If the package should fail because some preconditions are
6446not met, set PKG_FAIL_REASON to a descriptive message. 6453not met, set PKG_FAIL_REASON to a descriptive message.
6447 6454
644821.1.8. Packages which should not be deleted, once installed 645521.1.8. Packages which should not be deleted, once installed
6449 6456
6450To ensure that a package may not be deleted, once it has been installed, the 6457To ensure that a package may not be deleted, once it has been installed, the
6451PKG_PRESERVE definition should be set in the package Makefile. This will be 6458PKG_PRESERVE definition should be set in the package Makefile. This will be
6452carried into any binary package that is made from this pkgsrc entry. A " 6459carried into any binary package that is made from this pkgsrc entry. A "
6453preserved" package will not be deleted using pkg_delete(1) unless the "-f" 6460preserved" package will not be deleted using pkg_delete(1) unless the "-f"
6454option is used. 6461option is used.
6455 6462
645621.1.9. Handling packages with security problems 646321.1.9. Handling packages with security problems
6457 6464
6458When a vulnerability is found, this should be noted in localsrc/security/ 6465When a vulnerability is found, this should be noted in localsrc/security/
6459advisories/pkg-vulnerabilities. Entries in that file consist of three parts: 6466advisories/pkg-vulnerabilities. Entries in that file consist of three parts:
6460 6467
6461 * package version pattern 6468 * package version pattern
6462 6469
6463 * type of vulnerability (please cut'n'paste an existing one where possible) 6470 * type of vulnerability (please cut'n'paste an existing one where possible)
6464 6471
6465 * URL providing additional information about the issue 6472 * URL providing additional information about the issue
6466 6473
6467For the package version pattern please always use `<' to mark an upper bound 6474For the package version pattern please always use `<' to mark an upper bound
6468(not `<='!). This will avoid possible problems due unrelated PKGREVISION bumps 6475(not `<='!). This will avoid possible problems due unrelated PKGREVISION bumps
6469not related to security fixes. Lower bounds can be added too, using '>' or '>= 6476not related to security fixes. Lower bounds can be added too, using '>' or '>=
6470'. For example, "foo>=1<1.2" would mark versions 1.0 (included) to 1.2 6477'. For example, "foo>=1<1.2" would mark versions 1.0 (included) to 1.2
6471(excluded) of "foo" as affected by the security issue. 6478(excluded) of "foo" as affected by the security issue.
6472 6479
6473Entries should always be added at the bottom of the file. 6480Entries should always be added at the bottom of the file.
6474 6481
6475When fixing packages, please modify the upper bound of the corresponding entry. 6482When fixing packages, please modify the upper bound of the corresponding entry.
6476To continue the previous example, if a fix was backported to version 1.1nb2, 6483To continue the previous example, if a fix was backported to version 1.1nb2,
6477change the previous pattern to "foo>=1<1.1nb2". 6484change the previous pattern to "foo>=1<1.1nb2".
6478 6485
6479To locally test a package version pattern against a PKGNAME you can use the  6486To locally test a package version pattern against a PKGNAME you can use the
6480pkg_admin pmatch command. 6487pkg_admin pmatch command.
6481 6488
6482The URL should be as permanent as possible and provide as much information 6489The URL should be as permanent as possible and provide as much information
6483about the issue as possible. CVE entries are preferred. 6490about the issue as possible. CVE entries are preferred.
6484 6491
6485After committing that file, ask pkgsrc-security@NetBSD.org to update the file 6492After committing that file, ask pkgsrc-security@NetBSD.org to update the file
6486on ftp.NetBSD.org. 6493on ftp.NetBSD.org.
6487 6494
6488After fixing the vulnerability by a patch, its PKGREVISION should be increased 6495After fixing the vulnerability by a patch, its PKGREVISION should be increased
6489(this is of course not necessary if the problem is fixed by using a newer 6496(this is of course not necessary if the problem is fixed by using a newer
6490release of the software), and the pattern in the pkg-vulnerabilities file must 6497release of the software), and the pattern in the pkg-vulnerabilities file must
6491be updated. 6498be updated.
6492 6499
6493Also, if the fix should be applied to the stable pkgsrc branch, be sure to 6500Also, if the fix should be applied to the stable pkgsrc branch, be sure to
6494submit a pullup request! 6501submit a pullup request!
6495 6502
6496Binary packages already on ftp.NetBSD.org will be handled semi-automatically by 6503Binary packages already on ftp.NetBSD.org will be handled semi-automatically by
6497a weekly cron job. 6504a weekly cron job.
6498 6505
6499In case a security issue is disputed, please contact 6506In case a security issue is disputed, please contact
6500pkgsrc-security@NetBSD.org. 6507pkgsrc-security@NetBSD.org.
6501 6508
650221.1.10. How to handle incrementing versions when fixing an existing package 650921.1.10. How to handle incrementing versions when fixing an existing package
6503 6510
6504When making fixes to an existing package it can be useful to change the version 6511When making fixes to an existing package it can be useful to change the version
6505number in PKGNAME. To avoid conflicting with future versions by the original 6512number in PKGNAME. To avoid conflicting with future versions by the original
6506author, a "nb1", "nb2", ... suffix can be used on package versions by setting 6513author, a "nb1", "nb2", ... suffix can be used on package versions by setting
6507PKGREVISION=1 (2, ...). The "nb" is treated like a "." by the package tools. 6514PKGREVISION=1 (2, ...). The "nb" is treated like a "." by the package tools.
6508e.g. 6515e.g.
6509 6516
6510DISTNAME= foo-17.42 6517DISTNAME= foo-17.42
6511PKGREVISION= 9 6518PKGREVISION= 9
6512 6519
6513will result in a PKGNAME of "foo-17.42nb9". If you want to use the original 6520will result in a PKGNAME of "foo-17.42nb9". If you want to use the original
6514value of PKGNAME without the "nbX" suffix, e.g. for setting DIST_SUBDIR, use 6521value of PKGNAME without the "nbX" suffix, e.g. for setting DIST_SUBDIR, use
6515PKGNAME_NOREV. 6522PKGNAME_NOREV.
6516 6523
6517When a new release of the package is released, the PKGREVISION should be 6524When a new release of the package is released, the PKGREVISION should be
6518removed, e.g. on a new minor release of the above package, things should be 6525removed, e.g. on a new minor release of the above package, things should be
6519like: 6526like:
6520 6527
6521DISTNAME= foo-17.43 6528DISTNAME= foo-17.43
6522 6529
6523PKGREVISION should be incremented for any non-trivial change in the resulting 6530PKGREVISION should be incremented for any non-trivial change in the resulting
6524binary package. Without a PKGREVISION bump, someone with the previous version 6531binary package. Without a PKGREVISION bump, someone with the previous version
6525installed has no way of knowing that their package is out of date. Thus, 6532installed has no way of knowing that their package is out of date. Thus,
6526changes without increasing PKGREVISION are essentially labeled "this is so 6533changes without increasing PKGREVISION are essentially labeled "this is so
6527trivial that no reasonable person would want to upgrade", and this is the rough 6534trivial that no reasonable person would want to upgrade", and this is the rough
6528test for when increasing PKGREVISION is appropriate. Examples of changes that 6535test for when increasing PKGREVISION is appropriate. Examples of changes that
6529do not merit increasing PKGREVISION are: 6536do not merit increasing PKGREVISION are:
6530 6537
6531 * Changing HOMEPAGE, MAINTAINER, OWNER, or comments in Makefile. 6538 * Changing HOMEPAGE, MAINTAINER, OWNER, or comments in Makefile.
6532 6539
6533 * Changing build variables if the resulting binary package is the same. 6540 * Changing build variables if the resulting binary package is the same.
6534 6541
6535 * Changing DESCR. 6542 * Changing DESCR.
6536 6543
6537 * Adding PKG_OPTIONS if the default options don't change. 6544 * Adding PKG_OPTIONS if the default options don't change.
6538 6545
6539Examples of changes that do merit an increase to PKGREVISION include: 6546Examples of changes that do merit an increase to PKGREVISION include:
6540 6547
6541 * Security fixes 6548 * Security fixes
6542 6549
6543 * Changes or additions to a patch file 6550 * Changes or additions to a patch file
6544 6551
6545 * Changes to the PLIST 6552 * Changes to the PLIST
6546 6553
6547 * A dependency is changed or renamed. 6554 * A dependency is changed or renamed.
6548 6555
6549PKGREVISION must also be incremented when dependencies have ABI changes. 6556PKGREVISION must also be incremented when dependencies have ABI changes.
6550 6557
655121.1.11. Substituting variable text in the package files (the SUBST framework) 655821.1.11. Substituting variable text in the package files (the SUBST framework)
6552 6559
6553When you want to replace the same text in multiple files, or multiple times in 6560When you want to replace the same text in multiple files, or multiple times in
6554the same file, it is cumbersome to maintain a patch file for this. This is 6561the same file, it is cumbersome to maintain a patch file for this. This is
6555where the SUBST framework steps in. It provides an easy-to-use interface for 6562where the SUBST framework steps in. It provides an easy-to-use interface for
6556replacing text in files. It just needs the following information: 6563replacing text in files. It just needs the following information:
6557 6564
6558 * In which phase of the package build cycle should the replacement happen? 6565 * In which phase of the package build cycle should the replacement happen?
6559 6566
6560 * In which files should the replacement happen? 6567 * In which files should the replacement happen?
6561 6568
6562 * Which text should be replaced with what? 6569 * Which text should be replaced with what?
6563 6570
6564This information is encoded in a block of SUBST variables. A minimal example 6571This information is encoded in a block of SUBST variables. A minimal example
6565is: 6572is:
6566 6573
6567SUBST_CLASSES+= paths 6574SUBST_CLASSES+= paths
6568SUBST_STAGE.paths= pre-configure 6575SUBST_STAGE.paths= pre-configure
6569SUBST_FILES.paths= src/*.c 6576SUBST_FILES.paths= src/*.c
6570SUBST_SED.paths= -e 's,/usr/local,${PREFIX},g' 6577SUBST_SED.paths= -e 's,/usr/local,${PREFIX},g'
6571 6578
6572Translated into English, it means: In the pre-configure stage (that is, after 6579Translated into English, it means: In the pre-configure stage (that is, after
6573applying the patches from the patches/ directory and before running the 6580applying the patches from the patches/ directory and before running the
6574configure script and the portability check), replace the text /usr/local with 6581configure script and the portability check), replace the text /usr/local with
6575the content of the variable PREFIX. 6582the content of the variable PREFIX.
6576 6583
6577Each SUBST block starts by appending an identifier to SUBST_CLASSES (note the + 6584Each SUBST block starts by appending an identifier to SUBST_CLASSES (note the +
6578=). This identifier can be chosen freely by the package. If there should ever 6585=). This identifier can be chosen freely by the package. If there should ever
6579be duplicate identifiers, the pkgsrc infrastructure will catch this and fail 6586be duplicate identifiers, the pkgsrc infrastructure will catch this and fail
6580early, so don't worry about name collisions. 6587early, so don't worry about name collisions.
6581 6588
6582Except for SUBST_CLASSES, all variables in a SUBST block are parameterized 6589Except for SUBST_CLASSES, all variables in a SUBST block are parameterized
6583using this identifier. In the remainder of this section, these parameterized 6590using this identifier. In the remainder of this section, these parameterized
6584variables are written as SUBST_STAGE.*. 6591variables are written as SUBST_STAGE.*.
6585 6592
6586SUBST_CLASSES+= paths 6593SUBST_CLASSES+= paths
6587SUBST_STAGE.paths= pre-configure 6594SUBST_STAGE.paths= pre-configure
6588SUBST_MESSAGE.paths= Fixing absolute paths. 6595SUBST_MESSAGE.paths= Fixing absolute paths.
6589SUBST_FILES.paths= src/*.c 6596SUBST_FILES.paths= src/*.c
6590SUBST_FILES.paths+= scripts/*.sh 6597SUBST_FILES.paths+= scripts/*.sh
6591SUBST_SED.paths= -e 's,"/usr/local,"${PREFIX},g' 6598SUBST_SED.paths= -e 's,"/usr/local,"${PREFIX},g'
6592SUBST_SED.paths+= -e 's,"/var/log,"${VARBASE}/log,g' 6599SUBST_SED.paths+= -e 's,"/var/log,"${VARBASE}/log,g'
6593SUBST_VARS.paths= LOCALBASE PREFIX PKGVERSION 6600SUBST_VARS.paths= LOCALBASE PREFIX PKGVERSION
6594 6601
6595To get a complete picture about the SUBST substitutions, run bmake 6602To get a complete picture about the SUBST substitutions, run bmake
6596show-all-subst. If something doesn't work as expected, run pkglint on the 6603show-all-subst. If something doesn't work as expected, run pkglint on the
6597package, which detects several typical mistakes surrounding the SUBST blocks. 6604package, which detects several typical mistakes surrounding the SUBST blocks.
6598For any questions that might remain after this, have a look at mk/subst.mk. 6605For any questions that might remain after this, have a look at mk/subst.mk.
6599 6606
660021.1.11.1. Choosing the time where the substitutions happen 660721.1.11.1. Choosing the time where the substitutions happen
6601 6608
6602The SUBST_STAGE.* is one of {pre,do,post}- 6609The SUBST_STAGE.* is one of {pre,do,post}-
6603{extract,patch,configure,build,test,install}. Of these, pre-configure is used 6610{extract,patch,configure,build,test,install}. Of these, pre-configure is used
6604most often, by far. The most popular stages are, in chronological order: 6611most often, by far. The most popular stages are, in chronological order:
6605 6612
6606post-extract 6613post-extract
6607 6614
6608 The substitutions are applied immediately after the distfiles are 6615 The substitutions are applied immediately after the distfiles are
6609 extracted. Running bmake extract on the package will leave no traces of the 6616 extracted. Running bmake extract on the package will leave no traces of the
6610 original files. 6617 original files.
6611 6618
6612 When the substitution applies to files for which there is also a patch in 6619 When the substitution applies to files for which there is also a patch in
6613 the patches/ directory, this means that the patches will be computed based 6620 the patches/ directory, this means that the patches will be computed based
6614 on the result of the substitution. When these patches are sent to the 6621 on the result of the substitution. When these patches are sent to the
6615 upstream maintainer later, to be fixed in the upstream package, these 6622 upstream maintainer later, to be fixed in the upstream package, these
6616 patches may no longer match what the upstream author is used to. Because of 6623 patches may no longer match what the upstream author is used to. Because of
6617 this, pre-configure is often a better choice. 6624 this, pre-configure is often a better choice.
6618 6625
6619pre-configure 6626pre-configure
6620 6627
6621 The substitutions are applied after the patches from the patches/ 6628 The substitutions are applied after the patches from the patches/
6622 directory. This makes it possible to run bmake patch on the package, after 6629 directory. This makes it possible to run bmake patch on the package, after
6623 which the patches can be edited using the tools pkgvi and mkpatches from 6630 which the patches can be edited using the tools pkgvi and mkpatches from
6624 the pkgtools/pkgdiff package. 6631 the pkgtools/pkgdiff package.
6625 6632
6626 When updating the patches, it is helpful to explicitly separate the bmake 6633 When updating the patches, it is helpful to explicitly separate the bmake
6627 patch from the bmake configure, and to only edit the patches between these 6634 patch from the bmake configure, and to only edit the patches between these
6628 commands. Otherwise the substitutions from the SUBST block will end up in 6635 commands. Otherwise the substitutions from the SUBST block will end up in
6629 the patch file. When this happens in really obvious ways, pkglint will 6636 the patch file. When this happens in really obvious ways, pkglint will
6630 complain about patches that contain a hard-coded /usr/pkg instead of the 6637 complain about patches that contain a hard-coded /usr/pkg instead of the
6631 correct and intended @PREFIX@, but it can only detect these really obvious 6638 correct and intended @PREFIX@, but it can only detect these really obvious
6632 cases. 6639 cases.
6633 6640
6634do-configure 6641do-configure
6635 6642
6636 This stage should only be used if the package defines a pre-configure 6643 This stage should only be used if the package defines a pre-configure
6637 action itself, and the substitution must happen after that. Typical 6644 action itself, and the substitution must happen after that. Typical
6638 examples are packages that use the pre-configure stage to regenerate the 6645 examples are packages that use the pre-configure stage to regenerate the
6639 GNU configure script from configure.ac. 6646 GNU configure script from configure.ac.
6640 6647
6641post-configure 6648post-configure
6642 6649
6643 This stage is used to fix up any mistakes by the configure stage. 6650 This stage is used to fix up any mistakes by the configure stage.
6644 6651
6645pre-build 6652pre-build
6646 6653
6647 This stage should only be used for substitutions that are clearly related 6654 This stage should only be used for substitutions that are clearly related
6648 to building the package, not for fixing the configuration. Substitutions 6655 to building the package, not for fixing the configuration. Substitutions
6649 for pathnames (such as replacing /usr/local with ${PREFIX}) or user names 6656 for pathnames (such as replacing /usr/local with ${PREFIX}) or user names
6650 (such as replacing @MY_USER@ with the actual username) belong in 6657 (such as replacing @MY_USER@ with the actual username) belong in
6651 pre-configure or post-configure instead. 6658 pre-configure or post-configure instead.
6652 6659
6653post-build 6660post-build
6654 6661
6655 Just as with pre-build, this stage should only be used for substitutions 6662 Just as with pre-build, this stage should only be used for substitutions
6656 that are clearly related to building the package, not for fixing the 6663 that are clearly related to building the package, not for fixing the
6657 configuration. Substitutions for pathnames (such as replacing /usr/local 6664 configuration. Substitutions for pathnames (such as replacing /usr/local
6658 with ${PREFIX}) or user names (such as replacing @MY_USER@ with the actual 6665 with ${PREFIX}) or user names (such as replacing @MY_USER@ with the actual
6659 username) belong in pre-configure or post-configure instead. 6666 username) belong in pre-configure or post-configure instead.
6660 6667
6661 A typical use is to update pkg-config files to include the rpath compiler 6668 A typical use is to update pkg-config files to include the rpath compiler
6662 options. 6669 options.
6663 6670
6664pre-install 6671pre-install
6665 6672
6666 In general, the install phase should be as simple as possible. As with the 6673 In general, the install phase should be as simple as possible. As with the
6667 pre-build and post-build stages, it should not be used to fix pathnames or 6674 pre-build and post-build stages, it should not be used to fix pathnames or
6668 user names, these belong in pre-configure instead. There are only few 6675 user names, these belong in pre-configure instead. There are only few
6669 legitimate use cases for applying substitutions in this stage. 6676 legitimate use cases for applying substitutions in this stage.
6670 6677
667121.1.11.2. Choosing the files where the substitutions happen 667821.1.11.2. Choosing the files where the substitutions happen
6672 6679
6673The SUBST_FILES.* variable contains a list of filename patterns. These patterns 6680The SUBST_FILES.* variable contains a list of filename patterns. These patterns
6674are relative to WRKSRC since that is where most substitutions happen. A typical 6681are relative to WRKSRC since that is where most substitutions happen. A typical
6675example is: 6682example is:
6676 6683
6677SUBST_FILES.path= Makefile */Makefile */*/Makefile *.[ch] 6684SUBST_FILES.path= Makefile */Makefile */*/Makefile *.[ch]
6678 6685
6679The above patterns, especially the last, are quite broad. The SUBST 6686The above patterns, especially the last, are quite broad. The SUBST
6680implementation checks that each filename pattern that is mentioned here has an 6687implementation checks that each filename pattern that is mentioned here has an
6681effect. For example, if none of the */*/Makefile files contains the patterns to 6688effect. For example, if none of the */*/Makefile files contains the patterns to
6682be found and substituted, that filename pattern is redundant and should be left 6689be found and substituted, that filename pattern is redundant and should be left
6683out. By default, the SUBST framework will complain with an error message. If 6690out. By default, the SUBST framework will complain with an error message. If
6684the text to be substituted occurs in some of the files from a single pattern, 6691the text to be substituted occurs in some of the files from a single pattern,
6685but not in all of them, that is totally ok, and the SUBST framework will only 6692but not in all of them, that is totally ok, and the SUBST framework will only
6686print an INFO message for those files. 6693print an INFO message for those files.
6687 6694
6688If there is a good reason for having redundant filename patterns, set 6695If there is a good reason for having redundant filename patterns, set
6689SUBST_NOOP_OK.* to yes. 6696SUBST_NOOP_OK.* to yes.
6690 6697
6691Another popular way of choosing the files for the substitutions is via a shell 6698Another popular way of choosing the files for the substitutions is via a shell
6692command, like this: 6699command, like this:
6693 6700
6694C_FILES_CMD= cd ${WRKSRC} && ${FIND} . -name '*.c' 6701C_FILES_CMD= cd ${WRKSRC} && ${FIND} . -name '*.c'
6695SUBST_FILES.path= ${C_FILES_CMD:sh} 6702SUBST_FILES.path= ${C_FILES_CMD:sh}
6696 6703
6697The variable name C_FILES_CMD in this example is freely chosen and independent 6704The variable name C_FILES_CMD in this example is freely chosen and independent
6698of the SUBST framework. 6705of the SUBST framework.
6699 6706
6700In this variant, the SUBST_FILES.* variable lists each file individually. 6707In this variant, the SUBST_FILES.* variable lists each file individually.
6701Thereby chances are higher that there are filename patterns in which no 6708Thereby chances are higher that there are filename patterns in which no
6702substitution happens. Since the SUBST framework cannot know whether the 6709substitution happens. Since the SUBST framework cannot know whether the
6703filename patterns in SUBST_FILES.* have been explicitly listed in the Makefile 6710filename patterns in SUBST_FILES.* have been explicitly listed in the Makefile
6704(where any redundant filename pattern would be suspicious) or been generated by 6711(where any redundant filename pattern would be suspicious) or been generated by
6705a shell command (in which redundant filename patterns are more likely and to be 6712a shell command (in which redundant filename patterns are more likely and to be
6706expected), it will complain about these redundant filename patterns. Therefore, 6713expected), it will complain about these redundant filename patterns. Therefore,
6707SUBST blocks that use a shell command to generate the list of filename patterns 6714SUBST blocks that use a shell command to generate the list of filename patterns
6708often need to set SUBST_NOOP_OK.* to yes. 6715often need to set SUBST_NOOP_OK.* to yes.
6709 6716
671021.1.11.3. Choosing what to substitute 671721.1.11.3. Choosing what to substitute
6711 6718
6712In most cases, the substitutions are given using one or more sed(1) commands, 6719In most cases, the substitutions are given using one or more sed(1) commands,
6713like this: 6720like this:
6714 6721
6715SUBST_SED.path= -e 's|/usr/local|${PREFIX}|g' 6722SUBST_SED.path= -e 's|/usr/local|${PREFIX}|g'
6716 6723
6717Each of the sed commands needs to be preceded by the -e option and should be 6724Each of the sed commands needs to be preceded by the -e option and should be
6718specified on a line of its own, to avoid hiding short sed commands at the end 6725specified on a line of its own, to avoid hiding short sed commands at the end
6719of a line. 6726of a line.
6720 6727
6721Since the sed commands often contain shell metacharacters as the separator (the 6728Since the sed commands often contain shell metacharacters as the separator (the
6722| in the above example), it is common to enclose them in single quotes. 6729| in the above example), it is common to enclose them in single quotes.
6723 6730
6724A common substitution is to replace placeholders of the form @VARNAME@ with 6731A common substitution is to replace placeholders of the form @VARNAME@ with
6725their pkgsrc counterpart variable ${VARNAME}. A typical example is: 6732their pkgsrc counterpart variable ${VARNAME}. A typical example is:
6726 6733
6727SUBST_VARS.path= PREFIX 6734SUBST_VARS.path= PREFIX
6728 6735
6729This type of substitutions is typically done by the GNU configure scripts 6736This type of substitutions is typically done by the GNU configure scripts
6730during the do-configure stage, but in some cases these need to be overridden. 6737during the do-configure stage, but in some cases these need to be overridden.
6731The same pattern is also used when a package defines patches that replace 6738The same pattern is also used when a package defines patches that replace
6732previously hard-coded paths like /usr/local with a @PREFIX@ placeholder first, 6739previously hard-coded paths like /usr/local with a @PREFIX@ placeholder first,
6733which then gets substituted by the actual ${PREFIX} in the pre-configure stage. 6740which then gets substituted by the actual ${PREFIX} in the pre-configure stage.
6734In many of these cases, it works equally well to just use the SUBST framework 6741In many of these cases, it works equally well to just use the SUBST framework
6735to directly replace /usr/local with ${PREFIX}, thereby omitting the 6742to directly replace /usr/local with ${PREFIX}, thereby omitting the
6736intermediate patch file. 6743intermediate patch file.
6737 6744
6738If the above is not flexible enough, it is possible to not use sed at all for 6745If the above is not flexible enough, it is possible to not use sed at all for
6739the substitution but to specify an entirely different command, like this: 6746the substitution but to specify an entirely different command, like this:
6740 6747
6741SUBST_FILTER_CMD.path= LC_ALL=C ${TR} -d '\r' 6748SUBST_FILTER_CMD.path= LC_ALL=C ${TR} -d '\r'
6742 6749
6743This is used for the few remaining packages in which the distributed files use 6750This is used for the few remaining packages in which the distributed files use
6744Windows-style line endings that need to be converted to UNIX-style line 6751Windows-style line endings that need to be converted to UNIX-style line
6745endings. 6752endings.
6746 6753
674721.1.11.4. Other SUBST variables 675421.1.11.4. Other SUBST variables
6748 6755
6749When a SUBST block is applied during a package build, a message is logged. The 6756When a SUBST block is applied during a package build, a message is logged. The
6750default message is fine for most purposes but can be overridden by setting 6757default message is fine for most purposes but can be overridden by setting
6751SUBST_MESSAGE.* to an individual message. 6758SUBST_MESSAGE.* to an individual message.
6752 6759
675321.2. The fetch phase 676021.2. The fetch phase
6754 6761
675521.2.1. Packages whose distfiles aren't available for plain downloading 676221.2.1. Packages whose distfiles aren't available for plain downloading
6756 6763
6757If you need to download from a dynamic URL you can set DYNAMIC_MASTER_SITES and 6764If you need to download from a dynamic URL you can set DYNAMIC_MASTER_SITES and
6758a make fetch will call files/getsite.sh with the name of each file to download 6765a make fetch will call files/getsite.sh with the name of each file to download
6759as an argument, expecting it to output the URL of the directory from which to 6766as an argument, expecting it to output the URL of the directory from which to
6760download it. graphics/ns-cult3d is an example of this usage. 6767download it. graphics/ns-cult3d is an example of this usage.
6761 6768
6762If the download can't be automated, because the user must submit personal 6769If the download can't be automated, because the user must submit personal
6763information to apply for a password, or must pay for the source, or whatever, 6770information to apply for a password, or must pay for the source, or whatever,
6764you can set FETCH_MESSAGE to a list of lines that are displayed to the user 6771you can set FETCH_MESSAGE to a list of lines that are displayed to the user
6765before aborting the build. Example: 6772before aborting the build. Example:
6766 6773
6767FETCH_MESSAGE= "Please download the files" 6774FETCH_MESSAGE= "Please download the files"
6768FETCH_MESSAGE+= " "${DISTFILES:Q} 6775FETCH_MESSAGE+= " "${DISTFILES:Q}
6769FETCH_MESSAGE+= "manually from "${MASTER_SITES:Q}"." 6776FETCH_MESSAGE+= "manually from "${MASTER_SITES:Q}"."
6770 6777
677121.2.2. How to handle modified distfiles with the 'old' name 677821.2.2. How to handle modified distfiles with the 'old' name
6772 6779
6773Sometimes authors of a software package make some modifications after the 6780Sometimes authors of a software package make some modifications after the
6774software was released, and they put up a new distfile without changing the 6781software was released, and they put up a new distfile without changing the
6775package's version number. If a package is already in pkgsrc at that time, the 6782package's version number. If a package is already in pkgsrc at that time, the
6776checksum will no longer match. The contents of the new distfile should be 6783checksum will no longer match. The contents of the new distfile should be
6777compared against the old one before changing anything, to make sure the 6784compared against the old one before changing anything, to make sure the
6778distfile was really updated on purpose, and that no trojan horse or so crept 6785distfile was really updated on purpose, and that no trojan horse or so crept
6779in. Please mention that the distfiles were compared and what was found in your 6786in. Please mention that the distfiles were compared and what was found in your
6780commit message. 6787commit message.
6781 6788
6782Then, the correct way to work around this is to set DIST_SUBDIR to a unique 6789Then, the correct way to work around this is to set DIST_SUBDIR to a unique
6783directory name, usually based on PKGNAME_NOREV (but take care with python or 6790directory name, usually based on PKGNAME_NOREV (but take care with python or
6784ruby packages, where PKGNAME includes a variable prefix). All DISTFILES and 6791ruby packages, where PKGNAME includes a variable prefix). All DISTFILES and
6785PATCHFILES for this package will be put in that subdirectory of the local 6792PATCHFILES for this package will be put in that subdirectory of the local
6786distfiles directory. (See Section 21.1.10, "How to handle incrementing versions 6793distfiles directory. (See Section 21.1.10, "How to handle incrementing versions
6787when fixing an existing package" for more details.) In case this happens more 6794when fixing an existing package" for more details.) In case this happens more
6788often, PKGNAME can be used (thus including the nbX suffix) or a date stamp can 6795often, PKGNAME can be used (thus including the nbX suffix) or a date stamp can
6789be appended, like ${PKGNAME_NOREV}-YYYYMMDD. 6796be appended, like ${PKGNAME_NOREV}-YYYYMMDD.
6790 6797
6791DIST_SUBDIR is also used when a distfile's name does not contain a version and 6798DIST_SUBDIR is also used when a distfile's name does not contain a version and
6792the distfile is apt to change. In cases where the likelihood of this is very 6799the distfile is apt to change. In cases where the likelihood of this is very
6793small, DIST_SUBDIR might not be required. Additionally, DIST_SUBDIR must not be 6800small, DIST_SUBDIR might not be required. Additionally, DIST_SUBDIR must not be
6794removed unless the distfile name changes, even if a package is being moved or 6801removed unless the distfile name changes, even if a package is being moved or
6795renamed. 6802renamed.
6796 6803
6797Do not forget regenerating the distinfo file after that, since it contains the 6804Do not forget regenerating the distinfo file after that, since it contains the
6798DIST_SUBDIR path in the filenames. Also, increase the PKGREVISION if the 6805DIST_SUBDIR path in the filenames. Also, increase the PKGREVISION if the
6799installed package is different. Furthermore, a mail to the package's authors 6806installed package is different. Furthermore, a mail to the package's authors
6800seems appropriate telling them that changing distfiles after releases without 6807seems appropriate telling them that changing distfiles after releases without
6801changing the file names is not good practice. 6808changing the file names is not good practice.
6802 6809
680321.2.3. Packages hosted on github.com 681021.2.3. Packages hosted on github.com
6804 6811
6805Helper methods exist for packages hosted on github.com which will often have 6812Helper methods exist for packages hosted on github.com which will often have
6806distfile names that clash with other packages, for example 1.0.tar.gz. Use one 6813distfile names that clash with other packages, for example 1.0.tar.gz. Use one
6807of the three recipes from below: 6814of the three recipes from below:
6808 6815
680921.2.3.1. Fetch based on a tagged release 681621.2.3.1. Fetch based on a tagged release
6810 6817
6811If your distfile URL looks similar to https://github.com/username/example/ 6818If your distfile URL looks similar to https://github.com/username/example/
6812archive/v1.0.zip, then you are packaging a tagged release. 6819archive/v1.0.zip, then you are packaging a tagged release.
6813 6820
6814DISTNAME= example-1.0 6821DISTNAME= example-1.0
6815MASTER_SITES= ${MASTER_SITE_GITHUB:=username/} 6822MASTER_SITES= ${MASTER_SITE_GITHUB:=username/}
6816#GITHUB_PROJECT= example # can be omitted if same as DISTNAME 6823#GITHUB_PROJECT= example # can be omitted if same as DISTNAME
6817GITHUB_TAG= v${PKGVERSION_NOREV} 6824GITHUB_TAG= v${PKGVERSION_NOREV}
6818EXTRACT_SUFX= .zip 6825EXTRACT_SUFX= .zip
6819 6826
682021.2.3.2. Fetch based on a specific commit before the first release 682721.2.3.2. Fetch based on a specific commit before the first release
6821 6828
6822If your distfile looks similar to https://github.com/username/example/archive/ 6829If your distfile looks similar to https://github.com/username/example/archive/
6823988881adc9fc3655077dc2d4d757d480b5ea0e11 and is from a commit before the first 6830988881adc9fc3655077dc2d4d757d480b5ea0e11 and is from a commit before the first
6824release, then set the package version to 0.0.0.N, where N is the number of 6831release, then set the package version to 0.0.0.N, where N is the number of
6825commits to the repository, and set GITHUB_TAG to the commit hash. This will 6832commits to the repository, and set GITHUB_TAG to the commit hash. This will
6826(almost) ensure that the first tagged release will have a version greater than 6833(almost) ensure that the first tagged release will have a version greater than
6827this one so that package upgrades will function properly. 6834this one so that package upgrades will function properly.
6828 6835
6829DISTNAME= example-0.0.0.347 6836DISTNAME= example-0.0.0.347
6830MASTER_SITES= ${MASTER_SITE_GITHUB:=username/} 6837MASTER_SITES= ${MASTER_SITE_GITHUB:=username/}
6831#GITHUB_PROJECT= example # can be omitted if same as DISTNAME 6838#GITHUB_PROJECT= example # can be omitted if same as DISTNAME
6832GITHUB_TAG= 988881adc9fc3655077dc2d4d757d480b5ea0e11 6839GITHUB_TAG= 988881adc9fc3655077dc2d4d757d480b5ea0e11
6833 6840
683421.2.3.3. Fetch based on a specific commit after a release 684121.2.3.3. Fetch based on a specific commit after a release
6835 6842
6836If your distfile looks similar to https://github.com/username/example/archive/ 6843If your distfile looks similar to https://github.com/username/example/archive/
6837988881adc9fc3655077dc2d4d757d480b5ea0e11 and is from a commit after a release, 6844988881adc9fc3655077dc2d4d757d480b5ea0e11 and is from a commit after a release,
6838then include the last release version and the commit count since that release 6845then include the last release version and the commit count since that release
6839in the package version and set GITHUB_TAG to the commit hash. The latest 6846in the package version and set GITHUB_TAG to the commit hash. The latest
6840release and commit count are shown in the output of "git describe --tags": 6847release and commit count are shown in the output of "git describe --tags":
6841 6848
6842# git clone https://github.com/username/example 6849# git clone https://github.com/username/example
6843# cd example 6850# cd example
6844# git describe --tags 6851# git describe --tags
68451.2.3-5-g988881a 68521.2.3-5-g988881a
6846 6853
6847DISTNAME= example-1.2.3.5 6854DISTNAME= example-1.2.3.5
6848MASTER_SITES= ${MASTER_SITE_GITHUB:=username/} 6855MASTER_SITES= ${MASTER_SITE_GITHUB:=username/}
6849#GITHUB_PROJECT= example # can be omitted if same as DISTNAME 6856#GITHUB_PROJECT= example # can be omitted if same as DISTNAME
6850GITHUB_TAG= 988881adc9fc3655077dc2d4d757d480b5ea0e11 6857GITHUB_TAG= 988881adc9fc3655077dc2d4d757d480b5ea0e11
6851 6858
685221.2.3.4. Fetch based on release 685921.2.3.4. Fetch based on release
6853 6860
6854If your distfile URL looks similar to https://github.com/username/example/ 6861If your distfile URL looks similar to https://github.com/username/example/
6855releases/download/rel-1.6/offensive-1.6.zip, then you are packaging a release. 6862releases/download/rel-1.6/offensive-1.6.zip, then you are packaging a release.
6856 6863
6857DISTNAME= offensive-1.6 6864DISTNAME= offensive-1.6
6858PKGNAME= ${DISTNAME:S/offensive/proper/} 6865PKGNAME= ${DISTNAME:S/offensive/proper/}
6859MASTER_SITES= ${MASTER_SITE_GITHUB:=username/} 6866MASTER_SITES= ${MASTER_SITE_GITHUB:=username/}
6860GITHUB_PROJECT= example 6867GITHUB_PROJECT= example
6861GITHUB_RELEASE= rel-${PKGVERSION_NOREV} # usually just set this to ${DISTNAME} 6868GITHUB_RELEASE= rel-${PKGVERSION_NOREV} # usually just set this to ${DISTNAME}
6862EXTRACT_SUFX= .zip 6869EXTRACT_SUFX= .zip
6863 6870
686421.3. The configure phase 687121.3. The configure phase
6865 6872
686621.3.1. Shared libraries - libtool 687321.3.1. Shared libraries - libtool
6867 6874
6868pkgsrc supports many different machines, with different object formats like 6875pkgsrc supports many different machines, with different object formats like
6869a.out and ELF, and varying abilities to do shared library and dynamic loading 6876a.out and ELF, and varying abilities to do shared library and dynamic loading
6870at all. To accompany this, varying commands and options have to be passed to 6877at all. To accompany this, varying commands and options have to be passed to
6871the compiler, linker, etc. to get the Right Thing, which can be pretty annoying 6878the compiler, linker, etc. to get the Right Thing, which can be pretty annoying
6872especially if you don't have all the machines at your hand to test things. The 6879especially if you don't have all the machines at your hand to test things. The
6873devel/libtool pkg can help here, as it just "knows" how to build both static 6880devel/libtool pkg can help here, as it just "knows" how to build both static
6874and dynamic libraries from a set of source files, thus being 6881and dynamic libraries from a set of source files, thus being
6875platform-independent. 6882platform-independent.
6876 6883
6877Here's how to use libtool in a package in seven simple steps: 6884Here's how to use libtool in a package in seven simple steps:
6878 6885
6879 1. Add USE_LIBTOOL=yes to the package Makefile. 6886 1. Add USE_LIBTOOL=yes to the package Makefile.
6880 6887
6881 2. For library objects, use "${LIBTOOL} --mode=compile ${CC}" in place of "$ 6888 2. For library objects, use "${LIBTOOL} --mode=compile ${CC}" in place of "$
6882 {CC}". You could even add it to the definition of CC, if only libraries are 6889 {CC}". You could even add it to the definition of CC, if only libraries are
6883 being built in a given Makefile. This one command will build both PIC and 6890 being built in a given Makefile. This one command will build both PIC and
6884 non-PIC library objects, so you need not have separate shared and 6891 non-PIC library objects, so you need not have separate shared and
6885 non-shared library rules. 6892 non-shared library rules.
6886 6893
6887 3. For the linking of the library, remove any "ar", "ranlib", and "ld 6894 3. For the linking of the library, remove any "ar", "ranlib", and "ld
6888 -Bshareable" commands, and instead use: 6895 -Bshareable" commands, and instead use:
6889 6896
6890 ${LIBTOOL} --mode=link \ 6897 ${LIBTOOL} --mode=link \
6891 ${CC} -o ${.TARGET:.a=.la} \ 6898 ${CC} -o ${.TARGET:.a=.la} \
6892 ${OBJS:.o=.lo} \ 6899 ${OBJS:.o=.lo} \
6893 -rpath ${PREFIX}/lib \ 6900 -rpath ${PREFIX}/lib \
6894 -version-info major:minor 6901 -version-info major:minor
6895 6902
6896 Note that the library is changed to have a .la extension, and the objects 6903 Note that the library is changed to have a .la extension, and the objects
6897 are changed to have a .lo extension. Change OBJS as necessary. This 6904 are changed to have a .lo extension. Change OBJS as necessary. This
6898 automatically creates all of the .a, .so.major.minor, and ELF symlinks (if 6905 automatically creates all of the .a, .so.major.minor, and ELF symlinks (if
6899 necessary) in the build directory. Be sure to include "-version-info", 6906 necessary) in the build directory. Be sure to include "-version-info",
6900 especially when major and minor are zero, as libtool will otherwise strip 6907 especially when major and minor are zero, as libtool will otherwise strip
6901 off the shared library version. 6908 off the shared library version.
6902 6909
6903 From the libtool manual: 6910 From the libtool manual:
6904 6911
6905 So, libtool library versions are described by three integers: 6912 So, libtool library versions are described by three integers:
6906 6913
6907 CURRENT 6914 CURRENT
6908 The most recent interface number that this library implements. 6915 The most recent interface number that this library implements.
6909 6916
6910 REVISION 6917 REVISION
6911 The implementation number of the CURRENT interface. 6918 The implementation number of the CURRENT interface.
6912 6919
6913 AGE 6920 AGE
6914 The difference between the newest and oldest interfaces that 6921 The difference between the newest and oldest interfaces that
6915 this library implements. In other words, the library implements 6922 this library implements. In other words, the library implements
6916 all the interface numbers in the range from number `CURRENT - 6923 all the interface numbers in the range from number `CURRENT -
6917 AGE' to `CURRENT'. 6924 AGE' to `CURRENT'.
6918 6925
6919 If two libraries have identical CURRENT and AGE numbers, then the 6926 If two libraries have identical CURRENT and AGE numbers, then the
6920 dynamic linker chooses the library with the greater REVISION number. 6927 dynamic linker chooses the library with the greater REVISION number.
6921 6928
6922 The "-release" option will produce different results for a.out and ELF 6929 The "-release" option will produce different results for a.out and ELF
6923 (excluding symlinks) in only one case. An ELF library of the form " 6930 (excluding symlinks) in only one case. An ELF library of the form "
6924 libfoo-release.so.x.y" will have a symlink of "libfoo.so.x.y" on an a.out 6931 libfoo-release.so.x.y" will have a symlink of "libfoo.so.x.y" on an a.out
6925 platform. This is handled automatically. 6932 platform. This is handled automatically.
6926 6933
6927 The "-rpath argument" is the install directory of the library being built. 6934 The "-rpath argument" is the install directory of the library being built.
6928 6935
6929 In the PLIST, include only the .la file, the other files will be added 6936 In the PLIST, include only the .la file, the other files will be added
6930 automatically. 6937 automatically.
6931 6938
6932 4. When linking shared object (.so) files, i.e. files that are loaded via 6939 4. When linking shared object (.so) files, i.e. files that are loaded via
6933 dlopen(3), NOT shared libraries, use "-module -avoid-version" to prevent 6940 dlopen(3), NOT shared libraries, use "-module -avoid-version" to prevent
6934 them getting version tacked on. 6941 them getting version tacked on.
6935 6942
6936 The PLIST file gets the foo.so entry. 6943 The PLIST file gets the foo.so entry.
6937 6944
6938 5. When linking programs that depend on these libraries before they are 6945 5. When linking programs that depend on these libraries before they are
6939 installed, preface the cc(1) or ld(1) line with "${LIBTOOL} --mode=link", 6946 installed, preface the cc(1) or ld(1) line with "${LIBTOOL} --mode=link",
6940 and it will find the correct libraries (static or shared), but please be 6947 and it will find the correct libraries (static or shared), but please be
6941 aware that libtool will not allow you to specify a relative path in -L 6948 aware that libtool will not allow you to specify a relative path in -L
6942 (such as "-L../somelib"), because it expects you to change that argument to 6949 (such as "-L../somelib"), because it expects you to change that argument to
6943 be the .la file. e.g. 6950 be the .la file. e.g.
6944 6951
6945 ${LIBTOOL} --mode=link ${CC} -o someprog -L../somelib -lsomelib 6952 ${LIBTOOL} --mode=link ${CC} -o someprog -L../somelib -lsomelib
6946 6953
6947 should be changed to: 6954 should be changed to:
6948 6955
6949 ${LIBTOOL} --mode=link ${CC} -o someprog ../somelib/somelib.la 6956 ${LIBTOOL} --mode=link ${CC} -o someprog ../somelib/somelib.la
6950 6957
6951 and it will do the right thing with the libraries. 6958 and it will do the right thing with the libraries.
6952 6959
6953 6. When installing libraries, preface the install(1) or cp(1) command with "$ 6960 6. When installing libraries, preface the install(1) or cp(1) command with "$
6954 {LIBTOOL} --mode=install", and change the library name to .la. e.g. 6961 {LIBTOOL} --mode=install", and change the library name to .la. e.g.
6955 6962
6956 ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${SOMELIB:.a=.la} ${PREFIX}/lib 6963 ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${SOMELIB:.a=.la} ${PREFIX}/lib
6957 6964
6958 This will install the static .a, shared library, any needed symlinks, and 6965 This will install the static .a, shared library, any needed symlinks, and
6959 run ldconfig(8). 6966 run ldconfig(8).
6960 6967
6961 7. In your PLIST, include only the .la file (this is a change from previous 6968 7. In your PLIST, include only the .la file (this is a change from previous
6962 behaviour). 6969 behaviour).
6963 6970
696421.3.2. Using libtool on GNU packages that already support libtool 697121.3.2. Using libtool on GNU packages that already support libtool
6965 6972
6966Add USE_LIBTOOL=yes to the package Makefile. This will override the package's 6973Add USE_LIBTOOL=yes to the package Makefile. This will override the package's
6967own libtool in most cases. For older libtool using packages, libtool is made by 6974own libtool in most cases. For older libtool using packages, libtool is made by
6968ltconfig script during the do-configure step; you can check the libtool script 6975ltconfig script during the do-configure step; you can check the libtool script
6969location by doing make configure; find work*/ -name libtool. 6976location by doing make configure; find work*/ -name libtool.
6970 6977
6971LIBTOOL_OVERRIDE specifies which libtool scripts, relative to WRKSRC, to 6978LIBTOOL_OVERRIDE specifies which libtool scripts, relative to WRKSRC, to
6972override. By default, it is set to "libtool */libtool */*/libtool". If this 6979override. By default, it is set to "libtool */libtool */*/libtool". If this
6973does not match the location of the package's libtool script(s), set it as 6980does not match the location of the package's libtool script(s), set it as
6974appropriate. 6981appropriate.
6975 6982
6976If you do not need *.a static libraries built and installed, then use 6983If you do not need *.a static libraries built and installed, then use
6977SHLIBTOOL_OVERRIDE instead. 6984SHLIBTOOL_OVERRIDE instead.
6978 6985
6979If your package makes use of the platform-independent library for loading 6986If your package makes use of the platform-independent library for loading
6980dynamic shared objects, that comes with libtool (libltdl), you should include 6987dynamic shared objects, that comes with libtool (libltdl), you should include
6981devel/libltdl/buildlink3.mk. 6988devel/libltdl/buildlink3.mk.
6982 6989
6983Some packages use libtool incorrectly so that the package may not work or build 6990Some packages use libtool incorrectly so that the package may not work or build
6984in some circumstances. Some of the more common errors are: 6991in some circumstances. Some of the more common errors are:
6985 6992
6986 * The inclusion of a shared object (-module) as a dependent library in an 6993 * The inclusion of a shared object (-module) as a dependent library in an
6987 executable or library. This in itself isn't a problem if one of two things 6994 executable or library. This in itself isn't a problem if one of two things
6988 has been done: 6995 has been done:
6989 6996
6990 1. The shared object is named correctly, i.e. libfoo.la, not foo.la 6997 1. The shared object is named correctly, i.e. libfoo.la, not foo.la
6991 6998
6992 2. The -dlopen option is used when linking an executable. 6999 2. The -dlopen option is used when linking an executable.
6993 7000
6994 * The use of libltdl without the correct calls to initialisation routines. 7001 * The use of libltdl without the correct calls to initialisation routines.
6995 The function lt_dlinit() should be called and the macro 7002 The function lt_dlinit() should be called and the macro
6996 LTDL_SET_PRELOADED_SYMBOLS included in executables. 7003 LTDL_SET_PRELOADED_SYMBOLS included in executables.
6997 7004
699821.3.3. GNU Autoconf/Automake 700521.3.3. GNU Autoconf/Automake
6999 7006
7000If a package needs GNU autoconf or automake to be executed to regenerate the 7007If a package needs GNU autoconf or automake to be executed to regenerate the
7001configure script and Makefile.in makefile templates from configure.ac and 7008configure script and Makefile.in makefile templates from configure.ac and
7002Makefile.am, then they should be executed in a pre-configure target: 7009Makefile.am, then they should be executed in a pre-configure target:
7003 7010
7004USE_TOOLS+= autoconf automake autoreconf 7011USE_TOOLS+= autoconf automake autoreconf
7005GNU_CONFIGURE= yes 7012GNU_CONFIGURE= yes
7006... 7013...
7007 7014
7008pre-configure: 7015pre-configure:
7009 set -e; cd ${WRKSRC} && autoreconf -fi 7016 set -e; cd ${WRKSRC} && autoreconf -fi
7010... 7017...
7011 7018
7012Packages which use GNU Automake will sometimes require GNU Make (gmake in 7019Packages which use GNU Automake will sometimes require GNU Make (gmake in
7013USE_TOOLS), but not always. Note that autoreconf only needs to be executed if 7020USE_TOOLS), but not always. Note that autoreconf only needs to be executed if
7014configure.ac or Makefiles are modified, or configure is not present. 7021configure.ac or Makefiles are modified, or configure is not present.
7015 7022
7016There are times when the configure process makes additional changes to the 7023There are times when the configure process makes additional changes to the
7017generated files, which then causes the build process to try to re-execute the 7024generated files, which then causes the build process to try to re-execute the
7018automake sequence. This is prevented by touching various files in the configure 7025automake sequence. This is prevented by touching various files in the configure
7019stage. If this causes problems with your package you can set AUTOMAKE_OVERRIDE= 7026stage. If this causes problems with your package you can set AUTOMAKE_OVERRIDE=
7020NO in the package Makefile. 7027NO in the package Makefile.
7021 7028
702221.3.4. Meson / ninja 702921.3.4. Meson / ninja
7023 7030
7024Packages using Meson to configure need to include: 7031Packages using Meson to configure need to include:
7025 7032
7026.include "../../devel/meson/build.mk" 7033.include "../../devel/meson/build.mk"
7027 7034
7028In nearly all cases (any program with dependencies), pkg-config needs to be 7035In nearly all cases (any program with dependencies), pkg-config needs to be
7029added to USE_TOOLS. If the package installs translation files for non-English 7036added to USE_TOOLS. If the package installs translation files for non-English
7030languages, also add msgfmt and xgettext: 7037languages, also add msgfmt and xgettext:
7031 7038
7032USE_TOOLS+= pkg-config msgfmt xgettext 7039USE_TOOLS+= pkg-config msgfmt xgettext
7033 7040
7034If any options need to be passed to Meson, use MESON_ARGS instead of 7041If any options need to be passed to Meson, use MESON_ARGS instead of
7035CONFIGURE_ARGS: 7042CONFIGURE_ARGS:
7036 7043
7037MESON_ARGS+= -Dx11=false 7044MESON_ARGS+= -Dx11=false
7038 7045
703921.4. Programming languages 704621.4. Programming languages
7040 7047
704121.4.1. C, C++, and Fortran 704821.4.1. C, C++, and Fortran
7042 7049
7043Compilers for the C and C++ languages comes with the NetBSD base system. By 7050Compilers for the C and C++ languages comes with the NetBSD base system. By
7044default, pkgsrc assumes that a package is written in C and will hide all other 7051default, pkgsrc assumes that a package is written in C and will hide all other
7045compilers (via the wrapper framework, see Chapter 18, Buildlink methodology). 7052compilers (via the wrapper framework, see Chapter 18, Buildlink methodology).
7046 7053
7047To declare which language's compiler a package needs, set the USE_LANGUAGES 7054To declare which language's compiler a package needs, set the USE_LANGUAGES
7048variable. Allowed values currently are: 7055variable. Allowed values currently are:
7049 7056
7050 c99, c++, c++03, gnu++03, c++0x, gnu++0x, c++11, gnu++11, 7057 c99, c++, c++03, gnu++03, c++0x, gnu++0x, c++11, gnu++11,
7051 c++14, gnu++14, c++17, gnu++17, c++20, gnu++20, fortran, 7058 c++14, gnu++14, c++17, gnu++17, c++20, gnu++20, fortran,
7052 fortran77, java, objc, obj-c++, and ada. 7059 fortran77, java, objc, obj-c++, and ada.
7053 7060
7054 7061
7055(and any combination). The default is "c". Packages using GNU configure 7062(and any combination). The default is "c". Packages using GNU configure
7056scripts, even if written in C++, usually need a C compiler for the configure 7063scripts, even if written in C++, usually need a C compiler for the configure
7057phase. 7064phase.
7058 7065
7059To express a general requirement on a specific C or C++ version, normally only 7066To express a general requirement on a specific C or C++ version, normally only
7060GCC_REQD needs to be set. For example, GCC 7 includes support for C++17, so if 7067GCC_REQD needs to be set. For example, GCC 7 includes support for C++17, so if
7061the package uses C++17 it should specify: 7068the package uses C++17 it should specify:
7062 7069
7063 GCC_REQD+= 7 7070 GCC_REQD+= 7
7064 7071
7065 7072
7066Language variants like c++11 for USE_LANGUAGES should only be specified if the 7073Language variants like c++11 for USE_LANGUAGES should only be specified if the
7067package does not explicitly set -std=... when compiling (i.e. the package 7074package does not explicitly set -std=... when compiling (i.e. the package
7068assumes the compiler defaults to C++11 or some other standard). This is usually 7075assumes the compiler defaults to C++11 or some other standard). This is usually
7069a bug in the upstream build system. 7076a bug in the upstream build system.
7070 7077
7071GCC version 5 includes support for C++14, while GCC 4.7 includes more-or-less 7078GCC version 5 includes support for C++14, while GCC 4.7 includes more-or-less
7072complete support for C++11. For more information, consult GCC's own 7079complete support for C++11. For more information, consult GCC's own
7073documentation on programming language support. 7080documentation on programming language support.
7074 7081
707521.4.2. Java 708221.4.2. Java
7076 7083
7077If a program is written in Java, use the Java framework in pkgsrc. The package 7084If a program is written in Java, use the Java framework in pkgsrc. The package
7078must include ../../mk/java-vm.mk. This Makefile fragment provides the following 7085must include ../../mk/java-vm.mk. This Makefile fragment provides the following
7079variables: 7086variables:
7080 7087
7081 * USE_JAVA defines if a build dependency on the JDK is added. If USE_JAVA is 7088 * USE_JAVA defines if a build dependency on the JDK is added. If USE_JAVA is
7082 set to "run", then there is only a runtime dependency on the JDK. The 7089 set to "run", then there is only a runtime dependency on the JDK. The
7083 default is "yes", which also adds a build dependency on the JDK. 7090 default is "yes", which also adds a build dependency on the JDK.
7084 7091
7085 * Set USE_JAVA2 to declare that a package needs a Java2 implementation. The 7092 * Set USE_JAVA2 to declare that a package needs a Java2 implementation. The
7086 supported values are "yes", "1.4", and "1.5". "yes" accepts any Java2 7093 supported values are "yes", "1.4", and "1.5". "yes" accepts any Java2
7087 implementation, "1.4" insists on versions 1.4 or above, and "1.5" only 7094 implementation, "1.4" insists on versions 1.4 or above, and "1.5" only
7088 accepts versions 1.5 or above. This variable is not set by default. 7095 accepts versions 1.5 or above. This variable is not set by default.
7089 7096
7090 * PKG_JAVA_HOME is automatically set to the runtime location of the used Java 7097 * PKG_JAVA_HOME is automatically set to the runtime location of the used Java
7091 implementation dependency. It may be used to set JAVA_HOME to a good value 7098 implementation dependency. It may be used to set JAVA_HOME to a good value
7092 if the program needs this variable to be defined. 7099 if the program needs this variable to be defined.
7093 7100
709421.4.3. Go 710121.4.3. Go
7095 7102
7096If a program is written in Go and has any dependencies on other Go modules, 7103If a program is written in Go and has any dependencies on other Go modules,
7097have the package include ../../lang/go/go-module.mk. 7104have the package include ../../lang/go/go-module.mk.
7098 7105
7099 1. Generate a list of those dependencies with make clean && make patch && make 7106 1. Generate a list of those dependencies with make clean && make patch && make
7100 show-go-modules > go-modules.mk. 7107 show-go-modules > go-modules.mk.
7101 7108
7102 2. Prepend .include "go-modules.mk" to any other .includes. 7109 2. Prepend .include "go-modules.mk" to any other .includes.
7103 7110
7104 3. Incorporate these modules in distinfo with make makesum. 7111 3. Incorporate these modules in distinfo with make makesum.
7105 7112
710621.4.4. Rust 711321.4.4. Rust
7107 7114
7108If a program is written in Rust and uses Cargo to build, have the package 7115If a program is written in Rust and uses Cargo to build, have the package
7109include ../../lang/rust/cargo.mk. 7116include ../../lang/rust/cargo.mk.
7110 7117
7111 1. Generate a list of those dependencies with make CARGO_ARGS="build 7118 1. Generate a list of those dependencies with make CARGO_ARGS="build
7112 --release" build && make print-cargo-depends > cargo-depends.mk. 7119 --release" build && make print-cargo-depends > cargo-depends.mk.
7113 7120
7114 2. Prepend .include "cargo-depends.mk" to any other .includes. 7121 2. Prepend .include "cargo-depends.mk" to any other .includes.
7115 7122
7116 3. Incorporate these modules in distinfo with make makesum. 7123 3. Incorporate these modules in distinfo with make makesum.
7117 7124
711821.4.5. Packages containing Perl scripts 712521.4.5. Packages containing Perl scripts
7119 7126
7120If your package contains interpreted Perl scripts, add "perl" to the USE_TOOLS 7127If your package contains interpreted Perl scripts, add "perl" to the USE_TOOLS
7121variable and set REPLACE_PERL to ensure that the proper interpreter path is 7128variable and set REPLACE_PERL to ensure that the proper interpreter path is
7122set. REPLACE_PERL should contain a list of scripts, relative to WRKSRC, that 7129set. REPLACE_PERL should contain a list of scripts, relative to WRKSRC, that
7123you want adjusted. Every occurrence of */bin/perl in a she-bang line will be 7130you want adjusted. Every occurrence of */bin/perl in a she-bang line will be
7124replaced with the full path to the Perl executable. 7131replaced with the full path to the Perl executable.
7125 7132
7126If a particular version of Perl is needed, set the PERL5_REQD variable to the 7133If a particular version of Perl is needed, set the PERL5_REQD variable to the
7127version number. The default is "5.0". 7134version number. The default is "5.0".
7128 7135
7129See Section 21.6.6, "Packages installing Perl modules" for information about 7136See Section 21.6.6, "Packages installing Perl modules" for information about
7130handling Perl modules. 7137handling Perl modules.
7131 7138
7132There is also the REPLACE_PERL6 variable for the language now known as Raku. 7139There is also the REPLACE_PERL6 variable for the language now known as Raku.
7133 7140
713421.4.6. Packages containing shell scripts 714121.4.6. Packages containing shell scripts
7135 7142
7136REPLACE_SH, REPLACE_BASH, REPLACE_CSH, and REPLACE_KSH can be used to replace 7143REPLACE_SH, REPLACE_BASH, REPLACE_CSH, and REPLACE_KSH can be used to replace
7137shell she-bangs in files. Please use the appropriate one, preferring REPLACE_SH 7144shell she-bangs in files. Please use the appropriate one, preferring REPLACE_SH
7138when this shell is sufficient. Each should contain a list of scripts, relative 7145when this shell is sufficient. Each should contain a list of scripts, relative
7139to WRKSRC, that you want adjusted. Every occurrence of the matching shell in a 7146to WRKSRC, that you want adjusted. Every occurrence of the matching shell in a
7140she-bang line will be replaced with the full path to the shell executable. When 7147she-bang line will be replaced with the full path to the shell executable. When
7141using REPLACE_BASH, don't forget to add bash to USE_TOOLS. 7148using REPLACE_BASH, don't forget to add bash to USE_TOOLS.
7142 7149
714321.4.7. Other programming languages 715021.4.7. Other programming languages
7144 7151
7145There are further similar REPLACE variables available, e.g., REPLACE_AWK for 7152There are further similar REPLACE variables available, e.g., REPLACE_AWK for
7146packages containing awk scripts, and REPLACE_R for R. These two, like the 7153packages containing awk scripts, and REPLACE_R for R. These two, like the
7147others noted above, have their actions defined centrally in mk/configure/ 7154others noted above, have their actions defined centrally in mk/configure/
7148replace-interpreter.mk. Other languages define the actions of these variables 7155replace-interpreter.mk. Other languages define the actions of these variables
7149within their own dedicated part of the tree, e.g., REPLACE_PHP is actioned in 7156within their own dedicated part of the tree, e.g., REPLACE_PHP is actioned in
7150lang/php/phpversion.mk, and REPLACE_PYTHON is actioned in lang/python/ 7157lang/php/phpversion.mk, and REPLACE_PYTHON is actioned in lang/python/
7151application.mk. For other languages, consult the mk files found within their 7158application.mk. For other languages, consult the mk files found within their
7152specific directories (the naming convention varies), or check the list found in 7159specific directories (the naming convention varies), or check the list found in
7153Appendix E, Help topics. 7160Appendix E, Help topics.
7154 7161
7155Currently, special handling for other languages varies in pkgsrc. If a compiler 7162Currently, special handling for other languages varies in pkgsrc. If a compiler
7156package provides a buildlink3.mk file, include that, otherwise just add a 7163package provides a buildlink3.mk file, include that, otherwise just add a
7157(build) dependency on the appropriate compiler package. 7164(build) dependency on the appropriate compiler package.
7158 7165
715921.5. The build phase 716621.5. The build phase
7160 7167
7161The most common failures when building a package are that some platforms do not 7168The most common failures when building a package are that some platforms do not
7162provide certain header files, functions or libraries, or they provide the 7169provide certain header files, functions or libraries, or they provide the
7163functions in a library that the original package author didn't know. To work 7170functions in a library that the original package author didn't know. To work
7164around this, you can rewrite the source code in most cases so that it does not 7171around this, you can rewrite the source code in most cases so that it does not
7165use the missing functions or provides a replacement function. 7172use the missing functions or provides a replacement function.
7166 7173
716721.5.1. Compiling C and C++ code conditionally 717421.5.1. Compiling C and C++ code conditionally
7168 7175
7169If a package already comes with a GNU configure script, the preferred way to 7176If a package already comes with a GNU configure script, the preferred way to
7170fix the build failure is to change the configure script, not the code. In the 7177fix the build failure is to change the configure script, not the code. In the
7171other cases, you can utilize the C preprocessor, which defines certain macros 7178other cases, you can utilize the C preprocessor, which defines certain macros
7172depending on the operating system and hardware architecture it compiles for. 7179depending on the operating system and hardware architecture it compiles for.
7173These macros can be queried using for example #if defined(__i386). Almost every 7180These macros can be queried using for example #if defined(__i386). Almost every
7174operating system, hardware architecture and compiler has its own macro. For 7181operating system, hardware architecture and compiler has its own macro. For
7175example, if the macros __GNUC__, __i386__ and __NetBSD__ are all defined, you 7182example, if the macros __GNUC__, __i386__ and __NetBSD__ are all defined, you
7176know that you are using NetBSD on an i386 compatible CPU, and your compiler is 7183know that you are using NetBSD on an i386 compatible CPU, and your compiler is
7177GCC. 7184GCC.
7178 7185
7179The list of the following macros for hardware and operating system depends on 7186The list of the following macros for hardware and operating system depends on
7180the compiler that is used. For example, if you want to conditionally compile 7187the compiler that is used. For example, if you want to conditionally compile
7181code on Solaris, don't use __sun__, as the SunPro compiler does not define it. 7188code on Solaris, don't use __sun__, as the SunPro compiler does not define it.
7182Use __sun instead. 7189Use __sun instead.
7183 7190
718421.5.1.1. C preprocessor macros to identify the operating system 719121.5.1.1. C preprocessor macros to identify the operating system
7185 7192
7186To distinguish between specific NetBSD versions, you should use the following 7193To distinguish between specific NetBSD versions, you should use the following
7187code. 7194code.
7188 7195
7189#ifdef __NetBSD__ 7196#ifdef __NetBSD__
7190#include <sys/param.h> 7197#include <sys/param.h>
7191#if __NetBSD_Prereq__(9,99,17) 7198#if __NetBSD_Prereq__(9,99,17)
7192/* use a newer feature */ 7199/* use a newer feature */
7193#else 7200#else
7194/* older code */ 7201/* older code */
7195#endif 7202#endif
7196#endif 7203#endif
7197 7204
7198#ifndef _WIN32 7205#ifndef _WIN32
7199/* Unix-like specific code */ 7206/* Unix-like specific code */
7200#endif 7207#endif
7201 7208
7202To distinguish between 4.4 BSD-derived systems and the rest of the world, you 7209To distinguish between 4.4 BSD-derived systems and the rest of the world, you
7203should use the following code. 7210should use the following code.
7204 7211
7205#include <sys/param.h> 7212#include <sys/param.h>
7206#if (defined(BSD) && BSD >= 199306) 7213#if (defined(BSD) && BSD >= 199306)
7207/* BSD-specific code goes here */ 7214/* BSD-specific code goes here */
7208#else 7215#else
7209/* non-BSD-specific code goes here */ 7216/* non-BSD-specific code goes here */
7210#endif 7217#endif
7211 7218
7212You can also test for the following macros: 7219You can also test for the following macros:
7213 7220
7214Cygwin __CYGWIN__ 7221Cygwin __CYGWIN__
7215DragonFly __DragonFly__ 7222DragonFly __DragonFly__
7216FreeBSD __FreeBSD__ 7223FreeBSD __FreeBSD__
7217Haiku __HAIKU__ 7224Haiku __HAIKU__
7218Interix __INTERIX 7225Interix __INTERIX
7219IRIX __sgi (TODO: get a definite source for this) 7226IRIX __sgi (TODO: get a definite source for this)
7220Linux __linux 7227Linux __linux
7221Mac OS X __APPLE__ 7228Mac OS X __APPLE__
7222MirBSD __MirBSD__ (__OpenBSD__ is also defined) 7229MirBSD __MirBSD__ (__OpenBSD__ is also defined)
7223Minix3 __minix 7230Minix3 __minix
7224NetBSD __NetBSD__ 7231NetBSD __NetBSD__
7225OpenBSD __OpenBSD__ 7232OpenBSD __OpenBSD__
7226Solaris sun, __sun 7233Solaris sun, __sun
7227 7234
722821.5.1.2. C preprocessor macros to identify the hardware architecture 723521.5.1.2. C preprocessor macros to identify the hardware architecture
7229 7236
7230i386 i386, __i386, __i386__ 7237i386 i386, __i386, __i386__
7231x86-64 __amd64__, __x86_64__ 7238x86-64 __amd64__, __x86_64__
7232ARM __arm__ 7239ARM __arm__
7233MIPS __mips 7240MIPS __mips
7234SPARC sparc, __sparc 7241SPARC sparc, __sparc
7235PowerPC __powerpc 7242PowerPC __powerpc
7236 7243
723721.5.1.3. C preprocessor macros to identify the compiler 724421.5.1.3. C preprocessor macros to identify the compiler
7238 7245
7239GCC __GNUC__ (major version), __GNUC_MINOR__ 7246GCC __GNUC__ (major version), __GNUC_MINOR__
7240MIPSpro _COMPILER_VERSION (0x741 for MIPSpro 7.41) 7247MIPSpro _COMPILER_VERSION (0x741 for MIPSpro 7.41)
7241SunPro __SUNPRO_C (0x570 for Sun C 5.7) 7248SunPro __SUNPRO_C (0x570 for Sun C 5.7)
7242SunPro C++ __SUNPRO_CC (0x580 for Sun C++ 5.8) 7249SunPro C++ __SUNPRO_CC (0x580 for Sun C++ 5.8)
7243 7250
724421.5.2. How to handle compiler bugs 725121.5.2. How to handle compiler bugs
7245 7252
7246Some source files trigger bugs in the compiler, based on combinations of 7253Some source files trigger bugs in the compiler, based on combinations of
7247compiler version and architecture and almost always relation to optimisation 7254compiler version and architecture and almost always relation to optimisation
7248being enabled. Common symptoms are gcc internal errors or never finishing 7255being enabled. Common symptoms are gcc internal errors or never finishing
7249compiling a file. 7256compiling a file.
7250 7257
7251Typically, a workaround involves testing the MACHINE_ARCH and compiler version, 7258Typically, a workaround involves testing the MACHINE_ARCH and compiler version,
7252disabling optimisation for that combination of file, MACHINE_ARCH and compiler. 7259disabling optimisation for that combination of file, MACHINE_ARCH and compiler.
7253 7260
7254This used to be a big problem in the past, but is rarely needed now as compiler 7261This used to be a big problem in the past, but is rarely needed now as compiler
7255technology has matured. If you still need to add a compiler specific 7262technology has matured. If you still need to add a compiler specific
7256workaround, please do so in the file hacks.mk and describe the symptom and 7263workaround, please do so in the file hacks.mk and describe the symptom and
7257compiler version as detailed as possible. 7264compiler version as detailed as possible.
7258 7265
725921.5.3. No such file or directory 726621.5.3. No such file or directory
7260 7267
7261Compilation sometimes fails with an error message like this: 7268Compilation sometimes fails with an error message like this:
7262 7269
7263.../x11/gtk3/work/gtk+-3.24.12/gdk/gdktypes.h:35:10: 7270.../x11/gtk3/work/gtk+-3.24.12/gdk/gdktypes.h:35:10:
7264 fatal error: pango/pango.h: No such file or directory 7271 fatal error: pango/pango.h: No such file or directory
7265 7272
7266The proper way to fix this problem depends on the type of the header, which is 7273The proper way to fix this problem depends on the type of the header, which is
7267described in the following sections. 7274described in the following sections.
7268 7275
726921.5.3.1. Headers from other packages 727621.5.3.1. Headers from other packages
7270 7277
7271If the header name looks like it comes from a different package, that other 7278If the header name looks like it comes from a different package, that other
7272package should be included via the buildlink3 framework. 7279package should be included via the buildlink3 framework.
7273 7280
7274First, look whether the header is somewhere in the buildlink3 directory below 7281First, look whether the header is somewhere in the buildlink3 directory below
7275WRKDIR. In the above case of the missing Pango header: 7282WRKDIR. In the above case of the missing Pango header:
7276 7283
7277$ find work/.buildlink/ -print | grep -F pango/pango.h 7284$ find work/.buildlink/ -print | grep -F pango/pango.h
7278 7285
7279In the case of Pango, the output is: 7286In the case of Pango, the output is:
7280 7287
7281work/.buildlink/include/pango-1.0/pango/pango.h 7288work/.buildlink/include/pango-1.0/pango/pango.h
7282 7289
7283If the pango/pango.h file were placed directly in the .buildlink directory, it 7290If the pango/pango.h file were placed directly in the .buildlink directory, it
7284would have been found automatically. There is an extra pango-1.0 path component 7291would have been found automatically. There is an extra pango-1.0 path component
7285though, which means that the compiler command line must contain an option of 7292though, which means that the compiler command line must contain an option of
7286the form -I${BUILDLINK3_PREFIX.pango}/include/pango-1.0. In most cases this 7293the form -I${BUILDLINK3_PREFIX.pango}/include/pango-1.0. In most cases this
7287option is generated by the configure script, which can be examined using: 7294option is generated by the configure script, which can be examined using:
7288 7295
7289$ $ grep -o '[-]I[^[:space:]]*/pango[^[:space:]]*' work/*/Makefile 7296$ $ grep -o '[-]I[^[:space:]]*/pango[^[:space:]]*' work/*/Makefile
7290-I/usr/pkg/include/pango-1.0 7297-I/usr/pkg/include/pango-1.0
7291-I/usr/pkg/include/pango-1.0 7298-I/usr/pkg/include/pango-1.0
7292-I/usr/pkg/include/pango-1.0 7299-I/usr/pkg/include/pango-1.0
7293-I/usr/pkg/include/pango-1.0 7300-I/usr/pkg/include/pango-1.0
7294-I/usr/pkg/include/pango-1.0 7301-I/usr/pkg/include/pango-1.0
7295 7302
7296This looks good. These options are transformed by the buildlink wrapper to 7303This looks good. These options are transformed by the buildlink wrapper to
7297refer to the correct path inside work/.buildlink. 7304refer to the correct path inside work/.buildlink.
7298 7305
7299Since the compilation fails though, examine the compiler command lines in work 7306Since the compilation fails though, examine the compiler command lines in work
7300/.work.log to see whether the -I option is included in the particular command 7307/.work.log to see whether the -I option is included in the particular command
7301line. 7308line.
7302 7309
7303To further analyze the situation, run bmake build-env, which sets up an 7310To further analyze the situation, run bmake build-env, which sets up an
7304interactive, realistic environment including all the pkgsrc wrapper commands 7311interactive, realistic environment including all the pkgsrc wrapper commands
7305and environment variables. From there, try to compile some simple example 7312and environment variables. From there, try to compile some simple example
7306programs that use the header. 7313programs that use the header.
7307 7314
730821.5.3.2. Headers generated during the build 731521.5.3.2. Headers generated during the build
7309 7316
7310If the name of the header seems to come from the package itself, and if the 7317If the name of the header seems to come from the package itself, and if the
7311build is run with parallel jobs, the package may have some undeclared 7318build is run with parallel jobs, the package may have some undeclared
7312dependencies between the .c and the .h files, and a C file is compiled before 7319dependencies between the .c and the .h files, and a C file is compiled before
7313its required header is generated. 7320its required header is generated.
7314 7321
7315To see whether the build runs with parallel jobs, run bmake show-all-build | 7322To see whether the build runs with parallel jobs, run bmake show-all-build |
7316grep JOBS. Its output looks like this: 7323grep JOBS. Its output looks like this:
7317 7324
7318 usr MAKE_JOBS= 7 7325 usr MAKE_JOBS= 7
7319 pkg MAKE_JOBS_SAFE # undefined 7326 pkg MAKE_JOBS_SAFE # undefined
7320 def _MAKE_JOBS_N= 7 7327 def _MAKE_JOBS_N= 7
7321 7328
7322In this case the pkgsrc user has asked pkgsrc to build packages with 7 jobs in 7329In this case the pkgsrc user has asked pkgsrc to build packages with 7 jobs in
7323parallel (MAKE_JOBS). The package could have disabled parallel builds by 7330parallel (MAKE_JOBS). The package could have disabled parallel builds by
7324setting MAKE_JOBS_SAFE to no, but in this case it hasn't. 7331setting MAKE_JOBS_SAFE to no, but in this case it hasn't.
7325 7332
7326To see whether the build failure is caused by parallel builds, first save the 7333To see whether the build failure is caused by parallel builds, first save the
7327exact error message and a bit of context, maybe you need it later for reporting 7334exact error message and a bit of context, maybe you need it later for reporting
7328a bug. Next, run: 7335a bug. Next, run:
7329 7336
7330MAKE_JOBS_SAFE=no bmake clean build 7337MAKE_JOBS_SAFE=no bmake clean build
7331 7338
7332If that succeeds, file a bug report against the pkgsrc package, including the 7339If that succeeds, file a bug report against the pkgsrc package, including the
7333exact error message and the contents of your mk.conf file. 7340exact error message and the contents of your mk.conf file.
7334 7341
733521.5.3.3. Symlinks 734221.5.3.3. Symlinks
7336 7343
7337Pkgsrc does not work reliably if any of LOCALBASE, VARBASE or WRKDIR contains a 7344Pkgsrc does not work reliably if any of LOCALBASE, VARBASE or WRKDIR contains a
7338symlink. Since 2019Q2, the pkgsrc bootstrap program prevents installing pkgsrc 7345symlink. Since 2019Q2, the pkgsrc bootstrap program prevents installing pkgsrc
7339in symlink-based directories. Existing pkgsrc installations are not checked for 7346in symlink-based directories. Existing pkgsrc installations are not checked for
7340symlinks though. 7347symlinks though.
7341 7348
7342The "No such file or directory" error messages are a typical symptom of 7349The "No such file or directory" error messages are a typical symptom of
7343symlinks, and it's quite difficult to find out that this is the actual cause. 7350symlinks, and it's quite difficult to find out that this is the actual cause.
7344 7351
734521.5.3.4. Stale working directories 735221.5.3.4. Stale working directories
7346 7353
7347When building a hierarchy of packages, it may happen that one package is built 7354When building a hierarchy of packages, it may happen that one package is built
7348and then pkgsrc is updated. This situation can provoke various hard to diagnose 7355and then pkgsrc is updated. This situation can provoke various hard to diagnose
7349build errors. To clean up the situation: 7356build errors. To clean up the situation:
7350 7357
7351$ (cd ../../ && cat mk/bsd.pkg.mk >/dev/null && rm -rf */*/work) 7358$ (cd ../../ && cat mk/bsd.pkg.mk >/dev/null && rm -rf */*/work)
7352 7359
7353(The only purpose of the bsd.pkg.mk is to prevent running this command in the 7360(The only purpose of the bsd.pkg.mk is to prevent running this command in the
7354wrong directory.) 7361wrong directory.)
7355 7362
7356If you have set WRKOBJDIR in mk.conf, remove that directory as well. 7363If you have set WRKOBJDIR in mk.conf, remove that directory as well.
7357 7364
735821.5.3.5. Other possible reasons 736521.5.3.5. Other possible reasons
7359 7366
7360On platforms other than BSD, third-party packages are installed in /usr/ 7367On platforms other than BSD, third-party packages are installed in /usr/
7361include, together with the base system. This means that pkgsrc cannot 7368include, together with the base system. This means that pkgsrc cannot
7362distinguish between headers provided by the base system (which it needs) and 7369distinguish between headers provided by the base system (which it needs) and
7363headers from third-party packages (which are often included in pkgsrc as well). 7370headers from third-party packages (which are often included in pkgsrc as well).
7364This can lead to subtle version mismatches. 7371This can lead to subtle version mismatches.
7365 7372
7366In pkgsrc installations that have been active for several years, it may happen 7373In pkgsrc installations that have been active for several years, it may happen
7367that some files are manually deleted. To exclude this unlikely reason, run  7374that some files are manually deleted. To exclude this unlikely reason, run
7368pkg_admin check. 7375pkg_admin check.
7369 7376
7370It may help to run pkg_admin rebuild-tree to check/fix dependencies. 7377It may help to run pkg_admin rebuild-tree to check/fix dependencies.
7371 7378
7372If all of the above doesn't help, see Chapter 2, Getting help for contact 7379If all of the above doesn't help, see Chapter 2, Getting help for contact
7373information. Be prepared to describe what you have tried so far and what any 7380information. Be prepared to describe what you have tried so far and what any
7374error messages were. 7381error messages were.
7375 7382
737621.5.4. Undefined reference to "..." 738321.5.4. Undefined reference to "..."
7377 7384
7378This error message often means that a package did not link to a shared library 7385This error message often means that a package did not link to a shared library
7379it needs. The following functions are known to cause this error message over 7386it needs. The following functions are known to cause this error message over
7380and over. 7387and over.
7381 7388
7382+-----------------------------------------------------+ 7389+-----------------------------------------------------+
7383| Function |Library |Affected platforms| 7390| Function |Library |Affected platforms|
7384|-------------------------+--------+------------------| 7391|-------------------------+--------+------------------|
7385|accept, bind, connect |-lsocket|Solaris | 7392|accept, bind, connect |-lsocket|Solaris |
7386|-------------------------+--------+------------------| 7393|-------------------------+--------+------------------|
7387|crypt |-lcrypt |DragonFly, NetBSD | 7394|crypt |-lcrypt |DragonFly, NetBSD |
7388|-------------------------+--------+------------------| 7395|-------------------------+--------+------------------|
7389|dlopen, dlsym |-ldl |Linux | 7396|dlopen, dlsym |-ldl |Linux |
7390|-------------------------+--------+------------------| 7397|-------------------------+--------+------------------|
7391|gethost* |-lnsl |Solaris | 7398|gethost* |-lnsl |Solaris |
7392|-------------------------+--------+------------------| 7399|-------------------------+--------+------------------|
7393|inet_aton |-lresolv|Solaris | 7400|inet_aton |-lresolv|Solaris |
7394|-------------------------+--------+------------------| 7401|-------------------------+--------+------------------|
7395|nanosleep, sem_*, timer_*|-lrt |Solaris | 7402|nanosleep, sem_*, timer_*|-lrt |Solaris |
7396|-------------------------+--------+------------------| 7403|-------------------------+--------+------------------|
7397|openpty |-lutil |Linux | 7404|openpty |-lutil |Linux |
7398+-----------------------------------------------------+ 7405+-----------------------------------------------------+
7399 7406
7400To fix these linker errors, it is often sufficient to add LIBS.OperatingSystem+ 7407To fix these linker errors, it is often sufficient to add LIBS.OperatingSystem+
7401= -lfoo to the package Makefile and then run bmake clean; bmake. 7408= -lfoo to the package Makefile and then run bmake clean; bmake.
7402 7409
740321.5.4.1. The SunPro compiler and inline functions 741021.5.4.1. The SunPro compiler and inline functions
7404 7411
7405When you are using the SunPro compiler, there is another possibility. That 7412When you are using the SunPro compiler, there is another possibility. That
7406compiler cannot handle the following code: 7413compiler cannot handle the following code:
7407 7414
7408extern int extern_func(int); 7415extern int extern_func(int);
7409 7416
7410static inline int 7417static inline int
7411inline_func(int x) 7418inline_func(int x)
7412{ 7419{
7413 return extern_func(x); 7420 return extern_func(x);
7414} 7421}
7415 7422
7416int main(void) 7423int main(void)
7417{ 7424{
7418 return 0; 7425 return 0;
7419} 7426}
7420 7427
7421It generates the code for inline_func even if that function is never used. This 7428It generates the code for inline_func even if that function is never used. This
7422code then refers to extern_func, which can usually not be resolved. To solve 7429code then refers to extern_func, which can usually not be resolved. To solve
7423this problem you can try to tell the package to disable inlining of functions. 7430this problem you can try to tell the package to disable inlining of functions.
7424 7431
 743221.5.4.2. Missing atomic functions
 7433
 7434When building for older machine architectures (e.g., i386, PowerPC), builds may
 7435fail because the package expects modern 64-bit atomic functions which the
 7436underlying hardware either doesn't support, or will only support with specific
 7437compiler flags. This is generally handled via inclusion of mk/atomic64.mk.
 7438
742521.5.5. Running out of memory 743921.5.5. Running out of memory
7426 7440
7427Sometimes packages fail to build because the compiler runs into an operating 7441Sometimes packages fail to build because the compiler runs into an operating
7428system specific soft limit. With the UNLIMIT_RESOURCES variable pkgsrc can be 7442system specific soft limit. With the UNLIMIT_RESOURCES variable pkgsrc can be
7429told to unlimit the resources. The allowed values are any combination of " 7443told to unlimit the resources. The allowed values are any combination of "
7430cputime", "datasize", "memorysize", "stacksize" and "virtualsize". Setting this 7444cputime", "datasize", "memorysize", "stacksize" and "virtualsize". Setting this
7431variable is similar to running the shell builtin ulimit command to raise the 7445variable is similar to running the shell builtin ulimit command to raise the
7432maximum data segment size or maximum stack size of a process, respectively, to 7446maximum data segment size or maximum stack size of a process, respectively, to
7433their hard limits. 7447their hard limits.
7434 7448
743521.6. The install phase 744921.6. The install phase
7436 7450
743721.6.1. Creating needed directories 745121.6.1. Creating needed directories
7438 7452
7439The BSD-compatible install supplied with some operating systems cannot create 7453The BSD-compatible install supplied with some operating systems cannot create
7440more than one directory at a time. As such, you should call ${INSTALL_*_DIR} 7454more than one directory at a time. As such, you should call ${INSTALL_*_DIR}
7441like this: 7455like this:
7442 7456
7443${INSTALL_DATA_DIR} ${PREFIX}/dir1 7457${INSTALL_DATA_DIR} ${PREFIX}/dir1
7444${INSTALL_DATA_DIR} ${PREFIX}/dir2 7458${INSTALL_DATA_DIR} ${PREFIX}/dir2
7445 7459
7446Instead of running the install commands directly, you can also append "dir1 7460Instead of running the install commands directly, you can also append "dir1
7447dir2" to the INSTALLATION_DIRS variable, which will automatically do the right 7461dir2" to the INSTALLATION_DIRS variable, which will automatically do the right
7448thing. 7462thing.
7449 7463
745021.6.2. Where to install documentation 746421.6.2. Where to install documentation
7451 7465
7452In general, documentation should be installed into ${PREFIX}/share/doc/$ 7466In general, documentation should be installed into ${PREFIX}/share/doc/$
7453{PKGBASE} or ${PREFIX}/share/doc/${PKGNAME_NOREV} (the latter includes the 7467{PKGBASE} or ${PREFIX}/share/doc/${PKGNAME_NOREV} (the latter includes the
7454version number of the package). 7468version number of the package).
7455 7469
7456Many modern packages using GNU autoconf allow to set the directory where HTML 7470Many modern packages using GNU autoconf allow to set the directory where HTML
7457documentation is installed with the "--with-html-dir" option. Sometimes using 7471documentation is installed with the "--with-html-dir" option. Sometimes using
7458this flag is needed because otherwise the documentation ends up in ${PREFIX}/ 7472this flag is needed because otherwise the documentation ends up in ${PREFIX}/
7459share/doc/html or other places. In pkgsrc, the HTML documentation should go 7473share/doc/html or other places. In pkgsrc, the HTML documentation should go
7460into the package-specific directory, just like any other documentation. 7474into the package-specific directory, just like any other documentation.
7461 7475
7462An exception to the above is that library API documentation generated with the 7476An exception to the above is that library API documentation generated with the
7463textproc/gtk-doc tools, for use by special browsers (devhelp) should be left at 7477textproc/gtk-doc tools, for use by special browsers (devhelp) should be left at
7464their default location, which is ${PREFIX}/share/gtk-doc. Such documentation 7478their default location, which is ${PREFIX}/share/gtk-doc. Such documentation
7465can be recognized from files ending in .devhelp or .devhelp2. (It is also 7479can be recognized from files ending in .devhelp or .devhelp2. (It is also
7466acceptable to install such files in ${PREFIX}/share/doc/${PKGBASE} or ${PREFIX} 7480acceptable to install such files in ${PREFIX}/share/doc/${PKGBASE} or ${PREFIX}
7467/share/doc/${PKGNAME}; the .devhelp* file must be directly in that directory 7481/share/doc/${PKGNAME}; the .devhelp* file must be directly in that directory
7468then, no additional subdirectory level is allowed in this case. This is usually 7482then, no additional subdirectory level is allowed in this case. This is usually
7469achieved by using "--with-html-dir=${PREFIX}/share/doc". ${PREFIX}/share/ 7483achieved by using "--with-html-dir=${PREFIX}/share/doc". ${PREFIX}/share/
7470gtk-doc is preferred though.) 7484gtk-doc is preferred though.)
7471 7485
747221.6.3. Installing highscore files 748621.6.3. Installing highscore files
7473 7487
7474Certain packages, most of them in the games category, install a score file that 7488Certain packages, most of them in the games category, install a score file that
7475allows all users on the system to record their highscores. In order for this to 7489allows all users on the system to record their highscores. In order for this to
7476work, the binaries need to be installed setgid and the score files owned by the 7490work, the binaries need to be installed setgid and the score files owned by the
7477appropriate group and/or owner (traditionally the "games" user/group). Set 7491appropriate group and/or owner (traditionally the "games" user/group). Set
7478USE_GAMESGROUP to yes to support this. The following variables, documented in 7492USE_GAMESGROUP to yes to support this. The following variables, documented in
7479more detail in mk/defaults/mk.conf, control this behaviour: GAMEDATAMODE, 7493more detail in mk/defaults/mk.conf, control this behaviour: GAMEDATAMODE,
7480GAMEDIRMODE, GAMES_GROUP, GAMEMODE, GAME_USER. Other useful variables are: 7494GAMEDIRMODE, GAMES_GROUP, GAMEMODE, GAME_USER. Other useful variables are:
7481GAMEDIR_PERMS, GAMEDATA_PERMS and SETGID_GAMES_PERMS. 7495GAMEDIR_PERMS, GAMEDATA_PERMS and SETGID_GAMES_PERMS.
7482 7496
7483An example that illustrates some of the variables described above is games/ 7497An example that illustrates some of the variables described above is games/
7484moon-buggy. OWN_DIRS_PERMS is used to properly set directory permissions of the 7498moon-buggy. OWN_DIRS_PERMS is used to properly set directory permissions of the
7485directory where the scorefile is saved, REQD_FILES_PERMS is used to create a 7499directory where the scorefile is saved, REQD_FILES_PERMS is used to create a
7486dummy scorefile (mbscore) with the proper permissions and SPECIAL_PERMS is used 7500dummy scorefile (mbscore) with the proper permissions and SPECIAL_PERMS is used
7487to install setgid the game binary: 7501to install setgid the game binary:
7488 7502
7489USE_GAMESGROUP= yes 7503USE_GAMESGROUP= yes
7490 7504
7491BUILD_DEFS+= VARBASE 7505BUILD_DEFS+= VARBASE
7492 7506
7493OWN_DIRS_PERMS+= ${VARBASE}/games/moon-buggy ${GAMEDIR_PERMS} 7507OWN_DIRS_PERMS+= ${VARBASE}/games/moon-buggy ${GAMEDIR_PERMS}
7494REQD_FILES_PERMS+= /dev/null ${VARBASE}/games/moon-buggy/mbscore ${GAMEDATA_PERMS} 7508REQD_FILES_PERMS+= /dev/null ${VARBASE}/games/moon-buggy/mbscore ${GAMEDATA_PERMS}
7495SPECIAL_PERMS+= ${PREFIX}/bin/moon-buggy ${SETGID_GAMES_PERMS} 7509SPECIAL_PERMS+= ${PREFIX}/bin/moon-buggy ${SETGID_GAMES_PERMS}
7496 7510
7497Various INSTALL_* variables are also available: INSTALL_GAME to install setgid 7511Various INSTALL_* variables are also available: INSTALL_GAME to install setgid
7498game binaries, INSTALL_GAME_DIR to install game directories that are needed to 7512game binaries, INSTALL_GAME_DIR to install game directories that are needed to
7499be accessed by setgid games and INSTALL_GAME_DATA to install scorefiles. 7513be accessed by setgid games and INSTALL_GAME_DATA to install scorefiles.
7500 7514
7501A package should therefore never hard code file ownership or access permissions 7515A package should therefore never hard code file ownership or access permissions
7502but rely on *_PERMS as described above or alternatively on INSTALL_GAME, 7516but rely on *_PERMS as described above or alternatively on INSTALL_GAME,
7503INSTALL_GAME_DATA and INSTALL_GAME_DIR to set these correctly. 7517INSTALL_GAME_DATA and INSTALL_GAME_DIR to set these correctly.
7504 7518
750521.6.4. Adding DESTDIR support to packages 751921.6.4. Adding DESTDIR support to packages
7506 7520
7507DESTDIR support means that a package installs into a staging directory, not the 7521DESTDIR support means that a package installs into a staging directory, not the
7508final location of the files. Then a binary package is created which can be used 7522final location of the files. Then a binary package is created which can be used
7509for installation as usual. There are two ways: Either the package must install 7523for installation as usual. There are two ways: Either the package must install
7510as root ("destdir") or the package can install as non-root user ("user-destdir" 7524as root ("destdir") or the package can install as non-root user ("user-destdir"
7511). 7525).
7512 7526
7513 * PKG_DESTDIR_SUPPORT has to be set to "destdir" or "user-destdir". By 7527 * PKG_DESTDIR_SUPPORT has to be set to "destdir" or "user-destdir". By
7514 default PKG_DESTDIR_SUPPORT is set to "user-destdir" to help catching more 7528 default PKG_DESTDIR_SUPPORT is set to "user-destdir" to help catching more
7515 potential packaging problems. If bsd.prefs.mk is included in the Makefile, 7529 potential packaging problems. If bsd.prefs.mk is included in the Makefile,
7516 PKG_DESTDIR_SUPPORT needs to be set before the inclusion. 7530 PKG_DESTDIR_SUPPORT needs to be set before the inclusion.
7517 7531
7518 * All installation operations have to be prefixed with ${DESTDIR}. 7532 * All installation operations have to be prefixed with ${DESTDIR}.
7519 7533
7520 * automake gets this DESTDIR mostly right automatically. Many manual rules 7534 * automake gets this DESTDIR mostly right automatically. Many manual rules
7521 and pre/post-install often are incorrect; fix them. 7535 and pre/post-install often are incorrect; fix them.
7522 7536
7523 * If files are installed with special owner/group use SPECIAL_PERMS. 7537 * If files are installed with special owner/group use SPECIAL_PERMS.
7524 7538
7525 * In general, packages should support UNPRIVILEGED to be able to use DESTDIR. 7539 * In general, packages should support UNPRIVILEGED to be able to use DESTDIR.
7526 7540
752721.6.5. Packages with hardcoded paths to other interpreters 754121.6.5. Packages with hardcoded paths to other interpreters
7528 7542
7529Your package may also contain scripts with hardcoded paths to other 7543Your package may also contain scripts with hardcoded paths to other
7530interpreters besides (or as well as) Perl. To correct the full pathname to the 7544interpreters besides (or as well as) Perl. To correct the full pathname to the
7531script interpreter, you need to set the following definitions in your Makefile 7545script interpreter, you need to set the following definitions in your Makefile
7532(we shall use tclsh in this example): 7546(we shall use tclsh in this example):
7533 7547
7534REPLACE_INTERPRETER+= tcl 7548REPLACE_INTERPRETER+= tcl
7535REPLACE.tcl.old= .*/bin/tclsh 7549REPLACE.tcl.old= .*/bin/tclsh
7536REPLACE.tcl.new= ${PREFIX}/bin/tclsh 7550REPLACE.tcl.new= ${PREFIX}/bin/tclsh
7537REPLACE_FILES.tcl= # list of tcl scripts which need to be fixed, 7551REPLACE_FILES.tcl= # list of tcl scripts which need to be fixed,
7538# relative to ${WRKSRC}, just as in REPLACE_PERL 7552# relative to ${WRKSRC}, just as in REPLACE_PERL
7539 7553
754021.6.6. Packages installing Perl modules 755421.6.6. Packages installing Perl modules
7541 7555
7542Makefiles of packages providing perl5 modules should include the Makefile 7556Makefiles of packages providing perl5 modules should include the Makefile
7543fragment ../../lang/perl5/module.mk. It provides a do-configure target for the 7557fragment ../../lang/perl5/module.mk. It provides a do-configure target for the
7544standard perl configuration for such modules as well as various hooks to tune 7558standard perl configuration for such modules as well as various hooks to tune
7545this configuration. See comments in this file for details. 7559this configuration. See comments in this file for details.
7546 7560
7547Perl5 modules will install into different places depending on the version of 7561Perl5 modules will install into different places depending on the version of
7548perl used during the build process. To address this, pkgsrc will append lines 7562perl used during the build process. To address this, pkgsrc will append lines
7549to the PLIST corresponding to the files listed in the installed .packlist file 7563to the PLIST corresponding to the files listed in the installed .packlist file
7550generated by most perl5 modules. This is invoked by defining PERL5_PACKLIST to 7564generated by most perl5 modules. This is invoked by defining PERL5_PACKLIST to
7551a space-separated list of packlist files relative to PERL5_PACKLIST_DIR 7565a space-separated list of packlist files relative to PERL5_PACKLIST_DIR
7552(PERL5_INSTALLVENDORARCH by default), e.g.: 7566(PERL5_INSTALLVENDORARCH by default), e.g.:
7553 7567
7554PERL5_PACKLIST= auto/Pg/.packlist 7568PERL5_PACKLIST= auto/Pg/.packlist
7555 7569
7556The perl5 config variables installarchlib, installscript, installvendorbin, 7570The perl5 config variables installarchlib, installscript, installvendorbin,
7557installvendorscript, installvendorarch, installvendorlib, installvendorman1dir, 7571installvendorscript, installvendorarch, installvendorlib, installvendorman1dir,
7558and installvendorman3dir represent those locations in which components of perl5 7572and installvendorman3dir represent those locations in which components of perl5
7559modules may be installed, provided as variable with uppercase and prefixed with 7573modules may be installed, provided as variable with uppercase and prefixed with
7560PERL5_, e.g. PERL5_INSTALLARCHLIB and may be used by perl5 packages that don't 7574PERL5_, e.g. PERL5_INSTALLARCHLIB and may be used by perl5 packages that don't
7561have a packlist. These variables are also substituted for in the PLIST as 7575have a packlist. These variables are also substituted for in the PLIST as
7562uppercase prefixed with PERL5_SUB_. 7576uppercase prefixed with PERL5_SUB_.
7563 7577
756421.6.7. Packages installing info files 757821.6.7. Packages installing info files
7565 7579
7566Some packages install info files or use the "makeinfo" or "install-info" 7580Some packages install info files or use the "makeinfo" or "install-info"
7567commands. INFO_FILES should be defined in the package Makefile so that INSTALL 7581commands. INFO_FILES should be defined in the package Makefile so that INSTALL
7568and DEINSTALL scripts will be generated to handle registration of the info 7582and DEINSTALL scripts will be generated to handle registration of the info
7569files in the Info directory file. The "install-info" command used for the info 7583files in the Info directory file. The "install-info" command used for the info
7570files registration is either provided by the system, or by a special purpose 7584files registration is either provided by the system, or by a special purpose
7571package automatically added as dependency if needed. 7585package automatically added as dependency if needed.
7572 7586
7573PKGINFODIR is the directory under ${PREFIX} where info files are primarily 7587PKGINFODIR is the directory under ${PREFIX} where info files are primarily
7574located. PKGINFODIR defaults to "info" and can be overridden by the user. 7588located. PKGINFODIR defaults to "info" and can be overridden by the user.
7575 7589
7576The info files for the package should be listed in the package PLIST; however 7590The info files for the package should be listed in the package PLIST; however
7577any split info files need not be listed. 7591any split info files need not be listed.
7578 7592
7579A package which needs the "makeinfo" command at build time must add "makeinfo" 7593A package which needs the "makeinfo" command at build time must add "makeinfo"
7580to USE_TOOLS in its Makefile. If a minimum version of the "makeinfo" command is 7594to USE_TOOLS in its Makefile. If a minimum version of the "makeinfo" command is
7581needed it should be noted with the TEXINFO_REQD variable in the package 7595needed it should be noted with the TEXINFO_REQD variable in the package
7582Makefile. By default, a minimum version of 3.12 is required. If the system does 7596Makefile. By default, a minimum version of 3.12 is required. If the system does
7583not provide a makeinfo command or if it does not match the required minimum, a 7597not provide a makeinfo command or if it does not match the required minimum, a
7584build dependency on the devel/gtexinfo package will be added automatically. 7598build dependency on the devel/gtexinfo package will be added automatically.
7585 7599
7586The build and installation process of the software provided by the package 7600The build and installation process of the software provided by the package
7587should not use the install-info command as the registration of info files is 7601should not use the install-info command as the registration of info files is
7588the task of the package INSTALL script, and it must use the appropriate  7602the task of the package INSTALL script, and it must use the appropriate
7589makeinfo command. 7603makeinfo command.
7590 7604
7591To achieve this goal, the pkgsrc infrastructure creates overriding scripts for 7605To achieve this goal, the pkgsrc infrastructure creates overriding scripts for
7592the install-info and makeinfo commands in a directory listed early in PATH. 7606the install-info and makeinfo commands in a directory listed early in PATH.
7593 7607
7594The script overriding install-info has no effect except the logging of a 7608The script overriding install-info has no effect except the logging of a
7595message. The script overriding makeinfo logs a message and according to the 7609message. The script overriding makeinfo logs a message and according to the
7596value of TEXINFO_REQD either runs the appropriate makeinfo command or exit on 7610value of TEXINFO_REQD either runs the appropriate makeinfo command or exit on
7597error. 7611error.
7598 7612
759921.6.8. Packages installing man pages 761321.6.8. Packages installing man pages
7600 7614
7601All packages that install manual pages should install them into the same 7615All packages that install manual pages should install them into the same
7602directory, so that there is one common place to look for them. In pkgsrc, this 7616directory, so that there is one common place to look for them. In pkgsrc, this
7603place is ${PREFIX}/${PKGMANDIR}, and this expression should be used in 7617place is ${PREFIX}/${PKGMANDIR}, and this expression should be used in
7604packages. The default for PKGMANDIR is "man". Another often-used value is " 7618packages. The default for PKGMANDIR is "man". Another often-used value is "
7605share/man". 7619share/man".
7606 7620
7607Note 7621Note
7608 7622
7609The support for a custom PKGMANDIR is far from complete. 7623The support for a custom PKGMANDIR is far from complete.
7610 7624
7611The PLIST files can just use man/ as the top level directory for the man page 7625The PLIST files can just use man/ as the top level directory for the man page
7612file entries, and the pkgsrc framework will convert as needed. In all other 7626file entries, and the pkgsrc framework will convert as needed. In all other
7613places, the correct PKGMANDIR must be used. 7627places, the correct PKGMANDIR must be used.
7614 7628
7615Packages that are configured with GNU_CONFIGURE set as "yes", by default will 7629Packages that are configured with GNU_CONFIGURE set as "yes", by default will
7616use the ./configure --mandir switch to set where the man pages should be 7630use the ./configure --mandir switch to set where the man pages should be
7617installed. The path is GNU_CONFIGURE_MANDIR which defaults to ${PREFIX}/$ 7631installed. The path is GNU_CONFIGURE_MANDIR which defaults to ${PREFIX}/$
7618{PKGMANDIR}. 7632{PKGMANDIR}.
7619 7633
7620Packages that use GNU_CONFIGURE but do not use --mandir, can set 7634Packages that use GNU_CONFIGURE but do not use --mandir, can set
7621CONFIGURE_HAS_MANDIR to "no". Or if the ./configure script uses a non-standard 7635CONFIGURE_HAS_MANDIR to "no". Or if the ./configure script uses a non-standard
7622use of --mandir, you can set GNU_CONFIGURE_MANDIR as needed. 7636use of --mandir, you can set GNU_CONFIGURE_MANDIR as needed.
7623 7637
7624See Section 19.5, "Man page compression" for information on installation of 7638See Section 19.5, "Man page compression" for information on installation of
7625compressed manual pages. 7639compressed manual pages.
7626 7640
762721.6.9. Packages installing X11 fonts 764121.6.9. Packages installing X11 fonts
7628 7642
7629If a package installs font files, you will need to rebuild the fonts database 7643If a package installs font files, you will need to rebuild the fonts database
7630in the directory where they get installed at installation and deinstallation 7644in the directory where they get installed at installation and deinstallation
7631time. This can be automatically done by using the pkginstall framework. 7645time. This can be automatically done by using the pkginstall framework.
7632 7646
7633You can list the directories where fonts are installed in the FONTS_DIRS.type 7647You can list the directories where fonts are installed in the FONTS_DIRS.type
7634variables, where type can be one of "ttf", "type1" or "x11". Also make sure 7648variables, where type can be one of "ttf", "type1" or "x11". Also make sure
7635that the database file fonts.dir is not listed in the PLIST. 7649that the database file fonts.dir is not listed in the PLIST.
7636 7650
7637Note that you should not create new directories for fonts; instead use the 7651Note that you should not create new directories for fonts; instead use the
7638standard ones to avoid that the user needs to manually configure his X server 7652standard ones to avoid that the user needs to manually configure his X server
7639to find them. 7653to find them.
7640 7654
764121.6.10. Packages installing SGML or XML data 765521.6.10. Packages installing SGML or XML data
7642 7656
7643If a package installs SGML or XML data files that need to be registered in 7657If a package installs SGML or XML data files that need to be registered in
7644system-wide catalogs (like DTDs, sub-catalogs, etc.), you need to take some 7658system-wide catalogs (like DTDs, sub-catalogs, etc.), you need to take some
7645extra steps: 7659extra steps:
7646 7660
7647 1. Include ../../textproc/xmlcatmgr/catalogs.mk in your Makefile, which takes 7661 1. Include ../../textproc/xmlcatmgr/catalogs.mk in your Makefile, which takes
7648 care of registering those files in system-wide catalogs at installation and 7662 care of registering those files in system-wide catalogs at installation and
7649 deinstallation time. 7663 deinstallation time.
7650 7664
7651 2. Set SGML_CATALOGS to the full path of any SGML catalogs installed by the 7665 2. Set SGML_CATALOGS to the full path of any SGML catalogs installed by the
7652 package. 7666 package.
7653 7667
7654 3. Set XML_CATALOGS to the full path of any XML catalogs installed by the 7668 3. Set XML_CATALOGS to the full path of any XML catalogs installed by the
7655 package. 7669 package.
7656 7670
7657 4. Set SGML_ENTRIES to individual entries to be added to the SGML catalog. 7671 4. Set SGML_ENTRIES to individual entries to be added to the SGML catalog.
7658 These come in groups of three strings; see xmlcatmgr(1) for more 7672 These come in groups of three strings; see xmlcatmgr(1) for more
7659 information (specifically, arguments recognized by the 'add' action). Note 7673 information (specifically, arguments recognized by the 'add' action). Note
7660 that you will normally not use this variable. 7674 that you will normally not use this variable.
7661 7675
7662 5. Set XML_ENTRIES to individual entries to be added to the XML catalog. These 7676 5. Set XML_ENTRIES to individual entries to be added to the XML catalog. These
7663 come in groups of three strings; see xmlcatmgr(1) for more information 7677 come in groups of three strings; see xmlcatmgr(1) for more information
7664 (specifically, arguments recognized by the 'add' action). Note that you 7678 (specifically, arguments recognized by the 'add' action). Note that you
7665 will normally not use this variable. 7679 will normally not use this variable.
7666 7680
766721.6.11. Packages installing extensions to the MIME database 768121.6.11. Packages installing extensions to the MIME database
7668 7682
7669If a package provides extensions to the MIME database by installing .xml files 7683If a package provides extensions to the MIME database by installing .xml files
7670inside ${PREFIX}/share/mime/packages, you need to take some extra steps to 7684inside ${PREFIX}/share/mime/packages, you need to take some extra steps to
7671ensure that the database is kept consistent with respect to these new files: 7685ensure that the database is kept consistent with respect to these new files:
7672 7686
7673 1. Include ../../databases/shared-mime-info/mimedb.mk (avoid using the 7687 1. Include ../../databases/shared-mime-info/mimedb.mk (avoid using the
7674 buildlink3.mk file from this same directory, which is reserved for 7688 buildlink3.mk file from this same directory, which is reserved for
7675 inclusion from other buildlink3.mk files). It takes care of rebuilding the 7689 inclusion from other buildlink3.mk files). It takes care of rebuilding the
7676 MIME database at installation and deinstallation time, and disallows any 7690 MIME database at installation and deinstallation time, and disallows any
7677 access to it directly from the package. 7691 access to it directly from the package.
7678 7692
7679 2. Check the PLIST and remove any entries under the share/mime directory,  7693 2. Check the PLIST and remove any entries under the share/mime directory,
7680 except for files saved under share/mime/packages. The former are handled 7694 except for files saved under share/mime/packages. The former are handled
7681 automatically by the update-mime-database program, but the latter are 7695 automatically by the update-mime-database program, but the latter are
7682 package-dependent and must be removed by the package that installed them in 7696 package-dependent and must be removed by the package that installed them in
7683 the first place. 7697 the first place.
7684 7698
7685 3. Remove any share/mime/* directories from the PLIST. They will be handled by 7699 3. Remove any share/mime/* directories from the PLIST. They will be handled by
7686 the shared-mime-info package. 7700 the shared-mime-info package.
7687 7701
768821.6.12. Packages using intltool 770221.6.12. Packages using intltool
7689 7703
7690If a package uses intltool during its build, add intltool to the USE_TOOLS, 7704If a package uses intltool during its build, add intltool to the USE_TOOLS,
7691which forces it to use the intltool package provided by pkgsrc, instead of the 7705which forces it to use the intltool package provided by pkgsrc, instead of the
7692one bundled with the distribution file. 7706one bundled with the distribution file.
7693 7707
7694This tracks intltool's build-time dependencies and uses the latest available 7708This tracks intltool's build-time dependencies and uses the latest available
7695version; this way, the package benefits of any bug fixes that may have appeared 7709version; this way, the package benefits of any bug fixes that may have appeared
7696since it was released. 7710since it was released.
7697 7711
769821.6.13. Packages installing startup scripts 771221.6.13. Packages installing startup scripts
7699 7713
7700If a package contains a rc.d script, it won't be copied into the startup 7714If a package contains a rc.d script, it won't be copied into the startup
7701directory by default, but you can enable it, by adding the option 7715directory by default, but you can enable it, by adding the option
7702PKG_RCD_SCRIPTS=YES in mk.conf. This option will copy the scripts into /etc/ 7716PKG_RCD_SCRIPTS=YES in mk.conf. This option will copy the scripts into /etc/
7703rc.d when a package is installed, and it will automatically remove the scripts 7717rc.d when a package is installed, and it will automatically remove the scripts
7704when the package is deinstalled. 7718when the package is deinstalled.
7705 7719
770621.6.14. Packages installing TeX modules 772021.6.14. Packages installing TeX modules
7707 7721
7708If a package installs TeX packages into the texmf tree, the ls-R database of 7722If a package installs TeX packages into the texmf tree, the ls-R database of
7709the tree needs to be updated. 7723the tree needs to be updated.
7710 7724
7711Note 7725Note
7712 7726
7713Except the main TeX packages such as kpathsea, packages should install files 7727Except the main TeX packages such as kpathsea, packages should install files
7714into ${PREFIX}/share/texmf-dist, not ${PREFIX}/share/texmf. 7728into ${PREFIX}/share/texmf-dist, not ${PREFIX}/share/texmf.
7715 7729
7716 1. Include ../../print/kpathsea/texmf.mk. This takes care of rebuilding the 7730 1. Include ../../print/kpathsea/texmf.mk. This takes care of rebuilding the
7717 ls-R database at installation and deinstallation time. 7731 ls-R database at installation and deinstallation time.
7718 7732
7719 2. If your package installs files into a texmf tree other than the one at $ 7733 2. If your package installs files into a texmf tree other than the one at $
7720 {PREFIX}/share/texmf-dist, set TEX_TEXMF_DIRS to the list of all texmf 7734 {PREFIX}/share/texmf-dist, set TEX_TEXMF_DIRS to the list of all texmf
7721 trees that need database update. 7735 trees that need database update.
7722 7736
7723 If your package also installs font map files that need to be registered 7737 If your package also installs font map files that need to be registered
7724 using updmap, include ../../print/tex-tetex/map.mk and set TEX_MAP_FILES 7738 using updmap, include ../../print/tex-tetex/map.mk and set TEX_MAP_FILES
7725 and/or TEX_MIXEDMAP_FILES to the list of all such font map files. Then  7739 and/or TEX_MIXEDMAP_FILES to the list of all such font map files. Then
7726 updmap will be run automatically at installation/deinstallation to enable/ 7740 updmap will be run automatically at installation/deinstallation to enable/
7727 disable font map files for TeX output drivers. 7741 disable font map files for TeX output drivers.
7728 7742
7729 3. Make sure that none of ls-R databases are included in PLIST, as they will 7743 3. Make sure that none of ls-R databases are included in PLIST, as they will
7730 be removed only by the kpathsea package. 7744 be removed only by the kpathsea package.
7731 7745
773221.6.15. Packages supporting running binaries in emulation 774621.6.15. Packages supporting running binaries in emulation
7733 7747
7734There are some packages that provide libraries and executables for running 7748There are some packages that provide libraries and executables for running
7735binaries from a one operating system on a different one (if the latter supports 7749binaries from a one operating system on a different one (if the latter supports
7736it). One example is running Linux binaries on NetBSD. 7750it). One example is running Linux binaries on NetBSD.
7737 7751
7738The pkgtools/rpm2pkg helps in extracting and packaging Linux rpm packages. 7752The pkgtools/rpm2pkg helps in extracting and packaging Linux rpm packages.
7739 7753
7740The CHECK_SHLIBS can be set to no to avoid the check-shlibs target, which tests 7754The CHECK_SHLIBS can be set to no to avoid the check-shlibs target, which tests
7741if all libraries for each installed executable can be found by the dynamic 7755if all libraries for each installed executable can be found by the dynamic
7742linker. Since the standard dynamic linker is run, this fails for emulation 7756linker. Since the standard dynamic linker is run, this fails for emulation
7743packages, because the libraries used by the emulation are not in the standard 7757packages, because the libraries used by the emulation are not in the standard
7744directories. 7758directories.
7745 7759
774621.6.16. Packages installing hicolor icons 776021.6.16. Packages installing hicolor icons
7747 7761
7748If a package installs images under the share/icons/hicolor and/or updates the 7762If a package installs images under the share/icons/hicolor and/or updates the
7749share/icons/hicolor/icon-theme.cache database, you need to take some extra 7763share/icons/hicolor/icon-theme.cache database, you need to take some extra
7750steps to make sure that the shared theme directory is handled appropriately and 7764steps to make sure that the shared theme directory is handled appropriately and
7751that the cache database is rebuilt: 7765that the cache database is rebuilt:
7752 7766
7753 1. Include ../../graphics/hicolor-icon-theme/buildlink3.mk. 7767 1. Include ../../graphics/hicolor-icon-theme/buildlink3.mk.
7754 7768
7755 2. Check the PLIST and remove the entry that refers to the theme cache. 7769 2. Check the PLIST and remove the entry that refers to the theme cache.
7756 7770
7757 3. Ensure that the PLIST does not remove the shared icon directories from the 7771 3. Ensure that the PLIST does not remove the shared icon directories from the
7758 share/icons/hicolor hierarchy because they will be handled automatically. 7772 share/icons/hicolor hierarchy because they will be handled automatically.
7759 7773
7760The best way to verify that the PLIST is correct with respect to the last two 7774The best way to verify that the PLIST is correct with respect to the last two
7761points is to regenerate it using make print-PLIST. 7775points is to regenerate it using make print-PLIST.
7762 7776
776321.6.17. Packages installing desktop files 777721.6.17. Packages installing desktop files
7764 7778
7765If a package installs .desktop files under share/applications and these include 7779If a package installs .desktop files under share/applications and these include
7766MIME information (MimeType key), you need to take extra steps to ensure that 7780MIME information (MimeType key), you need to take extra steps to ensure that
7767they are registered into the MIME database: 7781they are registered into the MIME database:
7768 7782
7769 1. Include ../../sysutils/desktop-file-utils/desktopdb.mk. 7783 1. Include ../../sysutils/desktop-file-utils/desktopdb.mk.
7770 7784
7771 2. Check the PLIST and remove the entry that refers to the share/applications/ 7785 2. Check the PLIST and remove the entry that refers to the share/applications/
7772 mimeinfo.cache file. It will be handled automatically. 7786 mimeinfo.cache file. It will be handled automatically.
7773 7787
7774The best way to verify that the PLIST is correct with respect to the last point 7788The best way to verify that the PLIST is correct with respect to the last point
7775is to regenerate it using make print-PLIST. 7789is to regenerate it using make print-PLIST.
7776 7790
777721.7. Marking packages as having problems 779121.7. Marking packages as having problems
7778 7792
7779In some cases one does not have the time to solve a problem immediately. In 7793In some cases one does not have the time to solve a problem immediately. In
7780this case, one can plainly mark a package as broken. For this, one just sets 7794this case, one can plainly mark a package as broken. For this, one just sets
7781the variable BROKEN to the reason why the package is broken (similar to the 7795the variable BROKEN to the reason why the package is broken (similar to the
7782PKG_FAIL_REASON variable). A user trying to build the package will immediately 7796PKG_FAIL_REASON variable). A user trying to build the package will immediately
7783be shown this message, and the build will not be even tried. 7797be shown this message, and the build will not be even tried.
7784 7798
7785BROKEN packages are removed from pkgsrc in irregular intervals. 7799BROKEN packages are removed from pkgsrc in irregular intervals.
7786 7800
7787Chapter 22. GNOME packaging and porting 7801Chapter 22. GNOME packaging and porting
7788 7802
7789Table of Contents 7803Table of Contents
7790 7804
779122.1. Meta packages 780522.1. Meta packages
779222.2. Packaging a GNOME application 780622.2. Packaging a GNOME application
779322.3. Updating GNOME to a newer version 780722.3. Updating GNOME to a newer version
779422.4. Patching guidelines 780822.4. Patching guidelines
7795 7809
7796Quoting GNOME's web site: 7810Quoting GNOME's web site:
7797 7811
7798 The GNOME project provides two things: The GNOME desktop environment, an 7812 The GNOME project provides two things: The GNOME desktop environment, an
7799 intuitive and attractive desktop for users, and the GNOME development 7813 intuitive and attractive desktop for users, and the GNOME development
7800 platform, an extensive framework for building applications that integrate 7814 platform, an extensive framework for building applications that integrate
7801 into the rest of the desktop. 7815 into the rest of the desktop.
7802 7816
7803pkgsrc provides a seamless way to automatically build and install a complete 7817pkgsrc provides a seamless way to automatically build and install a complete
7804GNOME environment under many different platforms. We can say with confidence 7818GNOME environment under many different platforms. We can say with confidence
7805that pkgsrc is one of the most advanced build and packaging systems for GNOME 7819that pkgsrc is one of the most advanced build and packaging systems for GNOME
7806due to its included technologies buildlink3, the wrappers and tools framework 7820due to its included technologies buildlink3, the wrappers and tools framework
7807and automatic configuration file management. Lots of efforts are put into 7821and automatic configuration file management. Lots of efforts are put into
7808achieving a completely clean deinstallation of installed software components. 7822achieving a completely clean deinstallation of installed software components.
7809 7823
7810Given that pkgsrc is NetBSD's official packaging system, the above also means 7824Given that pkgsrc is NetBSD's official packaging system, the above also means
7811that great efforts are put into making GNOME work under this operating system. 7825that great efforts are put into making GNOME work under this operating system.
7812 7826
7813This chapter is aimed at pkgsrc developers and other people interested in 7827This chapter is aimed at pkgsrc developers and other people interested in
7814helping our GNOME porting and packaging efforts. It provides instructions on 7828helping our GNOME porting and packaging efforts. It provides instructions on
7815how to manage the existing packages and some important information regarding 7829how to manage the existing packages and some important information regarding
7816their internals. 7830their internals.
7817 7831
781822.1. Meta packages 783222.1. Meta packages
7819 7833
7820pkgsrc includes three GNOME-related meta packages: 7834pkgsrc includes three GNOME-related meta packages:
7821 7835
7822 * meta-pkgs/gnome-base: Provides the core GNOME desktop environment. It only 7836 * meta-pkgs/gnome-base: Provides the core GNOME desktop environment. It only
7823 includes the necessary bits to get it to boot correctly, although it may 7837 includes the necessary bits to get it to boot correctly, although it may
7824 lack important functionality for daily operation. The idea behind this 7838 lack important functionality for daily operation. The idea behind this
7825 package is to let end users build their own configurations on top of this 7839 package is to let end users build their own configurations on top of this
7826 one, first installing this meta package to achieve a functional setup and 7840 one, first installing this meta package to achieve a functional setup and
7827 then adding individual applications. 7841 then adding individual applications.
7828 7842
7829 * meta-pkgs/gnome: Provides a complete installation of the GNOME platform and 7843 * meta-pkgs/gnome: Provides a complete installation of the GNOME platform and
7830 desktop as defined by the GNOME project; this is based on the components 7844 desktop as defined by the GNOME project; this is based on the components
7831 distributed in the platform/x.y/x.y.z/sources and desktop/x.y/x.y.z/sources 7845 distributed in the platform/x.y/x.y.z/sources and desktop/x.y/x.y.z/sources
7832 directories of the official FTP server. Developer-only tools found in those 7846 directories of the official FTP server. Developer-only tools found in those
7833 directories are not installed unless required by some other component to 7847 directories are not installed unless required by some other component to
7834 work properly. Similarly, packages from the bindings set (bindings/x.y/ 7848 work properly. Similarly, packages from the bindings set (bindings/x.y/
7835 x.y.z/sources) are not pulled in unless required as a dependency for an 7849 x.y.z/sources) are not pulled in unless required as a dependency for an
7836 end-user component. This package "extends" meta-pkgs/gnome-base. 7850 end-user component. This package "extends" meta-pkgs/gnome-base.
7837 7851
7838 * meta-pkgs/gnome-devel: Installs all the tools required to build a GNOME 7852 * meta-pkgs/gnome-devel: Installs all the tools required to build a GNOME
7839 component when fetched from the CVS repository. These are required to let 7853 component when fetched from the CVS repository. These are required to let
7840 the autogen.sh scripts work appropriately. 7854 the autogen.sh scripts work appropriately.
7841 7855
7842In all these packages, the DEPENDS lines are sorted in a way that eases 7856In all these packages, the DEPENDS lines are sorted in a way that eases
7843updates: a package may depend on other packages listed before it but not on any 7857updates: a package may depend on other packages listed before it but not on any
7844listed after it. It is very important to keep this order to ease updates so...  7858listed after it. It is very important to keep this order to ease updates so...
7845do not change it to alphabetical sorting! 7859do not change it to alphabetical sorting!
7846 7860
784722.2. Packaging a GNOME application 786122.2. Packaging a GNOME application
7848 7862
7849Almost all GNOME applications are written in C and use a common set of tools as 7863Almost all GNOME applications are written in C and use a common set of tools as
7850their build system. Things get different with the new bindings to other 7864their build system. Things get different with the new bindings to other
7851languages (such as Python), but the following will give you a general idea on 7865languages (such as Python), but the following will give you a general idea on
7852the minimum required tools: 7866the minimum required tools:
7853 7867
7854 * Almost all GNOME applications use the GNU Autotools as their build system. 7868 * Almost all GNOME applications use the GNU Autotools as their build system.
7855 As a general rule you will need to tell this to your package: 7869 As a general rule you will need to tell this to your package:
7856 7870
7857 GNU_CONFIGURE= yes 7871 GNU_CONFIGURE= yes
7858 USE_LIBTOOL= yes 7872 USE_LIBTOOL= yes
7859 USE_TOOLS+= gmake 7873 USE_TOOLS+= gmake
7860 7874
7861 * If the package uses pkg-config to detect dependencies, add this tool to the 7875 * If the package uses pkg-config to detect dependencies, add this tool to the
7862 list of required utilities: 7876 list of required utilities:
7863 7877
7864 USE_TOOLS+= pkg-config 7878 USE_TOOLS+= pkg-config
7865 7879
7866 Also use pkgtools/verifypc at the end of the build process to ensure that 7880 Also use pkgtools/verifypc at the end of the build process to ensure that
7867 you did not miss to specify any dependency in your package and that the 7881 you did not miss to specify any dependency in your package and that the
7868 version requirements are all correct. 7882 version requirements are all correct.
7869 7883
7870 * If the package uses intltool, be sure to add intltool to the USE_TOOLS to 7884 * If the package uses intltool, be sure to add intltool to the USE_TOOLS to
7871 handle dependencies and to force the package to use the latest available 7885 handle dependencies and to force the package to use the latest available
7872 version. 7886 version.
7873 7887
7874 * If the package uses gtk-doc (a documentation generation utility), do not 7888 * If the package uses gtk-doc (a documentation generation utility), do not
7875 add a dependency on it. The tool is rather big and the distfile should come 7889 add a dependency on it. The tool is rather big and the distfile should come
7876 with pregenerated documentation anyway; if it does not, it is a bug that 7890 with pregenerated documentation anyway; if it does not, it is a bug that
7877 you ought to report. For such packages you should disable gtk-doc (unless 7891 you ought to report. For such packages you should disable gtk-doc (unless
7878 it is the default): 7892 it is the default):
7879 7893
7880 CONFIGURE_ARGS+= --disable-gtk-doc 7894 CONFIGURE_ARGS+= --disable-gtk-doc
7881 7895
7882 The default location of installed HTML files (share/gtk-doc/<package-name>) 7896 The default location of installed HTML files (share/gtk-doc/<package-name>)
7883 is correct and should not be changed unless the package insists on 7897 is correct and should not be changed unless the package insists on
7884 installing them somewhere else. Otherwise programs as devhelp will not be 7898 installing them somewhere else. Otherwise programs as devhelp will not be
7885 able to open them. You can do that with an entry similar to: 7899 able to open them. You can do that with an entry similar to:
7886 7900
7887 CONFIGURE_ARGS+= --with-html-dir=${PREFIX}/share/gtk-doc/... 7901 CONFIGURE_ARGS+= --with-html-dir=${PREFIX}/share/gtk-doc/...
7888 7902
7889GNOME uses multiple shared directories and files under the installation prefix 7903GNOME uses multiple shared directories and files under the installation prefix
7890to maintain databases. In this context, shared means that those exact same 7904to maintain databases. In this context, shared means that those exact same
7891directories and files are used among several different packages, leading to 7905directories and files are used among several different packages, leading to
7892conflicts in the PLIST. pkgsrc currently includes functionality to handle the 7906conflicts in the PLIST. pkgsrc currently includes functionality to handle the
7893most common cases, so you have to forget about using @unexec ${RMDIR} lines in 7907most common cases, so you have to forget about using @unexec ${RMDIR} lines in
7894your file lists and omitting shared files from them. If you find yourself doing 7908your file lists and omitting shared files from them. If you find yourself doing
7895those, your package is most likely incorrect. 7909those, your package is most likely incorrect.
7896 7910
7897The following table lists the common situations that result in using shared 7911The following table lists the common situations that result in using shared
7898directories or files. For each of them, the appropriate solution is given. 7912directories or files. For each of them, the appropriate solution is given.
7899After applying the solution be sure to regenerate the package's file list with  7913After applying the solution be sure to regenerate the package's file list with
7900make print-PLIST and ensure it is correct. 7914make print-PLIST and ensure it is correct.
7901 7915
7902Table 22.1. PLIST handling for GNOME packages 7916Table 22.1. PLIST handling for GNOME packages
7903 7917
7904+-----------------------------------------------------------------------------+ 7918+-----------------------------------------------------------------------------+
7905| If the package... | Then... | 7919| If the package... | Then... |
7906|-------------------------------------------+---------------------------------| 7920|-------------------------------------------+---------------------------------|
7907|Installs icons under the share/icons/ |See Section 21.6.16, "Packages | 7921|Installs icons under the share/icons/ |See Section 21.6.16, "Packages |
7908|hicolor hierarchy or updates share/icons/ |installing hicolor icons". | 7922|hicolor hierarchy or updates share/icons/ |installing hicolor icons". |
7909|hicolor/icon-theme.cache. | | 7923|hicolor/icon-theme.cache. | |
7910|-------------------------------------------+---------------------------------| 7924|-------------------------------------------+---------------------------------|
7911| |See Section 21.6.11, "Packages | 7925| |See Section 21.6.11, "Packages |
7912|Installs files under share/mime/packages. |installing extensions to the MIME| 7926|Installs files under share/mime/packages. |installing extensions to the MIME|
7913| |database". | 7927| |database". |
7914|-------------------------------------------+---------------------------------| 7928|-------------------------------------------+---------------------------------|
7915|Installs .desktop files under share/ |See Section 21.6.17, "Packages | 7929|Installs .desktop files under share/ |See Section 21.6.17, "Packages |
7916|applications and these include MIME |installing desktop files". | 7930|applications and these include MIME |installing desktop files". |
7917|information. | | 7931|information. | |
7918+-----------------------------------------------------------------------------+ 7932+-----------------------------------------------------------------------------+
7919 7933
7920 7934
792122.3. Updating GNOME to a newer version 793522.3. Updating GNOME to a newer version
7922 7936
7923When seeing GNOME as a whole, there are two kinds of updates: 7937When seeing GNOME as a whole, there are two kinds of updates:
7924 7938
7925Major update 7939Major update
7926 7940
7927 Given that there is still a very long way for GNOME 3 (if it ever appears), 7941 Given that there is still a very long way for GNOME 3 (if it ever appears),
7928 we consider a major update one that goes from a 2.X version to a 2.Y one, 7942 we consider a major update one that goes from a 2.X version to a 2.Y one,
7929 where Y is even and greater than X. These are hard to achieve because they 7943 where Y is even and greater than X. These are hard to achieve because they
7930 introduce lots of changes in the components' code and almost all GNOME 7944 introduce lots of changes in the components' code and almost all GNOME
7931 distfiles are updated to newer versions. Some of them can even break API 7945 distfiles are updated to newer versions. Some of them can even break API
7932 and ABI compatibility with the previous major version series. As a result, 7946 and ABI compatibility with the previous major version series. As a result,
7933 the update needs to be done all at once to minimize breakage. 7947 the update needs to be done all at once to minimize breakage.
7934 7948
7935 A major update typically consists of around 80 package updates and the 7949 A major update typically consists of around 80 package updates and the
7936 addition of some new ones. 7950 addition of some new ones.
7937 7951
7938Minor update 7952Minor update
7939 7953
7940 We consider a minor update one that goes from a 2.A.X version to a 2.A.Y 7954 We consider a minor update one that goes from a 2.A.X version to a 2.A.Y
7941 one where Y is greater than X. These are easy to achieve because they do 7955 one where Y is greater than X. These are easy to achieve because they do
7942 not update all GNOME components, can be done in an incremental way and do 7956 not update all GNOME components, can be done in an incremental way and do
7943 not break API nor ABI compatibility. 7957 not break API nor ABI compatibility.
7944 7958
7945 A minor update typically consists of around 50 package updates, although 7959 A minor update typically consists of around 50 package updates, although
7946 the numbers here may vary a lot. 7960 the numbers here may vary a lot.
7947 7961
7948In order to update the GNOME components in pkgsrc to a new stable release 7962In order to update the GNOME components in pkgsrc to a new stable release
7949(either major or minor), the following steps should be followed: 7963(either major or minor), the following steps should be followed:
7950 7964
7951 1. Get a list of all the tarballs that form the new release by using the 7965 1. Get a list of all the tarballs that form the new release by using the
7952 following commands. These will leave the full list of the components' 7966 following commands. These will leave the full list of the components'
7953 distfiles into the list.txt file: 7967 distfiles into the list.txt file:
7954 7968
7955 % echo ls "*.tar.bz2" | \ 7969 % echo ls "*.tar.bz2" | \
7956 ftp -V ftp://ftp.gnome.org/pub/gnome/platform/x.y/x.y.z/sources/ | \ 7970 ftp -V ftp://ftp.gnome.org/pub/gnome/platform/x.y/x.y.z/sources/ | \
7957 awk '{ print $9 }' >list.txt 7971 awk '{ print $9 }' >list.txt
7958 % echo ls "*.tar.bz2" | \ 7972 % echo ls "*.tar.bz2" | \
7959 ftp -V ftp://ftp.gnome.org/pub/gnome/desktop/x.y/x.y.z/sources/ | \ 7973 ftp -V ftp://ftp.gnome.org/pub/gnome/desktop/x.y/x.y.z/sources/ | \
7960 awk '{ print $9 }' >>list.txt 7974 awk '{ print $9 }' >>list.txt
7961 7975
7962 2. Open each meta package's Makefile and bump their version to the release you 7976 2. Open each meta package's Makefile and bump their version to the release you
7963 are updating them to. The three meta packages should be always consistent 7977 are updating them to. The three meta packages should be always consistent
7964 with versioning. Obviously remove any PKGREVISIONs that might be in them. 7978 with versioning. Obviously remove any PKGREVISIONs that might be in them.
7965 7979
7966 3. For each meta package, update all its DEPENDS lines to match the latest 7980 3. For each meta package, update all its DEPENDS lines to match the latest
7967 versions as shown by the above commands. Do not list any newer version 7981 versions as shown by the above commands. Do not list any newer version
7968 (even if found in the FTP) because the meta packages are supposed to list 7982 (even if found in the FTP) because the meta packages are supposed to list
7969 the exact versions that form a specific GNOME release. Exceptions are 7983 the exact versions that form a specific GNOME release. Exceptions are
7970 permitted here if a newer version solves a serious issue in the overall 7984 permitted here if a newer version solves a serious issue in the overall
7971 desktop experience; these typically come in the form of a revision bump in 7985 desktop experience; these typically come in the form of a revision bump in
7972 pkgsrc, not in newer versions from the developers. 7986 pkgsrc, not in newer versions from the developers.
7973 7987
7974 Packages not listed in the list.txt file should be updated to the latest 7988 Packages not listed in the list.txt file should be updated to the latest
7975 version available (if found in pkgsrc). This is the case, for example, of 7989 version available (if found in pkgsrc). This is the case, for example, of
7976 the dependencies on the GNU Autotools in the meta-pkgs/gnome-devel meta 7990 the dependencies on the GNU Autotools in the meta-pkgs/gnome-devel meta
7977 package. 7991 package.
7978 7992
7979 4. Generate a patch from the modified meta packages and extract the list of 7993 4. Generate a patch from the modified meta packages and extract the list of
7980 "new" lines. This will provide you an outline on what packages need to be 7994 "new" lines. This will provide you an outline on what packages need to be
7981 updated in pkgsrc and in what order: 7995 updated in pkgsrc and in what order:
7982 7996
7983 % cvs diff -u gnome-devel gnome-base gnome | grep '^+D' >todo.txt 7997 % cvs diff -u gnome-devel gnome-base gnome | grep '^+D' >todo.txt
7984 7998
7985 5. For major desktop updates it is recommended to zap all your installed 7999 5. For major desktop updates it is recommended to zap all your installed
7986 packages and start over from scratch at this point. 8000 packages and start over from scratch at this point.
7987 8001
7988 6. Now comes the longest step by far: iterate over the contents of todo.txt 8002 6. Now comes the longest step by far: iterate over the contents of todo.txt
7989 and update the packages listed in it in order. For major desktop updates 8003 and update the packages listed in it in order. For major desktop updates
7990 none of these should be committed until the entire set is completed because 8004 none of these should be committed until the entire set is completed because
7991 there are chances of breaking not-yet-updated packages. 8005 there are chances of breaking not-yet-updated packages.
7992 8006
7993 7. Once the packages are up to date and working, commit them to the tree one 8007 7. Once the packages are up to date and working, commit them to the tree one
7994 by one with appropriate log messages. At the end, commit the three meta 8008 by one with appropriate log messages. At the end, commit the three meta
7995 package updates and all the corresponding changes to the doc/CHANGES-<YEAR> 8009 package updates and all the corresponding changes to the doc/CHANGES-<YEAR>
7996 and pkgsrc/doc/TODO files. 8010 and pkgsrc/doc/TODO files.
7997 8011
799822.4. Patching guidelines 801222.4. Patching guidelines
7999 8013
8000GNOME is a very big component in pkgsrc which approaches 100 packages. Please, 8014GNOME is a very big component in pkgsrc which approaches 100 packages. Please,
8001it is very important that you always, always, always feed back any portability 8015it is very important that you always, always, always feed back any portability
8002fixes you do to a GNOME package to the mainstream developers (see 8016fixes you do to a GNOME package to the mainstream developers (see
8003Section 12.3.5, "Feedback to the author"). This is the only way to get their 8017Section 12.3.5, "Feedback to the author"). This is the only way to get their
8004attention on portability issues and to ensure that future versions can be built 8018attention on portability issues and to ensure that future versions can be built
8005out-of-the box on NetBSD. The less custom patches in pkgsrc, the easier further 8019out-of-the box on NetBSD. The less custom patches in pkgsrc, the easier further
8006updates are. Those developers in charge of issuing major GNOME updates will be 8020updates are. Those developers in charge of issuing major GNOME updates will be
8007grateful if you do that. 8021grateful if you do that.
8008 8022
8009The most common places to report bugs are the GNOME's GitLab and the 8023The most common places to report bugs are the GNOME's GitLab and the
8010freedesktop.org's GitLab. Not all components use these to track bugs, but most 8024freedesktop.org's GitLab. Not all components use these to track bugs, but most
8011of them do. Do not be short on your reports: always provide detailed 8025of them do. Do not be short on your reports: always provide detailed
8012explanations of the current failure, how it can be improved to achieve maximum 8026explanations of the current failure, how it can be improved to achieve maximum
8013portability and, if at all possible, provide a patch against the main Git 8027portability and, if at all possible, provide a patch against the main Git
8014branch. The more verbose you are, the higher chances of your patch being 8028branch. The more verbose you are, the higher chances of your patch being
8015accepted. 8029accepted.
8016 8030
8017Also, please avoid using preprocessor magic to fix portability issues. While 8031Also, please avoid using preprocessor magic to fix portability issues. While
8018the FreeBSD GNOME people are doing a great job in porting GNOME to their 8032the FreeBSD GNOME people are doing a great job in porting GNOME to their
8019operating system, the official GNOME sources are now plagued by conditionals 8033operating system, the official GNOME sources are now plagued by conditionals
8020that check for __FreeBSD__ and similar macros. This hurts portability. Please 8034that check for __FreeBSD__ and similar macros. This hurts portability. Please
8021see our patching guidelines (Section 12.3.4, "Patching guidelines") for more 8035see our patching guidelines (Section 12.3.4, "Patching guidelines") for more
8022details. 8036details.
8023 8037
8024Chapter 23. Submitting and Committing 8038Chapter 23. Submitting and Committing
8025 8039
8026Table of Contents 8040Table of Contents
8027 8041
802823.1. Submitting binary packages 804223.1. Submitting binary packages
802923.2. Submitting source packages (for non-NetBSD-developers) 804323.2. Submitting source packages (for non-NetBSD-developers)
803023.3. General notes when adding, updating, or removing packages 804423.3. General notes when adding, updating, or removing packages
803123.4. Commit Messages 804523.4. Commit Messages
803223.5. Committing: Adding a package to CVS 804623.5. Committing: Adding a package to CVS
803323.6. Updating a package to a newer version 804723.6. Updating a package to a newer version
803423.7. Renaming a package in pkgsrc 804823.7. Renaming a package in pkgsrc
803523.8. Moving a package in pkgsrc 804923.8. Moving a package in pkgsrc
8036 8050
803723.1. Submitting binary packages 805123.1. Submitting binary packages
8038 8052
8039Our policy is that we accept binaries only from pkgsrc developers to guarantee 8053Our policy is that we accept binaries only from pkgsrc developers to guarantee
8040that the packages don't contain any trojan horses etc. This is not to annoy 8054that the packages don't contain any trojan horses etc. This is not to annoy
8041anyone but rather to protect our users! You're still free to put up your 8055anyone but rather to protect our users! You're still free to put up your
8042home-made binary packages and tell the world where to get them. NetBSD 8056home-made binary packages and tell the world where to get them. NetBSD
8043developers doing bulk builds and wanting to upload them please see Chapter 8,  8057developers doing bulk builds and wanting to upload them please see Chapter 8,
8044Creating binary packages for everything in pkgsrc (bulk builds). 8058Creating binary packages for everything in pkgsrc (bulk builds).
8045 8059
804623.2. Submitting source packages (for non-NetBSD-developers) 806023.2. Submitting source packages (for non-NetBSD-developers)
8047 8061
8048Firstly, you can import new packages into pkgsrc-wip ("pkgsrc work-in-progress" 8062Firstly, you can import new packages into pkgsrc-wip ("pkgsrc work-in-progress"
8049); see the homepage at https://pkgsrc.org/wip/ for details. 8063); see the homepage at https://pkgsrc.org/wip/ for details.
8050 8064
8051Next, check that your package is complete, compiles and runs well; see 8065Next, check that your package is complete, compiles and runs well; see
8052Chapter 14, Creating a new pkgsrc package from scratch and the rest of this 8066Chapter 14, Creating a new pkgsrc package from scratch and the rest of this
8053document. Run the pkgtools/pkglint tool and fix any errors that appear. 8067document. Run the pkgtools/pkglint tool and fix any errors that appear.
8054 8068
8055Finally, send a report to the pkgsrc bug tracking system, either with the 8069Finally, send a report to the pkgsrc bug tracking system, either with the
8056send-pr(1) command, or if you don't have that, go to the web page https:// 8070send-pr(1) command, or if you don't have that, go to the web page https://
8057www.NetBSD.org/support/send-pr.html, which contains some instructions and a 8071www.NetBSD.org/support/send-pr.html, which contains some instructions and a
8058link to a form where you can submit packages. The sysutils/gtk-send-pr package 8072link to a form where you can submit packages. The sysutils/gtk-send-pr package
8059is also available as a substitute for either of the above two tools. 8073is also available as a substitute for either of the above two tools.
8060 8074
8061In the form of the problem report, the category should be "pkg", the synopsis 8075In the form of the problem report, the category should be "pkg", the synopsis
8062should include the package name and version number, and the description field 8076should include the package name and version number, and the description field
8063should contain a short description of your package (contents of the COMMENT 8077should contain a short description of your package (contents of the COMMENT
8064variable or DESCR file are OK). 8078variable or DESCR file are OK).
8065 8079
806623.3. General notes when adding, updating, or removing packages 808023.3. General notes when adding, updating, or removing packages
8067 8081
8068Please note all package additions, updates, moves, and removals in pkgsrc/doc/ 8082Please note all package additions, updates, moves, and removals in pkgsrc/doc/
8069CHANGES-YYYY. It's very important to keep this file up to date and conforming 8083CHANGES-YYYY. It's very important to keep this file up to date and conforming
8070to the existing format, because it will be used by scripts to automatically 8084to the existing format, because it will be used by scripts to automatically
8071update pages on www.NetBSD.org and other sites. Additionally, check the pkgsrc/ 8085update pages on www.NetBSD.org and other sites. Additionally, check the pkgsrc/
8072doc/TODO file and remove the entry for the package you updated or removed, in 8086doc/TODO file and remove the entry for the package you updated or removed, in
8073case it was mentioned there. 8087case it was mentioned there.
8074 8088
8075When the PKGREVISION of a package is bumped, the change should appear in pkgsrc 8089When the PKGREVISION of a package is bumped, the change should appear in pkgsrc
8076/doc/CHANGES-YYYY if it is security related or otherwise relevant. Mass bumps 8090/doc/CHANGES-YYYY if it is security related or otherwise relevant. Mass bumps
8077that result from a dependency being updated should not be mentioned. In all 8091that result from a dependency being updated should not be mentioned. In all
8078other cases it's the developer's decision. 8092other cases it's the developer's decision.
8079 8093
8080There is a make target that helps in creating proper CHANGES-YYYY entries: make 8094There is a make target that helps in creating proper CHANGES-YYYY entries: make
8081changes-entry. It uses the optional CTYPE and NETBSD_LOGIN_NAME variables. The 8095changes-entry. It uses the optional CTYPE and NETBSD_LOGIN_NAME variables. The
8082general usage is to first make sure that your CHANGES-YYYY file is up-to-date 8096general usage is to first make sure that your CHANGES-YYYY file is up-to-date
8083(to avoid having to resolve conflicts later-on) and then to cd to the package 8097(to avoid having to resolve conflicts later-on) and then to cd to the package
8084directory. For package updates, make changes-entry is enough. For new packages, 8098directory. For package updates, make changes-entry is enough. For new packages,
8085or package moves or removals, set the CTYPE variable on the command line to 8099or package moves or removals, set the CTYPE variable on the command line to
8086"Added", "Moved", or "Removed". You can set NETBSD_LOGIN_NAME in mk.conf if 8100"Added", "Moved", or "Removed". You can set NETBSD_LOGIN_NAME in mk.conf if
8087your local login name is not the same as your NetBSD login name. The target 8101your local login name is not the same as your NetBSD login name. The target
8088also automatically removes possibly existing entries for the package in the 8102also automatically removes possibly existing entries for the package in the
8089TODO file. Don't forget to commit the changes, e.g. by using make 8103TODO file. Don't forget to commit the changes, e.g. by using make
8090commit-changes-entry! If you are not using a checkout directly from 8104commit-changes-entry! If you are not using a checkout directly from
8091cvs.NetBSD.org, but e.g. a local copy of the repository, you can set 8105cvs.NetBSD.org, but e.g. a local copy of the repository, you can set
8092USE_NETBSD_REPO=yes. This makes the cvs commands use the main repository. 8106USE_NETBSD_REPO=yes. This makes the cvs commands use the main repository.
8093 8107
809423.4. Commit Messages 810823.4. Commit Messages
8095 8109
8096For several years, there have been mirrors of pkgsrc in fossil, git, and hg. 8110For several years, there have been mirrors of pkgsrc in fossil, git, and hg.
8097Standard practise when using these tools is to make the first line of a commit 8111Standard practise when using these tools is to make the first line of a commit
8098message function as a summary that can be read without the rest, such as is 8112message function as a summary that can be read without the rest, such as is
8099commonly done with "git log --oneline". For this reason, we have the following 8113commonly done with "git log --oneline". For this reason, we have the following
8100guidelines for pkgsrc commit messages: 8114guidelines for pkgsrc commit messages:
8101 8115
8102 * Start the commit message with a line that explains the big picture in 65 8116 * Start the commit message with a line that explains the big picture in 65
8103 characters or less. When a commit is for one package, include the name of 8117 characters or less. When a commit is for one package, include the name of
8104 the package. For updates, include the version to which it is updated. 8118 the package. For updates, include the version to which it is updated.
8105 8119
8106 * Leave the next line empty. 8120 * Leave the next line empty.
8107 8121
8108 * Then come the details for the commit (changes in that package, reason for a 8122 * Then come the details for the commit (changes in that package, reason for a
8109 change) and any relevant PRs. Wrap this section. 8123 change) and any relevant PRs. Wrap this section.
8110 8124
8111Here is an example: 8125Here is an example:
8112 8126
8113 libxslt: update to 1.0.30 8127 libxslt: update to 1.0.30
8114 8128
8115 Changes since 1.0.29: 8129 Changes since 1.0.29:
8116 ... 8130 ...
8117 8131
8118 8132
8119Here is another example: 8133Here is another example:
8120 8134
8121 mk/bsd.pkg.mk: enable SSP by default on NetBSD 8135 mk/bsd.pkg.mk: enable SSP by default on NetBSD
8122 8136
8123 (rationale) 8137 (rationale)
8124 8138
8125 8139
8126Commit messages are final: no "cvs admin" is allowed on the pkgsrc repository 8140Commit messages are final: no "cvs admin" is allowed on the pkgsrc repository
8127to change commit messages. 8141to change commit messages.
8128 8142
812923.5. Committing: Adding a package to CVS 814323.5. Committing: Adding a package to CVS
8130 8144
8131This section is only of interest for pkgsrc developers with write access to the 8145This section is only of interest for pkgsrc developers with write access to the
8132pkgsrc repository. 8146pkgsrc repository.
8133 8147
8134When the package is finished, "cvs add" the files. Start by adding the 8148When the package is finished, "cvs add" the files. Start by adding the
8135directory and then files in the directory. Don't forget to add the new package 8149directory and then files in the directory. Don't forget to add the new package
8136to the category's Makefile. Make sure you don't forget any files; you can check 8150to the category's Makefile. Make sure you don't forget any files; you can check
8137by running "cvs status". An example: 8151by running "cvs status". An example:
8138 8152
8139$ cd .../pkgsrc/category 8153$ cd .../pkgsrc/category
8140$ cvs add pkgname 8154$ cvs add pkgname
8141$ cd pkgname 8155$ cd pkgname
8142$ cvs add DESCR Makefile PLIST distinfo buildlink3.mk patches 8156$ cvs add DESCR Makefile PLIST distinfo buildlink3.mk patches
8143$ cvs add patches/p* 8157$ cvs add patches/p*
8144$ cvs status | less 8158$ cvs status | less
8145$ cvs commit 8159$ cvs commit
8146$ cd .. 8160$ cd ..
8147$ vi Makefile # add SUBDIRS+=pkgname line 8161$ vi Makefile # add SUBDIRS+=pkgname line
8148$ cvs commit Makefile 8162$ cvs commit Makefile
8149$ cd pkgname 8163$ cd pkgname
8150$ make CTYPE=Added commit-changes-entry 8164$ make CTYPE=Added commit-changes-entry
8151 8165
8152The commit message of the initial import should include part of the DESCR file, 8166The commit message of the initial import should include part of the DESCR file,
8153so people reading the mailing lists know what the package is/does. 8167so people reading the mailing lists know what the package is/does.
8154 8168
8155Also mention the new package in pkgsrc/doc/CHANGES-20xx. 8169Also mention the new package in pkgsrc/doc/CHANGES-20xx.
8156 8170
8157Previously, "cvs import" was suggested, but it was much easier to get wrong 8171Previously, "cvs import" was suggested, but it was much easier to get wrong
8158than "cvs add". 8172than "cvs add".
8159 8173
816023.6. Updating a package to a newer version 817423.6. Updating a package to a newer version
8161 8175
8162Please always put a concise, appropriate and relevant summary of the changes 8176Please always put a concise, appropriate and relevant summary of the changes
8163between old and new versions into the commit log when updating a package. There 8177between old and new versions into the commit log when updating a package. There
8164are various reasons for this: 8178are various reasons for this:
8165 8179
8166 * A URL is volatile, and can change over time. It may go away completely or 8180 * A URL is volatile, and can change over time. It may go away completely or
8167 its information may be overwritten by newer information. 8181 its information may be overwritten by newer information.
8168 8182
8169 * Having the change information between old and new versions in our CVS 8183 * Having the change information between old and new versions in our CVS
8170 repository is very useful for people who use either cvs or anoncvs. 8184 repository is very useful for people who use either cvs or anoncvs.
8171 8185
8172 * Having the change information between old and new versions in our CVS 8186 * Having the change information between old and new versions in our CVS
8173 repository is very useful for people who read the pkgsrc-changes mailing 8187 repository is very useful for people who read the pkgsrc-changes mailing
8174 list, so that they can make tactical decisions about when to upgrade the 8188 list, so that they can make tactical decisions about when to upgrade the
8175 package. 8189 package.
8176 8190
8177Please also recognize that, just because a new version of a package has been 8191Please also recognize that, just because a new version of a package has been
8178released, it should not automatically be upgraded in the CVS repository. We 8192released, it should not automatically be upgraded in the CVS repository. We
8179prefer to be conservative in the packages that are included in pkgsrc - 8193prefer to be conservative in the packages that are included in pkgsrc -
8180development or beta packages are not really the best thing for most places in 8194development or beta packages are not really the best thing for most places in
8181which pkgsrc is used. Please use your judgement about what should go into 8195which pkgsrc is used. Please use your judgement about what should go into
8182pkgsrc, and bear in mind that stability is to be preferred above new and 8196pkgsrc, and bear in mind that stability is to be preferred above new and
8183possibly untested features. 8197possibly untested features.
8184 8198
818523.7. Renaming a package in pkgsrc 819923.7. Renaming a package in pkgsrc
8186 8200
8187Renaming packages is not recommended. 8201Renaming packages is not recommended.
8188 8202
8189When renaming packages, be sure to fix any references to the old name in other 8203When renaming packages, be sure to fix any references to the old name in other
8190Makefiles, options, buildlink files, etc. 8204Makefiles, options, buildlink files, etc.
8191 8205
8192Also, when renaming a package, please add the package name and version pattern 8206Also, when renaming a package, please add the package name and version pattern
8193(s) of the previous package to SUPERSEDES. This may be repeated for multiple 8207(s) of the previous package to SUPERSEDES. This may be repeated for multiple
8194renames. The new package would be an exact replacement. Example: 8208renames. The new package would be an exact replacement. Example:
8195 8209
8196SUPERSEDES+= p5-IO-Compress-Zlib<2.017 8210SUPERSEDES+= p5-IO-Compress-Zlib<2.017
8197SUPERSEDES+= optcomp-[0-9]* 8211SUPERSEDES+= optcomp-[0-9]*
8198 8212
8199Note that "successor" in the CHANGES-YYYY file doesn't necessarily mean that it 8213Note that "successor" in the CHANGES-YYYY file doesn't necessarily mean that it
8200supersedes, as that successor may not be an exact replacement but is a 8214supersedes, as that successor may not be an exact replacement but is a
8201suggestion for the replaced functionality. 8215suggestion for the replaced functionality.
8202 8216
820323.8. Moving a package in pkgsrc 821723.8. Moving a package in pkgsrc
8204 8218
8205It is preferred that packages are not renamed or moved, but if needed please 8219It is preferred that packages are not renamed or moved, but if needed please
8206follow these steps. 8220follow these steps.
8207 8221
8208 1. Make a copy of the directory somewhere else. 8222 1. Make a copy of the directory somewhere else.
8209 8223
8210 2. Remove all CVS dirs. 8224 2. Remove all CVS dirs.
8211 8225
8212 Alternatively to the first two steps you can also do: 8226 Alternatively to the first two steps you can also do:
8213 8227
8214 % cvs -d user@cvs.NetBSD.org:/cvsroot export -D today pkgsrc/category/package 8228 % cvs -d user@cvs.NetBSD.org:/cvsroot export -D today pkgsrc/category/package
8215 8229
8216 and use that for further work. 8230 and use that for further work.
8217 8231
8218 3. Fix CATEGORIES and any DEPENDS paths that just did "../package" instead of  8232 3. Fix CATEGORIES and any DEPENDS paths that just did "../package" instead of
8219 "../../category/package". 8233 "../../category/package".
8220 8234
8221 4. In the modified package's Makefile, consider setting PREV_PKGPATH to the 8235 4. In the modified package's Makefile, consider setting PREV_PKGPATH to the
8222 previous category/package pathname. The PREV_PKGPATH can be used by tools 8236 previous category/package pathname. The PREV_PKGPATH can be used by tools
8223 for doing an update using pkgsrc building; for example, it can search the 8237 for doing an update using pkgsrc building; for example, it can search the
8224 pkg_summary(5) database for PREV_PKGPATH (if no SUPERSEDES) and then use 8238 pkg_summary(5) database for PREV_PKGPATH (if no SUPERSEDES) and then use
8225 the corresponding new PKGPATH for that moved package. Note that it may have 8239 the corresponding new PKGPATH for that moved package. Note that it may have
8226 multiple matches, so the tool should also check on the PKGBASE too. The 8240 multiple matches, so the tool should also check on the PKGBASE too. The
8227 PREV_PKGPATH probably has no value unless SUPERSEDES is not set, i.e. 8241 PREV_PKGPATH probably has no value unless SUPERSEDES is not set, i.e.
8228 PKGBASE stays the same. 8242 PKGBASE stays the same.
8229 8243
8230 5. cvs import the modified package in the new place. 8244 5. cvs import the modified package in the new place.
8231 8245
8232 6. Check if any package depends on it: 8246 6. Check if any package depends on it:
8233 8247
8234 % cd /usr/pkgsrc 8248 % cd /usr/pkgsrc
8235 % grep /package */*/Makefile* */*/buildlink* 8249 % grep /package */*/Makefile* */*/buildlink*
8236 8250
8237 7. Fix paths in packages from step 5 to point to new location. 8251 7. Fix paths in packages from step 5 to point to new location.
8238 8252
8239 8. cvs rm (-f) the package at the old location. 8253 8. cvs rm (-f) the package at the old location.
8240 8254
8241 9. Remove from oldcategory/Makefile. 8255 9. Remove from oldcategory/Makefile.
8242 8256
824310. Add to newcategory/Makefile. 825710. Add to newcategory/Makefile.
8244 8258
824511. Commit the changed and removed files: 825911. Commit the changed and removed files:
8246 8260
8247 % cvs commit oldcategory/package oldcategory/Makefile newcategory/Makefile 8261 % cvs commit oldcategory/package oldcategory/Makefile newcategory/Makefile
8248 8262
8249 (and any packages from step 5, of course). 8263 (and any packages from step 5, of course).
8250 8264
8251Chapter 24. Frequently Asked Questions 8265Chapter 24. Frequently Asked Questions
8252 8266
8253This section contains the answers to questions that may arise when you are 8267This section contains the answers to questions that may arise when you are
8254writing a package. If you don't find your question answered here, first have a 8268writing a package. If you don't find your question answered here, first have a
8255look in the other chapters, and if you still don't have the answer, ask on the 8269look in the other chapters, and if you still don't have the answer, ask on the
8256pkgsrc-users mailing list. 8270pkgsrc-users mailing list.
8257 8271
825824.1. What is the difference between MAKEFLAGS, .MAKEFLAGS and MAKE_FLAGS? 827224.1. What is the difference between MAKEFLAGS, .MAKEFLAGS and MAKE_FLAGS?
825924.2. What is the difference between MAKE, GMAKE and MAKE_PROGRAM? 827324.2. What is the difference between MAKE, GMAKE and MAKE_PROGRAM?
826024.3. What is the difference between CC, PKG_CC and PKGSRC_COMPILER? 827424.3. What is the difference between CC, PKG_CC and PKGSRC_COMPILER?
826124.4. Why does make show-var VARNAME=BUILDLINK_PREFIX.foo say it's empty? 827524.4. Why does make show-var VARNAME=BUILDLINK_PREFIX.foo say it's empty?
826224.5. What does ${MASTER_SITE_SOURCEFORGE:=package/} mean? I don't understand 827624.5. What does ${MASTER_SITE_SOURCEFORGE:=package/} mean? I don't understand
8263 the := inside it. 8277 the := inside it.
826424.6. Which mailing lists are there for package developers? 827824.6. Which mailing lists are there for package developers?
826524.7. Where is the pkgsrc documentation? 827924.7. Where is the pkgsrc documentation?
826624.8. I have a little time to kill. What shall I do? 828024.8. I have a little time to kill. What shall I do?
8267 8281
826824.1. What is the difference between MAKEFLAGS, .MAKEFLAGS and MAKE_FLAGS? 828224.1. What is the difference between MAKEFLAGS, .MAKEFLAGS and MAKE_FLAGS?
8269 8283
8270 MAKEFLAGS are the flags passed to the pkgsrc-internal invocations of make 8284 MAKEFLAGS are the flags passed to the pkgsrc-internal invocations of make
8271 (1). 8285 (1).
8272 8286
8273 MAKE_FLAGS are the flags that are passed to the MAKE_PROGRAM when 8287 MAKE_FLAGS are the flags that are passed to the MAKE_PROGRAM when
8274 building the package. 8288 building the package.
8275 8289
8276 .MAKEFLAGS is an internal variable of bmake and should not be used by 8290 .MAKEFLAGS is an internal variable of bmake and should not be used by
8277 packages. 8291 packages.
8278 8292
827924.2. What is the difference between MAKE, GMAKE and MAKE_PROGRAM? 829324.2. What is the difference between MAKE, GMAKE and MAKE_PROGRAM?
8280 8294
8281 MAKE is the path to the make(1) program that is used in the pkgsrc 8295 MAKE is the path to the make(1) program that is used in the pkgsrc
8282 infrastructure. 8296 infrastructure.
8283 8297
8284 GMAKE is the path to GNU Make, but you need to say USE_TOOLS+=gmake to 8298 GMAKE is the path to GNU Make, but you need to say USE_TOOLS+=gmake to
8285 use that. 8299 use that.
8286 8300
8287 MAKE_PROGRAM is the path to the Make program that is used for building 8301 MAKE_PROGRAM is the path to the Make program that is used for building
8288 the package. 8302 the package.
8289 8303
829024.3. What is the difference between CC, PKG_CC and PKGSRC_COMPILER? 830424.3. What is the difference between CC, PKG_CC and PKGSRC_COMPILER?
8291 8305
8292 CC is the path to the real C compiler, which can be configured by the 8306 CC is the path to the real C compiler, which can be configured by the
8293 pkgsrc user. 8307 pkgsrc user.
8294 8308
8295 PKG_CC is the path to the compiler wrapper. 8309 PKG_CC is the path to the compiler wrapper.
8296 8310
8297 PKGSRC_COMPILER is not a path to a compiler, but the type of compiler 8311 PKGSRC_COMPILER is not a path to a compiler, but the type of compiler
8298 that should be used. See mk/compiler.mk for more information about the 8312 that should be used. See mk/compiler.mk for more information about the
8299 latter variable. 8313 latter variable.
8300 8314
830124.4. Why does make show-var VARNAME=BUILDLINK_PREFIX.foo say it's empty? 831524.4. Why does make show-var VARNAME=BUILDLINK_PREFIX.foo say it's empty?
8302 8316
8303 For optimization reasons, some variables are only available in the " 8317 For optimization reasons, some variables are only available in the "
8304 wrapper" phase and later. To "simulate" the wrapper phase, append  8318 wrapper" phase and later. To "simulate" the wrapper phase, append
8305 PKG_PHASE=wrapper to the above command. 8319 PKG_PHASE=wrapper to the above command.
8306 8320
830724.5. What does ${MASTER_SITE_SOURCEFORGE:=package/} mean? I don't understand 832124.5. What does ${MASTER_SITE_SOURCEFORGE:=package/} mean? I don't understand
8308 the := inside it. 8322 the := inside it.
8309 8323
8310 The := is not an assignment operator, even though it may look like one. 8324 The := is not an assignment operator, even though it may look like one.
8311 Instead, it is a degenerate form of ${LIST:old_string=new_string}, which 8325 Instead, it is a degenerate form of ${LIST:old_string=new_string}, which
8312 is documented in the make(1) man page and which is commonly used in the 8326 is documented in the make(1) man page and which is commonly used in the
8313 form ${SRCS:.c=.o}. In the case of MASTER_SITE_*, old_string is the empty 8327 form ${SRCS:.c=.o}. In the case of MASTER_SITE_*, old_string is the empty
8314 string and new_string is package/. That's where the : and the = fall 8328 string and new_string is package/. That's where the : and the = fall
8315 together. 8329 together.
8316 8330
831724.6. Which mailing lists are there for package developers? 833124.6. Which mailing lists are there for package developers?
8318 8332
8319 tech-pkg 8333 tech-pkg
8320 8334
8321 This is a list for technical discussions related to pkgsrc 8335 This is a list for technical discussions related to pkgsrc
8322 development, e.g. soliciting feedback for changes to pkgsrc 8336 development, e.g. soliciting feedback for changes to pkgsrc
8323 infrastructure, proposed new features, questions related to porting 8337 infrastructure, proposed new features, questions related to porting
8324 pkgsrc to a new platform, advice for maintaining a package, patches 8338 pkgsrc to a new platform, advice for maintaining a package, patches
8325 that affect many packages, help requests moved from pkgsrc-users when 8339 that affect many packages, help requests moved from pkgsrc-users when
8326 an infrastructure bug is found, etc. 8340 an infrastructure bug is found, etc.
8327 8341
8328 pkgsrc-bugs 8342 pkgsrc-bugs
8329 8343
8330 All bug reports in category "pkg" sent with send-pr(1) appear here. 8344 All bug reports in category "pkg" sent with send-pr(1) appear here.
8331 Please do not report your bugs here directly; use one of the other 8345 Please do not report your bugs here directly; use one of the other
8332 mailing lists. 8346 mailing lists.
8333 8347
833424.7. Where is the pkgsrc documentation? 834824.7. Where is the pkgsrc documentation?
8335 8349
8336 There are many places where you can find documentation about pkgsrc: 8350 There are many places where you can find documentation about pkgsrc:
8337 8351
8338 * The pkgsrc guide (this document) is a collection of chapters that 8352 * The pkgsrc guide (this document) is a collection of chapters that
8339 explain large parts of pkgsrc, but some chapters tend to be outdated. 8353 explain large parts of pkgsrc, but some chapters tend to be outdated.
8340 Which ones they are is hard to say. 8354 Which ones they are is hard to say.
8341 8355
8342 * On the mailing list archives (see https://mail-index.NetBSD.org/), 8356 * On the mailing list archives (see https://mail-index.NetBSD.org/),
8343 you can find discussions about certain features, announcements of new 8357 you can find discussions about certain features, announcements of new
8344 parts of the pkgsrc infrastructure and sometimes even announcements 8358 parts of the pkgsrc infrastructure and sometimes even announcements
8345 that a certain feature has been marked as obsolete. The benefit here 8359 that a certain feature has been marked as obsolete. The benefit here
8346 is that each message has a date appended to it. 8360 is that each message has a date appended to it.
8347 8361
8348 * Many of the files in the mk/ directory start with a comment that 8362 * Many of the files in the mk/ directory start with a comment that
8349 describes the purpose of the file and how it can be used by the 8363 describes the purpose of the file and how it can be used by the
8350 pkgsrc user and package authors. An easy way to find this 8364 pkgsrc user and package authors. An easy way to find this
8351 documentation is to run bmake help. 8365 documentation is to run bmake help.
8352 8366
8353 * The CVS log messages are a rich source of information, but they tend 8367 * The CVS log messages are a rich source of information, but they tend
8354 to be highly abbreviated, especially for actions that occur often. 8368 to be highly abbreviated, especially for actions that occur often.
8355 Some contain a detailed description of what has changed, but they are 8369 Some contain a detailed description of what has changed, but they are
8356 geared towards the other pkgsrc developers, not towards an average 8370 geared towards the other pkgsrc developers, not towards an average
8357 pkgsrc user. They also only document changes, so if you don't know 8371 pkgsrc user. They also only document changes, so if you don't know
8358 what has been before, these messages may not be worth too much to 8372 what has been before, these messages may not be worth too much to
8359 you. 8373 you.
8360 8374
8361 * Some parts of pkgsrc are only "implicitly documented", that is the 8375 * Some parts of pkgsrc are only "implicitly documented", that is the
8362 documentation exists only in the mind of the developer who wrote the 8376 documentation exists only in the mind of the developer who wrote the
8363 code. To get this information, use the cvs annotate command to see 8377 code. To get this information, use the cvs annotate command to see
8364 who has written it and ask on the tech-pkg mailing list, so that 8378 who has written it and ask on the tech-pkg mailing list, so that
8365 others can find your questions later (see above). To be sure that the 8379 others can find your questions later (see above). To be sure that the
8366 developer in charge reads the mail, you may CC him or her. 8380 developer in charge reads the mail, you may CC him or her.
8367 8381
836824.8. I have a little time to kill. What shall I do? 838224.8. I have a little time to kill. What shall I do?
8369 8383
8370 This is not really an FAQ yet, but here's the answer anyway. 8384 This is not really an FAQ yet, but here's the answer anyway.
8371 8385
8372 * Run pkg_chk -N (from the pkgtools/pkg_chk package). It will tell you 8386 * Run pkg_chk -N (from the pkgtools/pkg_chk package). It will tell you
8373 about newer versions of installed packages that are available, but 8387 about newer versions of installed packages that are available, but
8374 not yet updated in pkgsrc. 8388 not yet updated in pkgsrc.
8375 8389
8376 * Browse pkgsrc/doc/TODO -- it contains a list of suggested new 8390 * Browse pkgsrc/doc/TODO -- it contains a list of suggested new
8377 packages and a list of cleanups and enhancements for pkgsrc that 8391 packages and a list of cleanups and enhancements for pkgsrc that
8378 would be nice to have. 8392 would be nice to have.
8379 8393
8380 * Review packages for which review was requested on the tech-pkg 8394 * Review packages for which review was requested on the tech-pkg
8381 mailing list. 8395 mailing list.
8382 8396
8383Part III. The pkgsrc infrastructure internals 8397Part III. The pkgsrc infrastructure internals
8384 8398
8385This part of the guide deals with everything from the infrastructure that is 8399This part of the guide deals with everything from the infrastructure that is
8386behind the interfaces described in the developer's guide. A casual package 8400behind the interfaces described in the developer's guide. A casual package
8387maintainer should not need anything from this part. 8401maintainer should not need anything from this part.
8388 8402
8389Table of Contents 8403Table of Contents
8390 8404
839125. Design of the pkgsrc infrastructure 840525. Design of the pkgsrc infrastructure
8392 8406
8393 25.1. The meaning of variable definitions 8407 25.1. The meaning of variable definitions
8394 25.2. Avoiding problems before they arise 8408 25.2. Avoiding problems before they arise
8395 25.3. Variable evaluation 8409 25.3. Variable evaluation
8396 8410
8397 25.3.1. At load time 8411 25.3.1. At load time
8398 25.3.2. At runtime 8412 25.3.2. At runtime
8399 8413
8400 25.4. How can variables be specified? 8414 25.4. How can variables be specified?
8401 25.5. Designing interfaces for Makefile fragments 8415 25.5. Designing interfaces for Makefile fragments
8402 8416
8403 25.5.1. Procedures with parameters 8417 25.5.1. Procedures with parameters
8404 25.5.2. Actions taken on behalf of parameters 8418 25.5.2. Actions taken on behalf of parameters
8405 8419
8406 25.6. The order in which files are loaded 8420 25.6. The order in which files are loaded
8407 8421
8408 25.6.1. The order in bsd.prefs.mk 8422 25.6.1. The order in bsd.prefs.mk
8409 25.6.2. The order in bsd.pkg.mk 8423 25.6.2. The order in bsd.pkg.mk
8410 8424
841126. Regression tests 842526. Regression tests
8412 8426
8413 26.1. Running the regression tests 8427 26.1. Running the regression tests
8414 26.2. Adding a new regression test 8428 26.2. Adding a new regression test
8415 8429
8416 26.2.1. Overridable functions 8430 26.2.1. Overridable functions
8417 26.2.2. Helper functions 8431 26.2.2. Helper functions
8418 8432
841927. Porting pkgsrc 843327. Porting pkgsrc
8420 8434
8421 27.1. Porting pkgsrc to a new operating system 8435 27.1. Porting pkgsrc to a new operating system
8422 8436
8423Chapter 25. Design of the pkgsrc infrastructure 8437Chapter 25. Design of the pkgsrc infrastructure
@@ -8577,1821 +8591,1787 @@ assigned using the := operator, which sh @@ -8577,1821 +8591,1787 @@ assigned using the := operator, which sh
857725.5.2. Actions taken on behalf of parameters 859125.5.2. Actions taken on behalf of parameters
8578 8592
8579Action files take some input parameters and may define runtime variables. They 8593Action files take some input parameters and may define runtime variables. They
8580shall not define loadtime variables. There are action files that are included 8594shall not define loadtime variables. There are action files that are included
8581implicitly by the pkgsrc infrastructure, while other must be included 8595implicitly by the pkgsrc infrastructure, while other must be included
8582explicitly. 8596explicitly.
8583 8597
8584An example for action files is mk/subst.mk. 8598An example for action files is mk/subst.mk.
8585 8599
858625.6. The order in which files are loaded 860025.6. The order in which files are loaded
8587 8601
8588Package Makefiles usually consist of a set of variable definitions, and include 8602Package Makefiles usually consist of a set of variable definitions, and include
8589the file ../../mk/bsd.pkg.mk in the very last line. Before that, they may also 8603the file ../../mk/bsd.pkg.mk in the very last line. Before that, they may also
8590include various other *.mk files if they need to query the availability of 8604include various other *.mk files if they need to query the availability of
8591certain features like the type of compiler or the X11 implementation. Due to 8605certain features like the type of compiler or the X11 implementation. Due to
8592the heavy use of preprocessor directives like .if and .for, the order in which 8606the heavy use of preprocessor directives like .if and .for, the order in which
8593the files are loaded matters. 8607the files are loaded matters.
8594 8608
8595This section describes at which point the various files are loaded and gives 8609This section describes at which point the various files are loaded and gives
8596reasons for that order. 8610reasons for that order.
8597 8611
859825.6.1. The order in bsd.prefs.mk 861225.6.1. The order in bsd.prefs.mk
8599 8613
8600The very first action in bsd.prefs.mk is to define some essential variables 8614The very first action in bsd.prefs.mk is to define some essential variables
8601like OPSYS, OS_VERSION and MACHINE_ARCH. 8615like OPSYS, OS_VERSION and MACHINE_ARCH.
8602 8616
8603Then, the user settings are loaded from the file specified in MAKECONF, which 8617Then, the user settings are loaded from the file specified in MAKECONF, which
8604is usually mk.conf. After that, those variables that have not been overridden 8618is usually mk.conf. After that, those variables that have not been overridden
8605by the user are loaded from mk/defaults/mk.conf. 8619by the user are loaded from mk/defaults/mk.conf.
8606 8620
8607After the user settings, the system settings and platform settings are loaded, 8621After the user settings, the system settings and platform settings are loaded,
8608which may override the user settings. 8622which may override the user settings.
8609 8623
8610Then, the tool definitions are loaded. The tool wrappers are not yet in effect. 8624Then, the tool definitions are loaded. The tool wrappers are not yet in effect.
8611This only happens when building a package, so the proper variables must be used 8625This only happens when building a package, so the proper variables must be used
8612instead of the direct tool names. 8626instead of the direct tool names.
8613 8627
8614As the last steps, some essential variables from the wrapper and the package 8628As the last steps, some essential variables from the wrapper and the package
8615system flavor are loaded, as well as the variables that have been cached in 8629system flavor are loaded, as well as the variables that have been cached in
8616earlier phases of a package build. 8630earlier phases of a package build.
8617 8631
861825.6.2. The order in bsd.pkg.mk 863225.6.2. The order in bsd.pkg.mk
8619 8633
8620First, bsd.prefs.mk is loaded. 8634First, bsd.prefs.mk is loaded.
8621 8635
8622Then, the various *-vars.mk files are loaded, which fill default values for 8636Then, the various *-vars.mk files are loaded, which fill default values for
8623those variables that have not been defined by the package. These variables may 8637those variables that have not been defined by the package. These variables may
8624later be used even in unrelated files. 8638later be used even in unrelated files.
8625 8639
8626Then, the file bsd.pkg.error.mk provides the target error-check that is added 8640Then, the file bsd.pkg.error.mk provides the target error-check that is added
8627as a special dependency to all other targets that use DELAYED_ERROR_MSG or 8641as a special dependency to all other targets that use DELAYED_ERROR_MSG or
8628DELAYED_WARNING_MSG. 8642DELAYED_WARNING_MSG.
8629 8643
8630Then, the package-specific hacks from hacks.mk are included. 8644Then, the package-specific hacks from hacks.mk are included.
8631 8645
8632Then, various other files follow. Most of them don't have any dependencies on 8646Then, various other files follow. Most of them don't have any dependencies on
8633what they need to have included before or after them, though some do. 8647what they need to have included before or after them, though some do.
8634 8648
8635The code to check PKG_FAIL_REASON and PKG_SKIP_REASON is then executed, which 8649The code to check PKG_FAIL_REASON and PKG_SKIP_REASON is then executed, which
8636restricts the use of these variables to all the files that have been included 8650restricts the use of these variables to all the files that have been included
8637before. Appearances in later files will be silently ignored. 8651before. Appearances in later files will be silently ignored.
8638 8652
8639Then, the files for the main targets are included, in the order of later 8653Then, the files for the main targets are included, in the order of later
8640execution, though the actual order should not matter. 8654execution, though the actual order should not matter.
8641 8655
8642At last, some more files are included that don't set any interesting variables 8656At last, some more files are included that don't set any interesting variables
8643but rather just define make targets to be executed. 8657but rather just define make targets to be executed.
8644 8658
8645Chapter 26. Regression tests 8659Chapter 26. Regression tests
8646 8660
8647Table of Contents 8661Table of Contents
8648 8662
864926.1. Running the regression tests 866326.1. Running the regression tests
865026.2. Adding a new regression test 866426.2. Adding a new regression test
8651 8665
8652 26.2.1. Overridable functions 8666 26.2.1. Overridable functions
8653 26.2.2. Helper functions 8667 26.2.2. Helper functions
8654 8668
8655The pkgsrc infrastructure consists of a large codebase, and there are many 8669The pkgsrc infrastructure consists of a large codebase, and there are many
8656corners where every little bit of a file is well thought out, making pkgsrc 8670corners where every little bit of a file is well thought out, making pkgsrc
8657likely to fail as soon as anything is changed near those parts. To prevent most 8671likely to fail as soon as anything is changed near those parts. To prevent most
8658changes from breaking anything, a suite of regression tests should go along 8672changes from breaking anything, a suite of regression tests should go along
8659with every important part of the pkgsrc infrastructure. This chapter describes 8673with every important part of the pkgsrc infrastructure. This chapter describes
8660how regression tests work in pkgsrc and how you can add new tests. 8674how regression tests work in pkgsrc and how you can add new tests.
8661 8675
866226.1. Running the regression tests 867626.1. Running the regression tests
8663 8677
8664You first need to install the pkgtools/pkg_regress package, which provides the  8678You first need to install the pkgtools/pkg_regress package, which provides the
8665pkg_regress command. Then you can simply run that command, which will run all 8679pkg_regress command. Then you can simply run that command, which will run all
8666tests in the regress/ directory. 8680tests in the regress/ directory.
8667 8681
866826.2. Adding a new regression test 868226.2. Adding a new regression test
8669 8683
8670Every directory in the regress/ directory that contains a file called spec is 8684Every directory in the regress/ directory that contains a file called spec is
8671considered a regression test. This file is a shell program that is included by 8685considered a regression test. This file is a shell program that is included by
8672the pkg_regress command. The following functions can be overridden to suit your 8686the pkg_regress command. The following functions can be overridden to suit your
8673needs. 8687needs.
8674 8688
867526.2.1. Overridable functions 868926.2.1. Overridable functions
8676 8690
8677These functions do not take any parameters. Although they are called in "set -e 8691These functions do not take any parameters. Although they are called in "set -e
8678" mode, they don't stop at the first failing command. See this Stack Overflow 8692" mode, they don't stop at the first failing command. See this Stack Overflow
8679question for details. 8693question for details.
8680 8694
8681do_setup 8695do_setup
8682 8696
8683 This function prepares the environment for the test. By default it does 8697 This function prepares the environment for the test. By default it does
8684 nothing. 8698 nothing.
8685 8699
8686do_test 8700do_test
8687 8701
8688 This function runs the actual test. By default, it calls TEST_MAKE with the 8702 This function runs the actual test. By default, it calls TEST_MAKE with the
8689 arguments MAKEARGS_TEST and writes its output including error messages into 8703 arguments MAKEARGS_TEST and writes its output including error messages into
8690 the file TEST_OUTFILE. 8704 the file TEST_OUTFILE.
8691 8705
8692 When defining this function, make sure that all output that needs to be 8706 When defining this function, make sure that all output that needs to be
8693 checked is written to the correct output file. Example: 8707 checked is written to the correct output file. Example:
8694 8708
8695 do_test() { 8709 do_test() {
8696 echo "Example output" 8710 echo "Example output"
8697 } 1>$TEST_OUTFILE 2>&1 8711 } 1>$TEST_OUTFILE 2>&1
8698 8712
8699check_result 8713check_result
8700 8714
8701 This function is run after the test and is typically used to compare the 8715 This function is run after the test and is typically used to compare the
8702 actual output from the one that is expected. It can make use of the various 8716 actual output from the one that is expected. It can make use of the various
8703 helper functions from the next section. Example: 8717 helper functions from the next section. Example:
8704 8718
8705 check_result() { 8719 check_result() {
8706 exit_status 0 8720 exit_status 0
8707 output_require "Example" 8721 output_require "Example"
8708 output_require "^[[:alpha:]+[[:space:]][[:alpha:]]{6}$" 8722 output_require "^[[:alpha:]+[[:space:]][[:alpha:]]{6}$"
8709 output_prohibit "no such file or directory" 8723 output_prohibit "no such file or directory"
8710 regress_fail "expected $expected but got $actual for input $input" 8724 regress_fail "expected $expected but got $actual for input $input"
8711 } 8725 }
8712 8726
8713do_cleanup 8727do_cleanup
8714 8728
8715 This function cleans everything up after the test has been run. By default 8729 This function cleans everything up after the test has been run. By default
8716 it does nothing. 8730 it does nothing.
8717 8731
871826.2.2. Helper functions 873226.2.2. Helper functions
8719 8733
8720regress_fail message... 8734regress_fail message...
8721 8735
8722 This function makes the test fail with the given error message. 8736 This function makes the test fail with the given error message.
8723 8737
8724exit_status expected 8738exit_status expected
8725 8739
8726 This function compares the exitcode of the do_test function with its first 8740 This function compares the exitcode of the do_test function with its first
8727 parameter. If they differ, the test will fail. 8741 parameter. If they differ, the test will fail.
8728 8742
8729output_require regex... 8743output_require regex...
8730 8744
8731 This function checks for each of its parameters if the output from do_test 8745 This function checks for each of its parameters if the output from do_test
8732 matches the extended regular expression. If it does not, the test will 8746 matches the extended regular expression. If it does not, the test will
8733 fail. Example: 8747 fail. Example:
8734 8748
8735 output_require "looks fine" 8749 output_require "looks fine"
8736 output_require "^[[:alpha:]+[[:space:]][[:alpha:]]{6}$" 8750 output_require "^[[:alpha:]+[[:space:]][[:alpha:]]{6}$"
8737 8751
8738output_prohibit regex... 8752output_prohibit regex...
8739 8753
8740 This function checks for each of its parameters if the output from do_test 8754 This function checks for each of its parameters if the output from do_test
8741 () does not match the extended regular expression. If any of the regular 8755 () does not match the extended regular expression. If any of the regular
8742 expressions matches, the test will fail. 8756 expressions matches, the test will fail.
8743 8757
8744Chapter 27. Porting pkgsrc 8758Chapter 27. Porting pkgsrc
8745 8759
8746Table of Contents 8760Table of Contents
8747 8761
874827.1. Porting pkgsrc to a new operating system 876227.1. Porting pkgsrc to a new operating system
8749 8763
8750The pkgsrc system has already been ported to many operating systems, hardware 8764The pkgsrc system has already been ported to many operating systems, hardware
8751architectures and compilers. This chapter explains the necessary steps to make 8765architectures and compilers. This chapter explains the necessary steps to make
8752pkgsrc even more portable. 8766pkgsrc even more portable.
8753 8767
875427.1. Porting pkgsrc to a new operating system 876827.1. Porting pkgsrc to a new operating system
8755 8769
8756To port pkgsrc to a new operating system (called MyOS in this example), you 8770To port pkgsrc to a new operating system (called MyOS in this example), you
8757need to touch the following files: 8771need to touch the following files:
8758 8772
8759pkgtools/bootstrap-mk-files/files/mods/MyOS.sys.mk 8773pkgtools/bootstrap-mk-files/files/mods/MyOS.sys.mk
8760 8774
8761 This file contains some basic definitions, for example the name of the C 8775 This file contains some basic definitions, for example the name of the C
8762 compiler. 8776 compiler.
8763 8777
8764mk/bsd.prefs.mk 8778mk/bsd.prefs.mk
8765 8779
8766 Insert code that defines the variables OPSYS, OS_VERSION, OPSYS_VERSION, 8780 Insert code that defines the variables OPSYS, OS_VERSION, OPSYS_VERSION,
8767 LOWER_VENDOR, MACHINE_ARCH, OBJECT_FMT, APPEND_ELF, and the other variables 8781 LOWER_VENDOR, MACHINE_ARCH, OBJECT_FMT, APPEND_ELF, and the other variables
8768 that appear in this file. 8782 that appear in this file.
8769 8783
8770mk/platform/MyOS.mk 8784mk/platform/MyOS.mk
8771 8785
8772 This file contains the platform-specific definitions that are used by 8786 This file contains the platform-specific definitions that are used by
8773 pkgsrc. Start by copying one of the other files and edit it to your needs. 8787 pkgsrc. Start by copying one of the other files and edit it to your needs.
8774 8788
8775mk/tools/tools.MyOS.mk 8789mk/tools/tools.MyOS.mk
8776 8790
8777 This file defines the paths to all the tools that are needed by one or the 8791 This file defines the paths to all the tools that are needed by one or the
8778 other package in pkgsrc, as well as by pkgsrc itself. Find out where these 8792 other package in pkgsrc, as well as by pkgsrc itself. Find out where these
8779 tools are on your platform and add them. 8793 tools are on your platform and add them.
8780 8794
8781Now, you should be able to build some basic packages, like lang/perl5, shells/ 8795Now, you should be able to build some basic packages, like lang/perl5, shells/
8782bash. 8796bash.
8783 8797
8784Appendix A. A simple example package: bison 8798Appendix A. A simple example package: bison
8785 8799
8786Table of Contents 8800Table of Contents
8787 8801
8788A.1. files 8802A.1. files
8789 8803
8790 A.1.1. Makefile 8804 A.1.1. Makefile
8791 A.1.2. DESCR 8805 A.1.2. DESCR
8792 A.1.3. PLIST 8806 A.1.3. PLIST
8793 A.1.4. Checking a package with pkglint 8807 A.1.4. Checking a package with pkglint
8794 8808
8795A.2. Steps for building, installing, packaging 8809A.2. Steps for building, installing, packaging
8796 8810
8797We checked to find a piece of software that wasn't in the packages collection, 8811We checked to find a piece of software that wasn't in the packages collection,
8798and picked GNU bison. Quite why someone would want to have bison when Berkeley  8812and picked GNU bison. Quite why someone would want to have bison when Berkeley
8799yacc is already present in the tree is beyond us, but it's useful for the 8813yacc is already present in the tree is beyond us, but it's useful for the
8800purposes of this exercise. 8814purposes of this exercise.
8801 8815
8802A.1. files 8816A.1. files
8803 8817
8804A.1.1. Makefile 8818A.1.1. Makefile
8805 8819
8806# $NetBSD$ 8820# $NetBSD$
8807# 8821#
8808 8822
8809DISTNAME= bison-1.25 8823DISTNAME= bison-1.25
8810CATEGORIES= devel 8824CATEGORIES= devel
8811MASTER_SITES= ${MASTER_SITE_GNU:=bison/} 8825MASTER_SITES= ${MASTER_SITE_GNU:=bison/}
8812 8826
8813MAINTAINER= pkgsrc-users@NetBSD.org 8827MAINTAINER= pkgsrc-users@NetBSD.org
8814HOMEPAGE= https://www.gnu.org/software/bison/bison.html 8828HOMEPAGE= https://www.gnu.org/software/bison/bison.html
8815COMMENT= GNU yacc clone 8829COMMENT= GNU yacc clone
8816 8830
8817GNU_CONFIGURE= yes 8831GNU_CONFIGURE= yes
8818INFO_FILES= yes 8832INFO_FILES= yes
8819 8833
8820.include "../../mk/bsd.pkg.mk" 8834.include "../../mk/bsd.pkg.mk"
8821 8835
8822A.1.2. DESCR 8836A.1.2. DESCR
8823 8837
8824GNU version of yacc. Can make re-entrant parsers, and numerous other 8838GNU version of yacc. Can make re-entrant parsers, and numerous other
8825improvements. Why you would want this when Berkeley yacc(1) is part 8839improvements. Why you would want this when Berkeley yacc(1) is part
8826of the NetBSD source tree is beyond me. 8840of the NetBSD source tree is beyond me.
8827 8841
8828A.1.3. PLIST 8842A.1.3. PLIST
8829 8843
8830@comment $NetBSD$ 8844@comment $NetBSD$
8831bin/bison 8845bin/bison
8832man/man1/bison.1.gz 8846man/man1/bison.1.gz
8833share/bison.simple 8847share/bison.simple
8834share/bison.hairy 8848share/bison.hairy
8835 8849
8836A.1.4. Checking a package with pkglint 8850A.1.4. Checking a package with pkglint
8837 8851
8838The NetBSD package system comes with pkgtools/pkglint which helps to check the 8852The NetBSD package system comes with pkgtools/pkglint which helps to check the
8839contents of these files. After installation it is quite easy to use, just 8853contents of these files. After installation it is quite easy to use, just
8840change to the directory of the package you wish to examine and run pkglint: 8854change to the directory of the package you wish to examine and run pkglint:
8841 8855
8842$ pkglint 8856$ pkglint
8843ERROR: Makefile: Each package must define its LICENSE. 8857ERROR: Makefile: Each package must define its LICENSE.
8844WARN: Makefile:9: HOMEPAGE should migrate from http to https. 8858WARN: Makefile:9: HOMEPAGE should migrate from http to https.
8845NOTE: PLIST:3: The .gz extension is unnecessary for manual pages. 8859NOTE: PLIST:3: The .gz extension is unnecessary for manual pages.
8846WARN: PLIST:5: "share/bison.hairy" should be sorted before "share/bison.simple". 8860WARN: PLIST:5: "share/bison.hairy" should be sorted before "share/bison.simple".
88471 error, 2 warnings and 1 note found. 88611 error, 2 warnings and 1 note found.
8848(Run "pkglint -e" to show explanations.) 8862(Run "pkglint -e" to show explanations.)
8849(Run "pkglint -fs" to show what can be fixed automatically.) 8863(Run "pkglint -fs" to show what can be fixed automatically.)
8850(Run "pkglint -F" to automatically fix some issues.) 8864(Run "pkglint -F" to automatically fix some issues.)
8851 8865
8852Depending on the supplied command line arguments (see pkglint(1)), more checks 8866Depending on the supplied command line arguments (see pkglint(1)), more checks
8853will be performed. Use e.g. pkglint -Wall for a very thorough check. 8867will be performed. Use e.g. pkglint -Wall for a very thorough check.
8854 8868
8855A.2. Steps for building, installing, packaging 8869A.2. Steps for building, installing, packaging
8856 8870
8857Create the directory where the package lives, plus any auxiliary directories: 8871Create the directory where the package lives, plus any auxiliary directories:
8858 8872
8859# cd /usr/pkgsrc/lang 8873# cd /usr/pkgsrc/lang
8860# mkdir bison 8874# mkdir bison
8861# cd bison 8875# cd bison
8862# mkdir patches 8876# mkdir patches
8863 8877
8864Create Makefile, DESCR and PLIST (see Chapter 12, Package components - files, 8878Create Makefile, DESCR and PLIST (see Chapter 12, Package components - files,
8865directories and contents) then continue with fetching the distfile: 8879directories and contents) then continue with fetching the distfile:
8866 8880
8867# make fetch 8881# make fetch
8868>> bison-1.25.tar.gz doesn't seem to exist on this system. 8882>> bison-1.25.tar.gz doesn't seem to exist on this system.
8869>> Attempting to fetch from ftp://prep.ai.mit.edu/pub/gnu//. 8883>> Attempting to fetch from ftp://prep.ai.mit.edu/pub/gnu//.
8870Requesting ftp://prep.ai.mit.edu/pub/gnu//bison-1.25.tar.gz (via ftp://orpheus.amdahl.com:80/) 8884Requesting ftp://prep.ai.mit.edu/pub/gnu//bison-1.25.tar.gz (via ftp://orpheus.amdahl.com:80/)
8871ftp: Error retrieving file: 500 Internal error 8885ftp: Error retrieving file: 500 Internal error
8872 8886
8873>> Attempting to fetch from ftp://wuarchive.wustl.edu/systems/gnu//. 8887>> Attempting to fetch from ftp://wuarchive.wustl.edu/systems/gnu//.
8874Requesting ftp://wuarchive.wustl.edu/systems/gnu//bison-1.25.tar.gz (via ftp://orpheus.amdahl.com:80/) 8888Requesting ftp://wuarchive.wustl.edu/systems/gnu//bison-1.25.tar.gz (via ftp://orpheus.amdahl.com:80/)
8875ftp: Error retrieving file: 500 Internal error 8889ftp: Error retrieving file: 500 Internal error
8876 8890
8877>> Attempting to fetch from ftp://ftp.freebsd.org/pub/FreeBSD/distfiles//. 8891>> Attempting to fetch from ftp://ftp.freebsd.org/pub/FreeBSD/distfiles//.
8878Requesting ftp://ftp.freebsd.org/pub/FreeBSD/distfiles//bison-1.25.tar.gz (via ftp://orpheus.amdahl.com:80/) 8892Requesting ftp://ftp.freebsd.org/pub/FreeBSD/distfiles//bison-1.25.tar.gz (via ftp://orpheus.amdahl.com:80/)
8879Successfully retrieved file. 8893Successfully retrieved file.
8880 8894
8881Generate the checksum of the distfile into distinfo: 8895Generate the checksum of the distfile into distinfo:
8882 8896
8883# make makedistinfo 8897# make makedistinfo
8884 8898
8885Now compile: 8899Now compile:
8886 8900
8887# make 8901# make
8888>> Checksum OK for bison-1.25.tar.gz. 8902>> Checksum OK for bison-1.25.tar.gz.
8889===> Extracting for bison-1.25 8903===> Extracting for bison-1.25
8890===> Patching for bison-1.25 8904===> Patching for bison-1.25
8891===> Ignoring empty patch directory 8905===> Ignoring empty patch directory
8892===> Configuring for bison-1.25 8906===> Configuring for bison-1.25
8893creating cache ./config.cache 8907creating cache ./config.cache
8894checking for gcc... cc 8908checking for gcc... cc
8895checking whether we are using GNU C... yes 8909checking whether we are using GNU C... yes
8896checking for a BSD compatible install... /usr/bin/install -c -o bin -g bin 8910checking for a BSD compatible install... /usr/bin/install -c -o bin -g bin
8897checking how to run the C preprocessor... cc -E 8911checking how to run the C preprocessor... cc -E
8898checking for minix/config.h... no 8912checking for minix/config.h... no
8899checking for POSIXized ISC... no 8913checking for POSIXized ISC... no
8900checking whether cross-compiling... no 8914checking whether cross-compiling... no
8901checking for ANSI C header files... yes 8915checking for ANSI C header files... yes
8902checking for string.h... yes 8916checking for string.h... yes
8903checking for stdlib.h... yes 8917checking for stdlib.h... yes
8904checking for memory.h... yes 8918checking for memory.h... yes
8905checking for working const... yes 8919checking for working const... yes
8906checking for working alloca.h... no 8920checking for working alloca.h... no
8907checking for alloca... yes 8921checking for alloca... yes
8908checking for strerror... yes 8922checking for strerror... yes
8909updating cache ./config.cache 8923updating cache ./config.cache
8910creating ./config.status 8924creating ./config.status
8911creating Makefile 8925creating Makefile
8912===> Building for bison-1.25 8926===> Building for bison-1.25
8913cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g LR0.c 8927cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g LR0.c
8914cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g allocate.c 8928cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g allocate.c
8915cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g closure.c 8929cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g closure.c
8916cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g conflicts.c 8930cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g conflicts.c
8917cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g derives.c 8931cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g derives.c
8918cc -c -DXPFILE=\"/usr/pkg/share/bison.simple\" -DXPFILE1=\"/usr/pkg/share/bison.hairy\" -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -g ./files.c 8932cc -c -DXPFILE=\"/usr/pkg/share/bison.simple\" -DXPFILE1=\"/usr/pkg/share/bison.hairy\" -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -g ./files.c
8919cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g getargs.c 8933cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g getargs.c
8920cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g gram.c 8934cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g gram.c
8921cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g lalr.c 8935cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g lalr.c
8922cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g lex.c 8936cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g lex.c
8923cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g main.c 8937cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g main.c
8924cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g nullable.c 8938cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g nullable.c
8925cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g output.c 8939cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g output.c
8926cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g print.c 8940cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g print.c
8927cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g reader.c 8941cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g reader.c
8928cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g reduce.c 8942cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g reduce.c
8929cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g symtab.c 8943cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g symtab.c
8930cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g warshall.c 8944cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g warshall.c
8931cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g version.c 8945cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g version.c
8932cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g getopt.c 8946cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g getopt.c
8933cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g getopt1.c 8947cc -c -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRERROR=1 -I./../include -g getopt1.c
8934cc -g -o bison LR0.o allocate.o closure.o conflicts.o derives.o files.o getargs.o gram.o lalr.o lex.o main.o nullable.o output.o print.o reader.o reduce.o symtab.o warshall.o version.o getopt.o getopt1.o 8948cc -g -o bison LR0.o allocate.o closure.o conflicts.o derives.o files.o getargs.o gram.o lalr.o lex.o main.o nullable.o output.o print.o reader.o reduce.o symtab.o warshall.o version.o getopt.o getopt1.o
8935./files.c:240: warning: mktemp() possibly used unsafely, consider using mkstemp() 8949./files.c:240: warning: mktemp() possibly used unsafely, consider using mkstemp()
8936rm -f bison.s1 8950rm -f bison.s1
8937sed -e "/^#line/ s|bison|/usr/pkg/share/bison|" < ./bison.simple > bison.s1 8951sed -e "/^#line/ s|bison|/usr/pkg/share/bison|" < ./bison.simple > bison.s1
8938 8952
8939Everything seems OK, so install the files: 8953Everything seems OK, so install the files:
8940 8954
8941# make install 8955# make install
8942>> Checksum OK for bison-1.25.tar.gz. 8956>> Checksum OK for bison-1.25.tar.gz.
8943===> Installing for bison-1.25 8957===> Installing for bison-1.25
8944sh ./mkinstalldirs /usr/pkg/bin /usr/pkg/share /usr/pkg/info /usr/pkg/man/man1 8958sh ./mkinstalldirs /usr/pkg/bin /usr/pkg/share /usr/pkg/info /usr/pkg/man/man1
8945rm -f /usr/pkg/bin/bison 8959rm -f /usr/pkg/bin/bison
8946cd /usr/pkg/share; rm -f bison.simple bison.hairy 8960cd /usr/pkg/share; rm -f bison.simple bison.hairy
8947rm -f /usr/pkg/man/man1/bison.1 /usr/pkg/info/bison.info* 8961rm -f /usr/pkg/man/man1/bison.1 /usr/pkg/info/bison.info*
8948install -c -o bin -g bin -m 555 bison /usr/pkg/bin/bison 8962install -c -o bin -g bin -m 555 bison /usr/pkg/bin/bison
8949/usr/bin/install -c -o bin -g bin -m 644 bison.s1 /usr/pkg/share/bison.simple 8963/usr/bin/install -c -o bin -g bin -m 644 bison.s1 /usr/pkg/share/bison.simple
8950/usr/bin/install -c -o bin -g bin -m 644 ./bison.hairy /usr/pkg/share/bison.hairy 8964/usr/bin/install -c -o bin -g bin -m 644 ./bison.hairy /usr/pkg/share/bison.hairy
8951cd .; for f in bison.info*; do /usr/bin/install -c -o bin -g bin -m 644 $f /usr/pkg/info/$f; done 8965cd .; for f in bison.info*; do /usr/bin/install -c -o bin -g bin -m 644 $f /usr/pkg/info/$f; done
8952/usr/bin/install -c -o bin -g bin -m 644 ./bison.1 /usr/pkg/man/man1/bison.1 8966/usr/bin/install -c -o bin -g bin -m 644 ./bison.1 /usr/pkg/man/man1/bison.1
8953===> Registering installation for bison-1.25 8967===> Registering installation for bison-1.25
8954 8968
8955You can now use bison, and also - if you decide so - remove it with pkg_delete 8969You can now use bison, and also - if you decide so - remove it with pkg_delete
8956bison. Should you decide that you want a binary package, do this now: 8970bison. Should you decide that you want a binary package, do this now:
8957 8971
8958# make package 8972# make package
8959>> Checksum OK for bison-1.25.tar.gz. 8973>> Checksum OK for bison-1.25.tar.gz.
8960===> Building package for bison-1.25 8974===> Building package for bison-1.25
8961Creating package bison-1.25.tgz 8975Creating package bison-1.25.tgz
8962Registering depends:. 8976Registering depends:.
8963Creating gzip'd tar ball in '/u/pkgsrc/lang/bison/bison-1.25.tgz' 8977Creating gzip'd tar ball in '/u/pkgsrc/lang/bison/bison-1.25.tgz'
8964 8978
8965Now that you don't need the source and object files any more, clean up: 8979Now that you don't need the source and object files any more, clean up:
8966 8980
8967# make clean 8981# make clean
8968===> Cleaning for bison-1.25 8982===> Cleaning for bison-1.25
8969 8983
8970Appendix B. Security hardening 8984Appendix B. Security hardening
8971 8985
8972Table of Contents 8986Table of Contents
8973 8987
8974B.1. Mechanisms 8988B.1. Mechanisms
8975 8989
8976 B.1.1. Enabled by default 8990 B.1.1. Enabled by default
8977 B.1.2. Not enabled by default 8991 B.1.2. Not enabled by default
8978 8992
8979B.2. Caveats 8993B.2. Caveats
8980 8994
8981 B.2.1. Problems with PKGSRC_MKPIE 8995 B.2.1. Problems with PKGSRC_MKPIE
8982 B.2.2. Problems with PKGSRC_USE_FORTIFY 8996 B.2.2. Problems with PKGSRC_USE_FORTIFY
8983 B.2.3. Problems with PKGSRC_USE_RELRO 8997 B.2.3. Problems with PKGSRC_USE_RELRO
8984 B.2.4. Problems with PKGSRC_USE_SSP 8998 B.2.4. Problems with PKGSRC_USE_SSP
8985 8999
8986B.3. Auditing the system 9000B.3. Auditing the system
8987 9001
8988 B.3.1. Checking for PIE 9002 B.3.1. Checking for PIE
8989 B.3.2. Checking for partial RELRO 9003 B.3.2. Checking for partial RELRO
8990 B.3.3. Checking for full RELRO 9004 B.3.3. Checking for full RELRO
8991 B.3.4. Checking for SSP 9005 B.3.4. Checking for SSP
8992 9006
8993A number of mechanisms are available in pkgsrc to improve the security of the 9007A number of mechanisms are available in pkgsrc to improve the security of the
8994resulting system. This page describes the mechanisms, and gives hints about 9008resulting system. This page describes the mechanisms, and gives hints about
8995detecting and fixing problems. 9009detecting and fixing problems.
8996 9010
8997Mechanisms can be enabled individually in mk.conf, and are individually 9011Mechanisms can be enabled individually in mk.conf, and are individually
8998described below. 9012described below.
8999 9013
9000Typically, a feature will cause some programs to fail to build or work when 9014Typically, a feature will cause some programs to fail to build or work when
9001first enabled. This can be due to latent problems in the program, and can be 9015first enabled. This can be due to latent problems in the program, and can be
9002due to other reasons. After enough testing to have confidence that user 9016due to other reasons. After enough testing to have confidence that user
9003problems will be quite rare, individual mechanisms will be enabled by default. 9017problems will be quite rare, individual mechanisms will be enabled by default.
9004 9018
9005For each mechanism, see the Caveats section below for an explanation of what 9019For each mechanism, see the Caveats section below for an explanation of what
9006might go wrong at compile time and at run time, and how to notice and address 9020might go wrong at compile time and at run time, and how to notice and address
9007these problems. 9021these problems.
9008 9022
9009B.1. Mechanisms 9023B.1. Mechanisms
9010 9024
9011B.1.1. Enabled by default 9025B.1.1. Enabled by default
9012 9026
9013B.1.1.1. PKGSRC_USE_FORTIFY 9027B.1.1.1. PKGSRC_USE_FORTIFY
9014 9028
9015This allows substitute wrappers to be used for some commonly used library 9029This allows substitute wrappers to be used for some commonly used library
9016functions that do not have built-in bounds checking - but could in some cases. 9030functions that do not have built-in bounds checking - but could in some cases.
9017 9031
9018Two mitigation levels are available: 9032Two mitigation levels are available:
9019 9033
9020 * "weak" only enables checks at compile-time. 9034 * "weak" only enables checks at compile-time.
9021 9035
9022 * "strong" enables checks at compile-time and runtime. 9036 * "strong" enables checks at compile-time and runtime.
9023 9037
9024"strong" has been enabled by default since pkgsrc-2017Q3. 9038"strong" has been enabled by default since pkgsrc-2017Q3.
9025 9039
9026B.1.1.2. PKGSRC_USE_SSP 9040B.1.1.2. PKGSRC_USE_SSP
9027 9041
9028This enables a stack-smashing protection mitigation. It is done by adding a 9042This enables a stack-smashing protection mitigation. It is done by adding a
9029guard variable to functions with vulnerable objects. The guards are initialized 9043guard variable to functions with vulnerable objects. The guards are initialized
9030when a function is entered and then checked when the function exits. The guard 9044when a function is entered and then checked when the function exits. The guard
9031check will fail and the program forcibly exited if the variable was modified in 9045check will fail and the program forcibly exited if the variable was modified in
9032the meantime. This can happen in case of buffer overflows or memory corruption, 9046the meantime. This can happen in case of buffer overflows or memory corruption,
9033and therefore exposing these bugs. 9047and therefore exposing these bugs.
9034 9048
9035Different mitigation levels are available: 9049Different mitigation levels are available:
9036 9050
9037 * "yes", which will only protect functions considered vulnerable by the 9051 * "yes", which will only protect functions considered vulnerable by the
9038 compiler; 9052 compiler;
9039 9053
9040 * "all", which will protect every function; 9054 * "all", which will protect every function;
9041 9055
9042 * "strong", the default, which will apply a better balance between the two 9056 * "strong", the default, which will apply a better balance between the two
9043 settings above. 9057 settings above.
9044 9058
9045This mitigation is supported by both GCC and clang. It may be supported in 9059This mitigation is supported by both GCC and clang. It may be supported in
9046additional compilers, possibly under a different name. It is particularly 9060additional compilers, possibly under a different name. It is particularly
9047useful for unsafe programming languages, such as C/C++. 9061useful for unsafe programming languages, such as C/C++.
9048 9062
9049 * "yes" is enabled by default where known supported since pkgsrc-2017Q3. 9063 * "yes" is enabled by default where known supported since pkgsrc-2017Q3.
9050 9064
9051 * "strong" is enabled by default where known supported since pkgsrc-2021Q4. 9065 * "strong" is enabled by default where known supported since pkgsrc-2021Q4.
9052 9066
9053More details can be found here: 9067More details can be found here:
9054 9068
9055 * Buffer overflow protection on Wikipedia 9069 * Buffer overflow protection on Wikipedia
9056 9070
9057B.1.1.3. PKGSRC_MKPIE 9071B.1.1.3. PKGSRC_MKPIE
9058 9072
9059This requests the creation of PIE (Position Independent Executables) for all 9073This requests the creation of PIE (Position Independent Executables) for all
9060executables. The PIE mechanism is normally used for shared libraries, so that 9074executables. The PIE mechanism is normally used for shared libraries, so that
9061they can be loaded at differing addresses at runtime. PIE itself does not have 9075they can be loaded at differing addresses at runtime. PIE itself does not have
9062useful security properties; however, it is necessary to fully leverage some, 9076useful security properties; however, it is necessary to fully leverage some,
9063such as ASLR. Some operating systems support Address Space Layout Randomization 9077such as ASLR. Some operating systems support Address Space Layout Randomization
9064(ASLR), which causes different addresses to be used each time a program is run. 9078(ASLR), which causes different addresses to be used each time a program is run.
9065This makes it more difficult for an attacker to guess addresses and thus makes 9079This makes it more difficult for an attacker to guess addresses and thus makes
9066exploits harder to construct. With PIE, ASLR can really be applied to the 9080exploits harder to construct. With PIE, ASLR can really be applied to the
9067entire program, instead of the stack and heap only. 9081entire program, instead of the stack and heap only.
9068 9082
9069PIE executables will only be built for toolchains that are known to support 9083PIE executables will only be built for toolchains that are known to support
9070PIE. Currently, this means NetBSD on x86, ARM, SPARC64, m68k, and MIPS. 9084PIE. Currently, this means NetBSD on x86, ARM, SPARC64, m68k, and MIPS.
9071 9085
9072PKGSRC_MKPIE was enabled by default after the pkgsrc-2021Q3 branch. 9086PKGSRC_MKPIE was enabled by default after the pkgsrc-2021Q3 branch.
9073 9087
9074B.1.1.4. PKGSRC_USE_RELRO 9088B.1.1.4. PKGSRC_USE_RELRO
9075 9089
9076This also makes the exploitation of some security vulnerabilities more 9090This also makes the exploitation of some security vulnerabilities more
9077difficult in some cases. 9091difficult in some cases.
9078 9092
9079Two different mitigation levels are available: 9093Two different mitigation levels are available:
9080 9094
9081 * partial (the default): the ELF sections are reordered so that internal data 9095 * partial (the default): the ELF sections are reordered so that internal data
9082 sections precede the program's own data sections, and non-PLT GOT is 9096 sections precede the program's own data sections, and non-PLT GOT is
9083 read-only; 9097 read-only;
9084 9098
9085 * full: in addition to partial RELRO, every relocation is performed 9099 * full: in addition to partial RELRO, every relocation is performed
9086 immediately when starting the program, allowing the entire GOT to be 9100 immediately when starting the program, allowing the entire GOT to be
9087 read-only. This can greatly slow down startup of large programs. 9101 read-only. This can greatly slow down startup of large programs.
9088 9102
9089This is currently supported by GCC. Many software distributions now enable this 9103This is currently supported by GCC. Many software distributions now enable this
9090feature by default, at the "partial" level. 9104feature by default, at the "partial" level.
9091 9105
9092More details can be found here: 9106More details can be found here:
9093 9107
9094 * Hardening ELF binaries using Relocation Read-Only (RELRO) 9108 * Hardening ELF binaries using Relocation Read-Only (RELRO)
9095 9109
9096B.1.2. Not enabled by default 9110B.1.2. Not enabled by default
9097 9111
9098B.1.2.1. PKGSRC_MKREPRO 9112B.1.2.1. PKGSRC_MKREPRO
9099 9113
9100With this option, pkgsrc will try to build packages reproducibly. This allows 9114With this option, pkgsrc will try to build packages reproducibly. This allows
9101packages built from the same tree and with the same options, to produce 9115packages built from the same tree and with the same options, to produce
9102identical results bit by bit. This option should be combined with ASLR and 9116identical results bit by bit. This option should be combined with ASLR and
9103PKGSRC_MKPIE to avoid predictable address offsets for attackers attempting to 9117PKGSRC_MKPIE to avoid predictable address offsets for attackers attempting to
9104exploit security vulnerabilities. 9118exploit security vulnerabilities.
9105 9119
9106More details can be found here: 9120More details can be found here:
9107 9121
9108 * Reproducible Builds - a set of software development practices that create 9122 * Reproducible Builds - a set of software development practices that create
9109 an independently-verifiable path from source to binary code 9123 an independently-verifiable path from source to binary code
9110 9124
9111More work likely needs to be done before pkgsrc is fully reproducible. 9125More work likely needs to be done before pkgsrc is fully reproducible.
9112 9126
9113B.1.2.2. PKGSRC_USE_STACK_CHECK 9127B.1.2.2. PKGSRC_USE_STACK_CHECK
9114 9128
9115This uses -fstack-check with GCC for another stack protection mitigation. 9129This uses -fstack-check with GCC for another stack protection mitigation.
9116 9130
9117It asks the compiler to generate code verifying that it does not corrupt the 9131It asks the compiler to generate code verifying that it does not corrupt the
9118stack. According to GCC's manual page, this is really only useful for 9132stack. According to GCC's manual page, this is really only useful for
9119multi-threaded programs. 9133multi-threaded programs.
9120 9134
9121B.2. Caveats 9135B.2. Caveats
9122 9136
9123B.2.1. Problems with PKGSRC_MKPIE 9137B.2.1. Problems with PKGSRC_MKPIE
9124 9138
9125B.2.1.1. Packages failing to build 9139B.2.1.1. Packages failing to build
9126 9140
9127A number of packages may fail to build with this option enabled. The failures 9141A number of packages may fail to build with this option enabled. The failures
9128are often related to the absence of the -fPIC compilation flag when building 9142are often related to the absence of the -fPIC compilation flag when building
9129libraries or executables (or ideally -fPIE in the latter case). This flag is 9143libraries or executables (or ideally -fPIE in the latter case). This flag is
9130added to the CFLAGS already, but requires the package to actually support it. 9144added to the CFLAGS already, but requires the package to actually support it.
9131 9145
9132B.2.1.1.1. How to fix 9146B.2.1.1.1. How to fix
9133 9147
9134These instructions are meant as a reference only; they likely need to be 9148These instructions are meant as a reference only; they likely need to be
9135adapted for many packages individually. 9149adapted for many packages individually.
9136 9150
9137For packages using Makefiles: 9151For packages using Makefiles:
9138 9152
9139MAKE_FLAGS+= CFLAGS=${CFLAGS:Q} 9153MAKE_FLAGS+= CFLAGS=${CFLAGS:Q}
9140MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q} 9154MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q}
9141 9155
9142For packages using Imakefiles: 9156For packages using Imakefiles:
9143 9157
9144MAKE_FLAGS+= CCOPTIONS=${CFLAGS:Q} 9158MAKE_FLAGS+= CCOPTIONS=${CFLAGS:Q}
9145MAKE_FLAGS+= LOCAL_LDFLAGS=${LDFLAGS:Q} 9159MAKE_FLAGS+= LOCAL_LDFLAGS=${LDFLAGS:Q}
9146 9160
9147B.2.1.2. Run-time crashes 9161B.2.1.2. Run-time crashes
9148 9162
9149Some programs may fail to run, or crash at random times once built as PIE. Two 9163Some programs may fail to run, or crash at random times once built as PIE. Two
9150scenarios are essentially possible. This is nearly always due to a bug in the 9164scenarios are essentially possible. This is nearly always due to a bug in the
9151program being exposed due to ASLR. 9165program being exposed due to ASLR.
9152 9166
9153B.2.1.3. Disabling PKGSRC_MKPIE on a per-package basis 9167B.2.1.3. Disabling PKGSRC_MKPIE on a per-package basis
9154 9168
9155Ideally, packages should be fixed for compatibility with MKPIE. However, in 9169Ideally, packages should be fixed for compatibility with MKPIE. However, in
9156some cases this is very difficult, due to complex build systems, packages using 9170some cases this is very difficult, due to complex build systems, packages using
9157non-standard toolchains, or programming languages with odd bootstrapping 9171non-standard toolchains, or programming languages with odd bootstrapping
9158mechanisms. 9172mechanisms.
9159 9173
9160To disable PKGSRC_MKPIE on a per-package basis, set MKPIE_SUPPORTED= no in the 9174To disable PKGSRC_MKPIE on a per-package basis, set MKPIE_SUPPORTED= no in the
9161package's Makefile before bsd.prefs.mk is included. 9175package's Makefile before bsd.prefs.mk is included.
9162 9176
9163B.2.2. Problems with PKGSRC_USE_FORTIFY 9177B.2.2. Problems with PKGSRC_USE_FORTIFY
9164 9178
9165B.2.2.1. Packages failing to build 9179B.2.2.1. Packages failing to build
9166 9180
9167This feature makes use of pre-processing directives to look for hardened, 9181This feature makes use of pre-processing directives to look for hardened,
9168alternative implementations of essential library calls. Some programs may fail 9182alternative implementations of essential library calls. Some programs may fail
9169to build as a result; this usually happens for those trying too hard to be 9183to build as a result; this usually happens for those trying too hard to be
9170portable, or otherwise abusing definitions in the standard library. 9184portable, or otherwise abusing definitions in the standard library.
9171 9185
9172B.2.2.2. Run-time crashes 9186B.2.2.2. Run-time crashes
9173 9187
9174This feature may cause some programs to crash, usually indicating an actual bug 9188This feature may cause some programs to crash, usually indicating an actual bug
9175in the program. The fix will typically involve patching the original program's 9189in the program. The fix will typically involve patching the original program's
9176source code. 9190source code.
9177 9191
9178B.2.2.3. Optimization is required 9192B.2.2.3. Optimization is required
9179 9193
9180At least in the case of GCC, FORTIFY will only be applied if optimization is 9194At least in the case of GCC, FORTIFY will only be applied if optimization is
9181applied while compiling. This means that the CFLAGS should also contain -O, -O2 9195applied while compiling. This means that the CFLAGS should also contain -O, -O2
9182or another optimization level. This cannot easily be applied globally, as some 9196or another optimization level. This cannot easily be applied globally, as some
9183packages may require specific optimization levels. 9197packages may require specific optimization levels.
9184 9198
9185B.2.2.4. Disabling FORTIFY on a per-package basis 9199B.2.2.4. Disabling FORTIFY on a per-package basis
9186 9200
9187Note 9201Note
9188 9202
9189FORTIFY should not be disabled to work around runtime crashes in the program! 9203FORTIFY should not be disabled to work around runtime crashes in the program!
9190This is a very bad idea and will expose you to security vulnerabilities. 9204This is a very bad idea and will expose you to security vulnerabilities.
9191 9205
9192To disable FORTIFY on a per-package basis, set the following in the package's 9206To disable FORTIFY on a per-package basis, set the following in the package's
9193Makefile before bsd.prefs.mk is included: 9207Makefile before bsd.prefs.mk is included:
9194 9208
9195FORTIFY_SUPPORTED= no 9209FORTIFY_SUPPORTED= no
9196 9210
9197B.2.3. Problems with PKGSRC_USE_RELRO 9211B.2.3. Problems with PKGSRC_USE_RELRO
9198 9212
9199B.2.3.1. Performance impact 9213B.2.3.1. Performance impact
9200 9214
9201For better protection, full RELRO requires every symbol to be resolved when the 9215For better protection, full RELRO requires every symbol to be resolved when the
9202program starts, rather than simply when required at run-time. This will have 9216program starts, rather than simply when required at run-time. This will have
9203more impact on programs using a lot of symbols, or linked to libraries exposing 9217more impact on programs using a lot of symbols, or linked to libraries exposing
9204a lot of symbols. Therefore, daemons or programs otherwise running in 9218a lot of symbols. Therefore, daemons or programs otherwise running in
9205background are affected only when started. Programs loading plug-ins at 9219background are affected only when started. Programs loading plug-ins at
9206run-time are affected when loading the plug-ins. 9220run-time are affected when loading the plug-ins.
9207 9221
9208The impact is not expected to be noticeable on modern hardware, except in some 9222The impact is not expected to be noticeable on modern hardware, except in some
9209cases for big programs. 9223cases for big programs.
9210 9224
9211B.2.3.2. Run-time crashes 9225B.2.3.2. Run-time crashes
9212 9226
9213Some programs handle plug-ins and dependencies in a way that conflicts with 9227Some programs handle plug-ins and dependencies in a way that conflicts with
9214RELRO: for instance, with an initialization routine listing any other plug-in 9228RELRO: for instance, with an initialization routine listing any other plug-in
9215required. With full RELRO, the missing symbols are resolved before the 9229required. With full RELRO, the missing symbols are resolved before the
9216initialization routine can run, and the dynamic loader will not be able to find 9230initialization routine can run, and the dynamic loader will not be able to find
9217them directly and abort as a result. Unfortunately, this is how Xorg loads its 9231them directly and abort as a result. Unfortunately, this is how Xorg loads its
9218drivers. Partial RELRO can be applied instead in this case. 9232drivers. Partial RELRO can be applied instead in this case.
9219 9233
9220B.2.3.3. Disabling RELRO on a per-package basis 9234B.2.3.3. Disabling RELRO on a per-package basis
9221 9235
9222To disable RELRO on a per-package basis, set the following in the package's 9236To disable RELRO on a per-package basis, set the following in the package's
9223Makefile before bsd.prefs.mk is included: 9237Makefile before bsd.prefs.mk is included:
9224 9238
9225RELRO_SUPPORTED= no 9239RELRO_SUPPORTED= no
9226 9240
9227It is also possible to at most enable partial RELRO, by setting RELRO_SUPPORTED 9241It is also possible to at most enable partial RELRO, by setting RELRO_SUPPORTED
9228to partial. 9242to partial.
9229 9243
9230B.2.4. Problems with PKGSRC_USE_SSP 9244B.2.4. Problems with PKGSRC_USE_SSP
9231 9245
9232B.2.4.1. Packages failing to build 9246B.2.4.1. Packages failing to build
9233 9247
9234The stack-smashing protection provided by this option does not work for some 9248The stack-smashing protection provided by this option does not work for some
9235programs. The most common situation in which this happens is when the program 9249programs. The most common situation in which this happens is when the program
9236allocates variables on the stack, with the size determined at run-time. 9250allocates variables on the stack, with the size determined at run-time.
9237 9251
9238B.2.4.2. Run-time crashes 9252B.2.4.2. Run-time crashes
9239 9253
9240Again, this feature may cause some programs to crash via a SIGABRT, usually 9254Again, this feature may cause some programs to crash via a SIGABRT, usually
9241indicating an actual bug in the program. 9255indicating an actual bug in the program.
9242 9256
9243On NetBSD LOG_CRIT level syslog messages are sent and - by default - appended 9257On NetBSD LOG_CRIT level syslog messages are sent and - by default - appended
9244to /var/log/messages, e.g.: 9258to /var/log/messages, e.g.:
9245 9259
9246Jan 6 15:42:51 hostname -: hostname program - - - buffer overflow detected; terminated 9260Jan 6 15:42:51 hostname -: hostname program - - - buffer overflow detected; terminated
9247 9261
9248(where hostname is the hostname(1) and program is the basename(1) of the 9262(where hostname is the hostname(1) and program is the basename(1) of the
9249program crashed). 9263program crashed).
9250 9264
9251Patching the original program is then required. 9265Patching the original program is then required.
9252 9266
9253Rebuilding the package via: 9267Rebuilding the package via:
9254 9268
9255% env CFLAGS=-g INSTALL_UNSTRIPPED=yes make replace 9269% env CFLAGS=-g INSTALL_UNSTRIPPED=yes make replace
9256 9270
9257and inspecting the backtrace of the coredump via the debugger should point out 9271and inspecting the backtrace of the coredump via the debugger should point out
9258the problematic call by inspecting the frame calling the _chk() (SSP) function. 9272the problematic call by inspecting the frame calling the _chk() (SSP) function.
9259 9273
9260B.2.4.3. Performance impact 9274B.2.4.3. Performance impact
9261 9275
9262The compiler emits extra code when using this feature: a check for buffer 9276The compiler emits extra code when using this feature: a check for buffer
9263overflows is performed when entering and exiting functions, requiring an extra 9277overflows is performed when entering and exiting functions, requiring an extra
9264variable on the stack. The level of protection can otherwise be adjusted to 9278variable on the stack. The level of protection can otherwise be adjusted to
9265affect only those functions considered more sensitive by the compiler (with 9279affect only those functions considered more sensitive by the compiler (with
9266-fstack-protector instead of -fstack-protector-all). 9280-fstack-protector instead of -fstack-protector-all).
9267 9281
9268The impact is not expected to be noticeable on modern hardware. However, 9282The impact is not expected to be noticeable on modern hardware. However,
9269programs with a hard requirement to run at the fastest possible speed should 9283programs with a hard requirement to run at the fastest possible speed should
9270avoid using this feature, or using libraries built with this feature. 9284avoid using this feature, or using libraries built with this feature.
9271 9285
9272B.2.4.4. Disabling SSP on a per-package basis 9286B.2.4.4. Disabling SSP on a per-package basis
9273 9287
9274Note 9288Note
9275 9289
9276SSP should not be disabled to work around runtime crashes in the program! This 9290SSP should not be disabled to work around runtime crashes in the program! This
9277is a very bad idea and will expose you to security vulnerabilities. 9291is a very bad idea and will expose you to security vulnerabilities.
9278 9292
9279To disable SSP on a per-package basis, set the following in the package's 9293To disable SSP on a per-package basis, set the following in the package's
9280Makefile before bsd.prefs.mk is included: 9294Makefile before bsd.prefs.mk is included:
9281 9295
9282SSP_SUPPORTED= no 9296SSP_SUPPORTED= no
9283 9297
9284B.3. Auditing the system 9298B.3. Auditing the system
9285 9299
9286The illusion of security is worse than having no security at all. This section 9300The illusion of security is worse than having no security at all. This section
9287lists a number of ways to ensure the security features requested are actually 9301lists a number of ways to ensure the security features requested are actually
9288effective. 9302effective.
9289 9303
9290These instructions were obtained and tested on a system derived from NetBSD 7 9304These instructions were obtained and tested on a system derived from NetBSD 7
9291(amd64). YMMV. 9305(amd64). YMMV.
9292 9306
9293B.3.1. Checking for PIE 9307B.3.1. Checking for PIE
9294 9308
9295The ELF executable type in use changes for binaries built as PIE; without: 9309The ELF executable type in use changes for binaries built as PIE; without:
9296 9310
9297$ file /path/to/bin/ary 9311$ file /path/to/bin/ary
9298/path/to/bin/ary: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for NetBSD 7.0, not stripped 9312/path/to/bin/ary: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for NetBSD 7.0, not stripped
9299 9313
9300as opposed to the following binary, built as PIE: 9314as opposed to the following binary, built as PIE:
9301 9315
9302$ file /path/to/pie/bin/ary 9316$ file /path/to/pie/bin/ary
9303/path/to/pie/bin/ary: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for NetBSD 7.0, not stripped 9317/path/to/pie/bin/ary: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for NetBSD 7.0, not stripped
9304 9318
9305The latter result is then what is expected. 9319The latter result is then what is expected.
9306 9320
9307B.3.2. Checking for partial RELRO 9321B.3.2. Checking for partial RELRO
9308 9322
9309The following command should list a section called RELRO: 9323The following command should list a section called RELRO:
9310 9324
9311$ objdump -p /path/to/bin/ary 9325$ objdump -p /path/to/bin/ary
9312 9326
9313/path/to/bin/ary: file format elf64-x86-64 9327/path/to/bin/ary: file format elf64-x86-64
9314 9328
9315Program Header: 9329Program Header:
9316[...] 9330[...]
9317 RELRO off 0x0000000000000d78 vaddr 0x0000000000600d78 paddr 0x0000000000600d78 align 2**0 9331 RELRO off 0x0000000000000d78 vaddr 0x0000000000600d78 paddr 0x0000000000600d78 align 2**0
9318 9332
9319This check is now performed automatically if PKG_DEVELOPER is set and RELRO is 9333This check is now performed automatically if PKG_DEVELOPER is set and RELRO is
9320enabled. 9334enabled.
9321 9335
9322B.3.3. Checking for full RELRO 9336B.3.3. Checking for full RELRO
9323 9337
9324The dynamic loader will apply RELRO immediately when detecting the presence of 9338The dynamic loader will apply RELRO immediately when detecting the presence of
9325the BIND_NOW flag: 9339the BIND_NOW flag:
9326 9340
9327$ objdump -x /path/to/bin/ary 9341$ objdump -x /path/to/bin/ary
9328 9342
9329/path/to/bin/ary: file format elf64-x86-64 9343/path/to/bin/ary: file format elf64-x86-64
9330 9344
9331Dynamic Section: 9345Dynamic Section:
9332[...] 9346[...]
9333 BIND_NOW 0x0000000000000000 9347 BIND_NOW 0x0000000000000000
9334 9348
9335This has to be combined with partial RELRO (see above) to be fully efficient. 9349This has to be combined with partial RELRO (see above) to be fully efficient.
9336 9350
9337This check is now performed automatically (where supported) if PKG_DEVELOPER is 9351This check is now performed automatically (where supported) if PKG_DEVELOPER is
9338set. 9352set.
9339 9353
9340B.3.4. Checking for SSP 9354B.3.4. Checking for SSP
9341 9355
9342Note 9356Note
9343 9357
9344Checking for SSP using this method only works where the operating system uses 9358Checking for SSP using this method only works where the operating system uses
9345libssp. libssp is not used on recent NetBSD/FreeBSD/Linux versions. 9359libssp. libssp is not used on recent NetBSD/FreeBSD/Linux versions.
9346 9360
9347Building objects, binaries and libraries with SSP will affect the presence of 9361Building objects, binaries and libraries with SSP will affect the presence of
9348additional symbols in the resulting file: 9362additional symbols in the resulting file:
9349 9363
9350$ nm /path/to/bin/ary 9364$ nm /path/to/bin/ary
9351[...] 9365[...]
9352 U __stack_chk_fail 9366 U __stack_chk_fail
93530000000000600ea0 B __stack_chk_guard 93670000000000600ea0 B __stack_chk_guard
9354 9368
9355This is an indicator that the program was indeed built with support for SSP. 9369This is an indicator that the program was indeed built with support for SSP.
9356 9370
9357This check is now performed automatically (where supported) if PKG_DEVELOPER is 9371This check is now performed automatically (where supported) if PKG_DEVELOPER is
9358set and SSP is enabled. 9372set and SSP is enabled.
9359 9373
9360Appendix C. Build logs 9374Appendix C. Build logs
9361 9375
9362Table of Contents 9376Table of Contents
9363 9377
9364C.1. Building figlet 9378C.1. Building figlet
9365C.2. Packaging figlet 9379C.2. Packaging figlet
9366 9380
9367C.1. Building figlet 9381C.1. Building figlet
9368 9382
9369# make 9383# make
9370===> Checking for vulnerabilities in figlet-2.2.1nb2 9384===> Checking for vulnerabilities in figlet-2.2.1nb2
9371=> figlet221.tar.gz doesn't seem to exist on this system. 9385=> figlet221.tar.gz doesn't seem to exist on this system.
9372=> Attempting to fetch figlet221.tar.gz from ftp://ftp.figlet.org/pub/figlet/program/unix/. 9386=> Attempting to fetch figlet221.tar.gz from ftp://ftp.figlet.org/pub/figlet/program/unix/.
9373=> [172219 bytes] 9387=> [172219 bytes]
9374Connected to ftp.plig.net. 9388Connected to ftp.plig.net.
9375220 ftp.plig.org NcFTPd Server (licensed copy) ready. 9389220 ftp.plig.org NcFTPd Server (licensed copy) ready.
9376331 Guest login ok, send your complete e-mail address as password. 9390331 Guest login ok, send your complete e-mail address as password.
9377230-You are user #5 of 500 simultaneous users allowed. 9391230-You are user #5 of 500 simultaneous users allowed.
9378230- 9392230-
9379230- ___ _ _ _ 9393230- ___ _ _ _
9380230- | _| |_ ___ ___| |_|___ ___ ___ ___ 9394230- | _| |_ ___ ___| |_|___ ___ ___ ___
9381230- | _| _| . |_| . | | | . |_| . | _| . | 9395230- | _| _| . |_| . | | | . |_| . | _| . |
9382230- |_| |_| | _|_| _|_|_|_ |_|___|_| |_ | 9396230- |_| |_| | _|_| _|_|_|_ |_|___|_| |_ |
9383230- |_| |_| |___| |___| 9397230- |_| |_| |___| |___|
9384230- 9398230-
9385230-** Welcome to ftp.plig.org ** 9399230-** Welcome to ftp.plig.org **
9386230- 9400230-
9387230-Please note that all transfers from this FTP site are logged. If you 9401230-Please note that all transfers from this FTP site are logged. If you
9388230-do not like this, please disconnect now. 9402230-do not like this, please disconnect now.
9389230- 9403230-
9390230-This archive is available via 9404230-This archive is available via
9391230- 9405230-
9392230-HTTP: http://ftp.plig.org/ 9406230-HTTP: http://ftp.plig.org/
9393230-FTP: ftp://ftp.plig.org/ (max 500 connections) 9407230-FTP: ftp://ftp.plig.org/ (max 500 connections)
9394230-RSYNC: rsync://ftp.plig.org/ (max 30 connections) 9408230-RSYNC: rsync://ftp.plig.org/ (max 30 connections)
9395230- 9409230-
9396230-Please email comments, bug reports and requests for packages to be 9410230-Please email comments, bug reports and requests for packages to be
9397230-mirrored to ftp-admin@plig.org. 9411230-mirrored to ftp-admin@plig.org.
9398230- 9412230-
9399230- 9413230-
9400230 Logged in anonymously. 9414230 Logged in anonymously.
9401Remote system type is UNIX. 9415Remote system type is UNIX.
9402Using binary mode to transfer files. 9416Using binary mode to transfer files.
9403200 Type okay. 9417200 Type okay.
9404250 "/pub" is new cwd. 9418250 "/pub" is new cwd.
9405250-"/pub/figlet" is new cwd. 9419250-"/pub/figlet" is new cwd.
9406250- 9420250-
9407250-Welcome to the figlet archive at ftp.figlet.org 9421250-Welcome to the figlet archive at ftp.figlet.org
9408250- 9422250-
9409250- ftp://ftp.figlet.org/pub/figlet/ 9423250- ftp://ftp.figlet.org/pub/figlet/
9410250- 9424250-
9411250-The official FIGlet web page is: 9425250-The official FIGlet web page is:
9412250- http://www.figlet.org/ 9426250- http://www.figlet.org/
9413250- 9427250-
9414250-If you have questions, please mailto:info@figlet.org. If you want to 9428250-If you have questions, please mailto:info@figlet.org. If you want to
9415250-contribute a font or something else, you can email us. 9429250-contribute a font or something else, you can email us.
9416250 9430250
9417250 "/pub/figlet/program" is new cwd. 9431250 "/pub/figlet/program" is new cwd.
9418250 "/pub/figlet/program/unix" is new cwd. 9432250 "/pub/figlet/program/unix" is new cwd.
9419local: figlet221.tar.gz remote: figlet221.tar.gz 9433local: figlet221.tar.gz remote: figlet221.tar.gz
9420502 Unimplemented command. 9434502 Unimplemented command.
9421227 Entering Passive Mode (195,40,6,41,246,104) 9435227 Entering Passive Mode (195,40,6,41,246,104)
9422150 Data connection accepted from 84.128.86.72:65131; transfer starting for figlet221.tar.gz (172219 bytes). 9436150 Data connection accepted from 84.128.86.72:65131; transfer starting for figlet221.tar.gz (172219 bytes).
942338% |************** | 65800 64.16 KB/s 00:01 ETA 943738% |************** | 65800 64.16 KB/s 00:01 ETA
9424226 Transfer completed. 9438226 Transfer completed.
9425172219 bytes received in 00:02 (75.99 KB/s) 9439172219 bytes received in 00:02 (75.99 KB/s)
9426221 Goodbye. 9440221 Goodbye.
9427=> Checksum OK for figlet221.tar.gz. 9441=> Checksum OK for figlet221.tar.gz.
9428===> Extracting for figlet-2.2.1nb2 9442===> Extracting for figlet-2.2.1nb2
9429===> Required installed package ccache-[0-9]*: ccache-2.3nb1 found 9443===> Required installed package ccache-[0-9]*: ccache-2.3nb1 found
9430===> Patching for figlet-2.2.1nb2 9444===> Patching for figlet-2.2.1nb2
9431===> Applying pkgsrc patches for figlet-2.2.1nb2 9445===> Applying pkgsrc patches for figlet-2.2.1nb2
9432===> Overriding tools for figlet-2.2.1nb2 9446===> Overriding tools for figlet-2.2.1nb2
9433===> Creating toolchain wrappers for figlet-2.2.1nb2 9447===> Creating toolchain wrappers for figlet-2.2.1nb2
9434===> Configuring for figlet-2.2.1nb2 9448===> Configuring for figlet-2.2.1nb2
9435===> Building for figlet-2.2.1nb2 9449===> Building for figlet-2.2.1nb2
9436gcc -O2 -DDEFAULTFONTDIR=\"/usr/pkg/share/figlet\" -DDEFAULTFONTFILE=\"standard.flf\" figlet.c zipio.c crc.c inflate.c -o figlet 9450gcc -O2 -DDEFAULTFONTDIR=\"/usr/pkg/share/figlet\" -DDEFAULTFONTFILE=\"standard.flf\" figlet.c zipio.c crc.c inflate.c -o figlet
9437chmod a+x figlet 9451chmod a+x figlet
9438gcc -O2 -o chkfont chkfont.c 9452gcc -O2 -o chkfont chkfont.c
9439=> Unwrapping files-to-be-installed. 9453=> Unwrapping files-to-be-installed.
9440# 9454#
9441# make install 9455# make install
9442===> Checking for vulnerabilities in figlet-2.2.1nb2 9456===> Checking for vulnerabilities in figlet-2.2.1nb2
9443===> Installing for figlet-2.2.1nb2 9457===> Installing for figlet-2.2.1nb2
9444install -d -o root -g wheel -m 755 /usr/pkg/bin 9458install -d -o root -g wheel -m 755 /usr/pkg/bin
9445install -d -o root -g wheel -m 755 /usr/pkg/man/man6 9459install -d -o root -g wheel -m 755 /usr/pkg/man/man6
9446mkdir -p /usr/pkg/share/figlet 9460mkdir -p /usr/pkg/share/figlet
9447cp figlet /usr/pkg/bin 9461cp figlet /usr/pkg/bin
9448cp chkfont /usr/pkg/bin 9462cp chkfont /usr/pkg/bin
9449chmod 555 figlist showfigfonts 9463chmod 555 figlist showfigfonts
9450cp figlist /usr/pkg/bin 9464cp figlist /usr/pkg/bin
9451cp showfigfonts /usr/pkg/bin 9465cp showfigfonts /usr/pkg/bin
9452cp fonts/*.flf /usr/pkg/share/figlet 9466cp fonts/*.flf /usr/pkg/share/figlet
9453cp fonts/*.flc /usr/pkg/share/figlet 9467cp fonts/*.flc /usr/pkg/share/figlet
9454cp figlet.6 /usr/pkg/man/man6 9468cp figlet.6 /usr/pkg/man/man6
9455===> Registering installation for figlet-2.2.1nb2 9469===> Registering installation for figlet-2.2.1nb2
9456# 9470#
9457 9471
9458C.2. Packaging figlet 9472C.2. Packaging figlet
9459 9473
9460# make package 9474# make package
9461===> Checking for vulnerabilities in figlet-2.2.1nb2 9475===> Checking for vulnerabilities in figlet-2.2.1nb2
9462===> Packaging figlet-2.2.1nb2 9476===> Packaging figlet-2.2.1nb2
9463===> Building binary package for figlet-2.2.1nb2 9477===> Building binary package for figlet-2.2.1nb2
9464Creating package /home/cvs/pkgsrc/packages/i386/All/figlet-2.2.1nb2.tgz 9478Creating package /home/cvs/pkgsrc/packages/i386/All/figlet-2.2.1nb2.tgz
9465Using SrcDir value of /usr/pkg 9479Using SrcDir value of /usr/pkg
9466Registering depends:. 9480Registering depends:.
9467# 9481#
9468 9482
9469Appendix D. Directory layout of the pkgsrc FTP server 9483Appendix D. Directory layout of the pkgsrc FTP server
9470 9484
9471Table of Contents 9485Table of Contents
9472 9486
9473D.1. distfiles: The distributed source files 9487D.1. distfiles: The distributed source files
9474D.2. misc: Miscellaneous things 9488D.2. misc: Miscellaneous things
9475D.3. packages: Binary packages 9489D.3. packages: Binary packages
9476D.4. reports: Bulk build reports 9490D.4. reports: Bulk build reports
9477D.5. current, stable, pkgsrc-20xxQy: source packages 9491D.5. current, stable, pkgsrc-20xxQy: source packages
9478 9492
9479As in other big projects, the directory layout of pkgsrc is quite complex for 9493As in other big projects, the directory layout of pkgsrc is quite complex for
9480newbies. This chapter explains where you find things on the FTP server. The 9494newbies. This chapter explains where you find things on the FTP server. The
9481base directory on ftp.NetBSD.org is /pub/pkgsrc/. On other servers it may be 9495base directory on ftp.NetBSD.org is /pub/pkgsrc/. On other servers it may be
9482different, but inside this directory, everything should look the same, no 9496different, but inside this directory, everything should look the same, no
9483matter on which server you are. This directory contains some subdirectories, 9497matter on which server you are. This directory contains some subdirectories,
9484which are explained below. 9498which are explained below.
9485 9499
9486D.1. distfiles: The distributed source files 9500D.1. distfiles: The distributed source files
9487 9501
9488The directory distfiles contains lots of archive files from all pkgsrc 9502The directory distfiles contains lots of archive files from all pkgsrc
9489packages, which are mirrored here. The subdirectories are called after their 9503packages, which are mirrored here. The subdirectories are called after their
9490package names and are used when the distributed files have names that don't 9504package names and are used when the distributed files have names that don't
9491explicitly contain a version number or are otherwise too generic (for example 9505explicitly contain a version number or are otherwise too generic (for example
9492release.tar.gz). 9506release.tar.gz).
9493 9507
9494D.2. misc: Miscellaneous things 9508D.2. misc: Miscellaneous things
9495 9509
9496This directory contains things that individual pkgsrc developers find worth 9510This directory contains things that individual pkgsrc developers find worth
9497publishing. 9511publishing.
9498 9512
9499D.3. packages: Binary packages 9513D.3. packages: Binary packages
9500 9514
9501This directory contains binary packages for the various platforms that are 9515This directory contains binary packages for the various platforms that are
9502supported by pkgsrc. Each subdirectory is of the form OPSYS/ARCH/OSVERSION_TAG. 9516supported by pkgsrc. Each subdirectory is of the form OPSYS/ARCH/OSVERSION_TAG.
9503The meaning of these variables is: 9517The meaning of these variables is:
9504 9518
9505 * OPSYS is the name of the operating system for which the packages have been 9519 * OPSYS is the name of the operating system for which the packages have been
9506 built. The name is taken from the output of the uname command, so it may 9520 built. The name is taken from the output of the uname command, so it may
9507 differ from the one you are used to hear. 9521 differ from the one you are used to hear.
9508 9522
9509 * ARCH is the hardware architecture of the platform for which the packages 9523 * ARCH is the hardware architecture of the platform for which the packages
9510 have been built. It also includes the ABI (Application Binary Interface) 9524 have been built. It also includes the ABI (Application Binary Interface)
9511 for platforms that have several of them. 9525 for platforms that have several of them.
9512 9526
9513 * OSVERSION is the version of the operating system. For version numbers that 9527 * OSVERSION is the version of the operating system. For version numbers that
9514 change often (for example NetBSD-current), the often-changing part should 9528 change often (for example NetBSD-current), the often-changing part should
9515 be replaced with an x, for example 4.99.x. 9529 be replaced with an x, for example 4.99.x.
9516 9530
9517 * TAG is either 20xxQy for a stable branch, or head for packages built from 9531 * TAG is either 20xxQy for a stable branch, or head for packages built from
9518 the HEAD branch. The latter should only be used when the packages are 9532 the HEAD branch. The latter should only be used when the packages are
9519 updated on a regular basis. Otherwise the date from checking out pkgsrc 9533 updated on a regular basis. Otherwise the date from checking out pkgsrc
9520 should be appended, for example head_20071015. 9534 should be appended, for example head_20071015.
9521 9535
9522The rationale for exactly this scheme is that the pkgsrc users looking for 9536The rationale for exactly this scheme is that the pkgsrc users looking for
9523binary packages can quickly click through the directories on the server and 9537binary packages can quickly click through the directories on the server and
9524find the best binary packages for their machines. Since they usually know the 9538find the best binary packages for their machines. Since they usually know the
9525operating system and the hardware architecture, OPSYS and ARCH are placed 9539operating system and the hardware architecture, OPSYS and ARCH are placed
9526first. After these choices, they can select the best combination of OSVERSION 9540first. After these choices, they can select the best combination of OSVERSION
9527and TAG together, since it is usually the case that packages stay compatible 9541and TAG together, since it is usually the case that packages stay compatible
9528between different version of the operating system. 9542between different version of the operating system.
9529 9543
9530In each of these directories, there is a whole binary packages collection for a 9544In each of these directories, there is a whole binary packages collection for a
9531specific platform. It has a directory called All which contains all binary 9545specific platform. It has a directory called All which contains all binary
9532packages. Besides that, there are various category directories that contain 9546packages. Besides that, there are various category directories that contain
9533symbolic links to the real binary packages. 9547symbolic links to the real binary packages.
9534 9548
9535D.4. reports: Bulk build reports 9549D.4. reports: Bulk build reports
9536 9550
9537Here are the reports from bulk builds, for those who want to fix packages that 9551Here are the reports from bulk builds, for those who want to fix packages that
9538didn't build on some of the platforms. The structure of subdirectories should 9552didn't build on some of the platforms. The structure of subdirectories should
9539look like the one in Section D.3, "packages: Binary packages". 9553look like the one in Section D.3, "packages: Binary packages".
9540 9554
9541D.5. current, stable, pkgsrc-20xxQy: source packages 9555D.5. current, stable, pkgsrc-20xxQy: source packages
9542 9556
9543These directories contain the "real" pkgsrc, that is the files that define how 9557These directories contain the "real" pkgsrc, that is the files that define how
9544to create binary packages from source archives. 9558to create binary packages from source archives.
9545 9559
9546Each of the current, stable and pkgsrc-20xxQy directories share the same 9560Each of the current, stable and pkgsrc-20xxQy directories share the same
9547structure. They each contain a pkgsrc directory and pkgsrc.tar.{bz,gz,xz} file. 9561structure. They each contain a pkgsrc directory and pkgsrc.tar.{bz,gz,xz} file.
9548 9562
9549The directory pkgsrc contains a snapshot of the CVS repository, which is 9563The directory pkgsrc contains a snapshot of the CVS repository, which is
9550updated regularly. The file pkgsrc.tar.{bz,gz,xz} contains the same as the 9564updated regularly. The file pkgsrc.tar.{bz,gz,xz} contains the same as the
9551directory, ready to be downloaded as a whole. 9565directory, ready to be downloaded as a whole.
9552 9566
9553The current directory contains files related to the HEAD branch of the CVS 9567The current directory contains files related to the HEAD branch of the CVS
9554repository. In this directory there is an additional file called 9568repository. In this directory there is an additional file called
9555pkgsrc-readmes.tar.{bz,gz,xz} that contains all pkgsrc READMEs with information 9569pkgsrc-readmes.tar.{bz,gz,xz} that contains all pkgsrc READMEs with information
9556about categories and packages. 9570about categories and packages.
9557 9571
9558The stable directory is a symlink to the latest pkgsrc-20xxQy. 9572The stable directory is a symlink to the latest pkgsrc-20xxQy.
9559 9573
9560The pkgsrc-20xxQy. directories contain files related to the -20xxQy stable 9574The pkgsrc-20xxQy. directories contain files related to the -20xxQy stable
9561branch of the CVS repository. In these directories there is an additional file 9575branch of the CVS repository. In these directories there is an additional file
9562called pkgsrc-20xxQy.tar.{bz,gz,xz}, which contains the state of pkgsrc when it 9576called pkgsrc-20xxQy.tar.{bz,gz,xz}, which contains the state of pkgsrc when it
9563was branched. 9577was branched.
9564 9578
9565Appendix E. Help topics 9579Appendix E. Help topics
9566 9580
9567The following list contains all help topics that are available when running  9581The following list contains all help topics that are available when running
9568bmake help topic=:index. 9582bmake help topic=:index.
9569 9583
9570#! -lintl 9584#! -lintl
957132bit 64bit 958532bit 64bit
9572ABI ACCEPTABLE_LICENSES 9586ABI ACCEPTABLE_LICENSES
9573ACROREAD_FONTPATH ADDITIONAL 9587ACROREAD_FONTPATH ADDITIONAL
9574AFAIK AIX 9588AFAIK AIX
9575ALLOW_VULNERABLE_PACKAGES ALL_ENV 9589ALLOW_VULNERABLE_PACKAGES ALL_ENV
9576ALSA_PC ALTERNATIVES_SRC 9590ALTERNATIVES_SRC AMANDA_TMP
9577AMANDA_TMP AMANDA_USER 9591AMANDA_USER AMANDA_VAR
9578AMANDA_VAR APACHE_GROUP 9592APACHE_GROUP APACHE_MODULE_NAME
9579APACHE_MODULE_NAME APACHE_MODULE_SRC 9593APACHE_MODULE_SRC APACHE_MODULE_SRCDIR
9580APACHE_MODULE_SRCDIR APACHE_PKG_PREFIX 9594APACHE_PKG_PREFIX APACHE_SUEXEC_CONFIGURE_ARGS
9581APACHE_SUEXEC_CONFIGURE_ARGS APACHE_SUEXEC_DOCROOT 9595APACHE_SUEXEC_DOCROOT APACHE_USER
9582APACHE_USER APPEND_ABI 9596APPEND_ABI APPEND_ELF
9583APPEND_ELF ARLA_CACHE 9597ARLA_CACHE AUDIT_PACKAGES_FLAGS
9584AUDIT_PACKAGES_FLAGS AUTOCONF_REQD 9598AUTOCONF_REQD AUTOMAKE_OVERRIDE
9585AUTOMAKE_OVERRIDE AUTOMAKE_REQD 9599AUTOMAKE_REQD AUTO_MKDIRS
9586AUTO_MKDIRS BDB185_DEFAULT 9600BDB185_DEFAULT BDBBASE
9587BDBBASE BDB_ACCEPTED 9601BDB_ACCEPTED BDB_DEFAULT
9588BDB_DEFAULT BDB_LIBS 9602BDB_LIBS BDB_TYPE
9589BDB_TYPE BINCIMAP_GROUP 9603BINCIMAP_GROUP BINCIMAP_USER
9590BINCIMAP_USER BIND_DIR 9604BIND_DIR BIND_GROUP
9591BIND_GROUP BIND_USER 9605BIND_USER BINOWN
9592BINOWN BINPKG_SITES 9606BINPKG_SITES BIN_INSTALL_FLAGS
9593BIN_INSTALL_FLAGS BISON_PKGDATADIR 9607BISON_PKGDATADIR BLAS
9594BLAS BLAS_ACCEPTED 9608BLAS_ACCEPTED BLAS_C_INTERFACE
9595BLAS_C_INTERFACE BLAS_INCLUDES 9609BLAS_INCLUDES BLAS_INDEX64
9596BLAS_INDEX64 BLAS_LIBS 9610BLAS_LIBS BLAS_TYPE
9597BLAS_TYPE BOOTSTRAP_DEPENDS 9611BOOTSTRAP_DEPENDS BROKEN
9598BROKEN BROKEN_EXCEPT_ON_PLATFORM 9612BROKEN_EXCEPT_ON_PLATFORM BROKEN_ON_PLATFORM
9599BROKEN_ON_PLATFORM BSDSRCDIR 9613BSDSRCDIR BSDXSRCDIR
9600BSDXSRCDIR BSD_MAKE_ENV 9614BSD_MAKE_ENV BUILDLINK_AUTO_DIRS
9601BUILDLINK_AUTO_DIRS BUILDLINK_AUTO_VARS 9615BUILDLINK_AUTO_VARS BUILDLINK_CFLAGS
9602BUILDLINK_CFLAGS BUILDLINK_CONTENTS_FILTER 9616BUILDLINK_CONTENTS_FILTER BUILDLINK_CPPFLAGS
9603BUILDLINK_CPPFLAGS BUILDLINK_DEPMETHOD 
9604BUILDLINK_FILES BUILDLINK_FILES_CMD 9617BUILDLINK_FILES BUILDLINK_FILES_CMD
9605BUILDLINK_FNAME_TRANSFORM BUILDLINK_LDFLAGS 9618BUILDLINK_FNAME_TRANSFORM BUILDLINK_LDFLAGS
9606BUILDLINK_LIBS BUILDLINK_OPSYS_SUPPORT_PTHREAD 9619BUILDLINK_LIBS BUILDLINK_OPSYS_SUPPORT_PTHREAD
9607BUILDLINK_PKGNAME BUILDLINK_PREFIX 9620BUILDLINK_PKGNAME BUILDLINK_PREFIX
9608BUILDLINK_RPATHDIRS BUILDLINK_TREE 9621BUILDLINK_RPATHDIRS BUILDLINK_TREE
9609BUILD_DEFS BUILD_DEFS_EFFECTS 9622BUILD_DEFS BUILD_DEFS_EFFECTS
9610BUILD_DEPENDS BUILD_DIRS 9623BUILD_DEPENDS BUILD_DIRS
9611BUILD_ENV_SHELL BUILD_MAKE_CMD 9624BUILD_ENV_SHELL BUILD_MAKE_CMD
9612BUILD_MAKE_FLAGS BUILD_TARGET 9625BUILD_MAKE_FLAGS BUILD_TARGET
9613BUILTIN_FIND_FILES BUILTIN_FIND_FILES_VAR 9626BUILTIN_FIND_FILES BUILTIN_FIND_FILES_VAR
9614BUILTIN_FIND_GREP BUILTIN_FIND_HEADERS 9627BUILTIN_FIND_GREP BUILTIN_FIND_HEADERS
9615BUILTIN_FIND_HEADERS_VAR BUILTIN_FIND_PKGCONFIG 9628BUILTIN_FIND_HEADERS_VAR BUILTIN_FIND_PKGCONFIG
9616BUILTIN_FIND_PKGCONFIG_VAR BUILTIN_PKG 9629BUILTIN_FIND_PKGCONFIG_VAR BUILTIN_PKG
9617BUILTIN_TEST_CURSES_DEFINES BUILTIN_TEST_CURSES_FUNCS 9630BUILTIN_TEST_CURSES_DEFINES BUILTIN_TEST_CURSES_FUNCS
9618BUILTIN_VERSION_SCRIPT BUILTIN_X11_TYPE 9631BUILTIN_VERSION_SCRIPT BUILTIN_X11_TYPE
9619BUILTIN_X11_VERSION CACTI_GROUP 9632BUILTIN_X11_VERSION CACTI_GROUP
9620CACTI_USER CANNA_GROUP 9633CACTI_USER CANNA_GROUP
9621CANNA_USER CAT 9634CANNA_USER CAT
9622CBLAS_LIBS CCACHE_BASE 9635CBLAS_LIBS CCACHE_BASE
9623CCACHE_DIR CCACHE_LOGFILE 9636CCACHE_DIR CCACHE_LOGFILE
9624CC_VERSION CC_VERSION_STRING 9637CC_VERSION CC_VERSION_STRING
9625CDRECORD_CONF CDROM_PKG_URL_DIR 9638CDRECORD_CONF CDROM_PKG_URL_DIR
9626CDROM_PKG_URL_HOST CHANGES 9639CDROM_PKG_URL_HOST CHANGES
9627CHECKOUT_DATE CHECK_COMPILER 9640CHECK_COMPILER CHECK_FAKEHOME
9628CHECK_FAKEHOME CHECK_FILES 9641CHECK_FILES CHECK_FILES_SKIP
9629CHECK_FILES_SKIP CHECK_FILES_STRICT 9642CHECK_FILES_STRICT CHECK_HEADERS
9630CHECK_HEADERS CHECK_HEADERS_SKIP 9643CHECK_HEADERS_SKIP CHECK_INTERPRETER
9631CHECK_INTERPRETER CHECK_INTERPRETER_SKIP 9644CHECK_INTERPRETER_SKIP CHECK_PERMS
9632CHECK_PERMS CHECK_PERMS_AUTOFIX 9645CHECK_PERMS_AUTOFIX CHECK_PERMS_SKIP
9633CHECK_PERMS_SKIP CHECK_PIE 9646CHECK_PIE CHECK_PIE_SKIP
9634CHECK_PIE_SKIP CHECK_PIE_SUPPORTED 9647CHECK_PIE_SUPPORTED CHECK_PORTABILITY
9635CHECK_PORTABILITY CHECK_PORTABILITY_EXPERIMENTAL 9648CHECK_PORTABILITY_EXPERIMENTAL CHECK_PORTABILITY_SKIP
9636CHECK_PORTABILITY_SKIP CHECK_RELRO 9649CHECK_RELRO CHECK_RELRO_SKIP
9637CHECK_RELRO_SKIP CHECK_RELRO_SUPPORTED 9650CHECK_RELRO_SUPPORTED CHECK_SHLIBS
9638CHECK_SHLIBS CHECK_SHLIBS_SKIP 9651CHECK_SHLIBS_SKIP CHECK_SHLIBS_SUPPORTED
9639CHECK_SHLIBS_SUPPORTED CHECK_SHLIBS_TOXIC 9652CHECK_SHLIBS_TOXIC CHECK_SSP
9640CHECK_SSP CHECK_SSP_SKIP 9653CHECK_SSP_SKIP CHECK_SSP_SUPPORTED
9641CHECK_SSP_SUPPORTED CHECK_STRIPPED 9654CHECK_STRIPPED CHECK_STRIPPED_SKIP
9642CHECK_STRIPPED_SKIP CHECK_WRKREF 9655CHECK_WRKREF CHECK_WRKREF_EXTRA_DIRS
9643CHECK_WRKREF_EXTRA_DIRS CHECK_WRKREF_SKIP 9656CHECK_WRKREF_SKIP CLAMAV_DBDIR
9644CLAMAV_DBDIR CLAMAV_GROUP 9657CLAMAV_GROUP CLAMAV_USER
9645CLAMAV_USER CLANGBASE 9658CLANGBASE CLEANDEPENDS
9646CLEANDEPENDS CMAKE_DEPENDENCIES_REWRITE 9659CMAKE_DEPENDENCIES_REWRITE CMAKE_INSTALL_NAME_DIR
9647CMAKE_INSTALL_NAME_DIR CMAKE_INSTALL_PREFIX 9660CMAKE_INSTALL_PREFIX CMAKE_MODULE_PATH_OVERRIDE
9648CMAKE_MODULE_PATH_OVERRIDE CMAKE_PKGSRC_BUILD_FLAGS 9661CMAKE_PKGSRC_BUILD_FLAGS CMAKE_PREFIX_PATH
9649CMAKE_PREFIX_PATH CMAKE_USE_GNU_INSTALL_DIRS 9662CMAKE_USE_GNU_INSTALL_DIRS COMPILER_RPATH_FLAG
9650COMMON_LISP_DOCFILES COMMON_LISP_EXAMPLES 
9651COMMON_LISP_EXTRAFILES COMMON_LISP_PACKAGES 
9652COMMON_LISP_SYSTEM COMPILER_RPATH_FLAG 
9653COMPILER_USE_SYMLINKS CONFIGURE_ARGS 9663COMPILER_USE_SYMLINKS CONFIGURE_ARGS
9654CONFIGURE_DIRS CONFIGURE_ENV 9664CONFIGURE_DIRS CONFIGURE_ENV
9655CONFIGURE_ENV_SHELL CONFIGURE_HAS_INFODIR 9665CONFIGURE_ENV_SHELL CONFIGURE_HAS_INFODIR
9656CONFIGURE_HAS_MANDIR CONFIGURE_SCRIPT 9666CONFIGURE_HAS_MANDIR CONFIGURE_SCRIPT
9657CONFIG_SHELL CONFIG_SHELL_FLAGS 9667CONFIG_SHELL CONFIG_SHELL_FLAGS
9658CONF_FILES CONF_FILES_MODE 9668CONF_FILES CONF_FILES_MODE
9659CONF_FILES_PERMS CONSERVER_DEFAULTHOST 9669CONF_FILES_PERMS CONSERVER_DEFAULTHOST
9660CONSERVER_DEFAULTPORT CP 9670CONSERVER_DEFAULTPORT CP
9661CPP CPP_PRECOMP_FLAGS 9671CPP CPP_PRECOMP_FLAGS
9662CREATE_WRKDIR_SYMLINK CROSSBASE 9672CREATE_WRKDIR_SYMLINK CROSSBASE
9663CTFCONVERT CTF_FILES_SKIP 9673CTFCONVERT CTF_FILES_SKIP
9664CTF_SUPPORTED CTYPE 9674CTF_SUPPORTED CTYPE
9665CUPS_GROUP CUPS_SYSTEM_GROUPS 9675CUPS_GROUP CUPS_SYSTEM_GROUPS
9666CUPS_USER CURSES_DEFAULT 9676CUPS_USER CURSES_DEFAULT
9667CURSES_TYPE CVS_EXTRACTDIR 9677CURSES_TYPE CXX
9668CVS_MODULE CVS_PROJECT 9678CYRUS_GROUP CYRUS_IDLE
9669CVS_REPOSITORIES CVS_ROOT 9679CYRUS_USER DAEMONTOOLS_GROUP
9670CVS_ROOT_GNU CVS_ROOT_NONGNU 9680DAEMONTOOLS_LOG_USER DARWIN_NO_SYSTEM_LIBS
9671CVS_ROOT_SOURCEFORGE CVS_TAG 9681DARWIN_REQUIRES_FILTER DBUS_GROUP
9672CXX CYRUS_GROUP 9682DBUS_USER DEFANG_GROUP
9673CYRUS_IDLE CYRUS_USER 9683DEFANG_USER DEFAULT_ACCEPTABLE_LICENSES
9674DAEMONTOOLS_GROUP DAEMONTOOLS_LOG_USER 9684DEFAULT_DISTFILES DEFAULT_IRC_SERVER
9675DARWIN_NO_SYSTEM_LIBS DARWIN_REQUIRES_FILTER 9685DEFAULT_SERIAL_DEVICE DEF_UMASK
9676DBUS_GROUP DBUS_USER 9686DEINSTALLDEPENDS DEINSTALL_SRC
9677DEFANG_GROUP DEFANG_USER 9687DEINSTALL_TEMPLATES DELAYED_ERROR_MSG
9678DEFAULT_ACCEPTABLE_LICENSES DEFAULT_DISTFILES 9688DELAYED_WARNING_MSG DEPENDS
9679DEFAULT_IRC_SERVER DEFAULT_SERIAL_DEVICE 9689DEPENDS_TARGET DEPENDS_TYPE
9680DEF_UMASK DEINSTALLDEPENDS 9690DESTDIR DESTDIR_VARNAME
9681DEINSTALL_SRC DEINSTALL_TEMPLATES 9691DIALER_GROUP DIGEST_REQD
9682DELAYED_ERROR_MSG DELAYED_WARNING_MSG 9692DISTDIR DISTFILES
9683DEPENDS DEPENDS_TARGET 9693DISTINFO_FILE DISTNAME
9684DEPENDS_TYPE DESTDIR 9694DIST_PATH DIST_SUBDIR
9685DESTDIR_VARNAME DIALER_GROUP 9695DJBDNS_AXFR_USER DJBDNS_CACHE_USER
9686DIGEST_REQD DISTDIR 9696DJBDNS_DJBDNS_GROUP DJBDNS_LOG_USER
9687DISTFILES DISTINFO_FILE 9697DJBDNS_RBL_USER DJBDNS_TINY_USER
9688DISTNAME DIST_PATH 9698DLOPEN_REQUIRE_PTHREADS DL_AUTO_VARS
9689DIST_SUBDIR DJBDNS_AXFR_USER 9699DL_CFLAGS DL_LDFLAGS
9690DJBDNS_CACHE_USER DJBDNS_DJBDNS_GROUP 9700DL_LIBS DNS
9691DJBDNS_LOG_USER DJBDNS_RBL_USER 9701DOCOWN DOWNLOADED_DISTFILE
9692DJBDNS_TINY_USER DLOPEN_REQUIRE_PTHREADS 9702DQCACHE_GROUP DQCACHE_USER
9693DL_AUTO_VARS DL_CFLAGS 9703DT_LAYOUT DYNAMIC_SITES_CMD
9694DL_LDFLAGS DL_LIBS 9704DYNAMIC_SITES_SCRIPT ECHO
9695DNS DOCOWN 9705ECHO_N ELK_GUI
9696DOWNLOADED_DISTFILE DQCACHE_GROUP 9706EMACS_TYPE EMULDIR
9697DQCACHE_USER DT_LAYOUT 9707EMULSUBDIR EMULSUBDIRSLASH
9698DYNAMIC_SITES_CMD DYNAMIC_SITES_SCRIPT 9708EMUL_ARCH EMUL_DISTRO
9699ECHO ECHO_N 9709EMUL_EXEC_FMT EMUL_IS_NATIVE
9700ELK_GUI EMACS_TYPE 9710EMUL_MODULES EMUL_OPSYS
9701EMULDIR EMULSUBDIR 9711EMUL_PKG_FMT EMUL_PLATFORM
9702EMULSUBDIRSLASH EMUL_ARCH 9712EMUL_PLATFORMS EMUL_PREFER
9703EMUL_DISTRO EMUL_EXEC_FMT 9713EMUL_REQD EMUL_TYPE
9704EMUL_IS_NATIVE EMUL_MODULES 9714ERROR_MSG EXIM_GROUP
9705EMUL_OPSYS EMUL_PKG_FMT 9715EXIM_USER EXPORT_SYMBOLS_LDFLAGS
9706EMUL_PLATFORM EMUL_PLATFORMS 9716EXTRACTOR EXTRACT_CMD
9707EMUL_PREFER EMUL_REQD 9717EXTRACT_CMD_DEFAULT EXTRACT_DIR
9708EMUL_TYPE ERROR_MSG 9718EXTRACT_ELEMENTS EXTRACT_ENV
9709EXIM_GROUP EXIM_USER 9719EXTRACT_ONLY EXTRACT_OPTS
9710EXPORT_SYMBOLS_LDFLAGS EXTRACTOR 9720EXTRACT_SUFX EXTRACT_USING
9711EXTRACT_CMD EXTRACT_CMD_DEFAULT 9721FAIL FAILOVER_FETCH
9712EXTRACT_DIR EXTRACT_ELEMENTS 9722FAIL_MSG FAKE_NCURSES
9713EXTRACT_ENV EXTRACT_ONLY 9723FAM FAM_ACCEPTED
9714EXTRACT_OPTS EXTRACT_SUFX 9724FAM_DEFAULT FAM_SERVER
9715EXTRACT_USING FAIL 9725FCPATH FEATURE_CPPFLAGS
9716FAILOVER_FETCH FAIL_MSG 9726FEATURE_LDFLAGS FEATURE_LIBS
9717FAKE_NCURSES FAM 9727FETCH_AFTER_ARGS FETCH_BEFORE_ARGS
9718FAM_ACCEPTED FAM_DEFAULT 9728FETCH_CMD FETCH_OUTPUT_ARGS
9719FAM_SERVER FCPATH 9729FETCH_PROXY FETCH_RESUME_ARGS
9720FEATURE_CPPFLAGS FEATURE_LDFLAGS 9730FETCH_TIMEOUT FETCH_USE_IPV4_ONLY
9721FEATURE_LIBS FETCH_AFTER_ARGS 9731FETCH_USING FILES_SUBST
9722FETCH_BEFORE_ARGS FETCH_CMD 9732FILES_SUBST_SED FIX_SYSTEM_HEADERS
9723FETCH_OUTPUT_ARGS FETCH_PROXY 
9724FETCH_RESUME_ARGS FETCH_TIMEOUT 
9725FETCH_USE_IPV4_ONLY FETCH_USING 
9726FILES_SUBST FILES_SUBST_SED 
9727FIX_SYSTEM_HEADERS FONTDIR 
9728FONTS_DIRS FONTS_VERBOSE 9733FONTS_DIRS FONTS_VERBOSE
9729FOO_HACKS_MK FOSSIL_EXTRACTDIR 9734FOO_HACKS_MK FOX_USE_XUNICODE
9730FOSSIL_REPO FOSSIL_REPOSITORIES 
9731FOSSIL_VERSION FOX_USE_XUNICODE 
9732FREEWNN_GROUP FREEWNN_USER 9735FREEWNN_GROUP FREEWNN_USER
9733FTP_PKG_URL_DIR FTP_PKG_URL_HOST 9736FTP_PKG_URL_DIR FTP_PKG_URL_HOST
9734GAMEDATAMODE GAMEDATA_PERMS 9737GAMEDATAMODE GAMEDATA_PERMS
9735GAMEDIRMODE GAMEDIR_PERMS 9738GAMEDIRMODE GAMEDIR_PERMS
9736GAMEGRP GAMEMODE 9739GAMEGRP GAMEMODE
9737GAMEOWN GAMES_GROUP 9740GAMEOWN GAMES_GROUP
9738GAMES_USER GCC 9741GAMES_USER GCC
9739GCCBASE GCC_REQD 9742GCCBASE GCC_REQD
9740GCC_VERSION_SUFFIX GEM_BUILD 9743GCC_VERSION_SUFFIX GEM_BUILD
9741GEM_CLEANBUILD GEM_CLEANBUILD_EXTENSIONS 9744GEM_CLEANBUILD GEM_CLEANBUILD_EXTENSIONS
9742GEM_DOCDIR GEM_EXTSDIR 9745GEM_DOCDIR GEM_EXTSDIR
9743GEM_HOME GEM_KEEPBUILD 9746GEM_HOME GEM_KEEPBUILD
9744GEM_LIBDIR GEM_NAME 9747GEM_LIBDIR GEM_NAME
9745GEM_PATH GEM_PLUGINSDIR 9748GEM_PATH GEM_PLUGINSDIR
9746GEM_SPECFILE GENERATE_PLIST 9749GEM_SPECFILE GENERATE_PLIST
9747GHC GHOSTSCRIPT_REQD 9750GHC GHOSTSCRIPT_REQD
9748GITHUB_PROJECT GITHUB_RELEASE 9751GITHUB_PROJECT GITHUB_RELEASE
9749GITHUB_SUBMODULES GITHUB_TAG 9752GITHUB_SUBMODULES GITHUB_TAG
9750GITHUB_TYPE GITLAB_PROJECT 9753GITHUB_TYPE GITLAB_PROJECT
9751GITLAB_RELEASE GITLAB_SUBMODULES 9754GITLAB_RELEASE GITLAB_SUBMODULES
9752GITLAB_TAG GITLAB_TYPE 9755GITLAB_TAG GITLAB_TYPE
9753GIT_BRANCH GIT_ENV 9756GNU GNU_CONFIGURE
9754GIT_EXTRACTDIR GIT_REPO 9757GNU_CONFIGURE_INFODIR GNU_CONFIGURE_MANDIR
9755GIT_REPOSITORIES GIT_REVISION 9758GNU_CONFIGURE_QUIET GNU_CONFIGURE_STRICT
9756GIT_TAG GNU 9759GODEP_REDIRECTS GO_BUILD_PATTERN
9757GNU_CONFIGURE GNU_CONFIGURE_INFODIR 9760GO_DEPS GO_DIST_BASE
9758GNU_CONFIGURE_MANDIR GNU_CONFIGURE_QUIET 9761GO_EXTRA_MOD_DIRS GO_MODULE_FILES
9759GNU_CONFIGURE_STRICT GODEP_REDIRECTS 9762GO_SRCPATH GO_VERSION_DEFAULT
9760GO_BUILD_PATTERN GO_DEPS 9763GROUP_SPECIFIC_PKGS GRUB_NETWORK_CARDS
9761GO_DIST_BASE GO_EXTRA_MOD_DIRS 9764GRUB_PRESET_COMMAND GRUB_SCAN_ARGS
9762GO_MODULE_FILES GO_SRCPATH 9765GZIP HASKELL_ENABLE_DYNAMIC_EXECUTABLE
9763GO_VERSION_DEFAULT GROUP_SPECIFIC_PKGS 
9764GRUB_NETWORK_CARDS GRUB_PRESET_COMMAND 
9765GRUB_SCAN_ARGS GZIP 
9766HASKELL_COMPILER HASKELL_ENABLE_DYNAMIC_EXECUTABLE 
9767HASKELL_ENABLE_HADDOCK_DOCUMENTATION HASKELL_ENABLE_LIBRARY_PROFILING 9766HASKELL_ENABLE_HADDOCK_DOCUMENTATION HASKELL_ENABLE_LIBRARY_PROFILING
9768HASKELL_ENABLE_SHARED_LIBRARY HASKELL_OPTIMIZATION_LEVEL 9767HASKELL_ENABLE_SHARED_LIBRARY HASKELL_OPTIMIZATION_LEVEL
9769HAS_CONFIGURE HEADER_TEMPLATES 9768HAS_CONFIGURE HEADER_TEMPLATES
9770HG_REPO HG_REPOSITORIES 9769HOMEPAGE HOST_PKGTOOLS_ARGS
9771HG_TAG HOMEPAGE 9770HOST_SPECIFIC_PKGS HOWL_GROUP
9772HOST_PKGTOOLS_ARGS HOST_SPECIFIC_PKGS 9771HOWL_USER ICCBASE
9773HOWL_GROUP HOWL_USER 9772ICECAST_CHROOTDIR ICON_THEMES
9774ICCBASE ICECAST_CHROOTDIR 9773IDOBASE IGNORE_CCACHE
9775ICON_THEMES IDOBASE 9774IGNORE_INFO_DIRS IGNORE_INTERACTIVE_FETCH
9776IGNORE_CCACHE IGNORE_INFO_DIRS 9775IMAKE IMAKEOPTS
9777IGNORE_INTERACTIVE_FETCH IMAKE 9776IMAKE_MAKE IMAKE_MANINSTALL
9778IMAKEOPTS IMAKE_MAKE 9777IMAP_UW_CCLIENT_MBOX_FMT IMDICTDIR
9779IMAKE_MANINSTALL IMAP_UW_CCLIENT_MBOX_FMT 9778INCOMPAT_CURSES INFO_DIR
9780IMDICTDIR INCOMPAT_CURSES 9779INFO_FILES INFO_FILES_VERBOSE
9781INFO_DIR INFO_FILES 9780INFO_MSG INIT_SYSTEM
9782INFO_FILES_VERBOSE INFO_MSG 9781INN_DATA_DIR INN_GROUP
9783INIT_SYSTEM INN_DATA_DIR 9782INN_USER INSTALLATION_DIRS
9784INN_GROUP INN_USER 9783INSTALLATION_DIRS_FROM_PLIST INSTALL_ENV
9785INSTALLATION_DIRS INSTALLATION_DIRS_FROM_PLIST 9784INSTALL_SH_OVERRIDE INSTALL_SRC
9786INSTALL_ENV INSTALL_SH_OVERRIDE 9785INSTALL_TEMPLATES INSTALL_UNSTRIPPED
9787INSTALL_SRC INSTALL_TEMPLATES 9786IRCD_HYBRID_IRC_GROUP IRCD_HYBRID_IRC_USER
9788INSTALL_UNSTRIPPED IRCD_HYBRID_IRC_GROUP 9787IRCD_HYBRID_MAXCONN IRCD_HYBRID_NICLEN
9789IRCD_HYBRID_IRC_USER IRCD_HYBRID_MAXCONN 9788IRCD_HYBRID_SYSLOG_EVENTS IRCD_HYBRID_SYSLOG_FACILITY
9790IRCD_HYBRID_NICLEN IRCD_HYBRID_SYSLOG_EVENTS 9789IRCD_HYBRID_TOPICLEN IRIX
9791IRCD_HYBRID_SYSLOG_FACILITY IRCD_HYBRID_TOPICLEN 9790IRRD_USE_PGP JABBERD_GROUP
9792IRIX IRRD_USE_PGP 9791JABBERD_LOGDIR JABBERD_PIDDIR
9793JABBERD_GROUP JABBERD_LOGDIR 9792JABBERD_SPOOLDIR JABBERD_USER
9794JABBERD_PIDDIR JABBERD_SPOOLDIR 9793JAVA_BINPREFIX JAVA_CLASSPATH
9795JABBERD_USER JAVA_APP_PATH 9794JAVA_HOME JAVA_LD_LIBRARY_PATH
9796JAVA_APP_TARGETS JAVA_BINPREFIX 9795JAVA_NAME JAVA_UNLIMIT
9797JAVA_CLASSPATH JAVA_HOME 9796JAVA_WRAPPERS JPEG_ACCEPTED
9798JAVA_LD_LIBRARY_PATH JAVA_NAME 9797JPEG_DEFAULT KERBEROS
9799JAVA_UNLIMIT JAVA_WRAPPERS 9798KERMIT_SUID_UUCP KJS_USE_PCRE
9800JPEG_ACCEPTED JPEG_DEFAULT 9799KNEWS_DOMAIN_FILE KNEWS_DOMAIN_NAME
9801KERBEROS KERMIT_SUID_UUCP 9800KRB5_ACCEPTED KRB5_DEFAULT
9802KJS_USE_PCRE KNEWS_DOMAIN_FILE 9801LANGUAGES LAPACKE_LIBS
9803KNEWS_DOMAIN_NAME KRB5_ACCEPTED 9802LAPACK_LIBS LATEX2HTML_ICONPATH
9804KRB5_DEFAULT LANGUAGES 9803LDCONFIG_ADD_CMD LDCONFIG_REMOVE_CMD
9805LAPACKE_LIBS LAPACK_LIBS 9804LDD LEAFNODE_DATA_DIR
9806LATEX2HTML_ICONPATH LDCONFIG_ADD_CMD 9805LEAFNODE_GROUP LEAFNODE_USER
9807LDCONFIG_REMOVE_CMD LDD 9806LIBDVDCSS_HOMEPAGE LIBDVDCSS_MASTER_SITES
9808LEAFNODE_DATA_DIR LEAFNODE_GROUP 9807LIBRSVG_TYPE LIBTOOL
9809LEAFNODE_USER LIBDVDCSS_HOMEPAGE 9808LIBTOOLIZE_PLIST LIBTOOL_M4_OVERRIDE
9810LIBDVDCSS_MASTER_SITES LIBRSVG_TYPE 9809LIBUSB_TYPE LICENSE
9811LIBTOOL LIBTOOLIZE_PLIST 9810LINKER_RPATH_FLAG LINK_RPATH_FLAG
9812LIBTOOL_M4_OVERRIDE LIBUSB_TYPE 
9813LICENSE LINKER_RPATH_FLAG 
9814LINK_RPATH_FLAG LINUX_BASE_NODEPS 
9815LINUX_BASE_PREFERRED LINUX_BASE_REQUIRED 
9816LINUX_LOCALES LOCALBASE 9811LINUX_LOCALES LOCALBASE
9817LOCALBASE_LOCKTYPE LOCALPATCHES 9812LOCALBASE_LOCKTYPE LOCALPATCHES
9818LOVE_DATA LOVE_GAME 9813LOVE_DATA LOVE_GAME
9819LOVE_VERSION LP32PLATFORMS 9814LOVE_VERSION LP32PLATFORMS
9820LP64PLATFORMS LUA_BUSTED_ARGS 9815LP64PLATFORMS LUA_BUSTED_ARGS
9821LUA_CDIR LUA_COMPILER 9816LUA_CDIR LUA_COMPILER
9822LUA_DOCDIR LUA_EXAMPLESDIR 9817LUA_DOCDIR LUA_EXAMPLESDIR
9823LUA_INCDIR LUA_INTERPRETER 9818LUA_INCDIR LUA_INTERPRETER
9824LUA_LDIR LUA_LINKER_MAGIC 9819LUA_LDIR LUA_LINKER_MAGIC
9825LUA_PKGPREFIX LUA_SELF_CONFLICT 9820LUA_PKGPREFIX LUA_SELF_CONFLICT
9826LUA_USE_BUSTED LUA_VERSIONS_ACCEPTED 9821LUA_USE_BUSTED LUA_VERSIONS_ACCEPTED
9827LUA_VERSIONS_INCOMPATIBLE LUA_VERSION_DEFAULT 9822LUA_VERSIONS_INCOMPATIBLE LUA_VERSION_DEFAULT
9828LUA_VERSION_REQD Lua 9823LUA_VERSION_REQD Lua
9829MACHINE_PLATFORM MAILAGENT_DOMAIN 9824MACHINE_PLATFORM MAILAGENT_DOMAIN
9830MAILAGENT_EMAIL MAILAGENT_FQDN 9825MAILAGENT_EMAIL MAILAGENT_FQDN
9831MAILAGENT_ORGANIZATION MAJORDOMO_HOMEDIR 9826MAILAGENT_ORGANIZATION MAJORDOMO_HOMEDIR
9832MAJOR_OS_VERSION MAKEINFO_ARGS 9827MAKEINFO_ARGS MAKE_DIRS
9833MAKE_DIRS MAKE_DIRS_PERMS 9828MAKE_DIRS_PERMS MAKE_ENV
9834MAKE_ENV MAKE_FILE 9829MAKE_FILE MAKE_FLAGS
9835MAKE_FLAGS MAKE_JOBS 9830MAKE_JOBS MAKE_JOBS_SAFE
9836MAKE_JOBS_SAFE MAKE_PROGRAM 9831MAKE_PROGRAM MANCOMPRESSED_IF_MANZ
9837MANCOMPRESSED_IF_MANZ MANINSTALL 9832MANINSTALL MANZ
9838MANZ MASTER_SITES 9833MASTER_SITES MASTER_SITE_BACKUP
9839MASTER_SITE_BACKUP MASTER_SITE_LOCAL 9834MASTER_SITE_LOCAL MASTER_SITE_MOZILLA
9840MASTER_SITE_MOZILLA MASTER_SITE_OVERRIDE 9835MASTER_SITE_OVERRIDE MASTER_SITE_PERL_CPAN
9841MASTER_SITE_PERL_CPAN MASTER_SORT 9836MASTER_SORT MASTER_SORT_RANDOM
9842MASTER_SORT_RANDOM MASTER_SORT_REGEX 9837MASTER_SORT_REGEX MECAB_CHARSET
9843MECAB_CHARSET MEDIATOMB_GROUP 9838MEDIATOMB_GROUP MEDIATOMB_USER
9844MEDIATOMB_USER MIPSPROBASE 9839MIPSPROBASE MIREDO_GROUP
9845MIREDO_GROUP MIREDO_USER 9840MIREDO_USER MISSING_FEATURES
9846MISSING_FEATURES MKDIR 9841MKDIR MKPIE_SUPPORTED
9847MKPIE_SUPPORTED MLDONKEY_GROUP 9842MLDONKEY_GROUP MLDONKEY_HOME
9848MLDONKEY_HOME MLDONKEY_USER 9843MLDONKEY_USER MONOTONE_GROUP
9849MONOTONE_GROUP MONOTONE_USER 9844MONOTONE_USER MOTIFBASE
9850MOTIFBASE MOTIF_TYPE 9845MOTIF_TYPE MOTIF_TYPE_DEFAULT
9851MOTIF_TYPE_DEFAULT MPI_TYPE 9846MPI_TYPE MSGFMT_STRIP_MSGCTXT
9852MSGFMT_STRIP_MSGCTXT MSGFMT_STRIP_MSGID_PLURAL 9847MSGFMT_STRIP_MSGID_PLURAL MTOOLS_ENABLE_FLOPPYD
9853MTOOLS_ENABLE_FLOPPYD MUST 
9854MV MYSQL_CHARSET 9848MV MYSQL_CHARSET
9855MYSQL_DATADIR MYSQL_EXTRA_CHARSET 9849MYSQL_DATADIR MYSQL_EXTRA_CHARSET
9856MYSQL_GROUP MYSQL_USER 9850MYSQL_GROUP MYSQL_USER
9857MYSQL_VERSION MYSQL_VERSIONS_ACCEPTED 9851MYSQL_VERSION MYSQL_VERSIONS_ACCEPTED
9858MYSQL_VERSIONS_ALL MYSQL_VERSION_DEFAULT 9852MYSQL_VERSIONS_ALL MYSQL_VERSION_DEFAULT
9859NAGIOSCMD_GROUP NAGIOSDIR 9853NAGIOSCMD_GROUP NAGIOSDIR
9860NAGIOS_GROUP NAGIOS_USER 9854NAGIOS_GROUP NAGIOS_USER
9861NATIVE_APPEND_ABI NATIVE_APPEND_ELF 9855NATIVE_APPEND_ABI NATIVE_APPEND_ELF
9862NATIVE_EXEC_FMT NATIVE_MACHINE_PLATFORM 9856NATIVE_EXEC_FMT NATIVE_MACHINE_PLATFORM
9863NATIVE_OBJECT_FMT NBPAX_PROGRAM_PREFIX 9857NATIVE_OBJECT_FMT NBPAX_PROGRAM_PREFIX
9864NETBSD_LOGIN_NAME NMH_EDITOR 9858NETBSD_LOGIN_NAME NMH_EDITOR
9865NMH_MTA NMH_PAGER 9859NMH_MTA NMH_PAGER
9866NODE_VERSIONS_ACCEPTED NODE_VERSIONS_INCOMPATIBLE 9860NODE_VERSIONS_ACCEPTED NODE_VERSIONS_INCOMPATIBLE
9867NODE_VERSION_DEFAULT NODE_VERSION_REQD 9861NODE_VERSION_DEFAULT NODE_VERSION_REQD
9868NOLOGIN NOTE 9862NOLOGIN NOTE
9869NOT_FOR_PLATFORM NOT_PAX_ASLR_SAFE 9863NOT_FOR_PLATFORM NOT_PAX_ASLR_SAFE
9870NOT_PAX_MPROTECT_SAFE NO_BUILD 9864NOT_PAX_MPROTECT_SAFE NO_BUILD
9871NO_CHECKSUM NO_CONFIGURE 9865NO_CHECKSUM NO_CONFIGURE
9872NO_SKIP NS_PREFERRED 9866NO_SKIP NS_PREFERRED
9873NULLMAILER_GROUP NULLMAILER_USER 9867NULLMAILER_GROUP NULLMAILER_USER
9874OASIS OASIS_BUILD_ARGS 9868OASIS OASIS_BUILD_ARGS
9875OBJHOSTNAME OBJMACHINE 9869OBJHOSTNAME OBJMACHINE
9876OCAML_FINDLIB_DIRS OCAML_FINDLIB_REGISTER 9870OCAML_FINDLIB_DIRS OCAML_FINDLIB_REGISTER
9877OCAML_FINDLIB_REGISTER_VERBOSE OCAML_SITELIBDIR 9871OCAML_FINDLIB_REGISTER_VERBOSE OCAML_SITELIBDIR
9878OCAML_TOPKG_DOCDIR OCAML_USE_DUNE 9872OCAML_TOPKG_DOCDIR OCAML_USE_DUNE
9879OCAML_USE_FINDLIB OCAML_USE_OASIS 9873OCAML_USE_FINDLIB OCAML_USE_OASIS
9880OCAML_USE_OASIS_DYNRUN OCAML_USE_OPAM 9874OCAML_USE_OASIS_DYNRUN OCAML_USE_OPAM
9881OCAML_USE_TOPKG OMF 9875OCAML_USE_TOPKG OMF
9882ONLY_FOR_COMPILER ONLY_FOR_PLATFORM 9876ONLY_FOR_COMPILER ONLY_FOR_PLATFORM
9883OPENSSH_CHROOT OPENSSH_GROUP 9877OPENSSH_CHROOT OPENSSH_GROUP
9884OPENSSH_USER OPSYS 9878OPENSSH_USER OPSYS
9885OPSYS_EMULDIR OPSYS_VERSION 9879OPSYS_EMULDIR OPSYS_VERSION
9886OS OSS_TYPE 9880OS OSS_TYPE
9887OSX OSX_TOLERATE_SDK_SKEW 9881OSX OSX_TOLERATE_SDK_SKEW
9888OS_HAVE_ALSA OS_HAVE_RCD 
9889OS_VARIANT OS_VERSION 9882OS_VARIANT OS_VERSION
9890OTF_FONTS_DIR OVERRIDE_DIRDEPTH 9883OTF_FONTS_DIR OVERRIDE_DIRDEPTH
9891OVERRIDE_GEMSPEC OVERRIDE_GNU_CONFIG_SCRIPTS 9884OVERRIDE_GEMSPEC OVERRIDE_GNU_CONFIG_SCRIPTS
9892OVERRIDE_ROCKSPEC OWN_DIRS 9885OWN_DIRS OWN_DIRS_PERMS
9893OWN_DIRS_PERMS P4GROUP 9886P4GROUP P4PORT
9894P4PORT P4ROOT 9887P4ROOT P4USER
9895P4USER PACKAGES 9888PACKAGES PALMOS_DEFAULT_SDK
9896PALMOS_DEFAULT_SDK PAMBASE 9889PAMBASE PAM_DEFAULT
9897PAM_DEFAULT PAPERSIZE 9890PAPERSIZE PASSIVE_FETCH
9898PASSIVE_FETCH PATCHDIR 9891PATCHDIR PATCHFILES
9899PATCHFILES PATCH_ARGS 9892PATCH_ARGS PATCH_DEBUG
9900PATCH_DEBUG PATCH_DIST_ARGS 9893PATCH_DIST_ARGS PATCH_DIST_CAT
9901PATCH_DIST_CAT PATCH_DIST_STRIP 9894PATCH_DIST_STRIP PATCH_FUZZ_FACTOR
9902PATCH_FUZZ_FACTOR PATCH_STRIP 9895PATCH_STRIP PATH
9903PATH PCCBASE 9896PCCBASE PEAR_CMD
9904PEAR PEAR_CHANNEL 9897PEAR_LIB PEAR_PACKAGE_XML
9905PEAR_CHANNEL_ALIAS PEAR_CHANNEL_VERSION 9898PERL5 PERL5_CONFIGURE
9906PEAR_CMD PEAR_LIB 9899PERL5_CONFIGURE_DIRS PERL5_LDFLAGS
9907PEAR_PACKAGE_XML PERL5 9900PERL5_LICENSE PERL5_MODULE_TYPE
9908PERL5_CONFIGURE PERL5_CONFIGURE_DIRS 9901PERL5_PACKLIST PERL5_PACKLIST_DIR
9909PERL5_LDFLAGS PERL5_LICENSE 9902PERL5_PERLBASE PERL5_SITEBASE
9910PERL5_MODULE_TYPE PERL5_PACKLIST 9903PERL5_USE_PACKLIST PERL5_VENDORBASE
9911PERL5_PACKLIST_DIR PERL5_PERLBASE 9904PFCTL PFVAR_H
9912PERL5_SITEBASE PERL5_USE_PACKLIST 9905PF_VERSION PGGROUP
9913PERL5_VENDORBASE PFCTL 9906PGHOME PGPKGSRCDIR
9914PFVAR_H PF_VERSION 9907PGSQL_TYPE PGSQL_VERSION
9915PGGROUP PGHOME 9908PGSQL_VERSIONS_ACCEPTED PGSQL_VERSION_DEFAULT
9916PGPKGSRCDIR PGSQL_TYPE 9909PGUSER PG_LIB_EXT
9917PGSQL_VERSION PGSQL_VERSIONS_ACCEPTED 9910PHP PHPCOMMON_MK
9918PGSQL_VERSION_DEFAULT PGUSER 9911PHPPKGSRCDIR PHP_BASE_VERS
9919PG_LIB_EXT PHP 9912PHP_CHECK_INSTALLED PHP_EXTENSION_DIR
9920PHPCOMMON_MK PHPPKGSRCDIR 9913PHP_INITIAL_TEENY PHP_PKG_PREFIX
9921PHP_BASE_VERS PHP_CHECK_INSTALLED 9914PHP_VERSION PHP_VERSIONS_ACCEPTED
9922PHP_EXTENSION_DIR PHP_INITIAL_TEENY 9915PHP_VERSIONS_INCOMPATIBLE PHP_VERSION_DEFAULT
9923PHP_PKG_PREFIX PHP_VERSION 9916PHP_VERSION_REQD PILRC_USE_GTK
9924PHP_VERSIONS_ACCEPTED PHP_VERSIONS_INCOMPATIBLE 9917PKGCONFIG_BASE PKGCONFIG_FILE
9925PHP_VERSION_DEFAULT PHP_VERSION_REQD 9918PKGCONFIG_OVERRIDE PKGCONFIG_OVERRIDE_STAGE
9926PILRC_USE_GTK PKGCONFIG_BASE 9919PKGDIR PKGGNUDIR
9927PKGCONFIG_FILE PKGCONFIG_OVERRIDE 9920PKGINFODIR PKGLOCALEDIR
9928PKGCONFIG_OVERRIDE_STAGE PKGDIR 9921PKGMANDIR PKGNAME
9929PKGGNUDIR PKGINFODIR 9922PKGNAME_REQD PKGPATH
9930PKGLOCALEDIR PKGMANDIR 9923PKGREVISION PKGSRC_BLAS_TYPES
9931PKGNAME PKGNAME_REQD 9924PKGSRC_CHANGES PKGSRC_COMPILER
9932PKGPATH PKGREVISION 9925PKGSRC_KEEP_BIN_PKGS PKGSRC_LOCKTYPE
9933PKGSRC_BLAS_TYPES PKGSRC_CHANGES 9926PKGSRC_MAKE_ENV PKGSRC_MESSAGE_RECIPIENTS
9934PKGSRC_COMPILER PKGSRC_KEEP_BIN_PKGS 9927PKGSRC_MKPIE PKGSRC_MKREPRO
9935PKGSRC_LOCKTYPE PKGSRC_MAKE_ENV 9928PKGSRC_OVERRIDE_MKPIE PKGSRC_RUN_TEST
9936PKGSRC_MESSAGE_RECIPIENTS PKGSRC_MKPIE 9929PKGSRC_SETENV PKGSRC_SLEEPSECS
9937PKGSRC_MKREPRO PKGSRC_OVERRIDE_MKPIE 9930PKGSRC_TODO PKGSRC_USE_CTF
9938PKGSRC_RUN_TEST PKGSRC_SETENV 9931PKGSRC_USE_FORTIFY PKGSRC_USE_MKTOOLS
9939PKGSRC_SLEEPSECS PKGSRC_TODO 9932PKGSRC_USE_RELRO PKGSRC_USE_SSP
9940PKGSRC_USE_CTF PKGSRC_USE_FORTIFY 9933PKGSRC_USE_STACK_CHECK PKGTASKS_DATAFILE
9941PKGSRC_USE_MKTOOLS PKGSRC_USE_RELRO 9934PKGTOOLS_ARGS PKGTOOLS_ENV
9942PKGSRC_USE_SSP PKGSRC_USE_STACK_CHECK 9935PKG_ALTERNATIVES PKG_APACHE
9943PKGTASKS_DATAFILE PKGTOOLS_ARGS 9936PKG_APACHE_ACCEPTED PKG_APACHE_DEFAULT
9944PKGTOOLS_ENV PKG_ALTERNATIVES 9937PKG_BEST_EXISTS PKG_BUILD_OPTIONS
9945PKG_APACHE PKG_APACHE_ACCEPTED 9938PKG_COMPRESSION PKG_CONFIG
9946PKG_APACHE_DEFAULT PKG_BEST_EXISTS 9939PKG_CONFIG_PERMS PKG_CREATE_USERGROUP
9947PKG_BUILD_OPTIONS PKG_COMPRESSION 9940PKG_DB_TMPDIR PKG_DEBUG_LEVEL
9948PKG_CONFIG PKG_CONFIG_PERMS 9941PKG_DEFAULT_OPTIONS PKG_DESTDIR_SUPPORT
9949PKG_CREATE_USERGROUP PKG_DB_TMPDIR 9942PKG_DEVELOPER PKG_DISABLED_OPTIONS
9950PKG_DEBUG_LEVEL PKG_DEFAULT_OPTIONS 9943PKG_FATAL_ERRORS PKG_FC
9951PKG_DESTDIR_SUPPORT PKG_DEVELOPER 9944PKG_FILELIST_CMD PKG_GECOS
9952PKG_DISABLED_OPTIONS PKG_FATAL_ERRORS 9945PKG_GID PKG_GROUPS
9953PKG_FC PKG_FILELIST_CMD 9946PKG_GROUPS_VARS PKG_HOME
9954PKG_GECOS PKG_GID 9947PKG_INIT_SCRIPTS PKG_JAVA_HOME
9955PKG_GROUPS PKG_GROUPS_VARS 9948PKG_JVM PKG_JVMS_ACCEPTED
9956PKG_HOME PKG_INIT_SCRIPTS 9949PKG_JVM_DEFAULT PKG_LEGACY_OPTIONS
9957PKG_JAVA_HOME PKG_JVM 9950PKG_LIBTOOL PKG_MKSYMLINKS
9958PKG_JVMS_ACCEPTED PKG_JVM_DEFAULT 9951PKG_OPTIONS PKG_OPTIONS_DEPRECATED_WARNINGS
9959PKG_LEGACY_OPTIONS PKG_LIBTOOL 9952PKG_OPTIONS_LEGACY_OPTS PKG_OPTIONS_LEGACY_VARS
9960PKG_MKSYMLINKS PKG_OPTIONS 9953PKG_OPTIONS_NONEMPTY_SETS PKG_OPTIONS_OPTIONAL_GROUPS
9961PKG_OPTIONS_DEPRECATED_WARNINGS PKG_OPTIONS_LEGACY_OPTS 9954PKG_OPTIONS_REQUIRED_GROUPS PKG_OPTIONS_VAR
9962PKG_OPTIONS_LEGACY_VARS PKG_OPTIONS_NONEMPTY_SETS 9955PKG_PHP PKG_PHP_MAJOR_VERS
9963PKG_OPTIONS_OPTIONAL_GROUPS PKG_OPTIONS_REQUIRED_GROUPS 9956PKG_PHP_VERSION PKG_RCD_SCRIPTS
9964PKG_OPTIONS_VAR PKG_PHP 9957PKG_REFCOUNT_DBDIR PKG_REGISTER_SHELLS
9965PKG_PHP_MAJOR_VERS PKG_PHP_VERSION 9958PKG_RESUME_TRANSFERS PKG_SHELL
9966PKG_RCD_SCRIPTS PKG_REFCOUNT_DBDIR 9959PKG_SUGGESTED_OPTIONS PKG_SUPPORTED_OPTIONS
9967PKG_REGISTER_SHELLS PKG_RESUME_TRANSFERS 9960PKG_SYSCONFBASE PKG_SYSCONFBASEDIR
9968PKG_SHELL PKG_SUGGESTED_OPTIONS 9961PKG_SYSCONFDIR PKG_SYSCONFDIR_PERMS
9969PKG_SUPPORTED_OPTIONS PKG_SYSCONFBASE 9962PKG_SYSCONFSUBDIR PKG_SYSCONFVAR
9970PKG_SYSCONFBASEDIR PKG_SYSCONFDIR 9963PKG_TOOLS_BIN PKG_UID
9971PKG_SYSCONFDIR_PERMS PKG_SYSCONFSUBDIR 9964PKG_UPDATE_FONTS_DB PKG_USERS
9972PKG_SYSCONFVAR PKG_TOOLS_BIN 9965PKG_USERS_VARS PKG_VERBOSE
9973PKG_UID PKG_UPDATE_FONTS_DB 9966PLEASE PLIST
9974PKG_USERS PKG_USERS_VARS 9967PLIST_AWK PLIST_AWK_ENV
9975PKG_VERBOSE PLEASE 9968PLIST_SRC PLIST_SUBST
9976PLIST PLIST_AWK 9969PLIST_TYPE PLIST_VARS
9977PLIST_AWK_ENV PLIST_SRC 9970POPTOP_USE_MPPE POSSIBLE_GFORTRAN_VERSION
9978PLIST_SUBST PLIST_TYPE 9971POST_FETCH_HOOK PREFER
9979PLIST_VARS POPTOP_USE_MPPE 9972PREFER_NATIVE PREFER_NATIVE_PTHREADS
9980POSSIBLE_GFORTRAN_VERSION POST_FETCH_HOOK 9973PREFER_PKGSRC PREFIX
9981PREFER PREFER_NATIVE 9974PREPEND_PATH PRE_ROOT_CMD
9982PREFER_NATIVE_PTHREADS PREFER_PKGSRC 9975PRIVILEGED_STAGES PS
9983PREFIX PREPEND_PATH 9976PTHREAD_AUTO_VARS PTHREAD_CFLAGS
9984PRE_ROOT_CMD PRIVILEGED_STAGES 9977PTHREAD_LDFLAGS PTHREAD_LIBS
9985PS PTHREAD_AUTO_VARS 9978PTHREAD_OPTS PTHREAD_TYPE
9986PTHREAD_CFLAGS PTHREAD_LDFLAGS 9979PVM_SSH PYPKGPREFIX
9987PTHREAD_LIBS PTHREAD_OPTS 9980PYTHON_FOR_BUILD_ONLY PYTHON_SELF_CONFLICT
9988PTHREAD_TYPE PVM_SSH 9981PYTHON_VERSIONED_DEPENDENCIES PYTHON_VERSIONS_ACCEPTED
9989PYPKGPREFIX PYTHON_FOR_BUILD_ONLY 9982PYTHON_VERSIONS_INCOMPATIBLE PYTHON_VERSION_DEFAULT
9990PYTHON_SELF_CONFLICT PYTHON_VERSIONED_DEPENDENCIES 9983PYTHON_VERSION_REQD PYVERSSUFFIX
9991PYTHON_VERSIONS_ACCEPTED PYTHON_VERSIONS_INCOMPATIBLE 9984QMAILDIR QMAIL_ALIAS_USER
9992PYTHON_VERSION_DEFAULT PYTHON_VERSION_REQD 9985QMAIL_DAEMON_USER QMAIL_LOG_USER
9993PYVERSSUFFIX QMAILDIR 9986QMAIL_NOFILES_GROUP QMAIL_PASSWD_USER
9994QMAIL_ALIAS_USER QMAIL_DAEMON_USER 9987QMAIL_QMAIL_GROUP QMAIL_QUEUE_DIR
9995QMAIL_LOG_USER QMAIL_NOFILES_GROUP 9988QMAIL_QUEUE_EXTRA QMAIL_QUEUE_USER
9996QMAIL_PASSWD_USER QMAIL_QMAIL_GROUP 9989QMAIL_REMOTE_USER QMAIL_ROOT_USER
9997QMAIL_QUEUE_DIR QMAIL_QUEUE_EXTRA 9990QMAIL_SEND_USER QORE_LATEST_MODULE_API
9998QMAIL_QUEUE_USER QMAIL_REMOTE_USER 9991QORE_MODULE_API QORE_MODULE_DIR
9999QMAIL_ROOT_USER QMAIL_SEND_USER 9992QORE_USER_MODULE_DIR QORE_VERSION
10000QORE_LATEST_MODULE_API QORE_MODULE_API 9993QPOPPER_FAC QPOPPER_SPOOL_DIR
10001QORE_MODULE_DIR QORE_USER_MODULE_DIR 9994QPOPPER_USER RAKE_NAME
10002QORE_VERSION QPOPPER_FAC 9995RASMOL_DEPTH RCD_SCRIPTS
10003QPOPPER_SPOOL_DIR QPOPPER_USER 9996RCD_SCRIPTS_DIR RCD_SCRIPTS_EXAMPLEDIR
10004RAKE_NAME RASMOL_DEPTH 9997RCD_SCRIPTS_MODE RCD_SCRIPTS_SHELL
10005RCD_DIR RCD_ORDER 9998RCD_SCRIPT_SRC RDOC
10006RCD_SCRIPTS RCD_SCRIPTS_DIR 
10007RCD_SCRIPTS_EXAMPLEDIR RCD_SCRIPTS_MODE 
10008RCD_SCRIPTS_SHELL RCD_SCRIPT_SRC 
10009RCD_SUBR RDOC 
10010READLINE_DEFAULT READLINE_TYPE 9999READLINE_DEFAULT READLINE_TYPE
10011REAL_ROOT_GROUP REAL_ROOT_USER 10000REAL_ROOT_GROUP REAL_ROOT_USER
10012RECURSIVE_MAKE RELAY_CTRL_DIR 10001RECURSIVE_MAKE RELAY_CTRL_DIR
10013RELRO_SUPPORTED REPLACE_AWK 10002RELRO_SUPPORTED REPLACE_AWK
10014REPLACE_BASH REPLACE_CSH 10003REPLACE_BASH REPLACE_CSH
10015REPLACE_KSH REPLACE_LUA 10004REPLACE_KSH REPLACE_LUA
10016REPLACE_NODEJS REPLACE_OCTAVE 10005REPLACE_NODEJS REPLACE_OCTAVE
10017REPLACE_PERL REPLACE_PERL6 10006REPLACE_PERL REPLACE_PERL6
10018REPLACE_PHP REPLACE_PYTHON 10007REPLACE_PHP REPLACE_PYTHON
10019REPLACE_QORE REPLACE_R 10008REPLACE_QORE REPLACE_R
10020REPLACE_RUBY REPLACE_RUBY_DIRS 10009REPLACE_RUBY REPLACE_RUBY_DIRS
10021REPLACE_RUBY_PAT REPLACE_SH 10010REPLACE_RUBY_PAT REPLACE_SH
10022REPLACE_TEXLUA REPLACE_WISH 10011REPLACE_TEXLUA REPLACE_WISH
10023REQD_DIRS REQD_DIRS_PERMS 10012REQD_DIRS REQD_DIRS_PERMS
10024REQD_FILES REQD_FILES_MODE 10013REQD_FILES REQD_FILES_MODE
10025REQD_FILES_PERMS RESOLV_AUTO_VARS 10014REQD_FILES_PERMS RESOLV_AUTO_VARS
10026RESOLV_LDFLAGS RESOLV_LIBS 10015RESOLV_LDFLAGS RESOLV_LIBS
10027RM ROCKSPEC_NAME 10016RM ROOT_CMD
10028ROCKSPEC_SPECFILE ROOT_CMD 
10029ROOT_GROUP ROOT_USER 10017ROOT_GROUP ROOT_USER
10030RPCGEN RPM 10018RPCGEN RPM
10031RPM2PKG_PLIST RPM2PKG_PREFIX 10019RPM2PKG_PLIST RPM2PKG_PREFIX
10032RPM2PKG_STAGE RPM2PKG_STRIP 10020RPM2PKG_STAGE RPM2PKG_STRIP
10033RPM2PKG_SUBPREFIX RPMFILES 10021RPM2PKG_SUBPREFIX RPMFILES
10034RPMIGNOREPATH RPM_DB_PREFIX 10022RPMIGNOREPATH RPM_DB_PREFIX
10035RSSH_CVS_PATH RSSH_RDIST_PATH 10023RSSH_CVS_PATH RSSH_RDIST_PATH
10036RSSH_RSYNC_PATH RSSH_SCP_PATH 10024RSSH_RSYNC_PATH RSSH_SCP_PATH
10037RSSH_SFTP_SERVER_PATH RUBY 10025RSSH_SFTP_SERVER_PATH RUBY
10038RUBYGEM RUBYGEM_NAME 10026RUBYGEM RUBYGEM_NAME
10039RUBYGEM_OPTIONS RUBYGEM_VERBOSE 10027RUBYGEM_OPTIONS RUBYGEM_VERBOSE
10040RUBY_ABI_VERSION RUBY_ARCH 10028RUBY_ABI_VERSION RUBY_ARCH
10041RUBY_ARCHINC RUBY_ARCHLIB 10029RUBY_ARCHINC RUBY_ARCHLIB
10042RUBY_BASE RUBY_BASERIDIR 10030RUBY_BASE RUBY_BASERIDIR
10043RUBY_BUILD_DOCUMENT RUBY_DLEXT 10031RUBY_BUILD_DOCUMENT RUBY_DLEXT
10044RUBY_DOC RUBY_DYNAMIC_DIRS 10032RUBY_DOC RUBY_DYNAMIC_DIRS
10045RUBY_EG RUBY_ENCODING_ARG 10033RUBY_EG RUBY_ENCODING_ARG
10046RUBY_EXTCONF RUBY_EXTCONF_CHECK 10034RUBY_EXTCONF RUBY_EXTCONF_CHECK
10047RUBY_EXTCONF_DEBUG RUBY_EXTCONF_MAKEFILE 10035RUBY_EXTCONF_DEBUG RUBY_EXTCONF_MAKEFILE
10048RUBY_GEM_ARCH RUBY_GEM_BASE 10036RUBY_GEM_ARCH RUBY_GEM_BASE
10049RUBY_INC RUBY_LIB 10037RUBY_INC RUBY_LIB
10050RUBY_LIB_BASE RUBY_NAME 10038RUBY_LIB_BASE RUBY_NAME
10051RUBY_NOVERSION RUBY_PKGPREFIX 10039RUBY_NOVERSION RUBY_PKGPREFIX
10052RUBY_RAILS RUBY_RAILS52_VERSION 10040RUBY_RAILS RUBY_RAILS52_VERSION
10053RUBY_RAILS60_VERSION RUBY_RAILS61_VERSION 10041RUBY_RAILS60_VERSION RUBY_RAILS61_VERSION
10054RUBY_RAILS70_VERSION RUBY_RAILS_ACCEPTED 10042RUBY_RAILS70_VERSION RUBY_RAILS_ACCEPTED
10055RUBY_RAILS_DEFAULT RUBY_RAILS_REQD 10043RUBY_RAILS_DEFAULT RUBY_RAILS_REQD
10056RUBY_RAILS_STRICT_DEP RUBY_RIDIR 10044RUBY_RAILS_STRICT_DEP RUBY_RIDIR
10057RUBY_SETUP RUBY_SHLIB 10045RUBY_SETUP RUBY_SHLIB
10058RUBY_SHLIBALIAS RUBY_SHLIBVER 10046RUBY_SHLIBALIAS RUBY_SHLIBVER
10059RUBY_SIMPLE_INSTALL RUBY_SITEARCHLIB 10047RUBY_SIMPLE_INSTALL RUBY_SITEARCHLIB
10060RUBY_SITELIB RUBY_SITELIB_BASE 10048RUBY_SITELIB RUBY_SITELIB_BASE
10061RUBY_SITERIDIR RUBY_SLEXT 10049RUBY_SITERIDIR RUBY_SLEXT
10062RUBY_SRCDIR RUBY_STATICLIB 10050RUBY_SRCDIR RUBY_STATICLIB
10063RUBY_SUFFIX RUBY_SYSRIDIR 10051RUBY_SUFFIX RUBY_SYSRIDIR
10064RUBY_USE_PTHREAD RUBY_VENDORARCHLIB 10052RUBY_USE_PTHREAD RUBY_VENDORARCHLIB
10065RUBY_VENDORLIB RUBY_VENDORLIB_BASE 10053RUBY_VENDORLIB RUBY_VENDORLIB_BASE
10066RUBY_VER RUBY_VERSION 10054RUBY_VER RUBY_VERSION
10067RUBY_VERSIONS_ACCEPTED RUBY_VERSIONS_INCOMPATIBLE 10055RUBY_VERSIONS_ACCEPTED RUBY_VERSIONS_INCOMPATIBLE
10068RUBY_VERSION_DEFAULT RUBY_VERSION_REQD 10056RUBY_VERSION_DEFAULT RUBY_VERSION_REQD
10069RUBY_VER_DIR RUN 10057RUBY_VER_DIR RUN
10070RUN_LDCONFIG RUST_TYPE 10058RUN_LDCONFIG RUST_TYPE
10071SCO SCREWS_GROUP 10059SCO SCREWS_GROUP
10072SCREWS_USER SCRIPTS_ENV 10060SCREWS_USER SCRIPTS_ENV
10073SCROLLKEEPER_DATADIR SCROLLKEEPER_REBUILDDB 10061SCROLLKEEPER_DATADIR SCROLLKEEPER_REBUILDDB
10074SCROLLKEEPER_UPDATEDB SDIST_PAWD 10062SCROLLKEEPER_UPDATEDB SDIST_PAWD
10075SDL12_TYPE SERIAL_DEVICES 10063SDL12_TYPE SERIAL_DEVICES
10076SETGIDGAME SETGID_GAMES_PERMS 10064SETGIDGAME SETGID_GAMES_PERMS
10077SETUID_ROOT_PERMS SH 10065SETUID_ROOT_PERMS SH
10078SHLIB SHORTNAME 10066SHLIB SIGN_PACKAGES
10079SIGN_PACKAGES SILC_CLIENT_WITH_PERL 10067SILC_CLIENT_WITH_PERL SITE_SPECIFIC_PKGS
10080SITE_SPECIFIC_PKGS SKIP_DEPENDS 10068SKIP_DEPENDS SMF_INSTANCES
10081SMF_INSTANCES SMF_MANIFEST 10069SMF_MANIFEST SMF_METHODS
10082SMF_METHODS SMF_METHOD_SHELL 10070SMF_METHOD_SHELL SMF_METHOD_SRC
10083SMF_METHOD_SRC SMF_NAME 10071SMF_NAME SMF_PREFIX
10084SMF_PREFIX SMF_SRCDIR 10072SMF_SRCDIR SNIPROXY_GROUP
10085SNIPROXY_GROUP SNIPROXY_USER 10073SNIPROXY_USER SOURCE_BUFFSIZE
10086SOURCE_BUFFSIZE SPECIAL_PERMS 10074SPECIAL_PERMS SPECIFIC_PKGS
10087SPECIFIC_PKGS SSH_SUID 10075SSH_SUID SSP_SUPPORTED
10088SSP_SUPPORTED SSYNC_PAWD 10076SSYNC_PAWD STEP_MSG
10089STEP_MSG STRIP 10077STRIP STRIP_DBG
10090STRIP_DBG STRIP_DEBUG 10078STRIP_DEBUG STRIP_DEBUG_SUPPORTED
10091STRIP_DEBUG_SUPPORTED STRIP_FILES_SKIP 10079STRIP_FILES_SKIP SU
10092SU SUBDIR 10080SUBDIR SUBST
10093SUBST SUBST_CLASSES 10081SUBST_CLASSES SUBST_FILES
10094SUBST_FILES SUBST_FILTER_CMD 10082SUBST_FILTER_CMD SUBST_MESSAGE
10095SUBST_MESSAGE SUBST_NOOP_OK 10083SUBST_NOOP_OK SUBST_SED
10096SUBST_SED SUBST_SHOW_DIFF 10084SUBST_SHOW_DIFF SUBST_SKIP_TEXT_CHECK
10097SUBST_SKIP_TEXT_CHECK SUBST_STAGE 10085SUBST_STAGE SUBST_VARS
10098SUBST_VARS SUNWSPROBASE 10086SUNWSPROBASE SUSE_PREFER
10099SUSE_PREFER SU_CMD 10087SU_CMD SYSCONFBASE
10100SVN_EXTRACTDIR SVN_REPO 10088TARGET_ARCH TBL
10101SVN_REPOSITORIES SVN_REVISION 10089TERMCAP_TYPE TERMINFO_DEFAULT
10102SYSCONFBASE TARGET_ARCH 10090TERMINFO_TYPE TEST
10103TBL TERMCAP_TYPE 10091TEST_DEPENDS TEST_DIRS
10104TERMINFO_DEFAULT TERMINFO_TYPE 10092TEST_ENV TEST_ENV_SHELL
10105TEST TEST_DEPENDS 10093TEST_MAKE_CMD TEST_MAKE_FLAGS
10106TEST_DIRS TEST_ENV 10094TEST_TARGET TEXLIVE_IGNORE_PATTERNS
10107TEST_ENV_SHELL TEST_MAKE_CMD 10095TEXLIVE_REV TEXLIVE_UNVERSIONED
10108TEST_MAKE_FLAGS TEST_TARGET 10096TEXMFSITE TEX_FORMATS
10109TEXLIVE_IGNORE_PATTERNS TEXLIVE_REV 10097TEX_HYPHEN_DAT TEX_HYPHEN_DEF
10110TEXLIVE_UNVERSIONED TEXMFSITE 10098TEX_TEXMF_DIRS THTTPD_LOG_FACILITY
10111TEX_FORMATS TEX_HYPHEN_DAT 10099TINYDYN_USER TLSWRAPPER_CHROOT
10112TEX_HYPHEN_DEF TEX_TEXMF_DIRS 10100TO TOOLS_ALIASES
10113THTTPD_LOG_FACILITY TINYDYN_USER 10101TOOLS_ALWAYS_WRAP TOOLS_ARGS
10114TLSWRAPPER_CHROOT TO 10102TOOLS_BROKEN TOOLS_CMD
10115TOOLS_ALIASES TOOLS_ALWAYS_WRAP 10103TOOLS_CMDLINE_SED TOOLS_CREATE
10116TOOLS_ARGS TOOLS_BROKEN 10104TOOLS_CROSS_DESTDIR TOOLS_DIR
10117TOOLS_CMD TOOLS_CMDLINE_SED 10105TOOLS_FAIL TOOLS_GNU_MISSING
10118TOOLS_CREATE TOOLS_CROSS_DESTDIR 10106TOOLS_LDCONFIG TOOLS_NOOP
10119TOOLS_DIR TOOLS_FAIL 10107TOOLS_PATH TOOLS_SCRIPT
10120TOOLS_GNU_MISSING TOOLS_LDCONFIG 10108TOOLS_USE_CROSS_COMPILE TOOL_DEPENDS
10121TOOLS_NOOP TOOLS_PATH 
10122TOOLS_SCRIPT TOOLS_USE_CROSS_COMPILE 
10123TOOL_DEPENDS TTF_FONTDIR 
10124TTF_FONTS_DIR TYPE 10109TTF_FONTS_DIR TYPE
10125UAC_REQD_EXECS UCSPI_SSL_GROUP 10110UAC_REQD_EXECS UCSPI_SSL_GROUP
10126UCSPI_SSL_USER UNLIMIT_RESOURCES 10111UCSPI_SSL_USER UNLIMIT_RESOURCES
10127UNPRIVILEGED UNPRIVILEGED_GROUP 10112UNPRIVILEGED UNPRIVILEGED_GROUP
10128UNPRIVILEGED_GROUPS UNPRIVILEGED_USER 10113UNPRIVILEGED_GROUPS UNPRIVILEGED_USER
10129UNWRAP_FILES UNWRAP_PATTERNS 10114UNWRAP_FILES UNWRAP_PATTERNS
10130UPDATE_GEMSPEC UPDATE_TARGET 10115UPDATE_GEMSPEC UPDATE_TARGET
10131URI USERGROUP_PHASE 10116URI USERGROUP_PHASE
10132USERPPP_GROUP USER_SPECIFIC_PKGS 10117USERPPP_GROUP USER_SPECIFIC_PKGS
10133USE_ABI_DEPENDS USE_APR 10118USE_ABI_DEPENDS USE_APR
10134USE_BSD_MAKEFILE USE_BUILTIN 10119USE_BSD_MAKEFILE USE_BUILTIN
10135USE_CROSS_COMPILE USE_CURSES 10120USE_CROSS_COMPILE USE_CURSES
10136USE_CWRAPPERS USE_DB185 10121USE_CWRAPPERS USE_DB185
10137USE_FEATURES USE_GAMESGROUP 10122USE_FEATURES USE_GAMESGROUP
10138USE_GCC_RUNTIME USE_IMAKE 10123USE_GCC_RUNTIME USE_IMAKE
10139USE_JAVA USE_JAVA2 10124USE_JAVA USE_JAVA2
10140USE_LANGUAGES USE_LIBTOOL 10125USE_LANGUAGES USE_LIBTOOL
10141USE_NATIVE_GCC USE_NETBSD_REPO 10126USE_NATIVE_GCC USE_NETBSD_REPO
10142USE_PKGSRC_GCC USE_PKGSRC_GCC_RUNTIME 10127USE_PKGSRC_GCC USE_PKGSRC_GCC_RUNTIME
10143USE_PKGTASKS USE_PKG_ADMIN_DIGEST 10128USE_PKGTASKS USE_PKG_ADMIN_DIGEST
10144USE_RUBY_EXTCONF USE_RUBY_INSTALL 10129USE_RUBY_EXTCONF USE_RUBY_INSTALL
10145USE_RUBY_SETUP USE_RUBY_SETUP_PKG 10130USE_RUBY_SETUP USE_RUBY_SETUP_PKG
10146USE_TOOLS UUCP_GROUP 10131USE_TOOLS UUCP_GROUP
10147UUCP_USER VARBASE 10132UUCP_USER VARBASE
10148VARNAME VIM_EXTRA_OPTS 10133VARNAME VIM_EXTRA_OPTS
10149WARNING_MSG WCALC_CGIDIR 10134WARNING_MSG WCALC_CGIDIR
10150WCALC_CGIPATH WCALC_HTMLDIR 10135WCALC_CGIPATH WCALC_HTMLDIR
10151WCALC_HTMLPATH WDM_MANAGERS 10136WCALC_HTMLPATH WDM_MANAGERS
10152WRAPPER_CC WRAPPER_REORDER_CMDS 10137WRAPPER_CC WRAPPER_REORDER_CMDS
10153WRKDIR WRKDIR_BASENAME 10138WRKDIR WRKDIR_BASENAME
10154WRKDIR_LOCKTYPE WRKLOG 10139WRKDIR_LOCKTYPE WRKLOG
10155WRKOBJDIR WRKSRC 10140WRKOBJDIR WRKSRC
10156X10_PORT X11 10141X10_PORT X11
10157X11BASE X11_PKGSRCDIR 10142X11BASE X11_PKGSRCDIR
10158X11_TYPE X509_CERTIFICATE 10143X11_TYPE X509_CERTIFICATE
10159X509_KEY XAW_TYPE 10144X509_KEY XAW_TYPE
10160XLOCK_DEFAULT_MODE XMKMF 10145XLOCK_DEFAULT_MODE XMKMF
10161XMKMF_FLAGS XXX 10146XMKMF_FLAGS XXX
10162XXXX YES 10147YES ZSH_STATIC
10163ZSH_STATIC __stdc__ 10148__stdc__ _vargroups
10164_vargroups accept 10149accept acquire-localbase-lock
10165acquire-localbase-lock acquire-lock 10150acquire-lock add
10166add added 10151added administrator
10167administrator alloca 10152alloca alternatives
10168alternatives aslr 10153aslr asprintf
10169asprintf atlas 10154atlas autoconf
10170autoconf automake 10155automake autoreconf
10171autoreconf awk 10156awk bash
10172bash big-endian 10157big-endian bin-install
10173bin-install bind 10158bind binpkg-list
10174binpkg-list blas 10159blas bootstrap-depends
10175bootstrap-depends broken 10160broken broken_on_platform
10176broken_on_platform bsd 10161bsd bsd.prog.mk
10177bsd.prog.mk build 10162build build-env
10178build-env buildlink-directories 10163buildlink-directories buildlink-oss-soundcard-h
10179buildlink-oss-soundcard-h c 10164c c++
10180c++ ccache 10165ccache cce
10181cce cdefs 10166cdefs ceil
10182ceil changes 10167changes changes-entry
10183changes-entry changes-entry-noupdate 10168changes-entry-noupdate check
10184check check-clean 10169check-clean check-files
10185check-files check-files-clean 10170check-files-clean check-vulnerable
10186check-vulnerable checksum 10171checksum checksum-phase
10187checksum-phase clean 10172clean clean-depends
10188clean-depends cleandir 10173cleandir commit
10189commit commit-changes-entry 10174commit-changes-entry compact
10190compact compiler 10175compiler conf
10191conf config.guess 10176config.guess config.sub
10192config.sub configuration 10177configuration configure
10193configure configure-env 10178configure-env configure-help
10194configure-help configure_args 10179configure_args connect
10195connect cos 10180cos cputime
10196cputime create-usergroup 10181create-usergroup csh
10197csh ctf 10182ctf debug
10198cvs debug 
10199declaration declare 10183declaration declare
10200defined depend 10184defined depend
10201dependencies depends 10185dependencies depends
10202depends-checksum depends-fetch 10186depends-checksum depends-fetch
10203deps describe 10187deps describe
10204destdir disable 10188destdir disable
10205distclean distinfo 10189distclean distinfo
10206dl dlopen 10190dl dlopen
10207do-buildlink do-clean 10191do-buildlink do-clean
10208do-configure do-configure-post-hook 10192do-configure do-configure-post-hook
10209do-extract do-fetch 10193do-extract do-fetch
10210do-install emul 10194do-install emul
10211emul-distinfo emul-fetch 10195emul-distinfo emul-fetch
10212emulation emulator 10196emulation emulator
10213enable endian 10197enable endian
10214endif enomem 10198enomem ensurepip
10215ensurepip err 10199err errx
10216errx etc 10200etc exp
10217exp extract-rpm 10201extract-rpm fabs
10218fabs feature 10202feature features
10219features fetch 10203fetch fetch-list
10220fetch-list follows 10204follows forbids
10221forbids form 10205form format
10222format fortify 10206fortify fortify_source
10223fortify_source fossil 
10224friend fts 10207friend fts
10225fts_close fts_open 10208fts_close fts_open
10226fts_read fts_set 10209fts_read fts_set
10227gcc gethostbyaddr 10210gcc gethostbyaddr
10228gethostbyname gethostbyname2 10211gethostbyname gethostbyname2
10229getopt_long getprogname 10212getopt_long getprogname
10230getservbyname getservbyport 10213getservbyname getservbyport
10231getservent gettext 10214getservent gettext
10232git github 10215github gitlab
10233gitlab glob 10216glob gnu
10234gnu gnu_configure_strict 10217gnu_configure_strict go
10235go go-deps 10218go-deps golang
10236golang guess-license 10219guess-license hashbang
10237hashbang heimdal 10220heimdal help
10238help hg 
10239imake increment 10221imake increment
10240indirect inet_aton 10222indirect inet_aton
10241interp interpreter 10223interp interpreter
10242intl ip4 10224intl ip4
10243ip6 ipv4 10225ip6 ipv4
10244ipv6 iso 10226ipv6 iso
10245kerberos krb 10227kerberos krb
10246krb5 ksh 10228krb5 ksh
10247lapack latex 10229lapack latex
10248libintl_bindtextdomain libintl_gettext 10230libintl_bindtextdomain libintl_gettext
10249libintl_textdomain libnbcompat 10231libintl_textdomain libnbcompat
10250libs libtool 10232libs libtool
10251licence license 10233licence license
10252lintl little-endian 10234lintl little-endian
10253lock locking 10235lock locking
10254lua lvalue 10236lua lvalue
10255make makesum 10237make makesum
10256memory mercurial 10238memory meta
10257meta meta-package 10239meta-package meta_package
10258meta_package mit-krb5 10240mit-krb5 mk.conf
10259mk.conf mkl 10241mkl mount
10260mount move 10242move moved
10261moved mprotect 10243mprotect mremap
10262mremap nb 10244nb nbcompat
10263nbcompat netlib 10245netlib node
10264node node.js 10246node.js nodejs
10265nodejs obstack 10247obstack obstack_ptr_grow
10266obstack_ptr_grow occurs 10248occurs only
10267only openblas 10249openblas options
10268options options.mk 10250options.mk order
10269order override 10251override override-intltool
10270override-intltool override-message-intltool 10252override-message-intltool package
10271package parallel 10253parallel path
10272path pax 10254pax paxctl
10273paxctl pbulk-index 10255pbulk-index pc
10274pc perl 10256perl perl5
10275perl5 perms 10257perms php
10276php pkg-build-options 10258pkg-build-options pkg-config
10277pkg-config pkg_build_options 10259pkg_build_options platform
10278platform plist 10260plist post-extract
10279post-extract post-fetch 10261post-fetch post-wrapper
10280post-wrapper pre-build-checks-hook 10262pre-build-checks-hook pre-configure
10281pre-configure pre-configure-checks-hook 10263pre-configure-checks-hook pre-extract
10282pre-extract pre-fetch 10264pre-fetch print-go-deps
10283print-go-deps print-plist 10265print-plist print-summary-data
10284print-summary-data privileged-install-hook 10266privileged-install-hook pypi
10285pypi python 10267python r
10286r readme-all 10268readme-all recursive
10287recursive recv 10269recv recvfrom
10288recvfrom regcomp 10270regcomp release-localbase-lock
10289release-localbase-lock release-lock 10271release-lock relro
10290relro remove 10272remove removed
10291removed rename 10273rename renamed
10292renamed reorder 10274reorder replace
10293replace replace_interpreter 10275replace_interpreter reproducible
10294reproducible resolv 10276resolv root
10295root ruby 10277ruby send
10296send sendfile 10278sendfile sendto
10297sendto setenv 10279setenv setgid
10298setgid setprogname 10280setprogname setuid
10299setuid sh 10281sh shebang
10300shebang show 10282show show-all
10301show-all show-build-defs 10283show-build-defs show-depends
10302show-depends show-depends-dirs 10284show-depends-dirs show-depends-pkgpaths
10303show-depends-pkgpaths show-depends-recursive 10285show-depends-recursive show-deps
10304show-deps show-distfiles 10286show-distfiles show-downlevel
10305show-downlevel show-subdir-var 10287show-subdir-var show-tools
10306show-tools show-var 10288show-var show-vars
10307show-vars snprintf 10289snprintf socket
10308socket ssp 10290ssp st_mode
10309st_mode stage-install 10291stage-install strcasestr
10310strcasestr strict 10292strict strip
10311strip strndup 10293strndup strnlen
10312strnlen strsep 10294strsep subst
10313subst substitutions 10295substitutions sun
10314subversion sun 
10315sunpro sunwspro 10296sunpro sunwspro
10316svn symlink 10297symlink test
10317test test-env 10298test-env tex
10318tex texlive 10299texlive tmp
10319tmp todo 10300todo tool
10320tool tools 10301tools tools-libtool-m4-override
10321tools-libtool-m4-override transitive 10302transitive type
10322type ulimit 10303ulimit undefined
10323undefined undo-replace 10304undo-replace unlimit
10324unlimit unprivileged 10305unprivileged unprivileged-install-hook
10325unprivileged-install-hook unstripped 10306unstripped update
10326update updated 10307updated upload
10327upload upload-distfiles 10308upload-distfiles use_tools
10328use_tools user 10309user utimes
10329utimes vasprintf 10310vasprintf verbose
10330verbose vsnprintf 10311vsnprintf warn
10331warn warning 10312warning warnings
10332warnings warnx 10313warnx wattr_off
10333wattr_off wattr_on 10314wattr_on work
10334work wrapper 10315wrapper wrkdir
10335wrkdir  
10336 10316
10337Appendix F. Editing guidelines for the pkgsrc guide 10317Appendix F. Editing guidelines for the pkgsrc guide
10338 10318
10339Table of Contents 10319Table of Contents
10340 10320
10341F.1. Make targets 10321F.1. Make targets
10342F.2. Procedure 10322F.2. Procedure
10343 10323
10344This section contains information on editing the pkgsrc guide itself. 10324This section contains information on editing the pkgsrc guide itself.
10345 10325
10346F.1. Make targets 10326F.1. Make targets
10347 10327
10348The pkgsrc guide's source code is stored in pkgsrc/doc/guide/files, and several 10328The pkgsrc guide's source code is stored in pkgsrc/doc/guide/files, and several
10349files are created from it: 10329files are created from it:
10350 10330
10351 * pkgsrc/doc/pkgsrc.txt 10331 * pkgsrc/doc/pkgsrc.txt
10352 10332
10353 * pkgsrc/doc/pkgsrc.html 10333 * pkgsrc/doc/pkgsrc.html
10354 10334
10355 * https://www.NetBSD.org/docs/pkgsrc/ 10335 * https://www.NetBSD.org/docs/pkgsrc/
10356 10336
10357 * https://www.NetBSD.org/docs/pkgsrc/pkgsrc.pdf: The PDF version of the 10337 * https://www.NetBSD.org/docs/pkgsrc/pkgsrc.pdf: The PDF version of the
10358 pkgsrc guide. 10338 pkgsrc guide.
10359 10339
10360 * https://www.NetBSD.org/docs/pkgsrc/pkgsrc.ps: PostScript version of the 10340 * https://www.NetBSD.org/docs/pkgsrc/pkgsrc.ps: PostScript version of the
10361 pkgsrc guide. 10341 pkgsrc guide.
10362 10342
10363F.2. Procedure 10343F.2. Procedure
10364 10344
10365The procedure to edit the pkgsrc guide is: 10345The procedure to edit the pkgsrc guide is:
10366 10346
10367 1. Make sure you have checked out the htdocs repository into a sibling 10347 1. Make sure you have checked out the htdocs repository into a sibling
10368 directory of your pkgsrc directory. You will need the ability to commit 10348 directory of your pkgsrc directory. You will need the ability to commit
10369 from both pkgsrc and htdocs. 10349 from both pkgsrc and htdocs.
10370 10350
10371 2. Make sure you have the packages needed to regenerate the pkgsrc guide (and 10351 2. Make sure you have the packages needed to regenerate the pkgsrc guide (and
10372 other XML-based NetBSD documentation) installed. These are automatically 10352 other XML-based NetBSD documentation) installed. These are automatically
10373 installed when you install the meta-pkgs/pkgsrc-guide-tools package. 10353 installed when you install the meta-pkgs/pkgsrc-guide-tools package.
10374 10354
10375 3. Run cd doc/guide to get to the right directory. All further steps will take 10355 3. Run cd doc/guide to get to the right directory. All further steps will take
10376 place here. 10356 place here.
10377 10357
10378 4. Edit the XML file(s) in files/. 10358 4. Edit the XML file(s) in files/.
10379 10359
10380 5. Run bmake to check the pkgsrc guide for valid XML and to build the final 10360 5. Run bmake to check the pkgsrc guide for valid XML and to build the final
10381 output files. If you get any errors at this stage, you can just edit the 10361 output files. If you get any errors at this stage, you can just edit the
10382 files, as there are only symbolic links in the working directory, pointing 10362 files, as there are only symbolic links in the working directory, pointing
10383 to the files in files/. 10363 to the files in files/.
10384 10364
10385 6. (cd files && cvs commit) 10365 6. (cd files && cvs commit)
10386 10366
10387 7. Run bmake clean && bmake to regenerate the output files with the proper RCS 10367 7. Run bmake clean && bmake to regenerate the output files with the proper RCS
10388 Ids. 10368 Ids.
10389 10369
10390 8. Run bmake regen to install and commit the files in both pkgsrc/doc and 10370 8. Run bmake regen to install and commit the files in both pkgsrc/doc and
10391 htdocs. 10371 htdocs.
10392 10372
10393 Note 10373 Note
10394 10374
10395 If you have added, removed or renamed some chapters, you need to 10375 If you have added, removed or renamed some chapters, you need to
10396 synchronize them using cvs add or cvs delete in the htdocs directory. 10376 synchronize them using cvs add or cvs delete in the htdocs directory.
10397 10377