Permalink
Browse files

[OS support] Add some support for Darwin (Mac OS/X)

Support is incomplete, still need lockf type of program

Signed-off-by: Christopher Hall <hsw@openmoko.com>
  • Loading branch information...
1 parent 5205848 commit 2aca0e0336cc638b5631eed778c9fe2a6b573e86 @hxw hxw committed Jan 7, 2010
Showing with 59 additions and 0 deletions.
  1. +46 −0 doc/Darwin.text
  2. +13 −0 samo-lib/Mk/definitions.mk
View
@@ -0,0 +1,46 @@
+Building on Darwin (Mac OS/X)
+============================
+
+Note that this was done on this system:
+
+ Darwin Kernel Version 8.11.0
+ Wed Oct 10 18:26:00 PDT 2007
+ root:xnu-792.24.17~1/RELEASE_PPC
+ Power Macintosh powerpc
+
+
+1. Install xcode and macports
+
+2. "sudo port install" some ports:
+ (this is not a complete list, as lots of dependencies
+ will be installed, these are just the main ports)
+
+ autoconf @2.65_0 (active)
+ automake @1.11_0 (active)
+ bzip2 @1.0.5_3+darwin (active)
+ coreutils @7.6_0 (active)
+ curl @7.19.7_0 (active)
+ gawk @3.1.7_0 (active)
+ gforth @0.7.0_0 (active)
+ git-core @1.6.5.3_0+doc (active)
+ gmake @3.81_0 (active) # the built-in make was 3.8 & does not work
+ m4 @1.4.13_0 (active)
+ openssl @0.9.8l_0+darwin (active)
+ py26-gd @0.56_0 (active)
+ python26 @2.6.4_0+darwin (active) # the built-in python was too old (2.3)
+ python_select @0.3_0+darwin_8 (active) # use to enable python 2.6
+ sqlite3 @3.6.20_0 (active)
+ wget @1.12_0 (active)
+ zlib @1.2.3_3 (active)
+
+3. Use gmake (to get the ports version)
+ if make --version is 3.81 or newer then you should be able to use make
+ and not have to have the macports version installed
+
+4. Missing: lockf or flock so building data will not work
+ In samo-lib/Mk/definitions.mk
+ need to set LOCKF to a proper value
+ such that the make command: ${LOCKF} file command args
+ will wait for exclusive lock on "file" before running command
+ on FreeBSD have lockf and Linux has flock, need the same for Darwin
+ maybe there is a program in one of the ports
View
@@ -77,6 +77,19 @@ REALPATH = realpath
# path may not exist
RESOLVEPATH = /usr/local/bin/readlink -f
+else ifeq (Darwin,${OS})
+
+# missing lockf/flock in Darwin, need further research to find replacement
+# cause error for the moment
+LOCKF = echo missing lockf;exit 55;
+AWK = gawk
+
+# path must exist
+REALPATH = opt/local/bin/greadlink -es
+
+# path may not exist
+RESOLVEPATH = /opt/local/bin/greadlink -m
+
else
$(error Unsupported OS: ${OS})
endif

0 comments on commit 2aca0e0

Please sign in to comment.