preliminary Portfile for torch 7 (was: Re: Writing portfiles: How to download a and not a

Lars Sonchocky-Helldorf lars.sonchocky-helldorf at
Mon Sep 7 18:09:18 PDT 2015

Hi Ryan,

Am 07.09.2015 um 04:29 schrieb Ryan Schmidt:

> On Sep 6, 2015, at 19:34, Lars Sonchocky-Helldorf wrote:
>> Thanks to your help I am now one step further. Now it fails when trying to configure the port:
>> --->  Configuring torch
>> sh: ./configure: No such file or directory
> The default for the configure phase is to run a script called configure. I guess this project doesn't have one.

no, it doesn't have a configure script. As I said it is a completely homegrown build system based on cmake. First it fetches the sources using git, then builds and even installs (of course not in the right location) torch. 

>> This happens because this whole project is based on a rather weird build system with shell scripts downloaded from remote hosts and executed locally, it uses homebrew, cmake and luarocks to build the whole thing …
> Everything that is needed should be fetched in the fetch phase. We would not want a build system to fetch additional files. We do have a couple ports that do this, but it causes various problems and should be avoided. 

Fixing that would be way above my level. I am even struggling setting up supposedly simple Portfiles. Here is what I did for now. see attached portfile. 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Portfile
Type: application/octet-stream
Size: 1907 bytes
Desc: not available
URL: <>
-------------- next part --------------

>> I managed to work around homebrew for now. I have no idea how to skip the configure phase of macports nor how to invoke later … any ideas?
> If you want there to be no configure phase, use:
> use_configure no
> If instead you want to run a different program in the configure phase, change configure.cmd and possible configure.args and configure.pre_args to match. 
> This should already be mentioned in the guide...

There is also the output of running "sudo port -v install torch" for the interested ones, I can send this on request (not to the list because it is too large), There you can see that everything is done right but in the wrong way (for the MacPorts system)



P.S.: If you have question on the Portfile please ask.

More information about the macports-users mailing list