xref: /openbsd-src/share/man/man7/library-specs.7 (revision c8840a0bbe01aa875176a04f2eef59697dd6857d)
1.\" $OpenBSD: library-specs.7,v 1.1 2001/11/16 13:36:42 espie Exp $
2.\"
3.\" Copyright (c) 2001 Marc Espie
4.\"
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
17.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
20.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26.\"
27.Dd April 9, 2001
28.Dt LIBRARY-SPECS 7
29.Os
30.Sh NAME
31.Nm library-specs
32.Nd shared library name specifications
33.Sh DESCRIPTION
34Each
35.Ev LIB_DEPENDS
36item in the port tree conforms to
37.Sq lib_specs:[pkgspec]:directory[,-subpackage][,flavor ...][:target] ,
38where
39.Sq lib_specs ,
40is a comma-separated list of
41.Sq lib_spec
42of the form:
43.Sq libname[.major[.minor]] .
44.Pp
45All libraries that a port needs must be mentioned in that list, either
46directly or indirectly through recursive dependencies (except, of course,
47for system libraries).
48.Pp
49The package system will embed correct dependency checks in the built
50package, according to the normal shared library semantics: any library with
51the same major number, and a greater or equal minor number will do.
52.Pp
53Therefore, porters must strive to respect correct shared library semantics
54in their own ports: by bumping the minor number each time the interface is
55augmented, and by bumping the major number each time the interface changes.
56Note that adding functions to a library is an interface augmentation.
57Removing functions is an interface change.
58.Pp
59The major.minor components of the library specification are used only as a build
60time check.
61Any library which is more recent than the given major.minor version will
62do.
63If the minor component is left empty, any minor will do.
64If both components are left empty, any version will do.
65If a specific major number is needed, use the form
66.Sq libname.=major[.minor] .
67.Pp
68The
69.Sq pkgspec
70part is always checked, both a build-time, and at
71.Xr pkg_add 1
72time.
73If
74.Sq pkgspec
75is left empty, any package will do: in effect, the pkgspec used is
76.Sq stem-* .
77.Pp
78If a given architecture does not support shared libraries, all
79.Ev LIB_DEPENDS
80will be turned into simple
81.Ev BUILD_DEPENDS
82checks.
83Failure to mention
84.Ev RUN_DEPENDS
85if the port needs anything beyond libraries from the dependent port will
86lead to strange errors.
87.Sh HISTORY
88Full support for library specifications first appeared in
89.Ox 3.1
90.Sh SEE ALSO
91.Xr pkg_add 1 ,
92.Xr bsd.port.mk 5 ,
93.Xr packages-specs 7 ,
94.Xr packages 7 ,
95.Xr ports 7
96