On Nov 6, 2008, at 03:45, Scott Haneda wrote:
This language is tcl I take it, which I have no experience with.
Yes, it's tcl. I didn't have much experience with it until MacPorts
either. It's not too hard to learn. At its most basic, which suffices
for many portfiles, it reads like a config file, which is a nice
simplification. When you need more power, it's there.
Is this acceptable in my testing:
puts "+++++++OTHER DEBUG: worksrcdir: ${worksrcdir}"
Seems to work like print or echo, I could not get the example
posted to this list to work:
*You can "ui_info ${worksrcpath}" or "return -code error $
{worksrcpath}" for example.*
Sorry, I forgot, ui_info stuff is only printed in debug mode. You
could use ui_warn instead. return -code error "something" should work
however.
The old portfile had this line in it:
set assp_base ${prefix}/var/assp
If that is just setting a variable as I suspect it is, why, and
what is later needing it, how does it now since it is prepended
with 'assp_' which is specific to this portfile.
It is simply a variable called "assp_base". There is nothing prepended.
The variable is used in several places in the existing assp portfile.
You can search the file for "assp_base" to see where.
For some reason, someone in the past decided it was a good idea to
remove mac line endings. While I am not sure it is needed now, for
5 lines or so, it probably can not hurt.
It wasn't removing Mac line endings. It was converting DOS line
endings (\r\n) to UNIX (\n) by removing \r.
Is there a way to do this recursively? There are alerady a ton of
new files, I would like to recursively hit .htm, .dat. and .txt and
be done with it:
pre-patch {
foreach file [glob -directory ${worksrcpath} *.pl *.sh docs/*.htm
*.txt rc/*.dat] {
reinplace "s%\r%%" $file
}
}
fs-traverse is the MacPorts way of recursively finding files in a
hierarchy. Search the existing ports for "fs-traverse" to see how
it's used.
In the past, we had this issue where no one knew why they were
removing the spaces from the file name, and I am about to do the
same, as I can not get it to work.
Here is the error message, right where the first space in the file
name is
DEBUG: cp: /tmp/Legacy: No such file or directory
#configure {
# reinplace "s%^#!.*perl%#![binaryInPath perl]%" \
# ${worksrcpath}/assp.pl \
# ${worksrcpath}/move2num.pl \
# ${worksrcpath}/rebuildspamdb.pl \
# ${worksrcpath}/repair.pl \
# ${worksrcpath}/stat.pl
# reinplace "s%/usr/local/assp%${assp_base}%" \
# ${worksrcpath}/docs/Legacy - ASSP Documentation.htm \
# ${worksrcpath}/stats.sh \
# ${worksrcpath}/assp.pl \
# ${worksrcpath}/rc/assp.dat \
# ${worksrcpath}/rc/start.dat \
# ${worksrcpath}/rc/stop.dat
# reinplace "s%/usr/local%${prefix}%" \
# ${worksrcpath}/Legacy - ASSP Documentation.htm
#}
So, I have tried quotes, and escapes, so far, no luck.
Perhaps reinplace doesn't like paths with spaces. I didn't know that.
I guess that could be a bug that we could fix.
Does tcl not have a multi line comment?
Googling for "tcl multiline comment" the first result states "TCL has
no native multi-line comment format" but it does show a workaround
you can try if you want:
http://www.rosettacode.org/rosettacode/w/index.php?title=Comments
Thanks, I will start working on the other suggestions. Sorry about
this learning curve I am on here.
_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users