2013-03-06 10:07:54 +01:00
|
|
|
# XXX: this may need -liconv on non-glibc systems..
|
|
|
|
|
2014-05-08 15:49:39 +02:00
|
|
|
{ stdenv, fetchFromGitHub, python, perl, autoconf, automake, libtool, intltool, flex }:
|
2010-10-20 15:05:49 +02:00
|
|
|
|
2013-03-05 23:30:46 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2014-05-08 15:26:42 +02:00
|
|
|
name = "recode-3.7-2fd838565";
|
2010-10-20 15:05:49 +02:00
|
|
|
|
2014-05-08 15:49:39 +02:00
|
|
|
src = fetchFromGitHub {
|
2014-05-08 15:26:42 +02:00
|
|
|
owner = "pinard";
|
|
|
|
repo = "Recode";
|
2013-03-05 23:30:46 +01:00
|
|
|
rev = "2fd8385658e5a08700e3b916053f6680ff85fdbd";
|
2014-05-08 15:26:42 +02:00
|
|
|
sha256 = "06vyjqaraamcc5vka66mlvxj27ihccqc74aymv2wn8nphr2rhh03";
|
2010-10-20 15:05:49 +02:00
|
|
|
};
|
|
|
|
|
2013-03-09 11:31:16 +01:00
|
|
|
buildInputs = [ python perl autoconf automake libtool intltool flex ];
|
2013-03-06 10:07:54 +01:00
|
|
|
|
2013-03-09 11:31:16 +01:00
|
|
|
preConfigure = ''
|
|
|
|
# fix build with new automake, https://bugs.gentoo.org/show_bug.cgi?id=419455
|
|
|
|
#rm acinclude.m4
|
|
|
|
substituteInPlace Makefile.am --replace "ACLOCAL = ./aclocal.sh @ACLOCAL@" ""
|
|
|
|
sed -i '/^AM_C_PROTOTYPES/d' configure.ac
|
|
|
|
substituteInPlace src/Makefile.am --replace "ansi2knr" ""
|
|
|
|
|
|
|
|
autoreconf -fi
|
2014-05-16 23:28:19 +02:00
|
|
|
''
|
|
|
|
+ stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
export LDFLAGS=-lintl
|
2013-03-09 11:31:16 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
#doCheck = true; # doesn't work yet
|
2013-03-06 10:07:54 +01:00
|
|
|
|
|
|
|
preCheck = ''
|
2013-03-06 19:12:21 +01:00
|
|
|
checkFlagsArray=(CPPFLAGS="-I../lib" LDFLAGS="-L../src/.libs -Wl,-rpath=../src/.libs")
|
2013-03-06 10:07:54 +01:00
|
|
|
'';
|
|
|
|
|
2010-10-20 15:05:49 +02:00
|
|
|
meta = {
|
|
|
|
homepage = "http://www.gnu.org/software/recode/";
|
|
|
|
description = "Converts files between various character sets and usages";
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2013-03-05 23:30:46 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ jcumming ];
|
2010-10-20 15:05:49 +02:00
|
|
|
};
|
|
|
|
}
|