summary refs log tree commit diff
path: root/pkgs/development/libraries/libewf
diff options
context:
space:
mode:
authorGabriel Ebner <gebner@gebner.org>2016-06-25 18:21:25 +0100
committerGabriel Ebner <gebner@gebner.org>2016-06-25 18:21:25 +0100
commit75d1e986a702d6d753278cfd940b5b3762f3654b (patch)
treedeac276bf4e04322a716fdd0f2ac1fe64ae75cca /pkgs/development/libraries/libewf
parent9ef6dceca9c050c1b2477d6d7b28921afe06df2e (diff)
downloadnixpkgs-75d1e986a702d6d753278cfd940b5b3762f3654b.tar
nixpkgs-75d1e986a702d6d753278cfd940b5b3762f3654b.tar.gz
nixpkgs-75d1e986a702d6d753278cfd940b5b3762f3654b.tar.bz2
nixpkgs-75d1e986a702d6d753278cfd940b5b3762f3654b.tar.lz
nixpkgs-75d1e986a702d6d753278cfd940b5b3762f3654b.tar.xz
nixpkgs-75d1e986a702d6d753278cfd940b5b3762f3654b.tar.zst
nixpkgs-75d1e986a702d6d753278cfd940b5b3762f3654b.zip
libewf: fix build with gcc 5
Fixes #15289.
Diffstat (limited to 'pkgs/development/libraries/libewf')
-rw-r--r--pkgs/development/libraries/libewf/04-fix-FTBFS-GCC5.patch20
-rw-r--r--pkgs/development/libraries/libewf/default.nix7
2 files changed, 24 insertions, 3 deletions
diff --git a/pkgs/development/libraries/libewf/04-fix-FTBFS-GCC5.patch b/pkgs/development/libraries/libewf/04-fix-FTBFS-GCC5.patch
new file mode 100644
index 00000000000..54878303589
--- /dev/null
+++ b/pkgs/development/libraries/libewf/04-fix-FTBFS-GCC5.patch
@@ -0,0 +1,20 @@
+Patch from Debian:
+https://sources.debian.net/data/main/libe/libewf/20140608-6/debian/patches/04-fix-FTBFS-GCC5.patch
+
+Description: fix a FTBFS with GCC-5. Thanks to Linn Crosetto <linn@hp.com> for
+             the first fix (see #777938). This patch closes #777945.
+Author: Joao Eriberto Mota Filho <eriberto@debian.org>
+Last-Update: 2015-07-02
+Index: libewf-20140608/libuna/Makefile.am
+===================================================================
+--- libewf-20140608.orig/libuna/Makefile.am
++++ libewf-20140608/libuna/Makefile.am
+@@ -3,7 +3,7 @@ AM_CPPFLAGS = \
+ 	-I$(top_srcdir)/include \
+ 	-I$(top_srcdir)/common \
+ 	@LIBCSTRING_CPPFLAGS@ \
+-	@LIBCERROR_CPPFLAGS@
++	@LIBCERROR_CPPFLAGS@ -std=gnu89
+ 
+ noinst_LTLIBRARIES = libuna.la
+ 
diff --git a/pkgs/development/libraries/libewf/default.nix b/pkgs/development/libraries/libewf/default.nix
index fad0170ade7..06f0bc89c2b 100644
--- a/pkgs/development/libraries/libewf/default.nix
+++ b/pkgs/development/libraries/libewf/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, zlib, openssl, libuuid, file, fuse }:
+{ fetchurl, stdenv, zlib, openssl, libuuid, file, fuse, autoreconfHook, pkgconfig }:
 
 stdenv.mkDerivation rec {
   version = "20140608";
@@ -8,15 +8,16 @@ stdenv.mkDerivation rec {
     sha256 = "0wfsffzxk934hl8cpwr14w8ixnh8d23x0xnnzcspjwi2c7730h6i";
   };
 
-  preConfigure = ''sed -e 's@/usr/bin/file@file@g' -i configure'';
-
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
   buildInputs = [ zlib openssl libuuid ];
+  patches = [ ./04-fix-FTBFS-GCC5.patch ];
 
   meta = {
     description = "Library for support of the Expert Witness Compression Format";
     homepage = http://sourceforge.net/projects/libewf/;
     license = stdenv.lib.licenses.lgpl3;
     maintainers = [ stdenv.lib.maintainers.raskin ] ;
+    platforms = stdenv.lib.platforms.unix;
     inherit version;
   };
 }