fix patches for both node versions
This commit is contained in:
parent
63e3ec8ce1
commit
d4081c2f97
24
pkgs/development/web/nodejs/default-arch.patch
Normal file
24
pkgs/development/web/nodejs/default-arch.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
diff -Naur a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
|
||||||
|
--- a/tools/gyp/pylib/gyp/xcode_emulation.py 2014-01-23 06:05:51.000000000 +0100
|
||||||
|
+++ b/tools/gyp/pylib/gyp/xcode_emulation.py 2014-02-04 17:49:48.000000000 +0100
|
||||||
|
@@ -1018,12 +1033,16 @@
|
||||||
|
# Since the value returned by this function is only used when ARCHS is not
|
||||||
|
# set, then on iOS we return "i386", as the default xcode project generator
|
||||||
|
# does not set ARCHS if it is not set in the .gyp file.
|
||||||
|
- if self.isIOS:
|
||||||
|
+
|
||||||
|
+ try:
|
||||||
|
+ if self.isIOS:
|
||||||
|
+ return 'i386'
|
||||||
|
+ version, build = self._XcodeVersion()
|
||||||
|
+ if version >= '0500':
|
||||||
|
+ return 'x86_64'
|
||||||
|
return 'i386'
|
||||||
|
- version, build = self._XcodeVersion()
|
||||||
|
- if version >= '0500':
|
||||||
|
+ except:
|
||||||
|
return 'x86_64'
|
||||||
|
- return 'i386'
|
||||||
|
|
||||||
|
class MacPrefixHeader(object):
|
||||||
|
"""A class that helps with emulating Xcode's GCC_PREFIX_HEADER feature.
|
@ -38,12 +38,13 @@ in stdenv.mkDerivation {
|
|||||||
dontDisableStatic = true;
|
dontDisableStatic = true;
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
|
sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' tools/gyp/pylib/gyp/xcode_emulation.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
patches = stdenv.lib.optional stdenv.isDarwin ./no-xcode.patch;
|
patches = stdenv.lib.optionals stdenv.isDarwin [ ./no-xcode.patch ./pkg-libpath.patch ];
|
||||||
|
|
||||||
buildInputs = [ python which http-parser zlib libuv openssl python ]
|
buildInputs = [ python which zlib libuv openssl python ]
|
||||||
++ (optional stdenv.isLinux utillinux)
|
++ optionals stdenv.isLinux [ utillinux http-parser ]
|
||||||
++ optionals stdenv.isDarwin [ pkgconfig openssl libtool ];
|
++ optionals stdenv.isDarwin [ pkgconfig openssl libtool ];
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
|
|
||||||
|
@ -70,24 +70,3 @@ diff -Naur a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_
|
|||||||
|
|
||||||
def AdjustLibraries(self, libraries, config_name=None):
|
def AdjustLibraries(self, libraries, config_name=None):
|
||||||
"""Transforms entries like 'Cocoa.framework' in libraries into entries like
|
"""Transforms entries like 'Cocoa.framework' in libraries into entries like
|
||||||
@@ -1018,12 +1033,16 @@
|
|
||||||
# Since the value returned by this function is only used when ARCHS is not
|
|
||||||
# set, then on iOS we return "i386", as the default xcode project generator
|
|
||||||
# does not set ARCHS if it is not set in the .gyp file.
|
|
||||||
- if self.isIOS:
|
|
||||||
+
|
|
||||||
+ try:
|
|
||||||
+ if self.isIOS:
|
|
||||||
+ return 'i386'
|
|
||||||
+ version, build = self._XcodeVersion()
|
|
||||||
+ if version >= '0500':
|
|
||||||
+ return 'x86_64'
|
|
||||||
return 'i386'
|
|
||||||
- version, build = self._XcodeVersion()
|
|
||||||
- if version >= '0500':
|
|
||||||
+ except:
|
|
||||||
return 'x86_64'
|
|
||||||
- return 'i386'
|
|
||||||
|
|
||||||
class MacPrefixHeader(object):
|
|
||||||
"""A class that helps with emulating Xcode's GCC_PREFIX_HEADER feature.
|
|
||||||
|
13
pkgs/development/web/nodejs/pkg-libpath.patch
Normal file
13
pkgs/development/web/nodejs/pkg-libpath.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/configure b/configure
|
||||||
|
index d199975..66d903b 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -734,7 +734,7 @@ def configure_library(lib, output):
|
||||||
|
# libpath needs to be provided ahead libraries
|
||||||
|
if pkg_libpath:
|
||||||
|
output['libraries'] += (
|
||||||
|
- filter(None, map(str.strip, pkg_cflags.split('-L'))))
|
||||||
|
+ pkg_libpath.split())
|
||||||
|
|
||||||
|
default_libs = getattr(options, shared_lib + '_libname')
|
||||||
|
default_libs = map('-l{0}'.format, default_libs.split(','))
|
@ -42,7 +42,7 @@ in stdenv.mkDerivation {
|
|||||||
patchShebangs .
|
patchShebangs .
|
||||||
'';
|
'';
|
||||||
|
|
||||||
patches = stdenv.lib.optional stdenv.isDarwin ./no-xcode.patch;
|
patches = stdenv.lib.optionals stdenv.isDarwin [ ./default-arch.patch ./no-xcode.patch ];
|
||||||
|
|
||||||
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
(cd tools/gyp; patch -Np1 -i ${../../python-modules/gyp/no-darwin-cflags.patch})
|
(cd tools/gyp; patch -Np1 -i ${../../python-modules/gyp/no-darwin-cflags.patch})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user