1{stdenv, fetchsvn, SDL2} :
2
3let rev = 5; in
4stdenv.mkDerivation rec {
5 name = "SDL2_gfx-${toString rev}";
6
7 src = fetchsvn {
8 url = http://svn.code.sf.net/p/sdl2gfx/code/trunk;
9 inherit rev;
10 sha256 = "1hzilbn1412m2b44mygrbdfh1gvks4v5p0kmafz248jf9ifsvmzp";
11 };
12
13 buildInputs = [ SDL2 ] ;
14
15 configureFlags = "--disable-mmx";
16
17 postInstall = ''
18 sed -i -e 's,"SDL.h",<SDL2/SDL.h>,' \
19 $out/include/SDL2/*.h
20
21 ln -s $out/include/SDL2/SDL2_framerate.h $out/include/SDL2/SDL_framerate.h;
22 ln -s $out/include/SDL2/SDL2_gfxPrimitives.h $out/include/SDL2/SDL_gfxPrimitives.h;
23 ln -s $out/include/SDL2/SDL2_rotozoom.h $out/include/SDL2/SDL_rotozoom.h;
24 ln -s $out/include/SDL2/*.h $out/include/;
25 '';
26
27 meta = {
28 description = "SDL graphics drawing primitives and support functions";
29
30 longDescription =
31 '' The SDL_gfx library evolved out of the SDL_gfxPrimitives code
32 which provided basic drawing routines such as lines, circles or
33 polygons and SDL_rotozoom which implemented a interpolating
34 rotozoomer for SDL surfaces.
35
36 The current components of the SDL_gfx library are:
37
38 * Graphic Primitives (SDL_gfxPrimitves.h)
39 * Rotozoomer (SDL_rotozoom.h)
40 * Framerate control (SDL_framerate.h)
41 * MMX image filters (SDL_imageFilter.h)
42 * Custom Blit functions (SDL_gfxBlitFunc.h)
43
44 The library is backwards compatible to the above mentioned
45 code. Its is written in plain C and can be used in C++ code.
46 '';
47
48 homepage = https://sourceforge.net/projects/sdlgfx/;
49 license = stdenv.lib.licenses.lgpl2Plus;
50
51 maintainers = [ stdenv.lib.maintainers.bjg ];
52 platforms = stdenv.lib.platforms.unix;
53 };
54}