2021-03-15 19:30:39 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2021-04-25 17:46:05 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, doxygen
|
|
|
|
, freeglut
|
2021-03-15 19:30:39 +00:00
|
|
|
, freetype
|
2021-04-25 17:46:05 +01:00
|
|
|
, GLUT
|
2021-03-15 19:30:39 +00:00
|
|
|
, libGL
|
|
|
|
, libGLU
|
|
|
|
, OpenGL
|
2021-04-25 17:46:05 +01:00
|
|
|
, pkg-config
|
2021-03-15 19:30:39 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ftgl";
|
2021-04-25 17:46:05 +01:00
|
|
|
version = "2.4.0";
|
2012-01-15 11:44:05 +00:00
|
|
|
|
2021-04-25 17:46:05 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "frankheckenbach";
|
|
|
|
repo = "ftgl";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-6TDNGoMeBLnucmHRgEDIVWcjlJb7N0sTluqBwRMMWn4=";
|
2010-10-20 11:53:45 +01:00
|
|
|
};
|
2012-01-15 11:44:05 +00:00
|
|
|
|
2021-04-25 17:46:05 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
doxygen
|
|
|
|
pkg-config
|
|
|
|
];
|
2021-03-15 19:30:39 +00:00
|
|
|
buildInputs = [
|
|
|
|
freetype
|
|
|
|
] ++ (if stdenv.isDarwin then [
|
|
|
|
OpenGL
|
2021-04-25 17:46:05 +01:00
|
|
|
GLUT
|
2021-03-15 19:30:39 +00:00
|
|
|
] else [
|
|
|
|
libGL
|
|
|
|
libGLU
|
2021-04-25 17:46:05 +01:00
|
|
|
freeglut
|
2021-03-15 19:30:39 +00:00
|
|
|
]);
|
2017-11-27 15:29:37 +00:00
|
|
|
|
2021-03-15 19:30:39 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-ft-prefix=${lib.getDev freetype}"
|
|
|
|
];
|
2020-04-02 03:26:48 +01:00
|
|
|
|
2017-11-27 15:29:37 +00:00
|
|
|
enableParallelBuilding = true;
|
2010-10-20 11:53:45 +01:00
|
|
|
|
2021-04-25 17:46:05 +01:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm644 src/FTSize.h -t ${placeholder "out"}/include/FTGL
|
|
|
|
install -Dm644 src/FTFace.h -t ${placeholder "out"}/include/FTGL
|
|
|
|
'';
|
|
|
|
|
2021-03-15 19:30:39 +00:00
|
|
|
meta = with lib; {
|
2021-04-25 17:46:05 +01:00
|
|
|
homepage = "https://github.com/frankheckenbach/ftgl";
|
2016-06-20 11:53:46 +01:00
|
|
|
description = "Font rendering library for OpenGL applications";
|
2012-01-15 11:44:11 +00:00
|
|
|
longDescription = ''
|
2021-03-15 19:30:39 +00:00
|
|
|
FTGL is a free cross-platform Open Source C++ library that uses Freetype2
|
|
|
|
to simplify rendering fonts in OpenGL applications. FTGL supports bitmaps,
|
|
|
|
pixmaps, texture maps, outlines, polygon mesh, and extruded polygon
|
|
|
|
rendering modes.
|
2012-01-15 11:44:11 +00:00
|
|
|
'';
|
2021-04-25 17:46:05 +01:00
|
|
|
license = licenses.mit;
|
2021-03-15 19:30:39 +00:00
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
|
|
|
platforms = platforms.unix;
|
2012-01-15 11:44:11 +00:00
|
|
|
};
|
2010-10-20 11:53:45 +01:00
|
|
|
}
|