2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, autoconf, automake, libtool, pkg-config
|
2009-04-28 12:37:09 +00:00
|
|
|
, freetype, SDL, libX11 }:
|
2007-09-05 13:56:12 +00:00
|
|
|
|
2008-03-10 09:48:17 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-06-22 13:21:29 +00:00
|
|
|
pname = "agg";
|
|
|
|
version = "2.5";
|
2007-09-05 13:56:12 +00:00
|
|
|
src = fetchurl {
|
2021-06-22 13:21:29 +00:00
|
|
|
url = "https://www.antigrain.com/${pname}-${version}.tar.gz";
|
2007-09-11 11:15:37 +00:00
|
|
|
sha256 = "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb";
|
2007-09-05 13:56:12 +00:00
|
|
|
};
|
2021-08-30 11:25:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2021-08-30 11:24:30 +00:00
|
|
|
autoconf
|
|
|
|
automake
|
|
|
|
libtool
|
2021-08-30 11:25:51 +00:00
|
|
|
];
|
|
|
|
buildInputs = [
|
2021-08-30 11:24:30 +00:00
|
|
|
freetype
|
|
|
|
SDL
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
libX11
|
|
|
|
];
|
2013-02-23 17:27:12 +00:00
|
|
|
|
2019-01-17 08:51:55 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace include/agg_renderer_outline_aa.h \
|
|
|
|
--replace 'line_profile_aa& profile() {' 'const line_profile_aa& profile() {'
|
|
|
|
'';
|
|
|
|
|
2013-02-23 17:27:12 +00:00
|
|
|
# fix build with new automake, from Gentoo ebuild
|
|
|
|
preConfigure = ''
|
|
|
|
sed -i '/^AM_C_PROTOTYPES/d' configure.in
|
|
|
|
sh autogen.sh
|
|
|
|
'';
|
2009-04-28 12:37:09 +00:00
|
|
|
|
2021-12-07 20:25:34 +00:00
|
|
|
configureFlags = [
|
|
|
|
(lib.strings.enableFeature stdenv.isLinux "platform")
|
|
|
|
"--enable-examples=no"
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2021-08-30 11:24:30 +00:00
|
|
|
"--x-includes=${lib.getDev libX11}/include"
|
|
|
|
"--x-libraries=${lib.getLib libX11}/lib"
|
|
|
|
];
|
2009-04-28 12:37:09 +00:00
|
|
|
|
2017-11-26 07:39:58 +00:00
|
|
|
# libtool --tag=CXX --mode=link g++ -g -O2 libexamples.la ../src/platform/X11/libaggplatformX11.la ../src/libagg.la -o alpha_mask2 alpha_mask2.o
|
|
|
|
# libtool: error: cannot find the library 'libexamples.la'
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2009-04-28 12:37:09 +00:00
|
|
|
meta = {
|
2013-10-05 14:22:46 +00:00
|
|
|
description = "High quality rendering engine for C++";
|
2009-04-28 12:37:09 +00:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Anti-Grain Geometry (AGG) is an Open Source, free of charge
|
|
|
|
graphic library, written in industrially standard C++. The
|
|
|
|
terms and conditions of use AGG are described on The License
|
|
|
|
page. AGG doesn't depend on any graphic API or technology.
|
|
|
|
Basically, you can think of AGG as of a rendering engine that
|
|
|
|
produces pixel images in memory from some vectorial data. But
|
|
|
|
of course, AGG can do much more than that.
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.antigrain.com/";
|
2021-08-30 11:24:30 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2009-04-28 12:37:09 +00:00
|
|
|
};
|
2007-09-05 13:56:12 +00:00
|
|
|
}
|