MacPorts on Other Platforms

Ryan Schmidt ryandesign at macports.org
Mon Sep 21 00:24:24 PDT 2009


On Sep 21, 2009, at 01:54, Anders F Björklund wrote:

> I think it only runs one at a time anyway, just that the deps fail.
> Or something like that, it's not like I actually digged into it...
>
> Just noticed that "make" works and "make -j1" does not.

On base? On a particular port?


> Besides,
> that "-j1" argument seemed rather silly to me in the first place ?

Sure. There's just no special case code in there to handle when  
jobs=1. But like I said it could be easily added. How about this patch?


Index: portbuild.tcl
===================================================================
--- portbuild.tcl	(revision 57981)
+++ portbuild.tcl	(working copy)
@@ -142,7 +142,7 @@
          return ""
      }

-    if {![exists build.jobs] || !([string match "*make*" [option  
build.cmd]] || [string match "*scons*" [option build.cmd]])} {
+    if {![exists build.jobs] || 1 == [option build.jobs] || !([string  
match "*make*" [option build.cmd]] || [string match "*scons*" [option  
build.cmd]])} {
          return ""
      }
      return " -j[option build.jobs]"



>> But MacPorts is documented as using GNU make by default. That's  
>> build.type. MacPorts should be using GNU make by default on all  
>> platforms unless the port sets build.type to bsd. Is this not the  
>> case?
>
> If nothing is set for build.type, it uses system make:
>    if {![exists build.type]} {
>        return [findBinary make $portutil::autoconf::make_path]
>    }

Ok. That's not what our documentation says happens. :)

http://guide.macports.org/#reference.phases.build

I think we should change the code to match the documentation, which  
means "build.type gnu" should be the default.


> So it was using -j1 for bsdmake as well ? Or actually it was using
> "fail" (2) for -j until the default value was changed from 0 to 1.
>
> So "whatever the system provides" is the default value, then it
> can be explicitly set to GNU for the 0.01% of the ports that care.

I'd rather change base to match the documentation in this case, since  
what's documented sounds like more predictable behavior.


>>> This makes it less portable, if it requires "Mac OS X" and "Xcode"
>>> instead of explicit dependencies like Tcl or GCC... That's all.
>>
>> Yeah. I guess all we can do is fix things when problems are reported.
>
> No, what you *could* do instead is saying "So what ? We don't care !"

We could do that as well.


> and just have MacPorts require Mac OS X (10.5+ ?) and be done with it.

We currently work on Mac OS X 10.4 and up and should not unnecessarily  
exclude 10.4 at this point.


> I don't think that MacPorts could ever be a portable build system,

I don't know if it could be. But it seems to me we have enough on our  
hands trying to make a good Mac build system without also trying to  
accommodate other OSes.


> I was just making sure that it runs on Darwin OS and now FreeBSD...
> Partly because I think Open Source is important, and partly because
> I don't have a new Mac to join in on the Snow Leopard crash fest...

Thanks! I certainly appreciate your efforts. They might well uncover  
other issues which are relevant on Mac OS X as well.




More information about the macports-dev mailing list