glew/cross: Fix build for Darwin.

The Makefile still contained calls to install with the -s (strip)
option, which we don't want because it uses the native strip utility and
we're going to crossStrip in fixupPhase later anyway.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2014-03-10 22:22:21 +01:00
parent 745c477930
commit 3d73bf6c57
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961

View File

@ -1,5 +1,7 @@
{ stdenv, fetchurl, mesa_glu, x11, libXmu, libXi }:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "glew-1.10.0";
@ -14,6 +16,9 @@ stdenv.mkDerivation rec {
patchPhase = ''
sed -i 's|lib64|lib|' config/Makefile.linux
${optionalString (stdenv ? cross) ''
sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile
''}
'';
buildPhase = "make all";
@ -25,6 +30,13 @@ buildPhase = "make all";
cp -r README.txt LICENSE.txt doc $out/share/doc/glew
'';
crossAttrs.makeFlags = [
"CC=${stdenv.cross.config}-gcc"
"LD=${stdenv.cross.config}-gcc"
"AR=${stdenv.cross.config}-ar"
"STRIP="
] ++ optional (stdenv.cross.libc == "libSystem") "SYSTEM=darwin";
meta = {
description = "An OpenGL extension loading library for C(++)";
homepage = http://glew.sourceforge.net/;