summary refs log tree commit diff
path: root/pkgs/development/libraries/libtheora
diff options
context:
space:
mode:
authorSpencer Whitt <sw@swhitt.me>2015-02-03 15:19:38 -0500
committerSpencer Whitt <sw@swhitt.me>2015-03-25 17:52:19 -0400
commit04f724873a016895aa5a34b6ebd248b871dd3705 (patch)
treecde2b9b6a623d4d4aba6cf6ca2482fe549bce448 /pkgs/development/libraries/libtheora
parentf5eed7e14e45f639514d432b680325cae6d40b06 (diff)
downloadnixpkgs-04f724873a016895aa5a34b6ebd248b871dd3705.tar
nixpkgs-04f724873a016895aa5a34b6ebd248b871dd3705.tar.gz
nixpkgs-04f724873a016895aa5a34b6ebd248b871dd3705.tar.bz2
nixpkgs-04f724873a016895aa5a34b6ebd248b871dd3705.tar.lz
nixpkgs-04f724873a016895aa5a34b6ebd248b871dd3705.tar.xz
nixpkgs-04f724873a016895aa5a34b6ebd248b871dd3705.tar.zst
nixpkgs-04f724873a016895aa5a34b6ebd248b871dd3705.zip
libtheora: Fix build on Darwin
Diffstat (limited to 'pkgs/development/libraries/libtheora')
-rw-r--r--pkgs/development/libraries/libtheora/default.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libtheora/default.nix b/pkgs/development/libraries/libtheora/default.nix
index cb936747417..fdf25b23e48 100644
--- a/pkgs/development/libraries/libtheora/default.nix
+++ b/pkgs/development/libraries/libtheora/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, libogg, libvorbis, tremor, autoconf, automake, libtool}:
+{stdenv, fetchurl, libogg, libvorbis, tremor, autoconf, automake, libtool, pkgconfig}:
 
 stdenv.mkDerivation ({
   name = "libtheora-1.1.1";
@@ -7,8 +7,16 @@ stdenv.mkDerivation ({
     sha256 = "0swiaj8987n995rc7hw0asvpwhhzpjiws8kr3s6r44bqqib2k5a0";
   };
 
+  buildInputs = [pkgconfig];
+
   propagatedBuildInputs = [libogg libvorbis];
 
+  # GCC's -fforce-addr flag is not supported by clang
+  # It's just an optimization, so it's safe to simply remove it
+  postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure --replace "-fforce-addr" ""
+  '';
+
   crossAttrs = {
     propagatedBuildInputs = [libogg.crossDrv tremor.crossDrv];
     configureFlags = "--disable-examples";