How to get all available install options for a port?

与世无争的帅哥 提交于 2019-12-11 23:59:45

问题


Basically I'd like to install opencv so that it makes use of tbb and boost with the complete source code. However I think I will need to know how to display all the available install options for a port. (Install options I mean "+sth" after a port name, is that how you call it?)

In my concrete example, my line starts like

sudo port install opencv +tbb +python27

but I am not sure how to get the dev and the boost options...

Any ideas how to display options? Or specifically for opencv?
Thanks!


回答1:


In addition to the answer provided by Barnabas Szabolcs, I have also found the info command is helpful for finding more information about a port, including the available variants, but also provides other interesting bits of information, such as the software license, maintainers, etc.

port info opencv

The above command results in the following output (as of the current portfile):

opencv @3.0.0_1 (graphics, science)
Variants:             contrib, dc1394, debug, eigen, java, opencl, openni,
                      python27, python34, qt4, qt5, tbb, universal, vtk

Description:          OpenCV is a library that is mainly aimed at real time
                      computer vision. Some example areas would be
                      Human-Computer Interaction (HCI), Object Identification,
                      Segmentation and Recognition, Face Recognition, Gesture
                      Recognition, Motion Tracking, Ego Motion, Motion
                      Understanding, Structure From Motion (SFM), and Mobile
                      Robotics.
Homepage:             http://opencv.org

Extract Dependencies: unzip
Build Dependencies:   cmake, pkgconfig
Library Dependencies: zlib, bzip2, libpng, jpeg, jasper, tiff, ilmbase, openexr,
                      ffmpeg
Platforms:            darwin
License:              BSD
Maintainers:          stromnov@macports.org, openmaintainer@macports.org



回答2:


Sorry, I have found it:

Port install options are called not options but variants. And the command is:

port variants opencv

in my case.

For those who care -- although in the code of opencv I have fond USING_BOOST flags -- there is no extra variant for boost support (perhaps it is automatic?).
My complete install line is

sudo port install opencv +debug +python27 +qt4 +tbb


来源:https://stackoverflow.com/questions/13424305/how-to-get-all-available-install-options-for-a-port

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!