2020-05-02 05:14:14 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fetchpatch
|
2021-01-19 06:50:56 +00:00
|
|
|
, autoreconfHook, perl, pkg-config, flux, zlib
|
2019-08-19 03:16:48 +01:00
|
|
|
, libjpeg, freetype, libpng, giflib
|
2015-09-15 10:26:18 +01:00
|
|
|
, enableX11 ? true, xorg
|
2010-11-29 18:00:26 +00:00
|
|
|
, enableSDL ? true, SDL }:
|
|
|
|
|
2019-08-19 03:16:48 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "directfb";
|
|
|
|
version = "1.7.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deniskropp";
|
|
|
|
repo = "DirectFB";
|
|
|
|
rev = "DIRECTFB_${lib.replaceStrings ["."] ["_"] version}";
|
|
|
|
sha256 = "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y";
|
2006-11-14 22:23:33 +00:00
|
|
|
};
|
2010-11-29 18:00:26 +00:00
|
|
|
|
2020-05-02 05:14:14 +01:00
|
|
|
patches = [
|
|
|
|
# Fixes build in "davinci" with glibc >= 2.28
|
|
|
|
# The "davinci" module is only enabled on 32-bit arm.
|
|
|
|
# https://github.com/deniskropp/DirectFB/pull/17
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/deniskropp/DirectFB/commit/3a236241bbec3f15b012b6f0dbe94353d8094557.patch";
|
|
|
|
sha256 = "0rj3gv0zlb225sqjz04p4yagy4xacf3210aa8vra8i1f0fv0w4kw";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook perl pkg-config flux ];
|
2010-11-29 18:00:26 +00:00
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
buildInputs = [ zlib libjpeg freetype giflib libpng ]
|
2019-08-19 03:16:48 +01:00
|
|
|
++ lib.optional enableSDL SDL
|
|
|
|
++ lib.optionals enableX11 (with xorg; [
|
2018-12-31 03:40:47 +00:00
|
|
|
xorgproto libX11 libXext
|
|
|
|
libXrender
|
2013-02-02 09:47:21 +00:00
|
|
|
]);
|
2010-11-29 18:00:26 +00:00
|
|
|
|
2019-08-19 03:16:48 +01:00
|
|
|
NIX_LDFLAGS = "-lgcc_s";
|
2010-11-29 18:00:26 +00:00
|
|
|
|
2009-10-24 16:39:54 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-sdl"
|
|
|
|
"--enable-zlib"
|
|
|
|
"--with-gfxdrivers=all"
|
2009-11-05 21:10:03 +00:00
|
|
|
"--enable-devmem"
|
|
|
|
"--enable-fbdev"
|
|
|
|
"--enable-mmx"
|
|
|
|
"--enable-sse"
|
|
|
|
"--with-software"
|
|
|
|
"--with-smooth-scaling"
|
2019-08-19 03:16:48 +01:00
|
|
|
] ++ lib.optional enableX11 "--enable-x11";
|
2014-02-01 13:03:44 +00:00
|
|
|
|
2019-08-19 03:16:48 +01:00
|
|
|
meta = with lib; {
|
2014-02-01 13:03:44 +00:00
|
|
|
description = "Graphics and input library designed with embedded systems in mind";
|
|
|
|
longDescription = ''
|
|
|
|
DirectFB is a thin library that provides hardware graphics acceleration,
|
|
|
|
input device handling and abstraction, integrated windowing system with
|
|
|
|
support for translucent windows and multiple display layers, not only on
|
|
|
|
top of the Linux Framebuffer Device. It is a complete hardware
|
|
|
|
abstraction layer with software fallbacks for every graphics operation
|
|
|
|
that is not supported by the underlying hardware. DirectFB adds graphical
|
|
|
|
power to embedded systems and sets a new standard for graphics under
|
|
|
|
Linux.
|
|
|
|
'';
|
2019-08-19 03:16:48 +01:00
|
|
|
homepage = "https://github.com/deniskropp/DirectFB";
|
2014-02-01 13:03:44 +00:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
2006-11-14 22:23:33 +00:00
|
|
|
}
|