tmux needs an older file on 10.4.11

Ryan Schmidt ryandesign at macports.org
Tue Sep 3 12:08:48 PDT 2013


On Sep 3, 2013, at 02:18, Jan Stary wrote:

> I am trying to build sysutils/tmux on MacOSX 10.4.11
> It fails because 10.4.11 (Darwin 8.11.0) does not have
> libproc.h that is included by tmux's osdep-darwin.c:
> 
>  osdep-darwin.c:22:21: error: libproc.h: No such file or directory
> 
> This problem has been encountered before,
> and there is even a known workaround.
> use an older version of osdep-darwin.c
> 
> http://sourceforge.net/mailarchive/forum.php?thread_name=51A035A8.6090504%40gmail.com&forum_name=tmux-users
> 
> I would like to prepare a diff to the tmux Portfile
> so that it builds on my 10.4.11, but I am not sure
> what is the right way to do this.
> 
> Does macports have the ability to say, in a Portfile,
> 
>  "if we are pre-10.5, replace osdep-darwin.c with
>  git checkout c1b994852594b23b7443e01e05257c991684ba4e -- osdep-darwin.c" ?
> 
> Or would it be better to just hold a copy of that version of the file
> in the port's files/, and conditionally use it on pre-10.5?

Portfiles are Tcl, which is a full programming language, so when the question is "Does MacPorts have the ability to …" the answer is usually yes, depending on how much code you want to write.

In MacPorts these days, "pre-10.5" means Mac OS X 10.4 a.k.a. darwin 8. MacPorts doesn't run on earlier systems anymore. So you can put the required code for this scenario inside a platform darwin 8 block:

platform darwin 8 {
    …
}

Instead of an entire older version of the source file, usually I'd suggest making a patchfile (which reverts whatever the bad parts are of the new file), and then you can apply that patchfile conditionally on darwin 8.



More information about the macports-users mailing list