From 75d1e986a702d6d753278cfd940b5b3762f3654b Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Sat, 25 Jun 2016 18:21:25 +0100 Subject: [PATCH] libewf: fix build with gcc 5 Fixes #15289. --- .../libraries/libewf/04-fix-FTBFS-GCC5.patch | 20 +++++++++++++++++++ pkgs/development/libraries/libewf/default.nix | 7 ++++--- 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/libraries/libewf/04-fix-FTBFS-GCC5.patch 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 for + the first fix (see #777938). This patch closes #777945. +Author: Joao Eriberto Mota Filho +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; }; }