| @@ -1,115 +1,115 @@ | | | @@ -1,115 +1,115 @@ |
1 | <!-- $NetBSD: devfaq.xml,v 1.14 2016/06/11 18:14:42 rillig Exp $ --> | | 1 | <!-- $NetBSD: devfaq.xml,v 1.15 2020/02/23 17:43:20 rillig Exp $ --> |
2 | | | 2 | |
3 | <chapter id="devfaq"> <?dbhtml filename="devfaq.html"?> | | 3 | <chapter id="devfaq"> <?dbhtml filename="devfaq.html"?> |
4 | <title>Frequently Asked Questions</title> | | 4 | <title>Frequently Asked Questions</title> |
5 | | | 5 | |
6 | <para>This section contains the answers to questions that may | | 6 | <para>This section contains the answers to questions that may |
7 | arise when you are writing a package. If you don't find your | | 7 | arise when you are writing a package. If you don't find your |
8 | question answered here, first have a look in the other chapters, | | 8 | question answered here, first have a look in the other chapters, |
9 | and if you still don't have the answer, ask on the | | 9 | and if you still don't have the answer, ask on the |
10 | <literal>pkgsrc-users</literal> mailing list.</para> | | 10 | <literal>pkgsrc-users</literal> mailing list.</para> |
11 | | | 11 | |
12 | <qandaset> | | 12 | <qandaset id="devfaq.qandaset"> |
13 | <qandaentry id="devfaq.makeflags"> | | 13 | <qandaentry id="devfaq.makeflags"> |
14 | | | 14 | |
15 | <question><para>What is the difference between | | 15 | <question id="devfaq.makeflags.q"><para>What is the difference between |
16 | <varname>MAKEFLAGS</varname>, <varname>.MAKEFLAGS</varname> and | | 16 | <varname>MAKEFLAGS</varname>, <varname>.MAKEFLAGS</varname> and |
17 | <varname>MAKE_FLAGS</varname>?</para></question> | | 17 | <varname>MAKE_FLAGS</varname>?</para></question> |
18 | | | 18 | |
19 | <answer><para><varname>MAKEFLAGS</varname> are the flags passed | | 19 | <answer><para><varname>MAKEFLAGS</varname> are the flags passed |
20 | to the pkgsrc-internal invocations of &man.make.1;, while | | 20 | to the pkgsrc-internal invocations of &man.make.1;, while |
21 | <varname>MAKE_FLAGS</varname> are the flags that are passed to | | 21 | <varname>MAKE_FLAGS</varname> are the flags that are passed to |
22 | the <varname>MAKE_PROGRAM</varname> when building the | | 22 | the <varname>MAKE_PROGRAM</varname> when building the |
23 | package. [FIXME: What is .MAKEFLAGS for?]</para></answer> | | 23 | package. [FIXME: What is .MAKEFLAGS for?]</para></answer> |
24 | | | 24 | |
25 | </qandaentry> | | 25 | </qandaentry> |
26 | <qandaentry id="devfaq.make"> | | 26 | <qandaentry id="devfaq.make"> |
27 | | | 27 | |
28 | <question><para>What is the difference between | | 28 | <question id="devfaq.make.q"><para>What is the difference between |
29 | <varname>MAKE</varname>, <varname>GMAKE</varname> and | | 29 | <varname>MAKE</varname>, <varname>GMAKE</varname> and |
30 | <varname>MAKE_PROGRAM</varname>?</para></question> | | 30 | <varname>MAKE_PROGRAM</varname>?</para></question> |
31 | | | 31 | |
32 | <answer><para><varname>MAKE</varname> is the path to the | | 32 | <answer><para><varname>MAKE</varname> is the path to the |
33 | &man.make.1; program that is used in the pkgsrc | | 33 | &man.make.1; program that is used in the pkgsrc |
34 | infrastructure. <varname>GMAKE</varname> is the path to GNU | | 34 | infrastructure. <varname>GMAKE</varname> is the path to GNU |
35 | Make, but you need to say <varname>USE_TOOLS+=gmake</varname> to | | 35 | Make, but you need to say <varname>USE_TOOLS+=gmake</varname> to |
36 | use that. <varname>MAKE_PROGRAM</varname> is the path to the | | 36 | use that. <varname>MAKE_PROGRAM</varname> is the path to the |
37 | Make program that is used for building the | | 37 | Make program that is used for building the |
38 | package.</para></answer> | | 38 | package.</para></answer> |
39 | | | 39 | |
40 | </qandaentry> | | 40 | </qandaentry> |
41 | <qandaentry id="devfaq.cc"> | | 41 | <qandaentry id="devfaq.cc"> |
42 | | | 42 | |
43 | <question><para>What is the difference between | | 43 | <question id="devfaq.cc.q"><para>What is the difference between |
44 | <varname>CC</varname>, <varname>PKG_CC</varname> and | | 44 | <varname>CC</varname>, <varname>PKG_CC</varname> and |
45 | <varname>PKGSRC_COMPILER</varname>?</para></question> | | 45 | <varname>PKGSRC_COMPILER</varname>?</para></question> |
46 | | | 46 | |
47 | <answer><para><varname>CC</varname> is the path to the real C | | 47 | <answer><para><varname>CC</varname> is the path to the real C |
48 | compiler, which can be configured by the pkgsrc user. | | 48 | compiler, which can be configured by the pkgsrc user. |
49 | <varname>PKG_CC</varname> is the path to the compiler wrapper. | | 49 | <varname>PKG_CC</varname> is the path to the compiler wrapper. |
50 | <varname>PKGSRC_COMPILER</varname> is <emphasis>not</emphasis> a | | 50 | <varname>PKGSRC_COMPILER</varname> is <emphasis>not</emphasis> a |
51 | path to a compiler, but the type of compiler that should be | | 51 | path to a compiler, but the type of compiler that should be |
52 | used. See <filename>mk/compiler.mk</filename> for more | | 52 | used. See <filename>mk/compiler.mk</filename> for more |
53 | information about the latter variable.</para></answer> | | 53 | information about the latter variable.</para></answer> |
54 | | | 54 | |
55 | </qandaentry> | | 55 | </qandaentry> |
56 | <qandaentry id="devfaq.bl3flags"> | | 56 | <qandaentry id="devfaq.bl3flags"> |
57 | | | 57 | |
58 | <question><para>What is the difference between | | 58 | <question id="devfaq.bl3flags.q"><para>What is the difference between |
59 | <varname>BUILDLINK_LDFLAGS</varname>, | | 59 | <varname>BUILDLINK_LDFLAGS</varname>, |
60 | <varname>BUILDLINK_LDADD</varname> and | | 60 | <varname>BUILDLINK_LDADD</varname> and |
61 | <varname>BUILDLINK_LIBS</varname>?</para></question> | | 61 | <varname>BUILDLINK_LIBS</varname>?</para></question> |
62 | | | 62 | |
63 | <answer><para>[FIXME]</para></answer> | | 63 | <answer><para>[FIXME]</para></answer> |
64 | | | 64 | |
65 | </qandaentry> | | 65 | </qandaentry> |
66 | <qandaentry id="devfaq.bl3prefix"> | | 66 | <qandaentry id="devfaq.bl3prefix"> |
67 | | | 67 | |
68 | <question><para>Why does <command>make show-var | | 68 | <question id="devfaq.bl3prefix.q"><para>Why does <command>make show-var |
69 | VARNAME=BUILDLINK_PREFIX.<replaceable>foo</replaceable></command> | | 69 | VARNAME=BUILDLINK_PREFIX.<replaceable>foo</replaceable></command> |
70 | say it's empty?</para></question> | | 70 | say it's empty?</para></question> |
71 | | | 71 | |
72 | <answer><para>For optimization reasons, some variables are only | | 72 | <answer><para>For optimization reasons, some variables are only |
73 | available in the <quote>wrapper</quote> phase and later. To | | 73 | available in the <quote>wrapper</quote> phase and later. To |
74 | <quote>simulate</quote> the wrapper phase, append | | 74 | <quote>simulate</quote> the wrapper phase, append |
75 | <command>PKG_PHASE=wrapper</command> to the above | | 75 | <command>PKG_PHASE=wrapper</command> to the above |
76 | command.</para></answer> | | 76 | command.</para></answer> |
77 | | | 77 | |
78 | </qandaentry> | | 78 | </qandaentry> |
79 | <qandaentry id="devfaq.master_sites"> | | 79 | <qandaentry id="devfaq.master_sites"> |
80 | | | 80 | |
81 | <question><para>What does | | 81 | <question id="devfaq.master_sites.q"><para>What does |
82 | <code>${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I | | 82 | <code>${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I |
83 | don't understand the <code>:=</code> inside | | 83 | don't understand the <code>:=</code> inside |
84 | it.</para></question> | | 84 | it.</para></question> |
85 | | | 85 | |
86 | <answer><para>The <code>:=</code> is not really an | | 86 | <answer><para>The <code>:=</code> is not really an |
87 | assignment operator, although it looks like it. | | 87 | assignment operator, although it looks like it. |
88 | Instead, it is a degenerate form of | | 88 | Instead, it is a degenerate form of |
89 | <code>${LIST:<replaceable>old_string</replaceable>=<replaceable>new_string</replaceable>}</code>, | | 89 | <code>${LIST:<replaceable>old_string</replaceable>=<replaceable>new_string</replaceable>}</code>, |
90 | which is documented in the &man.make.1; man page and which is | | 90 | which is documented in the &man.make.1; man page and which is |
91 | commonly used in the form <code>${SRCS:.c=.o}</code>. In the | | 91 | commonly used in the form <code>${SRCS:.c=.o}</code>. In the |
92 | case of <varname>MASTER_SITE_*</varname>, | | 92 | case of <varname>MASTER_SITE_*</varname>, |
93 | <replaceable>old_string</replaceable> is the empty string and | | 93 | <replaceable>old_string</replaceable> is the empty string and |
94 | <replaceable>new_string</replaceable> is | | 94 | <replaceable>new_string</replaceable> is |
95 | <code>package/</code>. That's where the | | 95 | <code>package/</code>. That's where the |
96 | <code>:</code> and the <code>=</code> fall | | 96 | <code>:</code> and the <code>=</code> fall |
97 | together.</para></answer> | | 97 | together.</para></answer> |
98 | | | 98 | |
99 | </qandaentry> | | 99 | </qandaentry> |
100 | <qandaentry id="devfaq.mailinglists"> | | 100 | <qandaentry id="devfaq.mailinglists"> |
101 | | | 101 | |
102 | <question><para>Which mailing lists are there for package | | 102 | <question id="devfaq.mailinglists.q"><para>Which mailing lists are there for package |
103 | developers?</para></question> | | 103 | developers?</para></question> |
104 | | | 104 | |
105 | <answer><variablelist> | | 105 | <answer><variablelist> |
106 | | | 106 | |
107 | <varlistentry><term><ulink | | 107 | <varlistentry><term><ulink |
108 | url="http://www.NetBSD.org/mailinglists/index.html#tech-pkg">tech-pkg</ulink></term> | | 108 | url="http://www.NetBSD.org/mailinglists/index.html#tech-pkg">tech-pkg</ulink></term> |
109 | | | 109 | |
110 | <listitem><para>This is a list for technical discussions related | | 110 | <listitem><para>This is a list for technical discussions related |
111 | to pkgsrc development, e.g. soliciting feedback for changes to | | 111 | to pkgsrc development, e.g. soliciting feedback for changes to |
112 | pkgsrc infrastructure, proposed new features, questions related | | 112 | pkgsrc infrastructure, proposed new features, questions related |
113 | to porting pkgsrc to a new platform, advice for maintaining a | | 113 | to porting pkgsrc to a new platform, advice for maintaining a |
114 | package, patches that affect many packages, help requests moved | | 114 | package, patches that affect many packages, help requests moved |
115 | from pkgsrc-users when an infrastructure bug is found, | | 115 | from pkgsrc-users when an infrastructure bug is found, |
| @@ -118,27 +118,27 @@ | | | @@ -118,27 +118,27 @@ |
118 | <varlistentry><term><ulink | | 118 | <varlistentry><term><ulink |
119 | url="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-bugs">pkgsrc-bugs</ulink></term> | | 119 | url="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-bugs">pkgsrc-bugs</ulink></term> |
120 | | | 120 | |
121 | <listitem><para>All bug reports in category "pkg" sent with | | 121 | <listitem><para>All bug reports in category "pkg" sent with |
122 | &man.send-pr.1; appear here. Please do not report your bugs here | | 122 | &man.send-pr.1; appear here. Please do not report your bugs here |
123 | directly; use one of the other mailing | | 123 | directly; use one of the other mailing |
124 | lists.</para></listitem></varlistentry> | | 124 | lists.</para></listitem></varlistentry> |
125 | | | 125 | |
126 | </variablelist></answer> | | 126 | </variablelist></answer> |
127 | | | 127 | |
128 | </qandaentry> | | 128 | </qandaentry> |
129 | <qandaentry id="devfaq.documentation"> | | 129 | <qandaentry id="devfaq.documentation"> |
130 | | | 130 | |
131 | <question><para>Where is the pkgsrc | | 131 | <question id="devfaq.documentation.q"><para>Where is the pkgsrc |
132 | documentation?</para></question> | | 132 | documentation?</para></question> |
133 | | | 133 | |
134 | <answer><para>There are many places where you can find | | 134 | <answer><para>There are many places where you can find |
135 | documentation about pkgsrc:</para> | | 135 | documentation about pkgsrc:</para> |
136 | | | 136 | |
137 | <itemizedlist> | | 137 | <itemizedlist> |
138 | | | 138 | |
139 | <listitem><para>The pkgsrc guide (this document) is a collection | | 139 | <listitem><para>The pkgsrc guide (this document) is a collection |
140 | of chapters that explain large parts of pkgsrc, but some | | 140 | of chapters that explain large parts of pkgsrc, but some |
141 | chapters tend to be outdated. Which ones they are is hard to | | 141 | chapters tend to be outdated. Which ones they are is hard to |
142 | say.</para></listitem> | | 142 | say.</para></listitem> |
143 | | | 143 | |
144 | <listitem><para>On the mailing list archives (see <ulink | | 144 | <listitem><para>On the mailing list archives (see <ulink |
| @@ -171,28 +171,28 @@ | | | @@ -171,28 +171,28 @@ |
171 | to see who has written it and ask on the | | 171 | to see who has written it and ask on the |
172 | <literal>tech-pkg</literal> mailing list, so that others can | | 172 | <literal>tech-pkg</literal> mailing list, so that others can |
173 | find your questions later (see above). To be sure that the | | 173 | find your questions later (see above). To be sure that the |
174 | developer in charge reads the mail, you may CC him or | | 174 | developer in charge reads the mail, you may CC him or |
175 | her.</para></listitem> | | 175 | her.</para></listitem> |
176 | | | 176 | |
177 | </itemizedlist> | | 177 | </itemizedlist> |
178 | | | 178 | |
179 | </answer> | | 179 | </answer> |
180 | | | 180 | |
181 | </qandaentry> | | 181 | </qandaentry> |
182 | | | 182 | |
183 | <qandaentry id="devfaq.too-much-time"> | | 183 | <qandaentry id="devfaq.too-much-time"> |
184 | <question><para>I have a little time to kill. What shall I | | 184 | <question id="devfaq.too-much-time.q"><para>I have a little time to kill. |
185 | do?</para></question> | | 185 | What shall I do?</para></question> |
186 | | | 186 | |
187 | <answer><para>This is not really an FAQ yet, but here's the answer | | 187 | <answer><para>This is not really an FAQ yet, but here's the answer |
188 | anyway.</para> | | 188 | anyway.</para> |
189 | | | 189 | |
190 | <itemizedlist> | | 190 | <itemizedlist> |
191 | <listitem><para>Run <command>pkg_chk -N</command> (from the | | 191 | <listitem><para>Run <command>pkg_chk -N</command> (from the |
192 | <filename role="pkg">pkgtools/pkg_chk</filename> package). It | | 192 | <filename role="pkg">pkgtools/pkg_chk</filename> package). It |
193 | will tell you about newer versions of installed packages that are | | 193 | will tell you about newer versions of installed packages that are |
194 | available, but not yet updated in pkgsrc.</para></listitem> | | 194 | available, but not yet updated in pkgsrc.</para></listitem> |
195 | | | 195 | |
196 | <listitem><para>Browse <filename>pkgsrc/doc/TODO</filename> | | 196 | <listitem><para>Browse <filename>pkgsrc/doc/TODO</filename> |
197 | — it contains a list of suggested new packages and a list of | | 197 | — it contains a list of suggested new packages and a list of |
198 | cleanups and enhancements for pkgsrc that would be nice to | | 198 | cleanups and enhancements for pkgsrc that would be nice to |