Hi, Is it possible to put something like this in the configure parameters? --with-libgcj-jar=`find ${prefix}/share/java -name "libgcj-4\.2*.jar"` \ This does not work as I get the following error: Error: Unable to open port: extra characters after close-quote Michael
On Feb 5, 2008, at 8:34 PM, Michael Franz wrote:
Is it possible to put something like this in the configure parameters?
You don't need to do it this way.
--with-libgcj-jar=`find ${prefix}/share/java -name "libgcj-4\. 2*.jar"` \
This does not work as I get the following error: Error: Unable to open port: extra characters after close-quote
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. -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
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. These don't cause a problem, but doesn't work. libgcj is not defined when configure executes. set libgcj [ open find ${prefix}/share/java -name "libgcj-4\.2*.jar"] set libgcj system find ${prefix}/share/java -name "libgcj-4\.2*.jar"
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. | +========================================================+
On Feb 5, 2008, at 20:40, 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.
These don't cause a problem, but doesn't work. libgcj is not defined when configure executes.
set libgcj [ open find ${prefix}/share/java -name "libgcj-4\.2*.jar"] set libgcj system find ${prefix}/share/java -name "libgcj-4\.2*.jar"
It would probably be: set libgcj [exec find ${prefix}/share/java -name "libgcj-4\.2*.jar"] (unless you use fs-traverse like Daniel said)
Le 6 févr. 08 à 08:01, Ryan Schmidt a écrit :
<snip/>
It would probably be:
set libgcj [exec find ${prefix}/share/java -name "libgcj-4\.2*.jar"]
(unless you use fs-traverse like Daniel said)
I think the current policy is to avoid any exec/system call when we can do it in a pure TCL fashion. -- Anthony Ramine, the "Ports tree cleaning Maestro". <nox@macports.org>
On Feb 6, 2008 2:07 AM, N_Ox <n.oxyde@gmail.com> wrote:
Le 6 févr. 08 à 08:01, Ryan Schmidt a écrit :
<snip/>
It would probably be:
set libgcj [exec find ${prefix}/share/java -name "libgcj-4\.2*.jar"]
(unless you use fs-traverse like Daniel said)
I think the current policy is to avoid any exec/system call when we can do it in a pure TCL fashion.
Not know TCL, is that the fs-traverse method?
Le 6 févr. 08 à 14:04, Michael Franz a écrit :
On Feb 6, 2008 2:07 AM, N_Ox <n.oxyde@gmail.com> wrote: Le 6 févr. 08 à 08:01, Ryan Schmidt a écrit :
<snip/>
It would probably be:
set libgcj [exec find ${prefix}/share/java -name "libgcj-4\.2*.jar"]
(unless you use fs-traverse like Daniel said)
I think the current policy is to avoid any exec/system call when we can do it in a pure TCL fashion.
Not know TCL, is that the fs-traverse method?
Yes, that's a TCL procedure defined in Pextlib library from MacPorts. see the portfile manpage for the documentation. Regards, -- Anthony Ramine, the "Ports tree cleaning Maestro". <nox@macports.org>
participants (4)
-
Daniel J. Luke
-
Michael Franz
-
N_Ox
-
Ryan Schmidt