mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
glib: Fix compilation on Darwin and use default gcc
http://hydra.nixos.org/build/12458779
This commit is contained in:
parent
78b5dea799
commit
ebd4594c2c
3 changed files with 32 additions and 5 deletions
24
pkgs/development/libraries/glib/darwin-compilation.patch
Normal file
24
pkgs/development/libraries/glib/darwin-compilation.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
Fix compilation on Mac OS X with gcc 4.8.
|
||||
|
||||
diff -ru glib-2.40.0-orig/gio/gdummyfile.c glib-2.40.0/gio/gdummyfile.c
|
||||
--- glib-2.40.0-orig/gio/gdummyfile.c 2014-02-03 18:40:41.000000000 +0100
|
||||
+++ glib-2.40.0/gio/gdummyfile.c 2014-07-15 10:58:31.000000000 +0200
|
||||
@@ -454,7 +454,8 @@
|
||||
result = g_malloc (escaped_string_end - escaped_string + 1);
|
||||
|
||||
out = result;
|
||||
- for (in = escaped_string; in < escaped_string_end; in++)
|
||||
+ in = escaped_string;
|
||||
+ for (; in < escaped_string_end; in++)
|
||||
{
|
||||
character = *in;
|
||||
if (*in == '%')
|
||||
@@ -551,6 +552,7 @@
|
||||
|
||||
decoded->scheme = g_malloc (p - uri);
|
||||
out = decoded->scheme;
|
||||
- for (in = uri; in < p - 1; in++)
|
||||
+ in = uri;
|
||||
+ for (; in < p - 1; in++)
|
||||
*out++ = g_ascii_tolower (*in);
|
||||
*out = 0;
|
|
@ -49,6 +49,8 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1d98mbqjmc34s8095lkw1j1bwvnnkw9581yfvjaikjvfjsaz29qd";
|
||||
};
|
||||
|
||||
patches = optional stdenv.isDarwin ./darwin-compilation.patch;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
buildInputs = [ libelf ]
|
||||
|
@ -67,6 +69,11 @@ stdenv.mkDerivation rec {
|
|||
NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl"
|
||||
+ optionalString stdenv.isSunOS " -DBSD_COMP";
|
||||
|
||||
preBuild = optionalString stdenv.isDarwin
|
||||
''
|
||||
export MACOSX_DEPLOYMENT_TARGET=
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
inherit doCheck;
|
||||
|
|
|
@ -4800,11 +4800,7 @@ let
|
|||
gtkmm;
|
||||
};
|
||||
|
||||
glib = callPackage ../development/libraries/glib {
|
||||
stdenv = if stdenv.isDarwin
|
||||
then overrideGCC stdenv gccApple
|
||||
else stdenv;
|
||||
};
|
||||
glib = callPackage ../development/libraries/glib { };
|
||||
glib-tested = glib.override { doCheck = true; }; # checked version separate to break cycles
|
||||
glibmm = callPackage ../development/libraries/glibmm { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue