@@ -1,66 +0,0 @@
1−{ composableDerivation, fetchurl, pkgconfig, xlibsWrapper, inputproto, libXi
2−, freeglut, mesa, libjpeg, zlib, libXinerama, libXft, libpng
3−, cfg ? {}
4−, automake, autoconf, libtool
5−}:
6−
7−let inherit (composableDerivation) edf; in
8−
9−let version = "1.3.3"; in
10−composableDerivation.composableDerivation {} {
11− name = "fltk-${version}";
12−
13− src = fetchurl {
14− url = "http://fltk.org/pub/fltk/${version}/fltk-${version}-source.tar.gz";
15− sha256 = "15qd7lkz5d5ynz70xhxhigpz3wns39v9xcf7ggkl0792syc8sfgq";
16− };
17−
18− # http://www.fltk.org/str.php?L3156
19− postPatch = ''
20− substituteInPlace FL/x.H \
21− --replace 'class Fl_XFont_On_Demand' 'class FL_EXPORT Fl_XFont_On_Demand'
22− '';
23−
24− propagatedBuildInputs = [ xlibsWrapper inputproto libXi freeglut ];
25−
26− enableParallelBilding = true;
27−
28− nativeBuildInputs = [
29− pkgconfig
30− automake autoconf libtool # only required because of patch
31− ];
32−
33− flags =
34− # this could be tidied up (?).. eg why does it require freeglut without glSupport?
35− edf { name = "cygwin"; } # use the CygWin libraries default=no
36− // edf { name = "debug"; } # turn on debugging default=no
37− // edf { name = "gl"; enable = { buildInputs = [ mesa ]; }; } # turn on OpenGL support default=yes
38− // edf { name = "shared"; } # turn on shared libraries default=no
39− // edf { name = "threads"; } # enable multi-threading support
40− // edf { name = "quartz"; enable = { buildInputs = "quartz"; }; } # don't konw yet what quartz is # use Quartz instead of Quickdraw (default=no)
41− // edf { name = "largefile"; } # omit support for large files
42− // edf { name = "localjpeg"; disable = { buildInputs = [libjpeg]; }; } # use local JPEG library, default=auto
43− // edf { name = "localzlib"; disable = { buildInputs = [zlib]; }; } # use local ZLIB library, default=auto
44− // edf { name = "localpng"; disable = { buildInputs = [libpng]; }; } # use local PNG library, default=auto
45− // edf { name = "xinerama"; enable = { buildInputs = [libXinerama]; }; } # turn on Xinerama support default=no
46− // edf { name = "xft"; enable = { buildInputs=[libXft]; }; } # turn on Xft support default=no
47− // edf { name = "xdbe"; }; # turn on Xdbe support default=no
48−
49− cfg = {
50− largefileSupport = true; # is default
51− glSupport = true; # doesn't build without it. Why?
52− localjpegSupport = false;
53− localzlibSupport = false;
54− localpngSupport = false;
55− sharedSupport = true;
56− threadsSupport = true;
57− } // cfg;
58−
59− meta = {
60− description = "A C++ cross-platform light-weight GUI library binding";
61− homepage = http://www.fltk.org;
62− };
63−
64− patches = [
65− ];
66−}