On Aug 10, 2007, at 12:34, Sbranzo wrote:
I'm trying to add a cvs variant to the slrn-devel portfile. As now i can fetch the sources with this:
variant cvs { fetch.type cvs
cvs.root :pserver:anonymous@slrn.cvs.sourceforge.net:/ cvsroot/slrn cvs.module slrn cvs.password cvs.date 20070717 version ${version}-${cvs.date} worksrcdir slrn pre-configure { autopoint -f; aclocal -I autoconf; autoheader; automake --foreign --add-missing; autoconf; } depends_build-append port:autoconf port:automake }
I can't pass the org.macports.configure phase because I should execute the autogen.sh script instead of ./configure.
Autogen.sh checks if automake autoconf and autopoint exist and than executes: ------------------------------- autopoint -f; aclocal -I autoconf; autoheader; automake --foreign --add-missing; autoconf;
./configure $@ -------------------------------
I'd like to run the first 5 commands before running configure, but the pre-configure hook seems to be ignored.
What I get is always:
[...] ---> Verifying checksum(s) for slrn-devel ---> Extracting slrn-devel ---> Configuring slrn-devel Error: Target org.macports.configure returned: no such file or directory Warning: the following items did not execute (for slrn-devel): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.archive org.macports.install Error: Status 1 encountered during processing.
Which is the right way to address this problem?
Why are you adding such a variant? Under which circumstances might a user want, or not want, to select it? I'm trying to figure out why you don't just fetch from CVS all the time, as that would seem to simplify things, wouldn't it? Variants are not supposed to change the version of the installed software, so if it's the same version, why would anyone care whether it's fetched from CVS or somewhere else, so long as it's fetched? The immediate answer to your question, I think, is that the commands you are issuing are not valid TCL commands, and are therefore are not getting executed, and therefore the ./configure script, which the configure phase it trying to run, does not exist, hence the error message about no such file or directory. Hopefully if you would run the install in debug mode ("sudo port -dv install"), error messages to this effect would be printed. I think you would need something like this: pre-configure { system "cd ${worksrcdir} && autopoint -f" system "cd ${worksrcdir} && aclocal -I autoconf" system "cd ${worksrcdir} && autoheader" system "cd ${worksrcdir} && automake --foreign --add- missing" system "cd ${worksrcdir} && autoconf" }