| 1 | <?xml version="1.0" encoding="ISO-8859-1"?> | 
|---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" | 
|---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ | 
|---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent"> | 
|---|
| 5 | %general-entities; | 
|---|
| 6 | ]> | 
|---|
| 7 |  | 
|---|
| 8 | <sect1 id="ch-system-zlib" role="wrap"> | 
|---|
| 9 | <?dbhtml filename="zlib.html"?> | 
|---|
| 10 |  | 
|---|
| 11 | <title>Zlib-&zlib-version;</title> | 
|---|
| 12 |  | 
|---|
| 13 | <indexterm zone="ch-system-zlib"> | 
|---|
| 14 | <primary sortas="a-Zlib">Zlib</primary> | 
|---|
| 15 | </indexterm> | 
|---|
| 16 |  | 
|---|
| 17 | <sect2 role="package"> | 
|---|
| 18 | <title/> | 
|---|
| 19 |  | 
|---|
| 20 | <para>The Zlib package contains compression and decompression routines | 
|---|
| 21 | used by some programs.</para> | 
|---|
| 22 |  | 
|---|
| 23 | </sect2> | 
|---|
| 24 |  | 
|---|
| 25 | <sect2 role="installation"> | 
|---|
| 26 | <title>Installation of Zlib</title> | 
|---|
| 27 |  | 
|---|
| 28 | <para os="p1">This patch will add the ability to use DESTDIR:</para> | 
|---|
| 29 |  | 
|---|
| 30 | <screen os="p2"><userinput>patch -Np1 -i ../&zlib-destdir-patch;</userinput></screen> | 
|---|
| 31 |  | 
|---|
| 32 | <para os="a">Change the default optimization to Os</para> | 
|---|
| 33 |  | 
|---|
| 34 | <screen os="b"><userinput>cp configure{,.orig} | 
|---|
| 35 | sed -e 's/-O3/-Os/g' configure.orig > configure</userinput></screen> | 
|---|
| 36 |  | 
|---|
| 37 | <para os="c">Prepare Zlib for compilation:</para> | 
|---|
| 38 |  | 
|---|
| 39 | <screen os="d"><userinput>CC="${CC} ${BUILD}" ./configure --prefix=/usr --shared</userinput></screen> | 
|---|
| 40 |  | 
|---|
| 41 | <variablelist os="aa"> | 
|---|
| 42 | <title>The meaning of the configure options:</title> | 
|---|
| 43 |  | 
|---|
| 44 | <varlistentry os="aa1"> | 
|---|
| 45 | <term><parameter>--shared</parameter></term> | 
|---|
| 46 | <listitem> | 
|---|
| 47 | <para>Tells Zlib to build its shared library.</para> | 
|---|
| 48 | </listitem> | 
|---|
| 49 | </varlistentry> | 
|---|
| 50 |  | 
|---|
| 51 | </variablelist> | 
|---|
| 52 |  | 
|---|
| 53 | <para os="c">Compile the package:</para> | 
|---|
| 54 |  | 
|---|
| 55 | <screen os="d"><userinput>make</userinput></screen> | 
|---|
| 56 |  | 
|---|
| 57 | <para os="e">Install the package:</para> | 
|---|
| 58 |  | 
|---|
| 59 | <screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen> | 
|---|
| 60 |  | 
|---|
| 61 | <para os="g">The previous command installed a <filename | 
|---|
| 62 | class="extension">.so</filename> file in <filename | 
|---|
| 63 | class="directory">/usr/lib</filename>. We will move it into | 
|---|
| 64 | <filename class="directory">/lib</filename> and then relink it | 
|---|
| 65 | to <filename class="directory">/usr/lib</filename>:</para> | 
|---|
| 66 |  | 
|---|
| 67 | <screen os="h"><userinput>mv -v ${CLFS}/usr/lib/libz.so.* ${CLFS}/lib | 
|---|
| 68 | ln -svf ../../lib/libz.so.1 ${CLFS}/usr/lib/libz.so</userinput></screen> | 
|---|
| 69 |  | 
|---|
| 70 | </sect2> | 
|---|
| 71 |  | 
|---|
| 72 | <sect2 id="contents-zlib" role="content"> | 
|---|
| 73 | <title>Contents of Zlib</title> | 
|---|
| 74 |  | 
|---|
| 75 | <segmentedlist> | 
|---|
| 76 | <segtitle>Installed libraries</segtitle> | 
|---|
| 77 |  | 
|---|
| 78 | <seglistitem> | 
|---|
| 79 | <seg>libz.[a,so]</seg> | 
|---|
| 80 | </seglistitem> | 
|---|
| 81 | </segmentedlist> | 
|---|
| 82 |  | 
|---|
| 83 | <variablelist> | 
|---|
| 84 | <bridgehead renderas="sect3">Short Descriptions</bridgehead> | 
|---|
| 85 | <?dbfo list-presentation="list"?> | 
|---|
| 86 | <?dbhtml list-presentation="table"?> | 
|---|
| 87 |  | 
|---|
| 88 | <varlistentry id="libz"> | 
|---|
| 89 | <term><filename class="libraryfile">libz</filename></term> | 
|---|
| 90 | <listitem> | 
|---|
| 91 | <para>Contains compression and decompression | 
|---|
| 92 | functions used by some programs</para> | 
|---|
| 93 | <indexterm zone="ch-system-zlib libz"> | 
|---|
| 94 | <primary sortas="c-libz">libz</primary> | 
|---|
| 95 | </indexterm> | 
|---|
| 96 | </listitem> | 
|---|
| 97 | </varlistentry> | 
|---|
| 98 |  | 
|---|
| 99 | </variablelist> | 
|---|
| 100 |  | 
|---|
| 101 | </sect2> | 
|---|
| 102 |  | 
|---|
| 103 | </sect1> | 
|---|