source: general/genlib/protobuf.xml@ 4fc30e49

12.2 gimp3 lazarus trunk xry111/for-12.3 xry111/spidermonkey128
Last change on this file since 4fc30e49 was 48a4274, checked in by Xi Ruoyao <xry111@…>, 3 months ago

protobuf: Don't install unnecessary static libs

  • Property mode set to 100644
File size: 7.2 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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 <!ENTITY protobuf-download-http "https://github.com/protocolbuffers/protobuf/releases/download/v&protobuf-version;/protobuf-&protobuf-version;.tar.gz">
8 <!ENTITY protobuf-md5sum "c96aaf02c8acea549d65bb7b2d549bf6">
9 <!ENTITY protobuf-size "6.0 MB">
10 <!ENTITY protobuf-buildsize "81 MB">
11 <!ENTITY protobuf-time "1.0 SBU (with parallelism=4)">
12]>
13
14<sect1 id="protobuf" xreflabel="Protobuf-&protobuf-version;">
15 <?dbhtml filename="protobuf.html"?>
16
17 <title>Protobuf-&protobuf-version;</title>
18
19 <indexterm zone="protobuf">
20 <primary sortas="a-protobuf">Protobuf</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title>Introduction to Protobuf</title>
25
26 <para>
27 The <application>Protobuf</application> package contains utilities and
28 libraries for using data in Google's data interchange format.
29 </para>
30
31 &lfs121_checked;
32
33 <bridgehead renderas="sect3">Package Information</bridgehead>
34 <itemizedlist spacing="compact">
35 <listitem>
36 <para>
37 Download (HTTP): <ulink url="&protobuf-download-http;"/>
38 </para>
39 </listitem>
40 <listitem>
41 <para>
42 Download MD5 sum: &protobuf-md5sum;
43 </para>
44 </listitem>
45 <listitem>
46 <para>
47 Download size: &protobuf-size;
48 </para>
49 </listitem>
50 <listitem>
51 <para>
52 Estimated disk space required: &protobuf-buildsize;
53 </para>
54 </listitem>
55 <listitem>
56 <para>
57 Estimated build time: &protobuf-time;
58 </para>
59 </listitem>
60 </itemizedlist>
61
62 <bridgehead renderas="sect3">Protobuf Dependencies</bridgehead>
63
64 <bridgehead renderas="sect4">Required</bridgehead>
65 <para role="required">
66 <xref linkend="abseil-cpp"/> and
67 <xref linkend="cmake"/>
68 </para>
69
70 <bridgehead renderas="sect4">Optional</bridgehead>
71 <para role="optional">
72 <ulink url="https://github.com/google/googletest">gtest (for tests)</ulink>
73 </para>
74
75 </sect2>
76
77 <sect2 role="installation">
78 <title>Installation of Protobuf</title>
79
80 <para>
81 Install <application>Protobuf</application> by running the following
82 commands:
83 </para>
84
85<screen><userinput>mkdir build &amp;&amp;
86cd build &amp;&amp;
87
88cmake -DCMAKE_INSTALL_PREFIX=/usr \
89 -DCMAKE_BUILD_TYPE=Release \
90 -Dprotobuf_BUILD_TESTS=OFF \
91 -Dprotobuf_ABSL_PROVIDER=package \
92 -Dprotobuf_BUILD_LIBUPB=OFF \
93 -Dprotobuf_BUILD_SHARED_LIBS=ON \
94 -Dutf8_range_ENABLE_INSTALL=OFF \
95 -G Ninja .. &amp;&amp;
96ninja</userinput></screen>
97
98 <para>
99 This package does come with a test suite, but it requires
100 <ulink url="https://github.com/google/googletest">gtest</ulink>, which
101 is not part of BLFS.
102 </para>
103
104 <para>
105 Now, as the &root; user:
106 </para>
107
108<screen role="root"><userinput>sed 's/utf8_range//' -i *.pc &amp;&amp;
109ninja install</userinput></screen>
110
111 </sect2>
112
113 <sect2 role="commands">
114 <title>Command Explanations</title>
115
116 <para>
117 <command>sed 's/utf8_range//' -i *.pc</command>: This command removes a
118 leftover reference to libutf8_range from the pkg-config files installed
119 by this package.
120 </para>
121
122 <para>
123 <parameter>-Dprotobuf_BUILD_TESTS=OFF</parameter>: This parameter prevents
124 the tests from being built because
125 <ulink url="https://github.com/google/googletest">gtest</ulink> is not
126 part of BLFS.
127 </para>
128
129 <para>
130 <parameter>-Dprotobuf_ABSL_PROVIDER=package</parameter>: This parameter
131 allows the build system to use the system-installed copy of
132 <xref linkend="abseil-cpp" role="nodep"/>.
133 </para>
134
135 <para>
136 <parameter>-Dprotobuf_BUILD_SHARED_LIBS=ON</parameter>: This parameter
137 enables building shared versions of the libraries provided by this package
138 instead of static versions.
139 </para>
140
141 <para>
142 <parameter>-Dutf8_range_ENABLE_INSTALL=OFF</parameter>: This parameter
143 disables installing the utf8_range static library. The functions
144 provided by this library and used by protobuf is already embedded into
145 <filename class='libraryfile'>libprotobuf.so</filename>, so installing
146 a full copy of the static library is just wasting the disk space.
147 </para>
148
149 </sect2>
150
151 <sect2 role="content">
152 <title>Contents</title>
153
154 <segmentedlist>
155 <segtitle>Installed Programs</segtitle>
156 <segtitle>Installed Libraries</segtitle>
157 <segtitle>Installed Directories</segtitle>
158
159 <seglistitem>
160 <seg>
161 protoc-26.1.0 and protoc (a symlink to protoc-26.1.0)
162 </seg>
163 <seg>
164 libprotobuf.so,
165 libprotobuf-lite.so, and
166 libprotoc.so
167 </seg>
168 <seg>
169 /usr/include/google,
170 /usr/include/java,
171 /usr/include/upb_generator, and
172 /usr/lib/cmake/protobuf
173 </seg>
174 </seglistitem>
175 </segmentedlist>
176
177 <variablelist>
178 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
179 <?dbfo list-presentation="list"?>
180 <?dbhtml list-presentation="table"?>
181
182 <varlistentry id="protoc">
183 <term><command>protoc</command></term>
184 <listitem>
185 <para>
186 parses protocol buffer files and generates output for several
187 programming languages and formats
188 </para>
189 <indexterm zone="protobuf protoc">
190 <primary sortas="b-protoc">protoc</primary>
191 </indexterm>
192 </listitem>
193 </varlistentry>
194
195 <varlistentry id="libprotobuf">
196 <term><filename class="libraryfile">libprotobuf.so</filename></term>
197 <listitem>
198 <para>
199 contains functions for utilizing data in Google's data interchange
200 format
201 </para>
202 <indexterm zone="protobuf libprotobuf">
203 <primary sortas="c-libprotobuf">libprotobuf.so</primary>
204 </indexterm>
205 </listitem>
206 </varlistentry>
207
208 <varlistentry id="libprotobuf-lite">
209 <term><filename class="libraryfile">libprotobuf-lite.so</filename></term>
210 <listitem>
211 <para>
212 contains a simpler version of the functions for utilizing data in
213 Google's data interchange format
214 </para>
215 <indexterm zone="protobuf libprotobuf-lite">
216 <primary sortas="c-libprotobuf-lite">libprotobuf-lite.so</primary>
217 </indexterm>
218 </listitem>
219 </varlistentry>
220
221 <varlistentry id="libprotoc">
222 <term><filename class="libraryfile">libprotoc.so</filename></term>
223 <listitem>
224 <para>
225 contains functions used by protoc at runtime for outputting data
226 for several programming languages and formats
227 </para>
228 <indexterm zone="protobuf libprotoc">
229 <primary sortas="c-libprotoc">libprotoc.so</primary>
230 </indexterm>
231 </listitem>
232 </varlistentry>
233 </variablelist>
234 </sect2>
235</sect1>
Note: See TracBrowser for help on using the repository browser.