- Update Shared Libraries section with new USE_LDCONFIG variables

This commit is contained in:
Pav Lucistnik 2006-06-17 14:38:53 +00:00
parent 507ebf0702
commit 1af5b7b833
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=28110

View file

@ -3945,7 +3945,7 @@ PORTVERSION= 1.0</programlisting>
<title>Shared Libraries</title>
<para>If your port installs one or more shared libraries, define a
<makevar>INSTALLS_SHLIB</makevar> make variable, which will instruct
<makevar>USE_LDCONFIG</makevar> make variable, which will instruct
a <filename>bsd.port.mk</filename> to run
<literal>&dollar;{LDCONFIG} -m</literal> on the directory where the
new library is installed (usually
@ -3960,9 +3960,11 @@ PORTVERSION= 1.0</programlisting>
de-installation will not cause the system to still believe the
library is there.</para>
<para>If you need, you can override the default location where the new
library is installed by defining the <makevar>LDCONFIG_DIRS</makevar>
make variable, which should contain a list of directories into which
<programlisting>USE_LDCONFIG= yes</programlisting>
<para>If you need, you can override the default directory
by setting the <makevar>USE_LDCONFIG</makevar>
value to a list of directories into which
shared libraries are to be installed. For example if your port
installs shared libraries into
<filename><makevar>PREFIX</makevar>/lib/foo</filename> and
@ -3970,13 +3972,9 @@ PORTVERSION= 1.0</programlisting>
you could use the following in your
<filename>Makefile</filename>:</para>
<programlisting>INSTALLS_SHLIB= yes
LDCONFIG_DIRS= %%PREFIX%%/lib/foo %%PREFIX%%/lib/bar</programlisting>
<programlisting>USE_LDCONFIG= ${PREFIX}/lib/foo ${PREFIX}/lib/bar</programlisting>
<para>Remember that non-standard directories will not be passed to
&man.ldconfig.8; on (re-)boot! If any port really
needs this to work, install a startup-script as
<filename role="package">x11/kdelibs3</filename> does. Please
<para>Please
double-check, often this is not necessary at all or can be avoided
through <literal>-rpath</literal> or setting <envar>LD_RUN_PATH</envar>
during linking (see <filename role="package">lang/moscow_ml</filename>
@ -3984,13 +3982,8 @@ LDCONFIG_DIRS= %%PREFIX%%/lib/foo %%PREFIX%%/lib/bar</programlisting>
<makevar>LD_LIBRARY_PATH</makevar> before invoking the binary, like
<filename role="package">www/mozilla</filename> does.</para>
<para>Note that content of <makevar>LDCONFIG_DIRS</makevar> is passed
through &man.sed.1; just like the rest of <filename>pkg-plist</filename>,
so <makevar>PLIST_SUB</makevar> substitutions also apply here. It is
recommended that you use <literal>%%PREFIX%%</literal> for
<makevar>PREFIX</makevar>, <literal>%%LOCALBASE%%</literal> for
<makevar>LOCALBASE</makevar> and <literal>%%X11BASE%%</literal> for
<makevar>X11BASE</makevar>.</para>
<para>When installing 32-bit libraries on 64-bit system, use
<makevar>USE_LDCONFIG32</makevar> instead.</para>
<para>Try to keep shared library version numbers in the
<filename>libfoo.so.0</filename> format. Our runtime linker only