[47209] trunk/dports/emulators/free42/Portfile
Ryan Schmidt
ryandesign at macports.org
Tue Feb 24 00:12:32 PST 2009
On Feb 23, 2009, at 08:00, krischik at macports.org wrote:
> Revision: 47209
> http://trac.macports.org/changeset/47209
> Author: krischik at macports.org
> Date: 2009-02-23 06:00:16 -0800 (Mon, 23 Feb 2009)
> Log Message:
> -----------
> Using application bundles to start the program - id.
You also added --jobs=${build.jobs} to the build.args without noting
it in your commit message. I've asked about this in responses to
previous commits where you added this option to other ports. In
free42 it's even more puzzling, since you override the build phase
entirely, thus the build.args aren't used at all and parallel
building does not happen. Neither does "nice" building for that
matter, two reasons why it's best not to override the build phase if
possible, since we want users to be able to set these options in
macports.conf and have them take effect for all ports. One solution
could be to let the build phase run as usual to build the binary
version, and in post-build you could build again for the decimal
version.
I'm hesitant to suggest this, but you could do it the way the php5
portfile manages to build both fastcgi and apache2 modules at the
same time. php5's makefile unfortunately does not allow this -- it's
an either/or choice, just like for free42 binary vs. decimal appears
to be an either/or choice -- but I wanted the user to be able to
select both +apache2 and +fastcgi variants at the same time. So if
the user chooses both, I run the build once normally, then add more
configure arguments and run it a second time with command_exec.
command_exec is supposed to be an internal MacPorts command not to be
used by portfiles, and php5 and php5-devel are the only ports that
use it, but I felt it was better to use command_exec, which properly
implements all the complexities of executing a command, including
setting the environment, adding arguments and outputting debug
messages, than implementing all that logic again in the portfile.
Further comments on your portfile. You set "-DNO_SINCOS" in the build
phase and add some LIBS to the build.env globally but the README that
comes with the software only mentions these being needed on Mac OS X.
Thus you should do this only in a "platform darwin" block. It should
also occur in the patch phase not the build phase. Depending on how
many places in the source this replacement needs to be done, it might
be better to make it a patchfile instead of a reinplace. (If many, I
can see that a patchfile could grow large and unwieldy, but if only
one or a few places, then a patchfile has the advantage of providing
context assistance when the upstream source changes and you have to
modify the portfile to follow.)
I'm attaching a patchfile implementing my suggestions. I also had to
disable parallel build, actually, since it failed with "No rule to
make target `skin2cc.cc', needed by `skin2cc'" when I left it enabled.
Now all that remains is that the items you install in $
{applications_dir} don't actually open the calculator. They appear in
the Dock for a split-second, then disappear. When I tried running $
{prefix}/bin/free42dec directly I noticed one problem was that X11
was not started. I'm on Tiger, and X11 only auto-starts on Leopard
and later, so on Tiger and earlier, you have to start X11 first. But
even if X11 is started, your application wrappers do not open the
calculator when double-clicked. They do open the calculator when I
run ${applications_dir}/Free42-Decimal.app/Contents/MacOS/Free42-
Decimal.command from the Terminal. So I'm not sure what's up.
> Modified Paths:
> --------------
> trunk/dports/emulators/free42/Portfile
>
> Modified: trunk/dports/emulators/free42/Portfile
> ===================================================================
> --- trunk/dports/emulators/free42/Portfile 2009-02-23 13:59:42 UTC
> (rev 47208)
> +++ trunk/dports/emulators/free42/Portfile 2009-02-23 14:00:16 UTC
> (rev 47209)
> @@ -1,6 +1,6 @@
> # -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t;
> indent-tabs-mode: nil; c-basic-offset: 4; -*-
> +# $Id$
> # vim: set fileencoding=utf-8 tabstop=4 shiftwidth=4 softtabstop=4
> noexpandtab filetype=tcl :
> -# $Id$
>
> PortSystem 1.0
>
> @@ -37,8 +37,10 @@
>
> worksrcdir ${name}
> use_parallel_build yes
> +build.args --jobs=${build.jobs}
> use_configure no
>
> +
> post-extract {
> system "unzip -q ${distpath}/${skin} -d ${workpath}/skin"
> }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: free42.diff
Type: application/octet-stream
Size: 1454 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20090224/f092e7bd/attachment-0001.obj>
More information about the macports-dev
mailing list