@@ -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,12 +7,28 @@ 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";
1523 };
24+
25+ meta = with stdenv.lib; {
26+ homepage = http://www.theora.org/;
27+ description = "Library for Theora, a free and open video compression format";
28+ license = licenses.bsd3;
29+ maintainers = [ maintainers.spwhitt ];
30+ platforms = platforms.unix;
31+ };
1632}
1733
1834# It has an old config.guess that doesn't know the mips64el.