free42 (was: Re: [46154] trunk/dports/emulators)
Martin Krischik
krischik at macports.org
Sun Feb 22 09:50:19 PST 2009
Am 01.02.2009 um 22:34 schrieb Ryan Schmidt:
> On Jan 30, 2009, at 11:25, krischik at macports.org wrote:
>
>> Revision: 46154
>> http://trac.macports.org/changeset/46154
>> Author: krischik at macports.org
>> Date: 2009-01-30 09:25:19 -0800 (Fri, 30 Jan 2009)
>> Log Message:
>> -----------
>> Ticket #18207: Free HP-42s Simulator.
>
> [snip]
>
>> +depends_lib port:gtk2 \
>> + path:${prefix}/bin/zsh:zsh
>
> This line must read "path:bin/zsh:zsh" to work as intended because
> variables are not expanded in depspecs.
>
> [snip]
>
>> + xinstall -m 755 \
>> + -W ${filespath} \
>> + Free42-Decimal.command.in \
>> + ${destroot}${applications_dir}/Free42-Decimal.command
>> + reinplace \
>> + s|@PREFIX@|${prefix}|g \
>> + ${destroot}${applications_dir}/Free42-Decimal.command
>> + system "SetFile -a E ${destroot}${applications_dir}/Free42-
>> Decimal.command"
>> + xinstall -m 755 \
>> + -W ${filespath} \
>> + Free42-Binary.command.in \
>> + ${destroot}${applications_dir}/Free42-Binary.command
>> + reinplace \
>> + s|@PREFIX@|${prefix}|g \
>> + ${destroot}${applications_dir}/Free42-Binary.command
>> + system "SetFile -a E ${destroot}${applications_dir}/Free42-
>> Binary.command"
>
> When I try to install the port I get:
>
> sh: line 1: SetFile: command not found
> Error: Target org.macports.destroot returned: shell command "SetFile
> -a E /mp/var/macports/build/
> _Users_rschmidt_macports_dports_emulators_free42/work/destroot/
> Applications/mp/Free42-Decimal.command" returned error 127
> Command output: sh: line 1: SetFile: command not found
>
> SetFile is not in any of the usual paths but in /Developer/Tools so
> you'll have to call it by that absolute path if you want to use it.
>
> But why do you want to use it? It looks like you're making files
> invisible.
No, I make the extension (.command) invisible.
> Is that because they look unsightly in the Applications directory?
> If so, then why are the files there and not placed in a less-visible
> MacPorts directory, e.g. ${prefix}/libexec/${name}?
It is the right place as - only the .command is ugly.
> It looks like these .command files are wrapper scripts around the
> real program. Wrapper scripts are fine; I do it in the wine port
> too. But I suggest you change it in this way:
> )1) Install the wrapper script as ${prefix}/bin/free42. Install the
> real binary in ${prefix}/libexec/${name}/free42. That way anyone who
> just types "free42" in the Terminal access your wrapper too.
Start via Terminal is what I want to avoid. I find I rather sad that
so few applications provide start-up via application icon. The command
file was a first attempt to provide easy access to the application.
Not perfect yet - I am still working on it.
> 2) If you want to make the program available in ${applications_dir},
> make a minimal application bundle. See for example the post-destroot
> section of the port lbreakout2.
That's the way to go indeed.
> 3) Rewrite the wrapper in sh so that a dependency on the zsh port is
> not necessary.
grumlgrumldon'tlikebashgrumlgruml
>> +############################################################ {{{1
>> ###########
>> +# vim: set nowrap tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab :
>> +# vim: set textwidth=0 filetype=tcl foldmethod=marker nospell :
>
> We already have the modeline in the first line of the portfile. If
> these lines are adding things that we don't have in the modeline,
> what are they and would they be useful to consider adding to our
> recommended modeline?
First and foremost they use the full names of the settings instead of
abbreviations. So lets compare:
1) fenc=utf-8 fileencoding
2) ft=tcl filetype
3) et expandtab
4) sw=4 shiftwidth
5) ts=4 tabstop
6) sts=4 softtabstop
No. 3 and 5 contradict each other - if tabs are expanded to spaces you
don't need to set the physical tab stops. My Suggestion is tabstop=8
noexpandtab - most terminals set the tabstop to 8.
I also have foldmethod=marker which might be helpful for very large
Portfiles - you can then fold parts of the source with {{{ and }}}.
textwidth=0 is actually wrong - better would be textwidth=78 - one can
then format comments with the "gq" command.
Martin
--
Martin Krischik
krischik at users.sourceforge.net
More information about the macports-dev
mailing list