Annotation of htdocs/docs/pkgsrc/creating.html, revision 1.124
1.120 sevan 1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
1.1 dsieger 2: <html>
3: <head>
4: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
1.6 rillig 5: <title>Chapter 10. Creating a new pkgsrc package from scratch</title>
1.26 spz 6: <link rel="stylesheet" type="text/css" href="/global.css">
1.1 dsieger 7: <meta name="generator" content="DocBook XSL Stylesheets VX.X.X">
1.15 rillig 8: <link rel="home" href="index.html" title="The pkgsrc guide">
1.1 dsieger 9: <link rel="up" href="developers-guide.html" title="Part II. The pkgsrc developer's guide">
10: <link rel="prev" href="developers-guide.html" title="Part II. The pkgsrc developer's guide">
1.6 rillig 11: <link rel="next" href="components.html" title="Chapter 11. Package components - files, directories and contents">
1.1 dsieger 12: </head>
13: <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14: <div class="navheader">
15: <table width="100%" summary="Navigation header">
1.6 rillig 16: <tr><th colspan="3" align="center">Chapter 10. Creating a new pkgsrc package from scratch</th></tr>
1.1 dsieger 17: <tr>
18: <td width="20%" align="left">
19: <a accesskey="p" href="developers-guide.html">Prev</a> </td>
20: <th width="60%" align="center">Part II. The pkgsrc developer's guide</th>
21: <td width="20%" align="right"> <a accesskey="n" href="components.html">Next</a>
22: </td>
23: </tr>
24: </table>
25: <hr>
26: </div>
1.42 asau 27: <div class="chapter">
1.1 dsieger 28: <div class="titlepage"><div><div><h2 class="title">
1.6 rillig 29: <a name="creating"></a>Chapter 10. Creating a new pkgsrc package from scratch</h2></div></div></div>
1.1 dsieger 30: <div class="toc">
31: <p><b>Table of Contents</b></p>
1.100 leot 32: <dl class="toc">
1.6 rillig 33: <dt><span class="sect1"><a href="creating.html#creating.common">10.1. Common types of packages</a></span></dt>
1.1 dsieger 34: <dd><dl>
1.6 rillig 35: <dt><span class="sect2"><a href="creating.html#creating.perl-module">10.1.1. Perl modules</a></span></dt>
1.124 ! wiz 36: <dt><span class="sect2"><a href="creating.html#creating.python-module">10.1.2. Python modules and programs</a></span></dt>
1.1 dsieger 37: </dl></dd>
1.6 rillig 38: <dt><span class="sect1"><a href="creating.html#creating.examples">10.2. Examples</a></span></dt>
39: <dd><dl><dt><span class="sect2"><a href="creating.html#creating.nvu">10.2.1. How the www/nvu package came into pkgsrc</a></span></dt></dl></dd>
1.1 dsieger 40: </dl>
41: </div>
42: <p>When you find a package that is not yet in pkgsrc, you
43: most likely have a URL from where you can download the source
44: code. Starting with this URL, creating a package involves only a
45: few steps.</p>
1.24 wiz 46: <div class="procedure"><ol class="procedure" type="1">
1.120 sevan 47: <li class="step"><p>First, install the packages <a href="http://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/url2pkg/README.html" target="_top"><code class="filename">pkgtools/url2pkg</code></a> and <a href="http://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>.</p></li>
1.42 asau 48: <li class="step"><p>Then, choose one of the top-level directories as the
1.1 dsieger 49: category in which you want to place your package. You can also create a
50: directory of your own (maybe called <code class="filename">local</code>). In that
51: category directory, create another directory for your package and change
52: into it.</p></li>
1.42 asau 53: <li class="step"><p>Run the program <span class="command"><strong>url2pkg</strong></span>, which will ask
1.1 dsieger 54: you for a URL. Enter the URL of the distribution file (in most cases a
55: <code class="filename">.tar.gz</code> file) and watch how the basic ingredients
56: of your package are created automatically. The distribution file is
57: extracted automatically to fill in some details in the
58: <code class="filename">Makefile</code> that would otherwise have to be done
59: manually.</p></li>
1.42 asau 60: <li class="step">
1.1 dsieger 61: <p>Examine the extracted files to determine the dependencies of
62: your package. Ideally, this is mentioned in some
63: <code class="filename">README</code> file, but things may differ. For each of
64: these dependencies, look where it exists in pkgsrc, and if there is a
65: file called <code class="filename">buildlink3.mk</code> in that directory, add a
66: line to your package <code class="filename">Makefile</code> which includes that
67: file just before the last line. If the
1.26 spz 68: <code class="filename">buildlink3.mk</code> file does not exist, it must be
69: created first. The <code class="filename">buildlink3.mk</code> file makes sure that the package's include files and libraries are provided.</p>
70: <p>If you just need binaries from a package, add a
1.1 dsieger 71: <code class="varname">DEPENDS</code> line to the Makefile, which specifies the
72: version of the dependency and where it can be found in pkgsrc. This line
73: should be placed in the third paragraph. If the dependency is only
74: needed for building the package, but not when using it, use
75: <code class="varname">BUILD_DEPENDS</code> instead of <code class="varname">DEPENDS</code>.
76: Your package may then look like this:</p>
77: <pre class="programlisting">
78: [...]
79:
1.66 asau 80: BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt
1.1 dsieger 81: DEPENDS+= screen-[0-9]*:../../misc/screen
82: DEPENDS+= screen>=4.0:../../misc/screen
83:
84: [...]
85:
86: .include "../../<em class="replaceable"><code>category</code></em>/<em class="replaceable"><code>package</code></em>/buildlink3.mk"
87: .include "../../devel/glib2/buildlink3.mk"
88: .include "../../mk/bsd.pkg.mk"
89: </pre>
90: </li>
1.42 asau 91: <li class="step"><p>Run <span class="command"><strong>pkglint</strong></span> to see what things still need
1.24 wiz 92: to be done to make your package a <span class="quote">“<span class="quote">good</span>”</span> one. If you don't
1.10 hubertf 93: know what pkglint's warnings want to tell you, try <span class="command"><strong>pkglint
94: --explain</strong></span> or <span class="command"><strong>pkglint
1.1 dsieger 95: -e</strong></span>, which outputs additional
96: explanations.</p></li>
1.42 asau 97: <li class="step"><p>In many cases the package is not yet ready to build. You can
1.10 hubertf 98: find instructions for the most common cases in the next section, <a class="xref" href="creating.html#creating.common" title="10.1. Common types of packages">Section 10.1, “Common types of packages”</a>. After you have followed the instructions
1.1 dsieger 99: over there, you can hopefully continue here.</p></li>
1.42 asau 100: <li class="step"><p>Run <span class="command"><strong>bmake clean</strong></span> to clean the working
1.1 dsieger 101: directory from the extracted files. Besides these files, a lot of cache
102: files and other system information has been saved in the working
103: directory, which may become wrong after you edited the
104: <code class="filename">Makefile</code>.</p></li>
1.42 asau 105: <li class="step"><p>Now, run <span class="command"><strong>bmake</strong></span> to build the package. For
1.10 hubertf 106: the various things that can go wrong in this phase, consult <a class="xref" href="fixes.html" title="Chapter 19. Making your package work">Chapter 19, <i>Making your package work</i></a>.</p></li>
1.42 asau 107: <li class="step"><p>When the package builds fine, the next step is to install
1.10 hubertf 108: the package. Run <span class="command"><strong>bmake install</strong></span> and hope that
1.1 dsieger 109: everything works.</p></li>
1.42 asau 110: <li class="step"><p>Up to now, the file <code class="filename">PLIST</code>, which
1.1 dsieger 111: contains a list of the files that are installed by the package, is
1.10 hubertf 112: nearly empty. Run <span class="command"><strong>bmake print-PLIST
1.1 dsieger 113: >PLIST</strong></span> to generate a probably correct list. Check
114: the file using your preferred text editor to see if the list of
115: files looks plausible.</p></li>
1.42 asau 116: <li class="step"><p>Run <span class="command"><strong>pkglint</strong></span> again to see if the generated
1.1 dsieger 117: <code class="filename">PLIST</code> contains garbage or not.</p></li>
1.42 asau 118: <li class="step"><p>When you ran <span class="command"><strong>bmake install</strong></span>, the package
1.1 dsieger 119: has been registered in the database of installed files, but with an
1.10 hubertf 120: empty list of files. To fix this, run <span class="command"><strong>bmake deinstall</strong></span>
121: and <span class="command"><strong>bmake install</strong></span> again. Now the package is
1.1 dsieger 122: registered with the list of files from
123: <code class="filename">PLIST</code>.</p></li>
1.42 asau 124: <li class="step"><p>Run <span class="command"><strong>bmake package</strong></span> to create a binary
1.1 dsieger 125: package from the set of installed files.</p></li>
126: </ol></div>
1.42 asau 127: <div class="sect1">
1.1 dsieger 128: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
1.6 rillig 129: <a name="creating.common"></a>10.1. Common types of packages</h2></div></div></div>
1.42 asau 130: <div class="sect2">
1.1 dsieger 131: <div class="titlepage"><div><div><h3 class="title">
1.6 rillig 132: <a name="creating.perl-module"></a>10.1.1. Perl modules</h3></div></div></div>
1.1 dsieger 133: <p>Simple Perl modules are handled automatically by
1.10 hubertf 134: <span class="command"><strong>url2pkg</strong></span>, including dependencies.</p>
1.1 dsieger 135: </div>
1.42 asau 136: <div class="sect2">
1.1 dsieger 137: <div class="titlepage"><div><div><h3 class="title">
1.124 ! wiz 138: <a name="creating.python-module"></a>10.1.2. Python modules and programs</h3></div></div></div>
1.17 imil 139: <p>Python modules and programs packages are easily created using a
140: set of predefined variables.</p>
141: <p>
1.63 wiz 142: If some Python versions are not supported by the software, set the
143: <code class="varname">PYTHON_VERSIONS_INCOMPATIBLE</code> variable to the Python versions
144: that are not supported, e.g.
1.17 imil 145: </p>
146: <pre class="programlisting">
1.93 sevan 147: PYTHON_VERSIONS_INCOMPATIBLE= 27
1.17 imil 148: </pre>
149: <p>
1.103 wiz 150: If the packaged software is a Python module, include one of
151: <code class="filename">../../lang/python/egg.mk</code>,
152: <code class="filename">../../lang/python/distutils.mk</code>, or
153: <code class="filename">../../lang/python/extension.mk</code>.</p>
154: <p>Most Python packages use either <span class="quote">“<span class="quote">distutils</span>”</span> or
155: easy-setup/setuptools (<span class="quote">“<span class="quote">eggs</span>”</span>).
156: if the packaged software is using setuptools, you only need
157: to include <span class="quote">“<span class="quote"><code class="filename">../../lang/python/egg.mk</code></span>”</span>.
158: Otherwise, if the software uses <span class="quote">“<span class="quote">distutils</span>”</span>, include
159: <span class="quote">“<span class="quote"><code class="filename">../../lang/python/distutils.mk</code></span>”</span>.
160: so pkgsrc will use this framework.
161: <span class="quote">“<span class="quote">distutils</span>”</span> uses a script called <code class="filename">setup.py</code>,
162: if the <span class="quote">“<span class="quote">distutils</span>”</span> driver is not called
163: <code class="filename">setup.py</code>, set the <code class="varname">PYSETUP</code> variable
164: to the name of the script.</p>
165: <p>Either way, the package directory should be called
1.24 wiz 166: <span class="quote">“<span class="quote">py-software</span>”</span> and <code class="varname">PKGNAME</code> should be set to
167: <span class="quote">“<span class="quote">${PYPKGPREFIX}-${DISTNAME}</span>”</span>, e.g.
1.17 imil 168: </p>
169: <pre class="programlisting">
170: DISTNAME= foopymodule-1.2.10
171: PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
172: </pre>
1.63 wiz 173: <p>If it is an application, include
174: <span class="quote">“<span class="quote"><code class="filename">../../lang/python/application.mk</code></span>”</span>.
175: In order to correctly set the path to the Python interpreter, use the
1.17 imil 176: <code class="varname">REPLACE_PYTHON</code> variable and set it to the list of files
1.36 wiz 177: (paths relative to <code class="varname">WRKSRC</code>) that must be corrected.
1.63 wiz 178: For example:
1.17 imil 179: </p>
180: <pre class="programlisting">
1.36 wiz 181: REPLACE_PYTHON= *.py
1.17 imil 182: </pre>
1.63 wiz 183: <p>Some Python modules have separate distributions for Python-2.x
184: and Python-3.x support. In pkgsrc this is handled by the
185: <code class="filename">versioned_dependencies.mk</code> file. Set
186: <code class="varname">PYTHON_VERSIONED_DEPENDENCIES</code> to the list of
187: packages that should be depended upon and include
188: <span class="quote">“<span class="quote"><code class="filename">../../lang/python/versioned_dependencies.mk</code></span>”</span>,
189: then the pkgsrc infrastructure will depend on the appropriate package
190: version. For example:
191: </p>
192: <pre class="programlisting">
1.122 wiz 193: PYTHON_VERSIONED_DEPENDENCIES=gobject
1.63 wiz 194: </pre>
195: <p>
196: Look inside <code class="filename">versioned_dependencies.mk</code> for a list
197: of supported packages.</p>
1.17 imil 198: </div>
1.1 dsieger 199: </div>
1.42 asau 200: <div class="sect1">
1.1 dsieger 201: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
1.6 rillig 202: <a name="creating.examples"></a>10.2. Examples</h2></div></div></div>
1.42 asau 203: <div class="sect2">
1.1 dsieger 204: <div class="titlepage"><div><div><h3 class="title">
1.6 rillig 205: <a name="creating.nvu"></a>10.2.1. How the www/nvu package came into pkgsrc</h3></div></div></div>
1.42 asau 206: <div class="sect3">
1.1 dsieger 207: <div class="titlepage"><div><div><h4 class="title">
1.6 rillig 208: <a name="creating.nvu.init"></a>10.2.1.1. The initial package</h4></div></div></div>
1.1 dsieger 209: <p>Looking at the file <code class="filename">pkgsrc/doc/TODO</code>, I saw
1.24 wiz 210: that the <span class="quote">“<span class="quote">nvu</span>”</span> package has not yet been imported into
1.1 dsieger 211: pkgsrc. As the description says it has to do with the web, the obvious
1.24 wiz 212: choice for the category is <span class="quote">“<span class="quote">www</span>”</span>.</p>
1.1 dsieger 213: <pre class="programlisting">
214: <code class="prompt">$</code> mkdir www/nvu
215: <code class="prompt">$</code> cd www/nvu
216: </pre>
217: <p>The web site says that the sources are available as a tar file, so
1.10 hubertf 218: I fed that URL to the <span class="command"><strong>url2pkg</strong></span> program:</p>
1.1 dsieger 219: <pre class="programlisting">
220: <code class="prompt">$</code> url2pkg http://cvs.nvu.com/download/nvu-1.0-sources.tar.bz2
221: </pre>
222: <p>My editor popped up, and I added a <code class="varname">PKGNAME</code> line
223: below the <code class="varname">DISTNAME</code> line, as the package name should
1.24 wiz 224: not have the word <span class="quote">“<span class="quote">sources</span>”</span> in it. I also filled in the
1.1 dsieger 225: <code class="varname">MAINTAINER</code>, <code class="varname">HOMEPAGE</code> and
226: <code class="varname">COMMENT</code> fields. Then the package
227: <code class="filename">Makefile</code> looked like that:</p>
228: <pre class="programlisting">
1.121 sevan 229: # $NetBSD $
1.1 dsieger 230: #
231:
232: DISTNAME= nvu-1.0-sources
233: PKGNAME= nvu-1.0
234: CATEGORIES= www
235: MASTER_SITES= http://cvs.nvu.com/download/
236: EXTRACT_SUFX= .tar.bz2
237:
238: MAINTAINER= rillig@NetBSD.org
239: HOMEPAGE= http://cvs.nvu.com/
240: COMMENT= Web Authoring System
241:
242: # url2pkg-marker (please do not remove this line.)
243: .include "../../mk/bsd.pkg.mk"
244: </pre>
1.123 wiz 245: <p>On the first line of output above, an artificial space has been added between NetBSD and $,
1.121 sevan 246: this is a workaround to prevent CVS expanding to the filename of the
247: guide.</p>
1.1 dsieger 248: <p>Then, I quit the editor and watched pkgsrc downloading a large
249: source archive:</p>
250: <pre class="programlisting">
251: url2pkg> Running "make makesum" ...
252: => Required installed package digest>=20010302: digest-20060826 found
253: => Fetching nvu-1.0-sources.tar.bz2
254: Requesting http://cvs.nvu.com/download/nvu-1.0-sources.tar.bz2
255: 100% |*************************************| 28992 KB 150.77 KB/s00:00 ETA
256: 29687976 bytes retrieved in 03:12 (150.77 KB/s)
257: url2pkg> Running "make extract" ...
258: => Required installed package digest>=20010302: digest-20060826 found
259: => Checksum SHA1 OK for nvu-1.0-sources.tar.bz2
260: => Checksum RMD160 OK for nvu-1.0-sources.tar.bz2
261: work.bacc -> /tmp/roland/pkgsrc/www/nvu/work.bacc
262: ===> Installing dependencies for nvu-1.0
263: ===> Overriding tools for nvu-1.0
264: ===> Extracting for nvu-1.0
265: url2pkg> Adjusting the Makefile.
266:
267: Remember to correct CATEGORIES, HOMEPAGE, COMMENT, and DESCR when you're done!
268:
269: Good luck! (See pkgsrc/doc/pkgsrc.txt for some more help :-)
270: </pre>
271: </div>
1.42 asau 272: <div class="sect3">
1.1 dsieger 273: <div class="titlepage"><div><div><h4 class="title">
1.6 rillig 274: <a name="creating.nvu.problems"></a>10.2.1.2. Fixing all kinds of problems to make the package work</h4></div></div></div>
1.1 dsieger 275: <p>Now that the package has been extracted, let's see what's inside
276: it. The package has a <code class="filename">README.txt</code>, but that only
277: says something about mozilla, so it's probably useless for seeing what
278: dependencies this package has. But since there is a GNU configure script
279: in the package, let's hope that it will complain about everything it
280: needs.</p>
281: <pre class="programlisting">
282: <code class="prompt">$</code> bmake
283: => Required installed package digest>=20010302: digest-20060826 found
284: => Checksum SHA1 OK for nvu-1.0-sources.tar.bz2
285: => Checksum RMD160 OK for nvu-1.0-sources.tar.bz2
286: ===> Patching for nvu-1.0
287: ===> Creating toolchain wrappers for nvu-1.0
288: ===> Configuring for nvu-1.0
289: [...]
290: configure: error: Perl 5.004 or higher is required.
291: [...]
292: WARNING: Please add USE_TOOLS+=perl to the package Makefile.
293: [...]
294: </pre>
295: <p>That worked quite well. So I opened the package Makefile in my
296: editor, and since it already has a <code class="varname">USE_TOOLS</code> line, I
1.24 wiz 297: just appended <span class="quote">“<span class="quote">perl</span>”</span> to it. Since the dependencies of the
1.1 dsieger 298: package have changed now, and since a perl wrapper is automatically
1.24 wiz 299: installed in the <span class="quote">“<span class="quote">tools</span>”</span> phase, I need to build the package
1.1 dsieger 300: from scratch.</p>
301: <pre class="programlisting">
302: <code class="prompt">$</code> bmake clean
303: ===> Cleaning for nvu-1.0
304: <code class="prompt">$</code> bmake
305: [...]
306: *** /tmp/roland/pkgsrc/www/nvu/work.bacc/.tools/bin/make is not \
307: GNU Make. You will not be able to build Mozilla without GNU Make.
308: [...]
309: </pre>
1.24 wiz 310: <p>So I added <span class="quote">“<span class="quote">gmake</span>”</span> to the
1.1 dsieger 311: <code class="varname">USE_TOOLS</code> line and tried again (from scratch).</p>
312: <pre class="programlisting">
313: [...]
314: checking for GTK - version >= 1.2.0... no
315: *** Could not run GTK test program, checking why...
316: [...]
317: </pre>
318: <p>Now to the other dependencies. The first question is: Where is the
319: GTK package hidden in pkgsrc?</p>
320: <pre class="programlisting">
321: <code class="prompt">$</code> echo ../../*/gtk*
322: [many packages ...]
323: <code class="prompt">$</code> echo ../../*/gtk
324: ../../x11/gtk
325: <code class="prompt">$</code> echo ../../*/gtk2
326: ../../x11/gtk2
327: <code class="prompt">$</code> echo ../../*/gtk2/bui*
328: ../../x11/gtk2/buildlink3.mk
329: </pre>
330: <p>The first try was definitely too broad. The second one had exactly
331: one result, which is very good. But there is one pitfall with GNOME
332: packages. Before GNOME 2 had been released, there were already many
333: GNOME 1 packages in pkgsrc. To be able to continue to use these
334: packages, the GNOME 2 packages were imported as separate packages, and
1.24 wiz 335: their names usually have a <span class="quote">“<span class="quote">2</span>”</span> appended. So I checked
1.1 dsieger 336: whether this was the case here, and indeed it was.</p>
337: <p>Since the GTK2 package has a <code class="filename">buildlink3.mk</code>
338: file, adding the dependency is very easy. I just inserted an
339: <code class="literal">.include</code> line before the last line of the package
340: <code class="filename">Makefile</code>, so that it now looks like this:</p>
341: <pre class="programlisting">
342: [...]
343: .include "../../x11/gtk2/buildlink3.mk"
344: .include "../../mk/bsd.pkg.mk
345: </pre>
1.10 hubertf 346: <p>After another <span class="command"><strong>bmake clean && bmake</strong></span>, the answer
1.1 dsieger 347: was:</p>
348: <pre class="programlisting">
349: [...]
350: checking for gtk-config... /home/roland/pkg/bin/gtk-config
351: checking for GTK - version >= 1.2.0... no
352: *** Could not run GTK test program, checking why...
353: *** The test program failed to compile or link. See the file config.log for the
354: *** exact error that occured. This usually means GTK was incorrectly installed
355: *** or that you have moved GTK since it was installed. In the latter case, you
356: *** may want to edit the gtk-config script: /home/roland/pkg/bin/gtk-config
357: configure: error: Test for GTK failed.
358: [...]
359: </pre>
1.24 wiz 360: <p>In this particular case, the assumption that <span class="quote">“<span class="quote">every package
361: prefers GNOME 2</span>”</span> had been wrong. The first of the lines above
1.1 dsieger 362: told me that this package really wanted to have the GNOME 1 version of
363: GTK. If the package had looked for GTK2, it would have looked for
1.10 hubertf 364: <span class="command"><strong>pkg-config</strong></span> instead of <span class="command"><strong>gtk-config</strong></span>.
1.1 dsieger 365: So I changed the <code class="literal">x11/gtk2</code> to
366: <code class="literal">x11/gtk</code> in the package <code class="filename">Makefile</code>,
367: and tried again.</p>
368: <pre class="programlisting">
369: [...]
1.59 jnemeth 370: cc -o xpidl.o -c -DOSTYPE=\"NetBSD3\" -DOSARCH=\"NetBSD\" [...]
1.1 dsieger 371: In file included from xpidl.c:42:
372: xpidl.h:53:24: libIDL/IDL.h: No such file or directory
373: In file included from xpidl.c:42:
374: xpidl.h:132: error: parse error before "IDL_ns"
375: [...]
376: </pre>
377: <p>The package still does not find all of its dependencies. Now the
378: question is: Which package provides the
379: <code class="filename">libIDL/IDL.h</code> header file?</p>
380: <pre class="programlisting">
381: <code class="prompt">$</code> echo ../../*/*idl*
382: ../../devel/py-idle ../../wip/idled ../../x11/acidlaunch
383: <code class="prompt">$</code> echo ../../*/*IDL*
384: ../../net/libIDL
385: </pre>
386: <p>Let's take the one from the second try. So I included the
387: <code class="filename">../../net/libIDL/buildlink3.mk</code> file and tried
388: again. But the error didn't change. After digging through some of the
389: code, I concluded that the build process of the package was broken and
390: couldn't have ever worked, but since the Mozilla source tree is quite
391: large, I didn't want to fix it. So I added the following to the package
392: <code class="filename">Makefile</code> and tried again:</p>
393: <pre class="programlisting">
394: CPPFLAGS+= -I${BUILDLINK_PREFIX.libIDL}/include/libIDL-2.0
395: BUILDLINK_TRANSFORM+= -l:IDL:IDL-2
396: </pre>
397: <p>The latter line is needed because the package expects the library
398: <code class="filename">libIDL.so</code>, but only
399: <code class="filename">libIDL-2.so</code> is available. So I told the compiler
400: wrapper to rewrite that on the fly.</p>
401: <p>The next problem was related to a recent change of the FreeType
1.120 sevan 402: interface. I looked up in <a href="http://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/www/seamonkey/README.html" target="_top"><code class="filename">www/seamonkey</code></a>
1.1 dsieger 403: which patch files were relevant for this issue and copied them to the
404: <code class="filename">patches</code> directory. Then I retried, fixed the
405: patches so that they applied cleanly and retried again. This time,
406: everything worked.</p>
407: </div>
1.42 asau 408: <div class="sect3">
1.1 dsieger 409: <div class="titlepage"><div><div><h4 class="title">
1.6 rillig 410: <a name="creating.nvu.inst"></a>10.2.1.3. Installing the package</h4></div></div></div>
1.1 dsieger 411: <pre class="programlisting">
412: <code class="prompt">$</code> bmake CHECK_FILES=no install
413: [...]
414: <code class="prompt">$</code> bmake print-PLIST >PLIST
415: <code class="prompt">$</code> bmake deinstall
416: <code class="prompt">$</code> bmake install
417: </pre>
418: </div>
419: </div>
420: </div>
421: </div>
422: <div class="navfooter">
423: <hr>
424: <table width="100%" summary="Navigation footer">
425: <tr>
426: <td width="40%" align="left">
427: <a accesskey="p" href="developers-guide.html">Prev</a> </td>
428: <td width="20%" align="center"><a accesskey="u" href="developers-guide.html">Up</a></td>
429: <td width="40%" align="right"> <a accesskey="n" href="components.html">Next</a>
430: </td>
431: </tr>
432: <tr>
433: <td width="40%" align="left" valign="top">Part II. The pkgsrc developer's guide </td>
434: <td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
1.6 rillig 435: <td width="40%" align="right" valign="top"> Chapter 11. Package components - files, directories and contents</td>
1.1 dsieger 436: </tr>
437: </table>
438: </div>
439: </body>
440: </html>
CVSweb <webmaster@jp.NetBSD.org>