"../handbook.sgml" -> "../book.sgml" in Emacs local variables section.
Fix up the list of questions and answers as a <qandaset> instead of an <itemizedlist>. This entails converting the <itemizedlist> element to a <qandaset>, and wrapping each question paragraph in a <question> and </question> pair, and each answer in a <answer>...</answer> pair. Then, search and replace for all the "Q. " and "A. " and remove them, because the stylesheet adds these for you. Finally, some of the questions are entered as <para><anchor id="foo">... Delete the anchor element, and put the id attribute on the para instead, so you have <para id="foo">... I'm not entirely sure why, but if you have that in the first form then the stylesheets don't include the links properly in the table of questions. If you have it in the second form then everything works fine.
This commit is contained in:
parent
e1302f8644
commit
4e9bf8757d
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=5431
4 changed files with 956 additions and 552 deletions
en_US.ISO8859-1/books
en_US.ISO_8859-1/books
|
@ -1,9 +1,9 @@
|
|||
<!--
|
||||
The FreeBSD Documentation Project
|
||||
|
||||
$Id: chapter.sgml,v 1.44 1999-08-18 18:58:10 nik Exp $
|
||||
$Id: chapter.sgml,v 1.45 1999-08-23 21:06:02 nik Exp $
|
||||
-->
|
||||
|
||||
|
||||
<chapter id="ports">
|
||||
<title>Installing Applications: The Ports collection</title>
|
||||
|
||||
|
@ -513,31 +513,42 @@ do-install:
|
|||
<sect1>
|
||||
<title>Some Questions and Answers</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Q. I thought this was going to be a discussion about
|
||||
<qandaset>
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I thought this was going to be a discussion about
|
||||
modems??!</para>
|
||||
|
||||
<para>A. Ah. You must be thinking of the serial ports on the back of
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Ah. You must be thinking of the serial ports on the back of
|
||||
your computer. We are using “port” here to mean the
|
||||
result of “porting” a program from one version of Unix
|
||||
to another. (It is an unfortunate bad habit of computer people to
|
||||
use the same word to refer to several completely different
|
||||
things).</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I thought you were supposed to use packages to install extra
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I thought you were supposed to use packages to install extra
|
||||
programs?</para>
|
||||
|
||||
<para>A. Yes, that is usually the quickest and easiest way of doing
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, that is usually the quickest and easiest way of doing
|
||||
it.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. So why bother with ports then?</para>
|
||||
|
||||
<para>A. Several reasons:-</para>
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>So why bother with ports then?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Several reasons:-</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
|
@ -576,24 +587,32 @@ do-install:
|
|||
-->;-)</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-patch"> Q. What is a patch?</para>
|
||||
|
||||
<para>A. A patch is a small (usually) file that specifies how to go
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-patch"> What is a patch?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>A patch is a small (usually) file that specifies how to go
|
||||
from one version of a file to another. It contains text that says,
|
||||
in effect, things like “delete line 23”, “add
|
||||
these two lines after line 468” or “change line 197 to
|
||||
this”. Also known as a “diff”, since it is
|
||||
generated by a program of that name.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-tarball"> Q. What is all this about
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-tarball"> What is all this about
|
||||
tarballs?</para>
|
||||
|
||||
<para>A. It is a file ending in <filename>.tar</filename> or
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>It is a file ending in <filename>.tar</filename> or
|
||||
<filename>.tar.gz</filename> (with variations like
|
||||
<filename>.tar.Z</filename>, or even <filename>.tgz</filename> if
|
||||
you are trying to squeeze the names into a DOS filesystem).</para>
|
||||
|
@ -613,22 +632,28 @@ do-install:
|
|||
&prompt.user; <userinput>tar xzvf foobar.tar.gz</userinput>
|
||||
&prompt.user; <userinput>tar tvf foobar.tar</userinput>
|
||||
&prompt.user; <userinput>tar xvf foobar.tar</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-checksum"> Q. And a checksum?</para>
|
||||
|
||||
<para>A. It is a number generated by adding up all the data in the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-checksum">And a checksum?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>It is a number generated by adding up all the data in the
|
||||
file you want to check. If any of the characters change, the
|
||||
checksum will no longer be equal to the total, so a simple
|
||||
comparison will allow you to spot the difference. (In practice, it
|
||||
is done in a more complicated way to spot problems like
|
||||
position-swapping, which will not show up with a simplistic
|
||||
addition).</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I did what you said for <link linkend="ports-cd">compiling
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I did what you said for <link linkend="ports-cd">compiling
|
||||
ports from a CDROM</link> and it worked great until I tried to
|
||||
install the kermit port:-</para>
|
||||
|
||||
|
@ -637,38 +662,48 @@ do-install:
|
|||
>> Attempting to fetch from ftp://kermit.columbia.edu/kermit/archives/.</screen>
|
||||
|
||||
<para>Why can it not be found? Have I got a dud CDROM?</para>
|
||||
|
||||
<para>A. The licensing terms for kermit do not allow us to put the
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The licensing terms for kermit do not allow us to put the
|
||||
tarball for it on the CDROM, so you will have to fetch it by hand
|
||||
— sorry! The reason why you got all those error messages was
|
||||
because you were not connected to the Internet at the time. Once
|
||||
you have downloaded it from any of the sites above, you can re-start
|
||||
the process (try and choose the nearest site to you, though, to save
|
||||
your time and the Internet's bandwidth).</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I did that, but when I tried to put it into
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I did that, but when I tried to put it into
|
||||
<filename>/usr/ports/distfiles</filename> I got some error about not
|
||||
having permission.</para>
|
||||
|
||||
<para>A. The ports mechanism looks for the tarball in
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The ports mechanism looks for the tarball in
|
||||
<filename>/usr/ports/distfiles</filename>, but you will not be able
|
||||
to copy anything there because it is sym-linked to the CDROM, which
|
||||
is read-only. You can tell it to look somewhere else by
|
||||
doing</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>make DISTDIR=<replaceable>/where/you/put/it</replaceable> install</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. Does the ports scheme only work if you have everything in
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>Does the ports scheme only work if you have everything in
|
||||
<filename>/usr/ports</filename>? My system administrator says I must
|
||||
put everything under
|
||||
<filename>/u/people/guests/wurzburger</filename>, but it does not
|
||||
seem to work.</para>
|
||||
|
||||
<para>A. You can use the <makevar>PORTSDIR</makevar> and
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>You can use the <makevar>PORTSDIR</makevar> and
|
||||
<makevar>PREFIX</makevar> variables to tell the ports mechanism to
|
||||
use different directories. For instance,</para>
|
||||
|
||||
|
@ -693,15 +728,19 @@ do-install:
|
|||
<para>If you do not fancy typing all that in every time you install a
|
||||
port (and to be honest, who would?), it is a good idea to put these
|
||||
variables into your environment.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I do not have a FreeBSD CDROM, but I would like to have all
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I do not have a FreeBSD CDROM, but I would like to have all
|
||||
the tarballs handy on my system so I do not have to wait for a
|
||||
download every time I install a port. Is there an easy way to get
|
||||
them all at once?</para>
|
||||
|
||||
<para>A. To get every single tarball for the ports collection,
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>To get every single tarball for the ports collection,
|
||||
do</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports</userinput>
|
||||
|
@ -714,57 +753,77 @@ do-install:
|
|||
|
||||
<para>and for just one port — well, I think you have guessed
|
||||
already.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I know it is probably faster to fetch the tarballs from one
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I know it is probably faster to fetch the tarballs from one
|
||||
of the FreeBSD mirror sites close by. Is there any way to tell the
|
||||
port to fetch them from servers other than ones listed in the
|
||||
MASTER_SITES?</para>
|
||||
|
||||
<para>A. Yes. If you know, for example, <hostid
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes. If you know, for example, <hostid
|
||||
role="fqdn">ftp.FreeBSD.org</hostid> is much closer than sites
|
||||
listed in <makevar>MASTER_SITES</makevar>, do as following
|
||||
example.</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports/<replaceable>directory</replaceable></userinput>
|
||||
&prompt.root; <userinput>make MASTER_SITE_OVERRIDE=ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I want to know what files make is going to need before it
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I want to know what files make is going to need before it
|
||||
tries to pull them down.</para>
|
||||
|
||||
<para>A. <command>make fetch-list</command> will display a list of
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para><command>make fetch-list</command> will display a list of
|
||||
the files needed for a port.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. Is there any way to stop the port from compiling? I want to
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>Is there any way to stop the port from compiling? I want to
|
||||
do some hacking on the source before I install it, but it is a bit
|
||||
tiresome having to watch it and hit control-C every time.</para>
|
||||
|
||||
<para>A. Doing <command>make extract</command> will stop it after it
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Doing <command>make extract</command> will stop it after it
|
||||
has fetched and extracted the source code.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I am trying to make my own port and I want to be able to
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I am trying to make my own port and I want to be able to
|
||||
stop it compiling until I have had a chance to see if my patches
|
||||
worked properly. Is there something like <command>make
|
||||
extract</command>, but for patches?</para>
|
||||
|
||||
<para>A. Yep, <command>make patch</command> is what you want. You
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yep, <command>make patch</command> is what you want. You
|
||||
will probably find the <makevar>PATCH_DEBUG</makevar> option useful
|
||||
as well. And by the way, thank you for your efforts!</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I have heard that some compiler options can cause bugs. Is
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I have heard that some compiler options can cause bugs. Is
|
||||
this true? How can I make sure that I compile ports with the right
|
||||
settings?</para>
|
||||
|
||||
<para>A. Yes, with version 2.6.3 of <command>gcc</command> (the
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, with version 2.6.3 of <command>gcc</command> (the
|
||||
version shipped with FreeBSD 2.1.0 and 2.1.5), the
|
||||
<option>-O2</option> option could result in buggy code unless you
|
||||
used the <option>-fno-strength-reduce</option> option as well.
|
||||
|
@ -772,7 +831,6 @@ do-install:
|
|||
<emphasis>should</emphasis> be able to specify the compiler options
|
||||
used by something like</para>
|
||||
|
||||
|
||||
<screen>&prompt.root; <userinput>make CFLAGS='-O2 -fno-strength-reduce' install</userinput></screen>
|
||||
|
||||
<para>or by editing <filename>/etc/make.conf</filename>, but
|
||||
|
@ -781,13 +839,17 @@ do-install:
|
|||
and inspect the Makefiles by hand, but this can get tedious if the
|
||||
source has lots of sub-directories, each with their own
|
||||
Makefiles.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. There are so many ports it is hard to find the one I want.
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>There are so many ports it is hard to find the one I want.
|
||||
Is there a list anywhere of what ports are available?</para>
|
||||
|
||||
<para>A. Look in the <filename>INDEX</filename> file in
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Look in the <filename>INDEX</filename> file in
|
||||
<filename>/usr/ports</filename>. If you would like to search the
|
||||
ports collection for a keyword, you can do that too. For example,
|
||||
you can find ports relevant to the LISP programming language
|
||||
|
@ -795,28 +857,36 @@ do-install:
|
|||
|
||||
<screen>&prompt.user; <userinput>cd /usr/ports</userinput>
|
||||
&prompt.user; <userinput>make search key=lisp</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I went to install the <literal>foo</literal> port but the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I went to install the <literal>foo</literal> port but the
|
||||
system suddenly stopped compiling it and starting compiling the
|
||||
<literal>bar</literal> port. What is going on?</para>
|
||||
|
||||
<para>A. The <literal>foo</literal> port needs something that is
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The <literal>foo</literal> port needs something that is
|
||||
supplied with <literal>bar</literal> — for instance, if
|
||||
<literal>foo</literal> uses graphics, <literal>bar</literal> might
|
||||
have a library with useful graphics processing routines. Or
|
||||
<literal>bar</literal> might be a tool that is needed to compile the
|
||||
<literal>foo</literal> port.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-remove"> Q. I installed the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-remove"> I installed the
|
||||
<literal>grizzle</literal> program from the ports and frankly it is
|
||||
a complete waste of disk space. I want to delete it but I do not
|
||||
know where it put all the files. Any clues?</para>
|
||||
|
||||
<para>A. No problem, just do</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>No problem, just do</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_delete grizzle-6.5</userinput></screen>
|
||||
|
||||
|
@ -824,27 +894,35 @@ do-install:
|
|||
|
||||
<screen>&prompt.root; <userinput>cd <replaceable>/usr/ports/somewhere/grizzle</replaceable></userinput>
|
||||
&prompt.root; <userinput>make deinstall</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
Q. Hang on a minute, you have to know the version number to use
|
||||
Hang on a minute, you have to know the version number to use
|
||||
that command. You do not seriously expect me to remember that, do
|
||||
you??</para>
|
||||
|
||||
<para>A. Not at all, you can find it out by doing</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Not at all, you can find it out by doing</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_info -a | grep grizzle</userinput>
|
||||
Information for grizzle-6.5:
|
||||
grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arcade game.</screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. Talking of disk space, the ports directory seems to be
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>Talking of disk space, the ports directory seems to be
|
||||
taking up an awful lot of room. Is it safe to go in there and
|
||||
delete things?</para>
|
||||
|
||||
<para>A. Yes, if you have installed the program and are fairly
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, if you have installed the program and are fairly
|
||||
certain you will not need the source again, there is no point in
|
||||
keeping it hanging around. The best way to do this is</para>
|
||||
|
||||
|
@ -853,44 +931,60 @@ grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arc
|
|||
|
||||
<para>which will go through all the ports subdirectories and delete
|
||||
everything except the skeletons for each port.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I tried that and it still left all those tarballs or
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I tried that and it still left all those tarballs or
|
||||
whatever you called them in the <filename>distfiles</filename>
|
||||
directory. Can I delete those as well?</para>
|
||||
|
||||
<para>A. Yes, if you are sure you have finished with them, those can
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, if you are sure you have finished with them, those can
|
||||
go as well.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I like having lots and lots of programs to play with. Is
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I like having lots and lots of programs to play with. Is
|
||||
there any way of installing all the ports in one go?</para>
|
||||
|
||||
<para>A. Just do</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Just do</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports</userinput>
|
||||
&prompt.root; <userinput>make install</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. OK, I tried that, but I thought it would take a very long
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>OK, I tried that, but I thought it would take a very long
|
||||
time so I went to bed and left it to get on with it. When I looked
|
||||
at the computer this morning, it had only done three and a half
|
||||
ports. Did something go wrong?</para>
|
||||
|
||||
<para>A. No, the problem is that some of the ports need to ask you
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>No, the problem is that some of the ports need to ask you
|
||||
questions that we cannot answer for you (eg “Do you want to
|
||||
print on A4 or US letter sized paper?”) and they need to have
|
||||
someone on hand to answer them.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I really do not want to spend all day staring at the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I really do not want to spend all day staring at the
|
||||
monitor. Any better ideas?</para>
|
||||
|
||||
<para>A. OK, do this before you go to bed/work/the local
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>OK, do this before you go to bed/work/the local
|
||||
park:-</para>
|
||||
|
||||
<screen>&prompt.root <userinput>cd /usr/ports</userinput>
|
||||
|
@ -903,15 +997,19 @@ grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arc
|
|||
&prompt.root; <userinput>make -DIS_INTERACTIVE install</userinput></screen>
|
||||
|
||||
<para>to finish the job.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. At work, we are using <literal>frobble</literal>, which is
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>At work, we are using <literal>frobble</literal>, which is
|
||||
in your ports collection, but we have altered it quite a bit to get
|
||||
it to do what we need. Is there any way of making our own packages,
|
||||
so we can distribute it more easily around our sites?</para>
|
||||
|
||||
<para>A. No problem, assuming you know how to make patches for your
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>No problem, assuming you know how to make patches for your
|
||||
changes:-</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd <replaceable>/usr/ports/somewhere/frobble</replaceable></userinput>
|
||||
|
@ -920,24 +1018,27 @@ grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arc
|
|||
[Apply your patches]
|
||||
&prompt.root; <userinput>cd ../..</userinput>
|
||||
&prompt.root; <userinput>make package</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. This ports stuff is really clever. I am desperate to find
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>This ports stuff is really clever. I am desperate to find
|
||||
out how you did it. What is the secret?</para>
|
||||
|
||||
<para>A. Nothing secret about it at all, just look at the
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Nothing secret about it at all, just look at the
|
||||
<filename>bsd.ports.mk</filename> and
|
||||
<filename>bsd.ports.subdir.mk</filename> files in your <ulink
|
||||
URL="file://localhost/usr/ports/Mk/">makefiles
|
||||
directory.</ulink></para>
|
||||
|
||||
<note>
|
||||
<para>Readers with an aversion to intricate shell-scripts are
|
||||
advised not to follow this link...)</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
</qandaset>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="porting">
|
||||
|
@ -4674,6 +4775,6 @@ pre-install:
|
|||
sgml-indent-data: t
|
||||
sgml-omittag: nil
|
||||
sgml-always-quote-attributes: t
|
||||
sgml-parent-document: ("../handbook.sgml" "part" "chapter")
|
||||
sgml-parent-document: ("../book.sgml" "part" "chapter")
|
||||
End:
|
||||
-->
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<!--
|
||||
The FreeBSD Documentation Project
|
||||
|
||||
$Id: book.sgml,v 1.44 1999-08-18 18:58:10 nik Exp $
|
||||
$Id: book.sgml,v 1.45 1999-08-23 21:06:02 nik Exp $
|
||||
-->
|
||||
|
||||
|
||||
<chapter id="ports">
|
||||
<title>Installing Applications: The Ports collection</title>
|
||||
|
||||
|
@ -513,31 +513,42 @@ do-install:
|
|||
<sect1>
|
||||
<title>Some Questions and Answers</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Q. I thought this was going to be a discussion about
|
||||
<qandaset>
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I thought this was going to be a discussion about
|
||||
modems??!</para>
|
||||
|
||||
<para>A. Ah. You must be thinking of the serial ports on the back of
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Ah. You must be thinking of the serial ports on the back of
|
||||
your computer. We are using “port” here to mean the
|
||||
result of “porting” a program from one version of Unix
|
||||
to another. (It is an unfortunate bad habit of computer people to
|
||||
use the same word to refer to several completely different
|
||||
things).</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I thought you were supposed to use packages to install extra
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I thought you were supposed to use packages to install extra
|
||||
programs?</para>
|
||||
|
||||
<para>A. Yes, that is usually the quickest and easiest way of doing
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, that is usually the quickest and easiest way of doing
|
||||
it.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. So why bother with ports then?</para>
|
||||
|
||||
<para>A. Several reasons:-</para>
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>So why bother with ports then?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Several reasons:-</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
|
@ -576,24 +587,32 @@ do-install:
|
|||
-->;-)</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-patch"> Q. What is a patch?</para>
|
||||
|
||||
<para>A. A patch is a small (usually) file that specifies how to go
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-patch"> What is a patch?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>A patch is a small (usually) file that specifies how to go
|
||||
from one version of a file to another. It contains text that says,
|
||||
in effect, things like “delete line 23”, “add
|
||||
these two lines after line 468” or “change line 197 to
|
||||
this”. Also known as a “diff”, since it is
|
||||
generated by a program of that name.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-tarball"> Q. What is all this about
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-tarball"> What is all this about
|
||||
tarballs?</para>
|
||||
|
||||
<para>A. It is a file ending in <filename>.tar</filename> or
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>It is a file ending in <filename>.tar</filename> or
|
||||
<filename>.tar.gz</filename> (with variations like
|
||||
<filename>.tar.Z</filename>, or even <filename>.tgz</filename> if
|
||||
you are trying to squeeze the names into a DOS filesystem).</para>
|
||||
|
@ -613,22 +632,28 @@ do-install:
|
|||
&prompt.user; <userinput>tar xzvf foobar.tar.gz</userinput>
|
||||
&prompt.user; <userinput>tar tvf foobar.tar</userinput>
|
||||
&prompt.user; <userinput>tar xvf foobar.tar</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-checksum"> Q. And a checksum?</para>
|
||||
|
||||
<para>A. It is a number generated by adding up all the data in the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-checksum">And a checksum?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>It is a number generated by adding up all the data in the
|
||||
file you want to check. If any of the characters change, the
|
||||
checksum will no longer be equal to the total, so a simple
|
||||
comparison will allow you to spot the difference. (In practice, it
|
||||
is done in a more complicated way to spot problems like
|
||||
position-swapping, which will not show up with a simplistic
|
||||
addition).</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I did what you said for <link linkend="ports-cd">compiling
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I did what you said for <link linkend="ports-cd">compiling
|
||||
ports from a CDROM</link> and it worked great until I tried to
|
||||
install the kermit port:-</para>
|
||||
|
||||
|
@ -637,38 +662,48 @@ do-install:
|
|||
>> Attempting to fetch from ftp://kermit.columbia.edu/kermit/archives/.</screen>
|
||||
|
||||
<para>Why can it not be found? Have I got a dud CDROM?</para>
|
||||
|
||||
<para>A. The licensing terms for kermit do not allow us to put the
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The licensing terms for kermit do not allow us to put the
|
||||
tarball for it on the CDROM, so you will have to fetch it by hand
|
||||
— sorry! The reason why you got all those error messages was
|
||||
because you were not connected to the Internet at the time. Once
|
||||
you have downloaded it from any of the sites above, you can re-start
|
||||
the process (try and choose the nearest site to you, though, to save
|
||||
your time and the Internet's bandwidth).</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I did that, but when I tried to put it into
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I did that, but when I tried to put it into
|
||||
<filename>/usr/ports/distfiles</filename> I got some error about not
|
||||
having permission.</para>
|
||||
|
||||
<para>A. The ports mechanism looks for the tarball in
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The ports mechanism looks for the tarball in
|
||||
<filename>/usr/ports/distfiles</filename>, but you will not be able
|
||||
to copy anything there because it is sym-linked to the CDROM, which
|
||||
is read-only. You can tell it to look somewhere else by
|
||||
doing</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>make DISTDIR=<replaceable>/where/you/put/it</replaceable> install</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. Does the ports scheme only work if you have everything in
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>Does the ports scheme only work if you have everything in
|
||||
<filename>/usr/ports</filename>? My system administrator says I must
|
||||
put everything under
|
||||
<filename>/u/people/guests/wurzburger</filename>, but it does not
|
||||
seem to work.</para>
|
||||
|
||||
<para>A. You can use the <makevar>PORTSDIR</makevar> and
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>You can use the <makevar>PORTSDIR</makevar> and
|
||||
<makevar>PREFIX</makevar> variables to tell the ports mechanism to
|
||||
use different directories. For instance,</para>
|
||||
|
||||
|
@ -693,15 +728,19 @@ do-install:
|
|||
<para>If you do not fancy typing all that in every time you install a
|
||||
port (and to be honest, who would?), it is a good idea to put these
|
||||
variables into your environment.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I do not have a FreeBSD CDROM, but I would like to have all
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I do not have a FreeBSD CDROM, but I would like to have all
|
||||
the tarballs handy on my system so I do not have to wait for a
|
||||
download every time I install a port. Is there an easy way to get
|
||||
them all at once?</para>
|
||||
|
||||
<para>A. To get every single tarball for the ports collection,
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>To get every single tarball for the ports collection,
|
||||
do</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports</userinput>
|
||||
|
@ -714,57 +753,77 @@ do-install:
|
|||
|
||||
<para>and for just one port — well, I think you have guessed
|
||||
already.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I know it is probably faster to fetch the tarballs from one
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I know it is probably faster to fetch the tarballs from one
|
||||
of the FreeBSD mirror sites close by. Is there any way to tell the
|
||||
port to fetch them from servers other than ones listed in the
|
||||
MASTER_SITES?</para>
|
||||
|
||||
<para>A. Yes. If you know, for example, <hostid
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes. If you know, for example, <hostid
|
||||
role="fqdn">ftp.FreeBSD.org</hostid> is much closer than sites
|
||||
listed in <makevar>MASTER_SITES</makevar>, do as following
|
||||
example.</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports/<replaceable>directory</replaceable></userinput>
|
||||
&prompt.root; <userinput>make MASTER_SITE_OVERRIDE=ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I want to know what files make is going to need before it
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I want to know what files make is going to need before it
|
||||
tries to pull them down.</para>
|
||||
|
||||
<para>A. <command>make fetch-list</command> will display a list of
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para><command>make fetch-list</command> will display a list of
|
||||
the files needed for a port.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. Is there any way to stop the port from compiling? I want to
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>Is there any way to stop the port from compiling? I want to
|
||||
do some hacking on the source before I install it, but it is a bit
|
||||
tiresome having to watch it and hit control-C every time.</para>
|
||||
|
||||
<para>A. Doing <command>make extract</command> will stop it after it
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Doing <command>make extract</command> will stop it after it
|
||||
has fetched and extracted the source code.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I am trying to make my own port and I want to be able to
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I am trying to make my own port and I want to be able to
|
||||
stop it compiling until I have had a chance to see if my patches
|
||||
worked properly. Is there something like <command>make
|
||||
extract</command>, but for patches?</para>
|
||||
|
||||
<para>A. Yep, <command>make patch</command> is what you want. You
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yep, <command>make patch</command> is what you want. You
|
||||
will probably find the <makevar>PATCH_DEBUG</makevar> option useful
|
||||
as well. And by the way, thank you for your efforts!</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I have heard that some compiler options can cause bugs. Is
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I have heard that some compiler options can cause bugs. Is
|
||||
this true? How can I make sure that I compile ports with the right
|
||||
settings?</para>
|
||||
|
||||
<para>A. Yes, with version 2.6.3 of <command>gcc</command> (the
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, with version 2.6.3 of <command>gcc</command> (the
|
||||
version shipped with FreeBSD 2.1.0 and 2.1.5), the
|
||||
<option>-O2</option> option could result in buggy code unless you
|
||||
used the <option>-fno-strength-reduce</option> option as well.
|
||||
|
@ -772,7 +831,6 @@ do-install:
|
|||
<emphasis>should</emphasis> be able to specify the compiler options
|
||||
used by something like</para>
|
||||
|
||||
|
||||
<screen>&prompt.root; <userinput>make CFLAGS='-O2 -fno-strength-reduce' install</userinput></screen>
|
||||
|
||||
<para>or by editing <filename>/etc/make.conf</filename>, but
|
||||
|
@ -781,13 +839,17 @@ do-install:
|
|||
and inspect the Makefiles by hand, but this can get tedious if the
|
||||
source has lots of sub-directories, each with their own
|
||||
Makefiles.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. There are so many ports it is hard to find the one I want.
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>There are so many ports it is hard to find the one I want.
|
||||
Is there a list anywhere of what ports are available?</para>
|
||||
|
||||
<para>A. Look in the <filename>INDEX</filename> file in
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Look in the <filename>INDEX</filename> file in
|
||||
<filename>/usr/ports</filename>. If you would like to search the
|
||||
ports collection for a keyword, you can do that too. For example,
|
||||
you can find ports relevant to the LISP programming language
|
||||
|
@ -795,28 +857,36 @@ do-install:
|
|||
|
||||
<screen>&prompt.user; <userinput>cd /usr/ports</userinput>
|
||||
&prompt.user; <userinput>make search key=lisp</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I went to install the <literal>foo</literal> port but the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I went to install the <literal>foo</literal> port but the
|
||||
system suddenly stopped compiling it and starting compiling the
|
||||
<literal>bar</literal> port. What is going on?</para>
|
||||
|
||||
<para>A. The <literal>foo</literal> port needs something that is
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The <literal>foo</literal> port needs something that is
|
||||
supplied with <literal>bar</literal> — for instance, if
|
||||
<literal>foo</literal> uses graphics, <literal>bar</literal> might
|
||||
have a library with useful graphics processing routines. Or
|
||||
<literal>bar</literal> might be a tool that is needed to compile the
|
||||
<literal>foo</literal> port.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-remove"> Q. I installed the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-remove"> I installed the
|
||||
<literal>grizzle</literal> program from the ports and frankly it is
|
||||
a complete waste of disk space. I want to delete it but I do not
|
||||
know where it put all the files. Any clues?</para>
|
||||
|
||||
<para>A. No problem, just do</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>No problem, just do</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_delete grizzle-6.5</userinput></screen>
|
||||
|
||||
|
@ -824,27 +894,35 @@ do-install:
|
|||
|
||||
<screen>&prompt.root; <userinput>cd <replaceable>/usr/ports/somewhere/grizzle</replaceable></userinput>
|
||||
&prompt.root; <userinput>make deinstall</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
Q. Hang on a minute, you have to know the version number to use
|
||||
Hang on a minute, you have to know the version number to use
|
||||
that command. You do not seriously expect me to remember that, do
|
||||
you??</para>
|
||||
|
||||
<para>A. Not at all, you can find it out by doing</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Not at all, you can find it out by doing</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_info -a | grep grizzle</userinput>
|
||||
Information for grizzle-6.5:
|
||||
grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arcade game.</screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. Talking of disk space, the ports directory seems to be
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>Talking of disk space, the ports directory seems to be
|
||||
taking up an awful lot of room. Is it safe to go in there and
|
||||
delete things?</para>
|
||||
|
||||
<para>A. Yes, if you have installed the program and are fairly
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, if you have installed the program and are fairly
|
||||
certain you will not need the source again, there is no point in
|
||||
keeping it hanging around. The best way to do this is</para>
|
||||
|
||||
|
@ -853,44 +931,60 @@ grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arc
|
|||
|
||||
<para>which will go through all the ports subdirectories and delete
|
||||
everything except the skeletons for each port.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I tried that and it still left all those tarballs or
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I tried that and it still left all those tarballs or
|
||||
whatever you called them in the <filename>distfiles</filename>
|
||||
directory. Can I delete those as well?</para>
|
||||
|
||||
<para>A. Yes, if you are sure you have finished with them, those can
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, if you are sure you have finished with them, those can
|
||||
go as well.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I like having lots and lots of programs to play with. Is
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I like having lots and lots of programs to play with. Is
|
||||
there any way of installing all the ports in one go?</para>
|
||||
|
||||
<para>A. Just do</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Just do</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports</userinput>
|
||||
&prompt.root; <userinput>make install</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. OK, I tried that, but I thought it would take a very long
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>OK, I tried that, but I thought it would take a very long
|
||||
time so I went to bed and left it to get on with it. When I looked
|
||||
at the computer this morning, it had only done three and a half
|
||||
ports. Did something go wrong?</para>
|
||||
|
||||
<para>A. No, the problem is that some of the ports need to ask you
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>No, the problem is that some of the ports need to ask you
|
||||
questions that we cannot answer for you (eg “Do you want to
|
||||
print on A4 or US letter sized paper?”) and they need to have
|
||||
someone on hand to answer them.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I really do not want to spend all day staring at the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I really do not want to spend all day staring at the
|
||||
monitor. Any better ideas?</para>
|
||||
|
||||
<para>A. OK, do this before you go to bed/work/the local
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>OK, do this before you go to bed/work/the local
|
||||
park:-</para>
|
||||
|
||||
<screen>&prompt.root <userinput>cd /usr/ports</userinput>
|
||||
|
@ -903,15 +997,19 @@ grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arc
|
|||
&prompt.root; <userinput>make -DIS_INTERACTIVE install</userinput></screen>
|
||||
|
||||
<para>to finish the job.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. At work, we are using <literal>frobble</literal>, which is
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>At work, we are using <literal>frobble</literal>, which is
|
||||
in your ports collection, but we have altered it quite a bit to get
|
||||
it to do what we need. Is there any way of making our own packages,
|
||||
so we can distribute it more easily around our sites?</para>
|
||||
|
||||
<para>A. No problem, assuming you know how to make patches for your
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>No problem, assuming you know how to make patches for your
|
||||
changes:-</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd <replaceable>/usr/ports/somewhere/frobble</replaceable></userinput>
|
||||
|
@ -920,24 +1018,27 @@ grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arc
|
|||
[Apply your patches]
|
||||
&prompt.root; <userinput>cd ../..</userinput>
|
||||
&prompt.root; <userinput>make package</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. This ports stuff is really clever. I am desperate to find
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>This ports stuff is really clever. I am desperate to find
|
||||
out how you did it. What is the secret?</para>
|
||||
|
||||
<para>A. Nothing secret about it at all, just look at the
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Nothing secret about it at all, just look at the
|
||||
<filename>bsd.ports.mk</filename> and
|
||||
<filename>bsd.ports.subdir.mk</filename> files in your <ulink
|
||||
URL="file://localhost/usr/ports/Mk/">makefiles
|
||||
directory.</ulink></para>
|
||||
|
||||
<note>
|
||||
<para>Readers with an aversion to intricate shell-scripts are
|
||||
advised not to follow this link...)</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
</qandaset>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="porting">
|
||||
|
@ -4674,6 +4775,6 @@ pre-install:
|
|||
sgml-indent-data: t
|
||||
sgml-omittag: nil
|
||||
sgml-always-quote-attributes: t
|
||||
sgml-parent-document: ("../handbook.sgml" "part" "chapter")
|
||||
sgml-parent-document: ("../book.sgml" "part" "chapter")
|
||||
End:
|
||||
-->
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<!--
|
||||
The FreeBSD Documentation Project
|
||||
|
||||
$Id: chapter.sgml,v 1.44 1999-08-18 18:58:10 nik Exp $
|
||||
$Id: chapter.sgml,v 1.45 1999-08-23 21:06:02 nik Exp $
|
||||
-->
|
||||
|
||||
|
||||
<chapter id="ports">
|
||||
<title>Installing Applications: The Ports collection</title>
|
||||
|
||||
|
@ -513,31 +513,42 @@ do-install:
|
|||
<sect1>
|
||||
<title>Some Questions and Answers</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Q. I thought this was going to be a discussion about
|
||||
<qandaset>
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I thought this was going to be a discussion about
|
||||
modems??!</para>
|
||||
|
||||
<para>A. Ah. You must be thinking of the serial ports on the back of
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Ah. You must be thinking of the serial ports on the back of
|
||||
your computer. We are using “port” here to mean the
|
||||
result of “porting” a program from one version of Unix
|
||||
to another. (It is an unfortunate bad habit of computer people to
|
||||
use the same word to refer to several completely different
|
||||
things).</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I thought you were supposed to use packages to install extra
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I thought you were supposed to use packages to install extra
|
||||
programs?</para>
|
||||
|
||||
<para>A. Yes, that is usually the quickest and easiest way of doing
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, that is usually the quickest and easiest way of doing
|
||||
it.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. So why bother with ports then?</para>
|
||||
|
||||
<para>A. Several reasons:-</para>
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>So why bother with ports then?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Several reasons:-</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
|
@ -576,24 +587,32 @@ do-install:
|
|||
-->;-)</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-patch"> Q. What is a patch?</para>
|
||||
|
||||
<para>A. A patch is a small (usually) file that specifies how to go
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-patch"> What is a patch?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>A patch is a small (usually) file that specifies how to go
|
||||
from one version of a file to another. It contains text that says,
|
||||
in effect, things like “delete line 23”, “add
|
||||
these two lines after line 468” or “change line 197 to
|
||||
this”. Also known as a “diff”, since it is
|
||||
generated by a program of that name.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-tarball"> Q. What is all this about
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-tarball"> What is all this about
|
||||
tarballs?</para>
|
||||
|
||||
<para>A. It is a file ending in <filename>.tar</filename> or
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>It is a file ending in <filename>.tar</filename> or
|
||||
<filename>.tar.gz</filename> (with variations like
|
||||
<filename>.tar.Z</filename>, or even <filename>.tgz</filename> if
|
||||
you are trying to squeeze the names into a DOS filesystem).</para>
|
||||
|
@ -613,22 +632,28 @@ do-install:
|
|||
&prompt.user; <userinput>tar xzvf foobar.tar.gz</userinput>
|
||||
&prompt.user; <userinput>tar tvf foobar.tar</userinput>
|
||||
&prompt.user; <userinput>tar xvf foobar.tar</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-checksum"> Q. And a checksum?</para>
|
||||
|
||||
<para>A. It is a number generated by adding up all the data in the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-checksum">And a checksum?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>It is a number generated by adding up all the data in the
|
||||
file you want to check. If any of the characters change, the
|
||||
checksum will no longer be equal to the total, so a simple
|
||||
comparison will allow you to spot the difference. (In practice, it
|
||||
is done in a more complicated way to spot problems like
|
||||
position-swapping, which will not show up with a simplistic
|
||||
addition).</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I did what you said for <link linkend="ports-cd">compiling
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I did what you said for <link linkend="ports-cd">compiling
|
||||
ports from a CDROM</link> and it worked great until I tried to
|
||||
install the kermit port:-</para>
|
||||
|
||||
|
@ -637,38 +662,48 @@ do-install:
|
|||
>> Attempting to fetch from ftp://kermit.columbia.edu/kermit/archives/.</screen>
|
||||
|
||||
<para>Why can it not be found? Have I got a dud CDROM?</para>
|
||||
|
||||
<para>A. The licensing terms for kermit do not allow us to put the
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The licensing terms for kermit do not allow us to put the
|
||||
tarball for it on the CDROM, so you will have to fetch it by hand
|
||||
— sorry! The reason why you got all those error messages was
|
||||
because you were not connected to the Internet at the time. Once
|
||||
you have downloaded it from any of the sites above, you can re-start
|
||||
the process (try and choose the nearest site to you, though, to save
|
||||
your time and the Internet's bandwidth).</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I did that, but when I tried to put it into
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I did that, but when I tried to put it into
|
||||
<filename>/usr/ports/distfiles</filename> I got some error about not
|
||||
having permission.</para>
|
||||
|
||||
<para>A. The ports mechanism looks for the tarball in
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The ports mechanism looks for the tarball in
|
||||
<filename>/usr/ports/distfiles</filename>, but you will not be able
|
||||
to copy anything there because it is sym-linked to the CDROM, which
|
||||
is read-only. You can tell it to look somewhere else by
|
||||
doing</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>make DISTDIR=<replaceable>/where/you/put/it</replaceable> install</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. Does the ports scheme only work if you have everything in
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>Does the ports scheme only work if you have everything in
|
||||
<filename>/usr/ports</filename>? My system administrator says I must
|
||||
put everything under
|
||||
<filename>/u/people/guests/wurzburger</filename>, but it does not
|
||||
seem to work.</para>
|
||||
|
||||
<para>A. You can use the <makevar>PORTSDIR</makevar> and
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>You can use the <makevar>PORTSDIR</makevar> and
|
||||
<makevar>PREFIX</makevar> variables to tell the ports mechanism to
|
||||
use different directories. For instance,</para>
|
||||
|
||||
|
@ -693,15 +728,19 @@ do-install:
|
|||
<para>If you do not fancy typing all that in every time you install a
|
||||
port (and to be honest, who would?), it is a good idea to put these
|
||||
variables into your environment.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I do not have a FreeBSD CDROM, but I would like to have all
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I do not have a FreeBSD CDROM, but I would like to have all
|
||||
the tarballs handy on my system so I do not have to wait for a
|
||||
download every time I install a port. Is there an easy way to get
|
||||
them all at once?</para>
|
||||
|
||||
<para>A. To get every single tarball for the ports collection,
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>To get every single tarball for the ports collection,
|
||||
do</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports</userinput>
|
||||
|
@ -714,57 +753,77 @@ do-install:
|
|||
|
||||
<para>and for just one port — well, I think you have guessed
|
||||
already.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I know it is probably faster to fetch the tarballs from one
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I know it is probably faster to fetch the tarballs from one
|
||||
of the FreeBSD mirror sites close by. Is there any way to tell the
|
||||
port to fetch them from servers other than ones listed in the
|
||||
MASTER_SITES?</para>
|
||||
|
||||
<para>A. Yes. If you know, for example, <hostid
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes. If you know, for example, <hostid
|
||||
role="fqdn">ftp.FreeBSD.org</hostid> is much closer than sites
|
||||
listed in <makevar>MASTER_SITES</makevar>, do as following
|
||||
example.</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports/<replaceable>directory</replaceable></userinput>
|
||||
&prompt.root; <userinput>make MASTER_SITE_OVERRIDE=ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I want to know what files make is going to need before it
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I want to know what files make is going to need before it
|
||||
tries to pull them down.</para>
|
||||
|
||||
<para>A. <command>make fetch-list</command> will display a list of
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para><command>make fetch-list</command> will display a list of
|
||||
the files needed for a port.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. Is there any way to stop the port from compiling? I want to
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>Is there any way to stop the port from compiling? I want to
|
||||
do some hacking on the source before I install it, but it is a bit
|
||||
tiresome having to watch it and hit control-C every time.</para>
|
||||
|
||||
<para>A. Doing <command>make extract</command> will stop it after it
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Doing <command>make extract</command> will stop it after it
|
||||
has fetched and extracted the source code.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I am trying to make my own port and I want to be able to
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I am trying to make my own port and I want to be able to
|
||||
stop it compiling until I have had a chance to see if my patches
|
||||
worked properly. Is there something like <command>make
|
||||
extract</command>, but for patches?</para>
|
||||
|
||||
<para>A. Yep, <command>make patch</command> is what you want. You
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yep, <command>make patch</command> is what you want. You
|
||||
will probably find the <makevar>PATCH_DEBUG</makevar> option useful
|
||||
as well. And by the way, thank you for your efforts!</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I have heard that some compiler options can cause bugs. Is
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I have heard that some compiler options can cause bugs. Is
|
||||
this true? How can I make sure that I compile ports with the right
|
||||
settings?</para>
|
||||
|
||||
<para>A. Yes, with version 2.6.3 of <command>gcc</command> (the
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, with version 2.6.3 of <command>gcc</command> (the
|
||||
version shipped with FreeBSD 2.1.0 and 2.1.5), the
|
||||
<option>-O2</option> option could result in buggy code unless you
|
||||
used the <option>-fno-strength-reduce</option> option as well.
|
||||
|
@ -772,7 +831,6 @@ do-install:
|
|||
<emphasis>should</emphasis> be able to specify the compiler options
|
||||
used by something like</para>
|
||||
|
||||
|
||||
<screen>&prompt.root; <userinput>make CFLAGS='-O2 -fno-strength-reduce' install</userinput></screen>
|
||||
|
||||
<para>or by editing <filename>/etc/make.conf</filename>, but
|
||||
|
@ -781,13 +839,17 @@ do-install:
|
|||
and inspect the Makefiles by hand, but this can get tedious if the
|
||||
source has lots of sub-directories, each with their own
|
||||
Makefiles.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. There are so many ports it is hard to find the one I want.
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>There are so many ports it is hard to find the one I want.
|
||||
Is there a list anywhere of what ports are available?</para>
|
||||
|
||||
<para>A. Look in the <filename>INDEX</filename> file in
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Look in the <filename>INDEX</filename> file in
|
||||
<filename>/usr/ports</filename>. If you would like to search the
|
||||
ports collection for a keyword, you can do that too. For example,
|
||||
you can find ports relevant to the LISP programming language
|
||||
|
@ -795,28 +857,36 @@ do-install:
|
|||
|
||||
<screen>&prompt.user; <userinput>cd /usr/ports</userinput>
|
||||
&prompt.user; <userinput>make search key=lisp</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I went to install the <literal>foo</literal> port but the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I went to install the <literal>foo</literal> port but the
|
||||
system suddenly stopped compiling it and starting compiling the
|
||||
<literal>bar</literal> port. What is going on?</para>
|
||||
|
||||
<para>A. The <literal>foo</literal> port needs something that is
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The <literal>foo</literal> port needs something that is
|
||||
supplied with <literal>bar</literal> — for instance, if
|
||||
<literal>foo</literal> uses graphics, <literal>bar</literal> might
|
||||
have a library with useful graphics processing routines. Or
|
||||
<literal>bar</literal> might be a tool that is needed to compile the
|
||||
<literal>foo</literal> port.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-remove"> Q. I installed the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-remove"> I installed the
|
||||
<literal>grizzle</literal> program from the ports and frankly it is
|
||||
a complete waste of disk space. I want to delete it but I do not
|
||||
know where it put all the files. Any clues?</para>
|
||||
|
||||
<para>A. No problem, just do</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>No problem, just do</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_delete grizzle-6.5</userinput></screen>
|
||||
|
||||
|
@ -824,27 +894,35 @@ do-install:
|
|||
|
||||
<screen>&prompt.root; <userinput>cd <replaceable>/usr/ports/somewhere/grizzle</replaceable></userinput>
|
||||
&prompt.root; <userinput>make deinstall</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
Q. Hang on a minute, you have to know the version number to use
|
||||
Hang on a minute, you have to know the version number to use
|
||||
that command. You do not seriously expect me to remember that, do
|
||||
you??</para>
|
||||
|
||||
<para>A. Not at all, you can find it out by doing</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Not at all, you can find it out by doing</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_info -a | grep grizzle</userinput>
|
||||
Information for grizzle-6.5:
|
||||
grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arcade game.</screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. Talking of disk space, the ports directory seems to be
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>Talking of disk space, the ports directory seems to be
|
||||
taking up an awful lot of room. Is it safe to go in there and
|
||||
delete things?</para>
|
||||
|
||||
<para>A. Yes, if you have installed the program and are fairly
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, if you have installed the program and are fairly
|
||||
certain you will not need the source again, there is no point in
|
||||
keeping it hanging around. The best way to do this is</para>
|
||||
|
||||
|
@ -853,44 +931,60 @@ grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arc
|
|||
|
||||
<para>which will go through all the ports subdirectories and delete
|
||||
everything except the skeletons for each port.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I tried that and it still left all those tarballs or
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I tried that and it still left all those tarballs or
|
||||
whatever you called them in the <filename>distfiles</filename>
|
||||
directory. Can I delete those as well?</para>
|
||||
|
||||
<para>A. Yes, if you are sure you have finished with them, those can
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, if you are sure you have finished with them, those can
|
||||
go as well.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I like having lots and lots of programs to play with. Is
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I like having lots and lots of programs to play with. Is
|
||||
there any way of installing all the ports in one go?</para>
|
||||
|
||||
<para>A. Just do</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Just do</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports</userinput>
|
||||
&prompt.root; <userinput>make install</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. OK, I tried that, but I thought it would take a very long
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>OK, I tried that, but I thought it would take a very long
|
||||
time so I went to bed and left it to get on with it. When I looked
|
||||
at the computer this morning, it had only done three and a half
|
||||
ports. Did something go wrong?</para>
|
||||
|
||||
<para>A. No, the problem is that some of the ports need to ask you
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>No, the problem is that some of the ports need to ask you
|
||||
questions that we cannot answer for you (eg “Do you want to
|
||||
print on A4 or US letter sized paper?”) and they need to have
|
||||
someone on hand to answer them.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I really do not want to spend all day staring at the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I really do not want to spend all day staring at the
|
||||
monitor. Any better ideas?</para>
|
||||
|
||||
<para>A. OK, do this before you go to bed/work/the local
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>OK, do this before you go to bed/work/the local
|
||||
park:-</para>
|
||||
|
||||
<screen>&prompt.root <userinput>cd /usr/ports</userinput>
|
||||
|
@ -903,15 +997,19 @@ grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arc
|
|||
&prompt.root; <userinput>make -DIS_INTERACTIVE install</userinput></screen>
|
||||
|
||||
<para>to finish the job.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. At work, we are using <literal>frobble</literal>, which is
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>At work, we are using <literal>frobble</literal>, which is
|
||||
in your ports collection, but we have altered it quite a bit to get
|
||||
it to do what we need. Is there any way of making our own packages,
|
||||
so we can distribute it more easily around our sites?</para>
|
||||
|
||||
<para>A. No problem, assuming you know how to make patches for your
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>No problem, assuming you know how to make patches for your
|
||||
changes:-</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd <replaceable>/usr/ports/somewhere/frobble</replaceable></userinput>
|
||||
|
@ -920,24 +1018,27 @@ grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arc
|
|||
[Apply your patches]
|
||||
&prompt.root; <userinput>cd ../..</userinput>
|
||||
&prompt.root; <userinput>make package</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. This ports stuff is really clever. I am desperate to find
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>This ports stuff is really clever. I am desperate to find
|
||||
out how you did it. What is the secret?</para>
|
||||
|
||||
<para>A. Nothing secret about it at all, just look at the
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Nothing secret about it at all, just look at the
|
||||
<filename>bsd.ports.mk</filename> and
|
||||
<filename>bsd.ports.subdir.mk</filename> files in your <ulink
|
||||
URL="file://localhost/usr/ports/Mk/">makefiles
|
||||
directory.</ulink></para>
|
||||
|
||||
<note>
|
||||
<para>Readers with an aversion to intricate shell-scripts are
|
||||
advised not to follow this link...)</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
</qandaset>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="porting">
|
||||
|
@ -4674,6 +4775,6 @@ pre-install:
|
|||
sgml-indent-data: t
|
||||
sgml-omittag: nil
|
||||
sgml-always-quote-attributes: t
|
||||
sgml-parent-document: ("../handbook.sgml" "part" "chapter")
|
||||
sgml-parent-document: ("../book.sgml" "part" "chapter")
|
||||
End:
|
||||
-->
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<!--
|
||||
The FreeBSD Documentation Project
|
||||
|
||||
$Id: book.sgml,v 1.44 1999-08-18 18:58:10 nik Exp $
|
||||
$Id: book.sgml,v 1.45 1999-08-23 21:06:02 nik Exp $
|
||||
-->
|
||||
|
||||
|
||||
<chapter id="ports">
|
||||
<title>Installing Applications: The Ports collection</title>
|
||||
|
||||
|
@ -513,31 +513,42 @@ do-install:
|
|||
<sect1>
|
||||
<title>Some Questions and Answers</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Q. I thought this was going to be a discussion about
|
||||
<qandaset>
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I thought this was going to be a discussion about
|
||||
modems??!</para>
|
||||
|
||||
<para>A. Ah. You must be thinking of the serial ports on the back of
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Ah. You must be thinking of the serial ports on the back of
|
||||
your computer. We are using “port” here to mean the
|
||||
result of “porting” a program from one version of Unix
|
||||
to another. (It is an unfortunate bad habit of computer people to
|
||||
use the same word to refer to several completely different
|
||||
things).</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I thought you were supposed to use packages to install extra
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I thought you were supposed to use packages to install extra
|
||||
programs?</para>
|
||||
|
||||
<para>A. Yes, that is usually the quickest and easiest way of doing
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, that is usually the quickest and easiest way of doing
|
||||
it.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. So why bother with ports then?</para>
|
||||
|
||||
<para>A. Several reasons:-</para>
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>So why bother with ports then?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Several reasons:-</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
|
@ -576,24 +587,32 @@ do-install:
|
|||
-->;-)</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-patch"> Q. What is a patch?</para>
|
||||
|
||||
<para>A. A patch is a small (usually) file that specifies how to go
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-patch"> What is a patch?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>A patch is a small (usually) file that specifies how to go
|
||||
from one version of a file to another. It contains text that says,
|
||||
in effect, things like “delete line 23”, “add
|
||||
these two lines after line 468” or “change line 197 to
|
||||
this”. Also known as a “diff”, since it is
|
||||
generated by a program of that name.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-tarball"> Q. What is all this about
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-tarball"> What is all this about
|
||||
tarballs?</para>
|
||||
|
||||
<para>A. It is a file ending in <filename>.tar</filename> or
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>It is a file ending in <filename>.tar</filename> or
|
||||
<filename>.tar.gz</filename> (with variations like
|
||||
<filename>.tar.Z</filename>, or even <filename>.tgz</filename> if
|
||||
you are trying to squeeze the names into a DOS filesystem).</para>
|
||||
|
@ -613,22 +632,28 @@ do-install:
|
|||
&prompt.user; <userinput>tar xzvf foobar.tar.gz</userinput>
|
||||
&prompt.user; <userinput>tar tvf foobar.tar</userinput>
|
||||
&prompt.user; <userinput>tar xvf foobar.tar</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-checksum"> Q. And a checksum?</para>
|
||||
|
||||
<para>A. It is a number generated by adding up all the data in the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-checksum">And a checksum?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>It is a number generated by adding up all the data in the
|
||||
file you want to check. If any of the characters change, the
|
||||
checksum will no longer be equal to the total, so a simple
|
||||
comparison will allow you to spot the difference. (In practice, it
|
||||
is done in a more complicated way to spot problems like
|
||||
position-swapping, which will not show up with a simplistic
|
||||
addition).</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I did what you said for <link linkend="ports-cd">compiling
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I did what you said for <link linkend="ports-cd">compiling
|
||||
ports from a CDROM</link> and it worked great until I tried to
|
||||
install the kermit port:-</para>
|
||||
|
||||
|
@ -637,38 +662,48 @@ do-install:
|
|||
>> Attempting to fetch from ftp://kermit.columbia.edu/kermit/archives/.</screen>
|
||||
|
||||
<para>Why can it not be found? Have I got a dud CDROM?</para>
|
||||
|
||||
<para>A. The licensing terms for kermit do not allow us to put the
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The licensing terms for kermit do not allow us to put the
|
||||
tarball for it on the CDROM, so you will have to fetch it by hand
|
||||
— sorry! The reason why you got all those error messages was
|
||||
because you were not connected to the Internet at the time. Once
|
||||
you have downloaded it from any of the sites above, you can re-start
|
||||
the process (try and choose the nearest site to you, though, to save
|
||||
your time and the Internet's bandwidth).</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I did that, but when I tried to put it into
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I did that, but when I tried to put it into
|
||||
<filename>/usr/ports/distfiles</filename> I got some error about not
|
||||
having permission.</para>
|
||||
|
||||
<para>A. The ports mechanism looks for the tarball in
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The ports mechanism looks for the tarball in
|
||||
<filename>/usr/ports/distfiles</filename>, but you will not be able
|
||||
to copy anything there because it is sym-linked to the CDROM, which
|
||||
is read-only. You can tell it to look somewhere else by
|
||||
doing</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>make DISTDIR=<replaceable>/where/you/put/it</replaceable> install</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. Does the ports scheme only work if you have everything in
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>Does the ports scheme only work if you have everything in
|
||||
<filename>/usr/ports</filename>? My system administrator says I must
|
||||
put everything under
|
||||
<filename>/u/people/guests/wurzburger</filename>, but it does not
|
||||
seem to work.</para>
|
||||
|
||||
<para>A. You can use the <makevar>PORTSDIR</makevar> and
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>You can use the <makevar>PORTSDIR</makevar> and
|
||||
<makevar>PREFIX</makevar> variables to tell the ports mechanism to
|
||||
use different directories. For instance,</para>
|
||||
|
||||
|
@ -693,15 +728,19 @@ do-install:
|
|||
<para>If you do not fancy typing all that in every time you install a
|
||||
port (and to be honest, who would?), it is a good idea to put these
|
||||
variables into your environment.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I do not have a FreeBSD CDROM, but I would like to have all
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I do not have a FreeBSD CDROM, but I would like to have all
|
||||
the tarballs handy on my system so I do not have to wait for a
|
||||
download every time I install a port. Is there an easy way to get
|
||||
them all at once?</para>
|
||||
|
||||
<para>A. To get every single tarball for the ports collection,
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>To get every single tarball for the ports collection,
|
||||
do</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports</userinput>
|
||||
|
@ -714,57 +753,77 @@ do-install:
|
|||
|
||||
<para>and for just one port — well, I think you have guessed
|
||||
already.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I know it is probably faster to fetch the tarballs from one
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I know it is probably faster to fetch the tarballs from one
|
||||
of the FreeBSD mirror sites close by. Is there any way to tell the
|
||||
port to fetch them from servers other than ones listed in the
|
||||
MASTER_SITES?</para>
|
||||
|
||||
<para>A. Yes. If you know, for example, <hostid
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes. If you know, for example, <hostid
|
||||
role="fqdn">ftp.FreeBSD.org</hostid> is much closer than sites
|
||||
listed in <makevar>MASTER_SITES</makevar>, do as following
|
||||
example.</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports/<replaceable>directory</replaceable></userinput>
|
||||
&prompt.root; <userinput>make MASTER_SITE_OVERRIDE=ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I want to know what files make is going to need before it
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I want to know what files make is going to need before it
|
||||
tries to pull them down.</para>
|
||||
|
||||
<para>A. <command>make fetch-list</command> will display a list of
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para><command>make fetch-list</command> will display a list of
|
||||
the files needed for a port.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. Is there any way to stop the port from compiling? I want to
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>Is there any way to stop the port from compiling? I want to
|
||||
do some hacking on the source before I install it, but it is a bit
|
||||
tiresome having to watch it and hit control-C every time.</para>
|
||||
|
||||
<para>A. Doing <command>make extract</command> will stop it after it
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Doing <command>make extract</command> will stop it after it
|
||||
has fetched and extracted the source code.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I am trying to make my own port and I want to be able to
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I am trying to make my own port and I want to be able to
|
||||
stop it compiling until I have had a chance to see if my patches
|
||||
worked properly. Is there something like <command>make
|
||||
extract</command>, but for patches?</para>
|
||||
|
||||
<para>A. Yep, <command>make patch</command> is what you want. You
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yep, <command>make patch</command> is what you want. You
|
||||
will probably find the <makevar>PATCH_DEBUG</makevar> option useful
|
||||
as well. And by the way, thank you for your efforts!</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I have heard that some compiler options can cause bugs. Is
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I have heard that some compiler options can cause bugs. Is
|
||||
this true? How can I make sure that I compile ports with the right
|
||||
settings?</para>
|
||||
|
||||
<para>A. Yes, with version 2.6.3 of <command>gcc</command> (the
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, with version 2.6.3 of <command>gcc</command> (the
|
||||
version shipped with FreeBSD 2.1.0 and 2.1.5), the
|
||||
<option>-O2</option> option could result in buggy code unless you
|
||||
used the <option>-fno-strength-reduce</option> option as well.
|
||||
|
@ -772,7 +831,6 @@ do-install:
|
|||
<emphasis>should</emphasis> be able to specify the compiler options
|
||||
used by something like</para>
|
||||
|
||||
|
||||
<screen>&prompt.root; <userinput>make CFLAGS='-O2 -fno-strength-reduce' install</userinput></screen>
|
||||
|
||||
<para>or by editing <filename>/etc/make.conf</filename>, but
|
||||
|
@ -781,13 +839,17 @@ do-install:
|
|||
and inspect the Makefiles by hand, but this can get tedious if the
|
||||
source has lots of sub-directories, each with their own
|
||||
Makefiles.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. There are so many ports it is hard to find the one I want.
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>There are so many ports it is hard to find the one I want.
|
||||
Is there a list anywhere of what ports are available?</para>
|
||||
|
||||
<para>A. Look in the <filename>INDEX</filename> file in
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Look in the <filename>INDEX</filename> file in
|
||||
<filename>/usr/ports</filename>. If you would like to search the
|
||||
ports collection for a keyword, you can do that too. For example,
|
||||
you can find ports relevant to the LISP programming language
|
||||
|
@ -795,28 +857,36 @@ do-install:
|
|||
|
||||
<screen>&prompt.user; <userinput>cd /usr/ports</userinput>
|
||||
&prompt.user; <userinput>make search key=lisp</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I went to install the <literal>foo</literal> port but the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I went to install the <literal>foo</literal> port but the
|
||||
system suddenly stopped compiling it and starting compiling the
|
||||
<literal>bar</literal> port. What is going on?</para>
|
||||
|
||||
<para>A. The <literal>foo</literal> port needs something that is
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The <literal>foo</literal> port needs something that is
|
||||
supplied with <literal>bar</literal> — for instance, if
|
||||
<literal>foo</literal> uses graphics, <literal>bar</literal> might
|
||||
have a library with useful graphics processing routines. Or
|
||||
<literal>bar</literal> might be a tool that is needed to compile the
|
||||
<literal>foo</literal> port.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para><anchor id="ports-remove"> Q. I installed the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id="ports-remove"> I installed the
|
||||
<literal>grizzle</literal> program from the ports and frankly it is
|
||||
a complete waste of disk space. I want to delete it but I do not
|
||||
know where it put all the files. Any clues?</para>
|
||||
|
||||
<para>A. No problem, just do</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>No problem, just do</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_delete grizzle-6.5</userinput></screen>
|
||||
|
||||
|
@ -824,27 +894,35 @@ do-install:
|
|||
|
||||
<screen>&prompt.root; <userinput>cd <replaceable>/usr/ports/somewhere/grizzle</replaceable></userinput>
|
||||
&prompt.root; <userinput>make deinstall</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
Q. Hang on a minute, you have to know the version number to use
|
||||
Hang on a minute, you have to know the version number to use
|
||||
that command. You do not seriously expect me to remember that, do
|
||||
you??</para>
|
||||
|
||||
<para>A. Not at all, you can find it out by doing</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Not at all, you can find it out by doing</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_info -a | grep grizzle</userinput>
|
||||
Information for grizzle-6.5:
|
||||
grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arcade game.</screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. Talking of disk space, the ports directory seems to be
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>Talking of disk space, the ports directory seems to be
|
||||
taking up an awful lot of room. Is it safe to go in there and
|
||||
delete things?</para>
|
||||
|
||||
<para>A. Yes, if you have installed the program and are fairly
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, if you have installed the program and are fairly
|
||||
certain you will not need the source again, there is no point in
|
||||
keeping it hanging around. The best way to do this is</para>
|
||||
|
||||
|
@ -853,44 +931,60 @@ grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arc
|
|||
|
||||
<para>which will go through all the ports subdirectories and delete
|
||||
everything except the skeletons for each port.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I tried that and it still left all those tarballs or
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I tried that and it still left all those tarballs or
|
||||
whatever you called them in the <filename>distfiles</filename>
|
||||
directory. Can I delete those as well?</para>
|
||||
|
||||
<para>A. Yes, if you are sure you have finished with them, those can
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes, if you are sure you have finished with them, those can
|
||||
go as well.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I like having lots and lots of programs to play with. Is
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I like having lots and lots of programs to play with. Is
|
||||
there any way of installing all the ports in one go?</para>
|
||||
|
||||
<para>A. Just do</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Just do</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports</userinput>
|
||||
&prompt.root; <userinput>make install</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. OK, I tried that, but I thought it would take a very long
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>OK, I tried that, but I thought it would take a very long
|
||||
time so I went to bed and left it to get on with it. When I looked
|
||||
at the computer this morning, it had only done three and a half
|
||||
ports. Did something go wrong?</para>
|
||||
|
||||
<para>A. No, the problem is that some of the ports need to ask you
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>No, the problem is that some of the ports need to ask you
|
||||
questions that we cannot answer for you (eg “Do you want to
|
||||
print on A4 or US letter sized paper?”) and they need to have
|
||||
someone on hand to answer them.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. I really do not want to spend all day staring at the
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>I really do not want to spend all day staring at the
|
||||
monitor. Any better ideas?</para>
|
||||
|
||||
<para>A. OK, do this before you go to bed/work/the local
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>OK, do this before you go to bed/work/the local
|
||||
park:-</para>
|
||||
|
||||
<screen>&prompt.root <userinput>cd /usr/ports</userinput>
|
||||
|
@ -903,15 +997,19 @@ grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arc
|
|||
&prompt.root; <userinput>make -DIS_INTERACTIVE install</userinput></screen>
|
||||
|
||||
<para>to finish the job.</para>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. At work, we are using <literal>frobble</literal>, which is
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>At work, we are using <literal>frobble</literal>, which is
|
||||
in your ports collection, but we have altered it quite a bit to get
|
||||
it to do what we need. Is there any way of making our own packages,
|
||||
so we can distribute it more easily around our sites?</para>
|
||||
|
||||
<para>A. No problem, assuming you know how to make patches for your
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>No problem, assuming you know how to make patches for your
|
||||
changes:-</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd <replaceable>/usr/ports/somewhere/frobble</replaceable></userinput>
|
||||
|
@ -920,24 +1018,27 @@ grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arc
|
|||
[Apply your patches]
|
||||
&prompt.root; <userinput>cd ../..</userinput>
|
||||
&prompt.root; <userinput>make package</userinput></screen>
|
||||
</listitem>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<listitem>
|
||||
<para>Q. This ports stuff is really clever. I am desperate to find
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>This ports stuff is really clever. I am desperate to find
|
||||
out how you did it. What is the secret?</para>
|
||||
|
||||
<para>A. Nothing secret about it at all, just look at the
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Nothing secret about it at all, just look at the
|
||||
<filename>bsd.ports.mk</filename> and
|
||||
<filename>bsd.ports.subdir.mk</filename> files in your <ulink
|
||||
URL="file://localhost/usr/ports/Mk/">makefiles
|
||||
directory.</ulink></para>
|
||||
|
||||
<note>
|
||||
<para>Readers with an aversion to intricate shell-scripts are
|
||||
advised not to follow this link...)</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
</qandaset>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="porting">
|
||||
|
@ -4674,6 +4775,6 @@ pre-install:
|
|||
sgml-indent-data: t
|
||||
sgml-omittag: nil
|
||||
sgml-always-quote-attributes: t
|
||||
sgml-parent-document: ("../handbook.sgml" "part" "chapter")
|
||||
sgml-parent-document: ("../book.sgml" "part" "chapter")
|
||||
End:
|
||||
-->
|
||||
|
|
Loading…
Reference in a new issue