summary refs log tree commit diff
path: root/pkgs/tools/filesystems/xfsprogs
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2014-09-19 14:18:33 -0700
committerWilliam A. Kennington III <william@wkennington.com>2014-09-19 15:34:36 -0700
commit9d1acf8559bca503e2091e1f509de802f99e1c70 (patch)
treeb6995a0160c70094e742dcfa439922ef34975aca /pkgs/tools/filesystems/xfsprogs
parent2a75276c88598a9cd65f634aa2704f4a3cf9c01e (diff)
downloadnixpkgs-9d1acf8559bca503e2091e1f509de802f99e1c70.tar
nixpkgs-9d1acf8559bca503e2091e1f509de802f99e1c70.tar.gz
nixpkgs-9d1acf8559bca503e2091e1f509de802f99e1c70.tar.bz2
nixpkgs-9d1acf8559bca503e2091e1f509de802f99e1c70.tar.lz
nixpkgs-9d1acf8559bca503e2091e1f509de802f99e1c70.tar.xz
nixpkgs-9d1acf8559bca503e2091e1f509de802f99e1c70.tar.zst
nixpkgs-9d1acf8559bca503e2091e1f509de802f99e1c70.zip
xfsprogs: 3.1.11 -> 3.2.1
Diffstat (limited to 'pkgs/tools/filesystems/xfsprogs')
-rw-r--r--pkgs/tools/filesystems/xfsprogs/default.nix66
1 files changed, 42 insertions, 24 deletions
diff --git a/pkgs/tools/filesystems/xfsprogs/default.nix b/pkgs/tools/filesystems/xfsprogs/default.nix
index 7c9cd05009d..e4d470836b8 100644
--- a/pkgs/tools/filesystems/xfsprogs/default.nix
+++ b/pkgs/tools/filesystems/xfsprogs/default.nix
@@ -1,41 +1,59 @@
-{ stdenv, fetchurl, libtool, gettext, libuuid }:
+{ stdenv, fetchurl, gettext, libuuid, readline }:
 
 stdenv.mkDerivation rec {
-  name = "xfsprogs-3.1.11";
+  name = "xfsprogs-3.2.1";
 
   src = fetchurl {
-    urls = [ "ftp://oss.sgi.com/projects/xfs/cmd_tars/${name}.tar.gz" "ftp://oss.sgi.com/projects/xfs/previous/${name}.tar.gz" ];
-    sha256 = "1gnnyhy3khl08a24c5y0pyakz6nnwkiw1fc6rb0r1j5mfw0rix5d";
+    urls = map (dir: "ftp://oss.sgi.com/projects/xfs/${dir}/${name}.tar.gz")
+      [ "cmd_tars" "previous" ];
+    sha256 = "0rsp31qrz0wskr70dwzl5ignkac7j98j7m9cy6wl57zy716fmy43";
   };
 
-  patchPhase = ''
-    sed -i s,/bin/bash,`type -P bash`, install-sh
+  prePatch = ''
+    sed -i s,/bin/bash,`type -P bash`,g install-sh
+    sed -i s,ldconfig,`type -P ldconfig`,g configure m4/libtool.m4
+
+    # Fixes from gentoo 3.2.1 ebuild
+    sed -i "/^PKG_DOC_DIR/s:@pkg_name@:${name}:" include/builddefs.in
+    sed -i '1iLLDFLAGS = -static' {estimate,fsr}/Makefile
+    sed -i "/LLDFLAGS/s:-static::" $(find -name Makefile)
+    sed -i '/LIB_SUBDIRS/s:libdisk::' Makefile
   '';
 
-  outputs = ["out" "lib"];
+  patches = [
+    # This patch fixes shared libs installation, still not fixed in 3.2.1
+    ./xfsprogs-3.1.11-sharelibs.patch
+  ];
 
-  postInstall = ''
-    (cd include; make install-dev)
-    # The make install-dev target is broken when --disable-shared
-    mkdir -p $lib/lib $lib/include
-    cp ./libhandle/.libs/libhandle.a \
-       ./libxcmd/.libs/libxcmd.a \
-       ./libxlog/.libs/libxlog.a \
-       ./libxfs/.libs/libxfs.a $lib/lib
-    mv $out/include/* $lib/include
-  '';
+  buildInputs = [ gettext libuuid readline ];
 
-  enableParallelBuilding = true;
+  outputs = [ "out" "lib" ];
 
-  buildInputs = [ libtool gettext libuuid ];
+  configureFlags = [
+    "MAKE=make"
+    "MSGFMT=msgfmt"
+    "MSGMERGE=msgmerge"
+    "XGETTEXT=xgettext"
+    "--disable-lib64"
+    "--enable-readline"
+    "--includedir=$(lib)/include"
+    "--libdir=$(lib)/lib"
+  ];
 
-  configureFlags = "MAKE=make MSGFMT=msgfmt MSGMERGE=msgmerge XGETTEXT=xgettext ZIP=gzip AWK=gawk --disable-shared";
-  preConfigure = ''
-    configureFlags="$configureFlags root_sbindir=$out/sbin root_libdir=$lib/lib"
+  installFlags = [ "install-dev" ];
+
+  postInstall = ''
+    # Emitted libraries have references to $out, fix this
+    sed -i "s,$out,$lib,g" $lib/lib/*
   '';
-  disableStatic = false;
 
-  meta = {
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://xfs.org/;
     description = "SGI XFS utilities";
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ wkennington ];
   };
 }