ocamlgraph: 1.8.5 -> 1.8.7

This commit is contained in:
Matthew Maurer 2017-01-25 02:05:54 -05:00 committed by Vincent Laporte
parent 078412521e
commit 3c7b0d37ae

View file

@ -1,24 +1,22 @@
{stdenv, fetchurl, ocaml, findlib, ocamlPackages }:
{stdenv, fetchurl, ocaml, findlib, lablgtk}:
stdenv.mkDerivation rec {
name = "ocamlgraph-${version}";
version = "1.8.5";
version = "1.8.7";
src = fetchurl {
url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz";
sha256 = "0bxqxzd5sd7siz57vhzb8bmiz1ddhgdv49gcsmwwfmd16mj4cryi";
sha256 = "1845r537swjil2fcj7lgbibc2zybfwqqasrd2s7bncajs83cl1nz";
};
buildInputs = [ ocaml findlib ocamlPackages.lablgtk ocamlPackages.camlp4 ];
buildInputs = [ ocaml findlib lablgtk ];
patches = ./destdir.patch;
# some patching is required so that the lablgtk2 library is taken into account. It
# does not reside in a subdirectory of the default library path, hence:
# * configure looked in the wrong path
# * ocaml needs that directory and the stubs directory as -I flag
postPatch = ''
sed -i 's@$(DESTDIR)$(OCAMLLIB)/ocamlgraph@$(prefix)/lib/ocaml/${ocaml.version}/site-lib/ocamlgraph@' Makefile.in
sed -i 's@$OCAMLLIB/lablgtk2@${ocamlPackages.lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2@' configure Makefile.in
sed -i 's@+lablgtk2@${ocamlPackages.lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2 -I ${ocamlPackages.lablgtk}/lib/ocaml/${ocaml.version}/site-lib/stublibs@' configure Makefile.in editor/Makefile
sed -i 's@$(DESTDIR)$(OCAMLLIB)/ocamlgraph@$(DESTDIR)/lib/ocaml/${ocaml.version}/site-lib/ocamlgraph@' Makefile.in
sed -i 's@OCAMLFINDDEST := -destdir $(DESTDIR)@@' Makefile.in
sed -i 's@+lablgtk2@${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2 -I ${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/stublibs@' configure Makefile.in editor/Makefile
'';
createFindlibDestdir = true;