git.iko.soy/typeable/nixpkgs
on master help sign in
libtheora: Fix build on Darwin
commit04f724873a016895aa5a34b6ebd248b871dd3705 authorSpencer Whitt <sw@swhitt.me> dateTue 3 Feb 2015, 15:19 (12 years ago) parentf5eed7e
1 file changed+9−1
pkgs/development/libraries/libtheora/default.nix+9−1
pkgs/development/libraries/libtheora/default.nix+9−1
@@ -1,4 +1,4 @@
1−{stdenv, fetchurl, libogg, libvorbis, tremor, autoconf, automake, libtool}:
1+{stdenv, fetchurl, libogg, libvorbis, tremor, autoconf, automake, libtool, pkgconfig}:
22
33stdenv.mkDerivation ({
44 name = "libtheora-1.1.1";
@@ -7,8 +7,16 @@ stdenv.mkDerivation ({
77 sha256 = "0swiaj8987n995rc7hw0asvpwhhzpjiws8kr3s6r44bqqib2k5a0";
88 };
99
10+ buildInputs = [pkgconfig];
11+
1012 propagatedBuildInputs = [libogg libvorbis];
1113
14+ # GCC's -fforce-addr flag is not supported by clang
15+ # It's just an optimization, so it's safe to simply remove it
16+ postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
17+ substituteInPlace configure --replace "-fforce-addr" ""
18+ '';
19+
1220 crossAttrs = {
1321 propagatedBuildInputs = [libogg.crossDrv tremor.crossDrv];
1422 configureFlags = "--disable-examples";