mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
nodejs: remove ‘no-xcode’ patches
now provided by xcbuild
This commit is contained in:
parent
d4b453d2c1
commit
b421a7d0a6
@ -1,79 +0,0 @@
|
||||
diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
|
||||
index a173ff0..1fc821a 100644
|
||||
--- a/tools/gyp/pylib/gyp/xcode_emulation.py
|
||||
+++ b/tools/gyp/pylib/gyp/xcode_emulation.py
|
||||
@@ -507,9 +507,12 @@ class XcodeSettings(object):
|
||||
def _XcodePlatformPath(self, configname=None):
|
||||
sdk_root = self._SdkRoot(configname)
|
||||
if sdk_root not in XcodeSettings._platform_path_cache:
|
||||
- platform_path = self._GetSdkVersionInfoItem(sdk_root,
|
||||
+ try:
|
||||
+ platform_path = self._GetSdkVersionInfoItem(sdk_root,
|
||||
'--show-sdk-platform-path')
|
||||
- XcodeSettings._platform_path_cache[sdk_root] = platform_path
|
||||
+ XcodeSettings._platform_path_cache[sdk_root] = platform_path
|
||||
+ except:
|
||||
+ XcodeSettings._platform_path_cache[sdk_root] = None
|
||||
return XcodeSettings._platform_path_cache[sdk_root]
|
||||
|
||||
def _SdkPath(self, configname=None):
|
||||
@@ -520,10 +523,13 @@ class XcodeSettings(object):
|
||||
|
||||
def _XcodeSdkPath(self, sdk_root):
|
||||
if sdk_root not in XcodeSettings._sdk_path_cache:
|
||||
- sdk_path = self._GetSdkVersionInfoItem(sdk_root, '--show-sdk-path')
|
||||
- XcodeSettings._sdk_path_cache[sdk_root] = sdk_path
|
||||
- if sdk_root:
|
||||
- XcodeSettings._sdk_root_cache[sdk_path] = sdk_root
|
||||
+ try:
|
||||
+ sdk_path = self._GetSdkVersionInfoItem(sdk_root, '--show-sdk-path')
|
||||
+ XcodeSettings._sdk_path_cache[sdk_root] = sdk_path
|
||||
+ if sdk_root:
|
||||
+ XcodeSettings._sdk_root_cache[sdk_path] = sdk_root
|
||||
+ except:
|
||||
+ XcodeSettings._sdk_path_cache[sdk_root] = None
|
||||
return XcodeSettings._sdk_path_cache[sdk_root]
|
||||
|
||||
def _AppendPlatformVersionMinFlags(self, lst):
|
||||
@@ -653,10 +659,11 @@ class XcodeSettings(object):
|
||||
framework_root = sdk_root
|
||||
else:
|
||||
framework_root = ''
|
||||
- config = self.spec['configurations'][self.configname]
|
||||
- framework_dirs = config.get('mac_framework_dirs', [])
|
||||
- for directory in framework_dirs:
|
||||
- cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
|
||||
+ if 'SDKROOT' in self._Settings():
|
||||
+ config = self.spec['configurations'][self.configname]
|
||||
+ framework_dirs = config.get('mac_framework_dirs', [])
|
||||
+ for directory in framework_dirs:
|
||||
+ cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
|
||||
|
||||
self.configname = None
|
||||
return cflags
|
||||
@@ -908,10 +915,11 @@ class XcodeSettings(object):
|
||||
sdk_root = self._SdkPath()
|
||||
if not sdk_root:
|
||||
sdk_root = ''
|
||||
- config = self.spec['configurations'][self.configname]
|
||||
- framework_dirs = config.get('mac_framework_dirs', [])
|
||||
- for directory in framework_dirs:
|
||||
- ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
|
||||
+ if 'SDKROOT' in self._Settings():
|
||||
+ config = self.spec['configurations'][self.configname]
|
||||
+ framework_dirs = config.get('mac_framework_dirs', [])
|
||||
+ for directory in framework_dirs:
|
||||
+ ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
|
||||
|
||||
platform_root = self._XcodePlatformPath(configname)
|
||||
if sdk_root and platform_root and self._IsXCTest():
|
||||
@@ -1683,6 +1691,9 @@ def _NormalizeEnvVarReferences(str):
|
||||
"""Takes a string containing variable references in the form ${FOO}, $(FOO),
|
||||
or $FOO, and returns a string with all variable references in the form ${FOO}.
|
||||
"""
|
||||
+ if str is None:
|
||||
+ return ''
|
||||
+
|
||||
# $FOO -> ${FOO}
|
||||
str = re.sub(r'\$([a-zA-Z_][a-zA-Z0-9_]*)', r'${\1}', str)
|
||||
|
@ -1,57 +0,0 @@
|
||||
diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
|
||||
index 407ead0..8bf64e7 100644
|
||||
--- a/tools/gyp/pylib/gyp/xcode_emulation.py
|
||||
+++ b/tools/gyp/pylib/gyp/xcode_emulation.py
|
||||
@@ -446,10 +446,16 @@ class XcodeSettings(object):
|
||||
|
||||
def _XcodeSdkPath(self, sdk_root):
|
||||
if sdk_root not in XcodeSettings._sdk_path_cache:
|
||||
- sdk_path = self._GetSdkVersionInfoItem(sdk_root, 'Path')
|
||||
- XcodeSettings._sdk_path_cache[sdk_root] = sdk_path
|
||||
- if sdk_root:
|
||||
- XcodeSettings._sdk_root_cache[sdk_path] = sdk_root
|
||||
+ try:
|
||||
+ sdk_path = self._GetSdkVersionInfoItem(sdk_root, 'Path')
|
||||
+ XcodeSettings._sdk_path_cache[sdk_root] = sdk_path
|
||||
+ if sdk_root:
|
||||
+ XcodeSettings._sdk_root_cache[sdk_path] = sdk_root
|
||||
+ except:
|
||||
+ # if this fails it's because xcodebuild failed, which means
|
||||
+ # the user is probably on a CLT-only system, where there
|
||||
+ # is no valid SDK root
|
||||
+ XcodeSettings._sdk_path_cache[sdk_root] = None
|
||||
return XcodeSettings._sdk_path_cache[sdk_root]
|
||||
|
||||
def _AppendPlatformVersionMinFlags(self, lst):
|
||||
@@ -572,10 +578,11 @@ class XcodeSettings(object):
|
||||
framework_root = sdk_root
|
||||
else:
|
||||
framework_root = ''
|
||||
- config = self.spec['configurations'][self.configname]
|
||||
- framework_dirs = config.get('mac_framework_dirs', [])
|
||||
- for directory in framework_dirs:
|
||||
- cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
|
||||
+ if 'SDKROOT' in self._Settings():
|
||||
+ config = self.spec['configurations'][self.configname]
|
||||
+ framework_dirs = config.get('mac_framework_dirs', [])
|
||||
+ for directory in framework_dirs:
|
||||
+ cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
|
||||
|
||||
self.configname = None
|
||||
return cflags
|
||||
@@ -826,10 +833,11 @@ class XcodeSettings(object):
|
||||
sdk_root = self._SdkPath()
|
||||
if not sdk_root:
|
||||
sdk_root = ''
|
||||
- config = self.spec['configurations'][self.configname]
|
||||
- framework_dirs = config.get('mac_framework_dirs', [])
|
||||
- for directory in framework_dirs:
|
||||
- ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
|
||||
+ if 'SDKROOT' in self._Settings():
|
||||
+ config = self.spec['configurations'][self.configname]
|
||||
+ framework_dirs = config.get('mac_framework_dirs', [])
|
||||
+ for directory in framework_dirs:
|
||||
+ ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
|
||||
|
||||
is_extension = self._IsIosAppExtension() or self._IsIosWatchKitExtension()
|
||||
if sdk_root and is_extension:
|
@ -1,13 +0,0 @@
|
||||
diff -Naur node-v8.9.4/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py node-v8.9.4-new/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
|
||||
--- node-v8.9.4/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py 2018-01-03 03:34:44.000000000 +0100
|
||||
+++ node-v8.9.4-new/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py 2018-03-12 11:15:37.972537585 +0100
|
||||
@@ -1251,7 +1251,8 @@
|
||||
if XCODE_VERSION_CACHE:
|
||||
return XCODE_VERSION_CACHE
|
||||
try:
|
||||
- version_list = GetStdout(['xcodebuild', '-version']).splitlines()
|
||||
+ #version_list = GetStdout(['xcodebuild', '-version']).splitlines()
|
||||
+ version_list = ['Xcode 9.2', 'Build version 9C40b']
|
||||
# In some circumstances xcodebuild exits 0 but doesn't return
|
||||
# the right results; for example, a user on 10.7 or 10.8 with
|
||||
# a bogus path set via xcode-select
|
@ -3,19 +3,17 @@
|
||||
# Updater dependencies
|
||||
, writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, nix
|
||||
, gnupg
|
||||
, darwin ? null
|
||||
, darwin, xcbuild
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
{ enableNpm ? true, version, sha256, patches } @args:
|
||||
{ enableNpm ? true, version, sha256, patches ? [] } @args:
|
||||
|
||||
let
|
||||
|
||||
inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices;
|
||||
|
||||
|
||||
|
||||
baseName = if enableNpm then "nodejs" else "nodejs-slim";
|
||||
|
||||
sharedLibDeps = { inherit openssl zlib libuv; } // (optionalAttrs (!stdenv.isDarwin) { inherit http-parser; });
|
||||
@ -48,9 +46,10 @@ in
|
||||
};
|
||||
|
||||
buildInputs = optionals stdenv.isDarwin [ CoreServices ApplicationServices ]
|
||||
++ [ python2 which zlib libuv openssl ]
|
||||
++ optionals stdenv.isLinux [ utillinux http-parser ]
|
||||
++ optionals stdenv.isDarwin [ pkgconfig darwin.cctools ];
|
||||
++ [ python2 zlib libuv openssl http-parser ];
|
||||
|
||||
nativeBuildInputs = [ which utillinux ]
|
||||
++ optionals stdenv.isDarwin [ pkgconfig xcbuild ];
|
||||
|
||||
configureFlags = sharedConfigureFlags ++ [ "--without-dtrace" ] ++ extraConfigFlags;
|
||||
|
||||
@ -73,7 +72,6 @@ in
|
||||
|
||||
prePatch = ''
|
||||
patchShebangs .
|
||||
sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' tools/gyp/pylib/gyp/xcode_emulation.py
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
|
@ -7,5 +7,4 @@ in
|
||||
inherit enableNpm;
|
||||
version = "10.7.0";
|
||||
sha256 = "0qp93ddbnvadimj11wnznwhkq8vq1f7q259iq8siy5b7r936kvil";
|
||||
patches = lib.optionals stdenv.isDarwin [ ./no-xcode-v7.patch ./no-xcodebuild.patch ];
|
||||
}
|
||||
|
@ -7,5 +7,4 @@ in
|
||||
inherit enableNpm;
|
||||
version = "6.14.3";
|
||||
sha256 = "1jbrfk875aimm65wni059rrydmhp4z0hrxskq3ci6jvykxr8gwg3";
|
||||
patches = lib.optionals stdenv.isDarwin [ ./no-xcode.patch ./no-xcodebuild.patch ];
|
||||
}
|
||||
|
@ -7,5 +7,4 @@ in
|
||||
inherit enableNpm;
|
||||
version = "8.11.3";
|
||||
sha256 = "1q3fc791ng1sgk0i5qnxpxri7235nkjm50zx1z34c759vhgpaz2p";
|
||||
patches = lib.optionals stdenv.isDarwin [ ./no-xcode-v7.patch ./no-xcodebuild.patch ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user