xfsprogs: 3.1.11 -> 3.2.1

This commit is contained in:
William A. Kennington III 2014-09-19 14:18:33 -07:00
parent 2a75276c88
commit 9d1acf8559

View File

@ -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
'';
patches = [
# This patch fixes shared libs installation, still not fixed in 3.2.1
./xfsprogs-3.1.11-sharelibs.patch
];
buildInputs = [ gettext libuuid readline ];
outputs = [ "out" "lib" ];
configureFlags = [
"MAKE=make"
"MSGFMT=msgfmt"
"MSGMERGE=msgmerge"
"XGETTEXT=xgettext"
"--disable-lib64"
"--enable-readline"
"--includedir=$(lib)/include"
"--libdir=$(lib)/lib"
];
installFlags = [ "install-dev" ];
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
# Emitted libraries have references to $out, fix this
sed -i "s,$out,$lib,g" $lib/lib/*
'';
enableParallelBuilding = true;
buildInputs = [ libtool gettext libuuid ];
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"
'';
disableStatic = false;
meta = {
meta = with stdenv.lib; {
homepage = http://xfs.org/;
description = "SGI XFS utilities";
license = licenses.lgpl21;
platforms = platforms.linux;
maintainers = with maintainers; [ wkennington ];
};
}