View Single Post
  #6   (View Single Post)  
Old 22nd March 2013
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 136
Default

Quote:
Originally Posted by jggimi View Post
I haven't built a port in several years. From memory, I recall using WANTLIB for libraries in the base or in X, and I recall setting third party libraries as LIB_DEPENDS. I may not remember correctly.
WANTLIB contains libraries from base, X, and packages too. LIB_DEPENDS lists the ports that contain any libraries in WANTLIB that aren’t already in base.
Quote:
Originally Posted by jggimi View Post
Again, my memory is foggy, but perhaps make with the port-lib-depends-check target?
Yes, this is the simplest way.

Quote:
Originally Posted by shep
I think I understand the basic process of compiling a program from source and believe that the porting team uses WANTLIBS, SHARED_LIBS and LIB_DEPENDS entries to assist in port maintenance but I can't find strict definitions and guidelines on how to do this. I think I have everything else (post_install , plists, DESCR) ready to go.
I usually start out with a blank LIB_DEPENDS, or just enough to make it build. Then, run “make port-lib-depends-check”. It will print something like this:
Code:
Missing: crypto.22 (/usr/local/lib/libquvi.so.0.0) (system lib)
Asking ports for dependency libwebp-0.2.1(graphics/libwebp)
Asking ports for dependency gettext-0.18.2p1(devel/gettext)
Asking ports for dependency libiconv-1.14p0(converters/libiconv)
Missing lib: curl.23 (/usr/local/lib/libquvi.so.0.0) (NOT REACHABLE)
Missing lib: idn.17 (/usr/local/lib/libquvi.so.0.0) (NOT REACHABLE)
Missing: m.7 (/usr/local/lib/libquvi.so.0.0) (system lib)
Missing: ssl.19 (/usr/local/lib/libquvi.so.0.0) (system lib)
Missing: z.4 (/usr/local/lib/libquvi.so.0.0) (system lib)
WANTLIB += crypto m ssl z
*** Error 1 in target 'port-lib-depends-check' (ignored)
I look for every lib marked “NOT REACHABLE” and find the port that provides it, and add that to LIB_DEPENDS. (In this case, net/curl and devel/libidn.) Then I run port-lib-depends-check again:
Code:
Missing: crypto.22 (/usr/local/lib/libquvi.so.0.0) (system lib)
Asking ports for dependency curl-7.26.0p1(net/curl)
Asking ports for dependency gettext-0.18.2p1(devel/gettext)
Asking ports for dependency libiconv-1.14p0(converters/libiconv)
Asking ports for dependency libidn-1.26(devel/libidn)
Missing: curl.23 from curl-7.26.0p1 (/usr/local/lib/libquvi.so.0.0)
Missing: idn.17 from libidn-1.26 (/usr/local/lib/libquvi.so.0.0)
Missing: m.7 (/usr/local/lib/libquvi.so.0.0) (system lib)
Missing: ssl.19 (/usr/local/lib/libquvi.so.0.0) (system lib)
Missing: z.4 (/usr/local/lib/libquvi.so.0.0) (system lib)
WANTLIB += crypto curl idn m ssl z
*** Error 1 in target 'port-lib-depends-check' (ignored)
Then I copy and paste the “WANTLIB += crypto …” part into the port Makefile. Running port-lib-depends-check again shows:
Code:
Asking ports for dependency curl-7.26.0p1(net/curl)
Asking ports for dependency gettext-0.18.2p1(devel/gettext)
Asking ports for dependency libiconv-1.14p0(converters/libiconv)
Asking ports for dependency libidn-1.26(devel/libidn)
So everything is okay (no errors).
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems.
Reply With Quote