Skip to content

Instantly share code, notes, and snippets.

@dpk
Last active December 18, 2017 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpk/794c843bc21946af950f2a1b0e239af3 to your computer and use it in GitHub Desktop.
Save dpk/794c843bc21946af950f2a1b0e239af3 to your computer and use it in GitHub Desktop.
Patch file for mk-with-libs.tgz to enable installing and building mk from https://9fans.github.io/plan9port/unix/ on Mac OS. to apply: patch -p1 < mk-darwin-x86_64.diff
diff -rNu mk.old/libbio/Make.Darwin-x86_64 mk.new/libbio/Make.Darwin-x86_64
--- mk.old/libbio/Make.Darwin-x86_64 1970-01-01 01:00:00.000000000 +0100
+++ mk.new/libbio/Make.Darwin-x86_64 2017-12-18 11:33:22.000000000 +0100
@@ -0,0 +1,7 @@
+CC=gcc
+CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I${PREFIX}/include
+O=o
+AR=ar
+ARFLAGS=rvc
+NAN=nan64.$O
+RANLIB=ranlib
diff -rNu mk.old/libfmt/Make.Darwin-x86_64 mk.new/libfmt/Make.Darwin-x86_64
--- mk.old/libfmt/Make.Darwin-x86_64 1970-01-01 01:00:00.000000000 +0100
+++ mk.new/libfmt/Make.Darwin-x86_64 2017-12-18 11:33:22.000000000 +0100
@@ -0,0 +1,7 @@
+CC=gcc
+CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I${PREFIX}/include
+O=o
+AR=ar
+ARFLAGS=rvc
+NAN=nan64.$O
+RANLIB=ranlib
diff -rNu mk.old/libregexp/Make.Darwin-x86_64 mk.new/libregexp/Make.Darwin-x86_64
--- mk.old/libregexp/Make.Darwin-x86_64 1970-01-01 01:00:00.000000000 +0100
+++ mk.new/libregexp/Make.Darwin-x86_64 2017-12-18 11:33:22.000000000 +0100
@@ -0,0 +1,7 @@
+CC=gcc
+CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I${PREFIX}/include
+O=o
+AR=ar
+ARFLAGS=rvc
+NAN=nan64.$O
+RANLIB=ranlib
diff -rNu mk.old/libregexp/regcomp.c mk.new/libregexp/regcomp.c
--- mk.old/libregexp/regcomp.c 2017-09-01 18:32:13.000000000 +0200
+++ mk.new/libregexp/regcomp.c 2017-12-18 11:37:33.000000000 +0100
@@ -1,3 +1,5 @@
+#include <stddef.h>
+
#include "lib9.h"
#include "regexp9.h"
#include "regcomp.h"
diff -rNu mk.old/libutf/Make.Darwin-x86_64 mk.new/libutf/Make.Darwin-x86_64
--- mk.old/libutf/Make.Darwin-x86_64 1970-01-01 01:00:00.000000000 +0100
+++ mk.new/libutf/Make.Darwin-x86_64 2017-12-18 11:33:22.000000000 +0100
@@ -0,0 +1,7 @@
+CC=gcc
+CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I${PREFIX}/include
+O=o
+AR=ar
+ARFLAGS=rvc
+NAN=nan64.$O
+RANLIB=ranlib
diff -rNu mk.old/mk/Make.Darwin-x86_64 mk.new/mk/Make.Darwin-x86_64
--- mk.old/mk/Make.Darwin-x86_64 1970-01-01 01:00:00.000000000 +0100
+++ mk.new/mk/Make.Darwin-x86_64 2017-12-18 11:33:22.000000000 +0100
@@ -0,0 +1,7 @@
+CC=gcc
+CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I${PREFIX}/include
+O=o
+AR=ar
+ARFLAGS=rvc
+NAN=nan64.$O
+RANLIB=ranlib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment