LIB_DEPENDS and a library ABI version

Jason E. Hale jhale at freebsd.org
Sat Nov 3 12:46:40 UTC 2012


On Saturday, November 03, 2012 16:06:41 Boris Samorodov wrote:
> what's the right way to determine ABI version number (and specify
> it at a port)?
> 
> For textproc/goldendict portlint suggests:
> -----
> LIB_DEPENDS=hunspell-1:${PORTSDIR}/textproc/hunspell
> -----
> 
> The library itself is:
> -----
> % ls -l /usr/local/lib/libhunspell-1.3.*so*
> lrwxr-xr-x  1 root  wheel      20 28 авг 23:41
> /usr/local/lib/libhunspell-1.3.so -> libhunspell-1.3.so.0
> -rwxr-xr-x  1 root  wheel  368752 28 авг 23:41
> /usr/local/lib/libhunspell-1.3.so.0
> -----
> 
> Should I use "LIB_DEPENDS=hunspell-1.3:..." (since only 0
> is after .so?
> 
Yes.  Typically, you would want to leave off only what is after .so.  So in 
this case:
LIB_DEPENDS=hunspell-1.3:${PORTSDIR}/textproc/hunspell
would be correct.
LIB_DEPENDS=hunspell-1.3.0:${PORTSDIR}/textproc/hunspell
would also be correct, but not really needed.

> Some libraries seems to place .so suffix at a random position:
> -----
> libspreadsheet-1.10.17.so
> liblua-5.1.so.1
> libwx_base-2.8.so.0.8.0
> -----
Some libraries are named with their versions as part of the library 
name...this is not the ABI version.  
Like liblua-5.1 is the name of the library and 1 is the ABI version.

I believe the following would be correct:

LIB_DEPENDS=libspreadsheet:${PORTSDIR}/math/gnumeric
or
LIB_DEPENDS=libspreadsheet-1.10.17:${PORTSDIR}/math/gnumeric
No ABI version...the library is installed as libspreadsheet.so and 
libspreadsheet-1.10.17.so.  I think the first version would be cleaner.

LIB_DEPENDS=lua-5.1:${PORTSDIR}/lang/lua
or
LIB_DEPENDS=lua-5.1.1:${PORTSDIR}/lang/lua
the last "1" is the ABI version

LIB_DEPENDS=wx_base-2.8:${PORTSDIR}/x11-toolkit-wxgtk28
or
LIB_DEPENDS=wx_base-2.8.0:${PORTSDIR}/x11-toolkit-wxgtk28
"0" is the ABI version

-- 
Jason E. Hale - jhale@
FreeBSD Ports Committer
KDE/FreeBSD Team


More information about the freebsd-ports mailing list