Generate plist from install_manifest.txt when port uses CMake?

arrowdodger 6yearold at gmail.com
Sun Mar 13 13:32:12 UTC 2011


Hello. Suppose we have a port, which uses CMake as build system and contains
following code:

include(FindFoo)

if(Foo_FOUND)
  add_library(FooPlugin ...)
  install(FooPlugin)
else()
  message(STATUS "Foo not found, plugin will not be built.")
endif()

If user already has foo port installed, then this check will succeed and
plugin will be built, possibly altering plist. But since it's happening in
CMake, we dont know when we should adjust plist in port's Makefile. So, port
author is forced to create absolutely full plist with all variants of turned
options (which can be mutually exclusive, by the way). It's quite hard,
IMHO, especially when port has a lot of such optional dependencies. Moving
all of them into OPTIONS isnt a good solution too, because WITHOUT_FOO
option, cannot prevent CMake from building stuff if foo port is already
installed.

So, how about using CMake-generated install_manifest.txt to generate plists?
They are 100% accurate for any variant of used options and are generated
automatically, which makes porter's life easier.


More information about the freebsd-ports mailing list