Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 64 lines 2.0 kB view raw
1{ lib, stdenv, fetchurl, autoconf, automake, libtool, pkg-config 2, freetype, SDL, libX11 }: 3 4stdenv.mkDerivation rec { 5 pname = "agg"; 6 version = "2.5"; 7 src = fetchurl { 8 url = "https://www.antigrain.com/${pname}-${version}.tar.gz"; 9 sha256 = "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"; 10 }; 11 nativeBuildInputs = [ 12 pkg-config 13 autoconf 14 automake 15 libtool 16 ]; 17 buildInputs = [ 18 freetype 19 SDL 20 ] ++ lib.optionals stdenv.isLinux [ 21 libX11 22 ]; 23 24 postPatch = '' 25 substituteInPlace include/agg_renderer_outline_aa.h \ 26 --replace 'line_profile_aa& profile() {' 'const line_profile_aa& profile() {' 27 ''; 28 29 # fix build with new automake, from Gentoo ebuild 30 preConfigure = '' 31 sed -i '/^AM_C_PROTOTYPES/d' configure.in 32 sh autogen.sh 33 ''; 34 35 configureFlags = [ 36 (lib.strings.enableFeature stdenv.isLinux "platform") 37 "--enable-examples=no" 38 ] ++ lib.optionals stdenv.isLinux [ 39 "--x-includes=${lib.getDev libX11}/include" 40 "--x-libraries=${lib.getLib libX11}/lib" 41 ]; 42 43 # libtool --tag=CXX --mode=link g++ -g -O2 libexamples.la ../src/platform/X11/libaggplatformX11.la ../src/libagg.la -o alpha_mask2 alpha_mask2.o 44 # libtool: error: cannot find the library 'libexamples.la' 45 enableParallelBuilding = false; 46 47 meta = { 48 description = "High quality rendering engine for C++"; 49 50 longDescription = '' 51 Anti-Grain Geometry (AGG) is an Open Source, free of charge 52 graphic library, written in industrially standard C++. The 53 terms and conditions of use AGG are described on The License 54 page. AGG doesn't depend on any graphic API or technology. 55 Basically, you can think of AGG as of a rendering engine that 56 produces pixel images in memory from some vectorial data. But 57 of course, AGG can do much more than that. 58 ''; 59 60 license = lib.licenses.gpl2Plus; 61 homepage = "http://www.antigrain.com/"; 62 platforms = lib.platforms.unix; 63 }; 64}