Skip to content

Instantly share code, notes, and snippets.

@dpeek
Created June 11, 2013 01:19
Show Gist options
  • Save dpeek/5753876 to your computer and use it in GitHub Desktop.
Save dpeek/5753876 to your computer and use it in GitHub Desktop.
Patches Neko Makefile and installer to work with Homebrew
From 045276ae065567ca2610ef4976c823c54473fa89 Mon Sep 17 00:00:00 2001
From: David Peek <[email protected]>
Date: Tue, 11 Jun 2013 11:13:18 +1000
Subject: [PATCH] Patch required by homebrew formula - no static, paths
---
Makefile | 7 ++++---
src/tools/install.neko | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 0f3fdc3..0e03a80 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,7 @@
## CONFIG
INSTALL_PREFIX = /usr
+LIB_PREFIX = /opt/local
CFLAGS = -Wall -O3 -fPIC -fomit-frame-pointer -I vm -D_GNU_SOURCE -I libs/common
EXTFLAGS = -pthread
@@ -50,11 +51,11 @@ EXTFLAGS =
MAKESO = ${CC}
LIBNEKO_NAME = libneko.dylib
LIBNEKO_INSTALL = -install_name @executable_path/${LIBNEKO_NAME}
-LIBNEKO_LIBS = -ldl /opt/local/lib/libgc.a -lm -dynamiclib -single_module ${LIBNEKO_INSTALL}
+LIBNEKO_LIBS = -ldl ${LIB_PREFIX}/lib/libgc.a -lm -dynamiclib -single_module ${LIBNEKO_INSTALL}
NEKOVM_FLAGS = -L${CURDIR}/bin -lneko
STD_NDLL_FLAGS = -bundle -undefined dynamic_lookup ${NEKOVM_FLAGS}
-CFLAGS += -L/usr/local/lib -L/opt/local/lib -I/opt/local/include
-INSTALL_FLAGS = -static
+CFLAGS += -L/usr/local/lib -L${LIB_PREFIX}/lib -I${LIB_PREFIX}/include
+#INSTALL_FLAGS = -static
endif
diff --git a/src/tools/install.neko b/src/tools/install.neko
index 0eba7a7..f8cf75e 100644
--- a/src/tools/install.neko
+++ b/src/tools/install.neko
@@ -158,7 +158,7 @@ search_includes = function(isap2) {
"/opt/local/include",
"/opt/local/include/mysql",
"/opt/local/include/mysql5/mysql",
- "/Developer/Headers/FlatCarbon",
+ "/System/Library/Frameworks/Carbon.framework/Versions/A/Headers/",
);
var inc2;
if( isap2 )
--
1.8.2.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment