2012-06-18 15:37:35 +00:00
|
|
|
{stdenv, fetchurl, pkgconfig, gtk, glib, zlib, libxml2, intltool, gnome_doc_utils, libgnomeui, scrollkeeper, mysql, pcre, which, libxslt}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name= "stardict-3.0.3";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://stardict-3.googlecode.com/files/${name}.tar.bz2";
|
|
|
|
sha256 = "0wrb8xqy6x9piwrn0vw5alivr9h3b70xlf51qy0jpl6d7mdhm8cv";
|
|
|
|
};
|
|
|
|
|
2015-04-01 23:39:50 +00:00
|
|
|
buildInputs = [ pkgconfig gtk glib zlib libxml2 intltool gnome_doc_utils libgnomeui scrollkeeper mysql.lib pcre which libxslt];
|
2012-06-18 15:37:35 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# mysql hacks: we need dynamic linking as there is no libmysqlclient.a
|
2015-04-01 23:39:50 +00:00
|
|
|
substituteInPlace tools/configure --replace '/usr/local/include/mysql' '${mysql.lib}/include/mysql/'
|
2012-06-18 15:37:35 +00:00
|
|
|
substituteInPlace tools/configure --replace 'AC_FIND_FILE([libmysqlclient.a]' 'AC_FIND_FILE([libmysqlclient.so]'
|
2015-04-01 23:39:50 +00:00
|
|
|
substituteInPlace tools/configure --replace '/usr/local/lib/mysql' '${mysql.lib}/lib/mysql/'
|
2012-06-18 15:37:35 +00:00
|
|
|
substituteInPlace tools/configure --replace 'for y in libmysqlclient.a' 'for y in libmysqlclient.so'
|
|
|
|
substituteInPlace tools/configure --replace 'libmysqlclient.a' 'libmysqlclient.so'
|
|
|
|
|
|
|
|
# a list of p0 patches from gentoo devs
|
|
|
|
patch -p0 < ${./stardict-3.0.3-overflow.patch}
|
|
|
|
patch -p0 < ${./stardict-3.0.3-gcc46.patch}
|
|
|
|
patch -p0 < ${./stardict-3.0.3-compositelookup_cpp.patch}
|
|
|
|
patch -p0 < ${./stardict-3.0.3-correct-glib-include.patch}
|
|
|
|
patch -p0 < ${./stardict-3.0.3-entry.patch}
|
|
|
|
|
|
|
|
# disable the xsltproc internet query
|
|
|
|
substituteInPlace dict/help/Makefile.am --replace 'xsltproc -o' 'xsltproc --nonet -o'
|
|
|
|
substituteInPlace dict/help/Makefile.in --replace 'xsltproc -o' 'xsltproc --nonet -o'
|
|
|
|
'';
|
|
|
|
|
|
|
|
# another gentoo patch: a p1 patch
|
|
|
|
patches = [ ./stardict-3.0.3-zlib-1.2.5.2.patch ];
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
./configure --disable-spell --disable-gucharmap --disable-festival --disable-espeak --disable-scrollkeeper --prefix=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2014-08-24 14:21:08 +00:00
|
|
|
description = "An international dictionary supporting fuzzy and glob style matching";
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.lgpl3;
|
2012-06-18 15:37:35 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [qknight];
|
|
|
|
};
|
|
|
|
}
|