2010-07-28 18:01:17 +00:00
|
|
|
{ composableDerivation, fetchurl, pkgconfig, x11, inputproto, libXi
|
2014-01-11 21:11:32 +00:00
|
|
|
, freeglut, mesa, libjpeg, zlib, libXinerama, libXft, libpng
|
|
|
|
|
|
|
|
, automake, autoconf, libtool
|
|
|
|
}:
|
2009-04-02 15:20:19 +00:00
|
|
|
|
2010-07-28 18:01:17 +00:00
|
|
|
let inherit (composableDerivation) edf; in
|
|
|
|
|
2013-12-31 21:36:27 +00:00
|
|
|
let version = "1.3.2"; in
|
2010-07-28 18:01:17 +00:00
|
|
|
composableDerivation.composableDerivation {} {
|
2012-01-03 10:02:33 +00:00
|
|
|
name = "fltk-${version}";
|
2009-04-02 15:20:19 +00:00
|
|
|
|
2010-07-28 18:01:17 +00:00
|
|
|
src = fetchurl {
|
2013-12-31 21:36:27 +00:00
|
|
|
url = "http://fltk.org/pub/fltk/${version}/fltk-${version}-source.tar.gz";
|
|
|
|
sha256 = "1974brlk723095vf8z72kazq1cbqr9a51kq6b0xda6zkjkgl8q0p";
|
2009-04-02 15:20:19 +00:00
|
|
|
};
|
|
|
|
|
2010-07-28 18:01:17 +00:00
|
|
|
propagatedBuildInputs = [ x11 inputproto libXi freeglut ];
|
2009-04-02 15:20:19 +00:00
|
|
|
|
2014-01-11 21:11:32 +00:00
|
|
|
enableParallelBilding = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
automake autoconf libtool # only required because of patch
|
|
|
|
];
|
2009-04-02 15:20:19 +00:00
|
|
|
|
|
|
|
flags =
|
|
|
|
# this could be tidied up (?).. eg why does it require freeglut without glSupport?
|
|
|
|
edf { name = "cygwin"; } # use the CygWin libraries default=no
|
|
|
|
// edf { name = "debug"; } # turn on debugging default=no
|
|
|
|
// edf { name = "gl"; enable = { buildInputs = [ mesa ]; }; } # turn on OpenGL support default=yes
|
|
|
|
// edf { name = "shared"; } # turn on shared libraries default=no
|
|
|
|
// edf { name = "threads"; } # enable multi-threading support
|
|
|
|
// edf { name = "quartz"; enable = { buildInputs = "quartz"; }; } # don't konw yet what quartz is # use Quartz instead of Quickdraw (default=no)
|
|
|
|
// edf { name = "largefile"; } # omit support for large files
|
|
|
|
// edf { name = "localjpeg"; disable = { buildInputs = [libjpeg]; }; } # use local JPEG library, default=auto
|
|
|
|
// edf { name = "localzlib"; disable = { buildInputs = [zlib]; }; } # use local ZLIB library, default=auto
|
|
|
|
// edf { name = "localpng"; disable = { buildInputs = [libpng]; }; } # use local PNG library, default=auto
|
|
|
|
// edf { name = "xinerama"; enable = { buildInputs = [libXinerama]; }; } # turn on Xinerama support default=no
|
|
|
|
// edf { name = "xft"; enable = { buildInputs=[libXft]; }; } # turn on Xft support default=no
|
|
|
|
// edf { name = "xdbe"; }; # turn on Xdbe support default=no
|
2010-07-28 18:01:17 +00:00
|
|
|
|
2009-04-02 15:20:19 +00:00
|
|
|
cfg = {
|
2010-07-28 18:01:17 +00:00
|
|
|
largefileSupport = true; # is default
|
|
|
|
glSupport = true; # doesn't build without it. Why?
|
|
|
|
localjpegSupport = false;
|
|
|
|
localzlibSupport = false;
|
|
|
|
localpngSupport = false;
|
|
|
|
sharedSupport = true;
|
|
|
|
threadsSupport = true;
|
2009-04-02 15:20:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
2010-07-28 18:01:17 +00:00
|
|
|
description = "A C++ cross-platform light-weight GUI library binding";
|
|
|
|
homepage = http://www.fltk.org;
|
2009-04-02 15:20:19 +00:00
|
|
|
};
|
2014-01-11 21:11:32 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# https://bugs.archlinux.org/task/36186
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://bugs.archlinux.org/task/36186?getfile=10750";
|
|
|
|
sha256 = "1hpb1i87nc3zw6mgpgf3bfv557ci930bsn6rwlhaif51nlqd2wbj";
|
|
|
|
}) ];
|
2009-04-02 15:20:19 +00:00
|
|
|
}
|