From 53972fc9988fbb97f24cacc0bccb56ad3dcca294 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Sat, 12 May 2012 15:41:09 +0100 Subject: [PATCH] Add patch to support FreeBSD 9 and 10 in GYP. Without this patch GYP will attempt to build v8 for Linux which will fail due to missing headers. --- Rakefile | 4 ++++ .../add-freebsd9-and-freebsd10-to-gyp-GetFlavor.patch | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 patches/add-freebsd9-and-freebsd10-to-gyp-GetFlavor.patch diff --git a/Rakefile b/Rakefile index 45df8bc..b9960e7 100644 --- a/Rakefile +++ b/Rakefile @@ -18,6 +18,10 @@ task :checkout do sh "git checkout #{V8_Version} -f" sh "#{make} dependencies" end + + # Fix gyp trying to build platform-linux on FreeBSD 9 and FreeBSD 10. + # Based on: https://chromiumcodereview.appspot.com/10079030/patch/1/2 + sh "patch -N -d vendor/v8 < patches/add-freebsd9-and-freebsd10-to-gyp-GetFlavor.patch" end desc "compile v8 via the ruby extension mechanism" diff --git a/patches/add-freebsd9-and-freebsd10-to-gyp-GetFlavor.patch b/patches/add-freebsd9-and-freebsd10-to-gyp-GetFlavor.patch new file mode 100644 index 0000000..861e8cd --- /dev/null +++ b/patches/add-freebsd9-and-freebsd10-to-gyp-GetFlavor.patch @@ -0,0 +1,11 @@ +--- build/gyp/pylib/gyp/common.py.orig 2012-05-12 15:36:46.235280559 +0100 ++++ build/gyp/pylib/gyp/common.py 2012-05-12 15:37:10.315754125 +0100 +@@ -355,6 +355,8 @@ + 'sunos5': 'solaris', + 'freebsd7': 'freebsd', + 'freebsd8': 'freebsd', ++ 'freebsd9': 'freebsd', ++ 'freebsd10': 'freebsd', + } + flavor = flavors.get(sys.platform, 'linux') + return params.get('flavor', flavor)