On Feb 5, 2008, at 9:40 PM, Michael Franz wrote:
Add a pre-configure phase which finds those files and generates the string/path that you want to pass to configure, put it in a portfile- local variable and then add it to your configure args by using that variable.
Any hints on how to do this? I have not found many examples. The one that I did find uses perl.
You probably want to use fs-traverse, which is described in the portfile man page: fs-traverse [-depth] [-ignoreErrors] varname target-list body Traverse the filesystem hierarchy rooted in each element of target-list and execute body for each found file/directory. varname is set to the path of the file/directory. If break is called during execution, the filesystem traversal is stopped. If continue is called during execution, the current file and any children are skipped and traversal continues with the next file/directory. -depth Equivalent to the -d switch to find(1). Please note that using -depth means you cannot prune a directory with continue as it will be processed after its children. -ignoreErrors Causes fs-traverse to ignore any permissions/read errors encountered during processing. If fs-traverse is called directly on a symbolic link, the link will be followed. All other links encountered during traversal will not be followed. fs-traverse will not descend into directories that have a different device number than the root of the descent. If you remove the current directory during traversal, be aware that you must call continue to inform fs-traverse that the directory should not be descended into. -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+