nixpkgs/pkgs/applications/editors/mg
D. Guthrie a0c2892c06 Fix mg building on darwin.
I am not happy with this at all. It avoids using libbsd at all on
darwin because there are conflicting header files, particularly the
header string.h.

Ideally that would be the thing to fix. But in the meantime, this patch
should do the trick.

It declares a header file apple.h, which files include if target is
darwin (checks for presence of __APPLE__). This header file also
references the three source files futimens.c, reallocarray.c and
strtonum.c. The former and  latter are from https://github.com/ibara/mg
which is another portable fork, but building against more platforms.

From the OpenBSD source tree is _null.h and tree.h. There is a check so
that if __APPLE__ is present then it will include them from this source
tree.

Now,the makefile GNUMakefile will not link against libbsd on darwin, by
checking the output of uname in much the same way as it did already for
FreeBSD.
2020-02-01 22:21:31 +00:00
..
darwin_no_libbsd.patch Fix mg building on darwin. 2020-02-01 22:21:31 +00:00
default.nix Fix mg building on darwin. 2020-02-01 22:21:31 +00:00