2020-05-02 04:14:14 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fetchpatch
|
2021-01-19 06:50:56 +00:00
|
|
|
, autoreconfHook, perl, pkg-config, flux, zlib
|
2019-08-19 02:16:48 +00:00
|
|
|
, libjpeg, freetype, libpng, giflib
|
2015-09-15 09:26:18 +00:00
|
|
|
, enableX11 ? true, xorg
|
2010-11-29 18:00:26 +00:00
|
|
|
, enableSDL ? true, SDL }:
|
|
|
|
|
2019-08-19 02:16:48 +00: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 04:14:14 +00: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 21:26:13 +00:00
|
|
|
buildInputs = [ zlib libjpeg freetype giflib libpng ]
|
2019-08-19 02:16:48 +00: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 02:16:48 +00:00
|
|
|
NIX_LDFLAGS = "-lgcc_s";
|
2010-11-29 18:00:26 +00:00
|
|
|
|
2009-10-24 15:39:54 +00: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 02:16:48 +00:00
|
|
|
] ++ lib.optional enableX11 "--enable-x11";
|
2014-02-01 13:03:44 +00:00
|
|
|
|
2021-10-23 09:07:38 +00:00
|
|
|
# Disable parallel building as parallel builds fail due to incomplete
|
|
|
|
# depends between autogenerated CoreSlave.h and it's include sites:
|
|
|
|
# CC prealloc_surface_pool_bridge.lo
|
|
|
|
# prealloc_surface_pool_bridge.c:41:10:
|
|
|
|
# fatal error: core/CoreSlave.h: No such file or directory
|
|
|
|
#
|
|
|
|
# Dependencies are specified manually in src/core/Makefile.am. Instead
|
|
|
|
# of fixing them one by one locally let's disable parallel builds until
|
|
|
|
# upstream fixes them.
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2019-08-19 02:16:48 +00: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 02:16:48 +00:00
|
|
|
homepage = "https://github.com/deniskropp/DirectFB";
|
2014-02-01 13:03:44 +00:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
2023-02-25 15:57:38 +00:00
|
|
|
broken = stdenv.hostPlatform.isMusl; # Broken at 2022-02-25
|
|
|
|
# See https://github.com/NixOS/nixpkgs/issues/218274
|
2014-02-01 13:03:44 +00:00
|
|
|
};
|
2006-11-14 22:23:33 +00:00
|
|
|
}
|