summary refs log tree commit diff
path: root/pkgs/development/libraries/xvidcore
diff options
context:
space:
mode:
authorcodyopel <codyopel@gmail.com>2015-02-17 02:01:10 -0500
committercodyopel <codyopel@gmail.com>2015-02-17 02:01:10 -0500
commit1b26e2584561a6f478c1ecde7c97e22cc948cb42 (patch)
treec9c9f7b0c822183638e440716a6a034171234339 /pkgs/development/libraries/xvidcore
parentaeb0db3deff2276c0f6040b47ff1348c314351fc (diff)
downloadnixpkgs-1b26e2584561a6f478c1ecde7c97e22cc948cb42.tar
nixpkgs-1b26e2584561a6f478c1ecde7c97e22cc948cb42.tar.gz
nixpkgs-1b26e2584561a6f478c1ecde7c97e22cc948cb42.tar.bz2
nixpkgs-1b26e2584561a6f478c1ecde7c97e22cc948cb42.tar.lz
nixpkgs-1b26e2584561a6f478c1ecde7c97e22cc948cb42.tar.xz
nixpkgs-1b26e2584561a6f478c1ecde7c97e22cc948cb42.tar.zst
nixpkgs-1b26e2584561a6f478c1ecde7c97e22cc948cb42.zip
xvidcore: refactor & 1.3.2 -> 1.3.3
Diffstat (limited to 'pkgs/development/libraries/xvidcore')
-rw-r--r--pkgs/development/libraries/xvidcore/default.nix44
1 files changed, 24 insertions, 20 deletions
diff --git a/pkgs/development/libraries/xvidcore/default.nix b/pkgs/development/libraries/xvidcore/default.nix
index fd5efdcc3d1..57c66f310fb 100644
--- a/pkgs/development/libraries/xvidcore/default.nix
+++ b/pkgs/development/libraries/xvidcore/default.nix
@@ -1,42 +1,46 @@
-{ stdenv, fetchurl, nasm, autoconf, automake, libtool }:
+{ stdenv, fetchurl, yasm, autoconf, automake, libtool }:
 
+with stdenv.lib;
 stdenv.mkDerivation rec {
-  name = "xvidcore-1.3.2";
+  name = "xvidcore-${version}";
+  version = "1.3.3";
   
   src = fetchurl {
     url = "http://downloads.xvid.org/downloads/${name}.tar.bz2";
-    sha256 = "1x0b2rq6fv99ramifhkakycd0prjc93lbzrffbjgjwg7w4s17hfn";
+    sha256 = "0m5g75qvapr7xpywg6a83v5x19kw1nm9l2q48lg7jvvpba0bmqdh";
   };
 
   preConfigure = ''
+    # Configure script is not in the root of the source directory
     cd build/generic
-  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+  '' + optionalString stdenv.isDarwin ''
+    # Undocumented darwin hack
     substituteInPlace configure --replace "-no-cpp-precomp" ""
   '';
 
-  configureFlags = stdenv.lib.optionals stdenv.isDarwin
-    [ "--enable-macosx_module" "--disable-assembly" ];
+  configureFlags = [ ]
+    # Undocumented darwin hack (assembly is probably disabled due to an
+    # issue with nasm, however yasm is now used)
+    ++ optional stdenv.isDarwin "--enable-macosx_module --disable-assembly";
 
-  buildInputs = [ nasm ]
-    ++ stdenv.lib.optionals stdenv.isDarwin [ autoconf automake libtool ];
+  nativeBuildInputs = [ ]
+    ++ optional (!stdenv.isDarwin) yasm;
 
-  # don't delete the '.a' files on darwin -- they're needed to compile ffmpeg
-  # (and perhaps other things)
-  postInstall = stdenv.lib.optionalString (!stdenv.isDarwin) ''
+  buildInputs = [ ]
+    # Undocumented darwin hack
+    ++ optionals stdenv.isDarwin [ autoconf automake libtool ];
+
+  # Don't remove static libraries (e.g. 'libs/*.a') on darwin.  They're needed to
+  # compile ffmpeg (and perhaps other things).
+  postInstall = optionalString (!stdenv.isDarwin) ''
     rm $out/lib/*.a
-  '' + ''
-    cd $out/lib
-    ln -s *.so.4.* libxvidcore.so
-    if [ ! -e libxvidcore.so.4 ]; then
-        ln -s *.so.4.* libxvidcore.so.4
-    fi
   '';
   
-  meta = with stdenv.lib; {
+  meta = {
     description = "MPEG-4 video codec for PC";
-    homepage    = http://www.xvid.org/;
+    homepage    = https://www.xvid.com/;
     license     = licenses.gpl2;
-    maintainers = with maintainers; [ lovek323 ];
+    maintainers = with maintainers; [ codyopel lovek323 ];
     platforms   = platforms.all;
   };
 }