2021-03-19 17:17:44 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2021-04-26 19:14:03 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, doxygen
|
2024-07-27 06:49:29 +00:00
|
|
|
, libglut
|
2021-03-19 17:17:44 +00:00
|
|
|
, freetype
|
|
|
|
, libGL
|
|
|
|
, libGLU
|
2021-04-26 19:14:03 +00:00
|
|
|
, pkg-config
|
2021-03-19 17:17:44 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ftgl";
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "2.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "frankheckenbach";
|
|
|
|
repo = "ftgl";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-6TDNGoMeBLnucmHRgEDIVWcjlJb7N0sTluqBwRMMWn4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
# GL_DYLIB is hardcoded to an impure path
|
|
|
|
# /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
|
|
|
|
# and breaks build on recent macOS versions
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace m4/gl.m4 \
|
|
|
|
--replace ' -dylib_file $GL_DYLIB: $GL_DYLIB' ""
|
|
|
|
'';
|
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
patches = [
|
|
|
|
./fix-warnings.patch
|
|
|
|
];
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
doxygen
|
|
|
|
pkg-config
|
|
|
|
];
|
2021-03-19 17:17:44 +00:00
|
|
|
buildInputs = [
|
|
|
|
freetype
|
|
|
|
libGL
|
|
|
|
libGLU
|
2024-07-27 06:49:29 +00:00
|
|
|
libglut
|
2021-03-19 17:17:44 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
postInstall = ''
|
2024-10-11 05:15:48 +00:00
|
|
|
install -Dm644 src/FTSize.h src/FTFace.h -t $out/include/FTGL
|
2021-04-26 19:14:03 +00:00
|
|
|
'';
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
meta = with lib; {
|
2021-04-26 19:14:03 +00:00
|
|
|
homepage = "https://github.com/frankheckenbach/ftgl";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Font rendering library for OpenGL applications";
|
|
|
|
longDescription = ''
|
2021-03-19 17:17:44 +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.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2021-04-26 19:14:03 +00:00
|
|
|
license = licenses.mit;
|
2021-03-19 17:17:44 +00:00
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|