2021-01-21 17:00:13 +00:00
|
|
|
{ fetchurl, lib, stdenv, pkg-config, autoreconfHook, gettext, glib, buildPackages }:
|
2011-03-02 17:18:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gts";
|
2011-03-02 17:18:15 +00:00
|
|
|
version = "0.7.6";
|
|
|
|
|
2019-04-06 05:14:33 +01:00
|
|
|
outputs = [ "bin" "dev" "out" ];
|
|
|
|
|
2011-03-02 17:18:15 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "mirror://sourceforge/gts/${pname}-${version}.tar.gz";
|
2011-03-02 17:18:15 +00:00
|
|
|
sha256 = "07mqx09jxh8cv9753y2d2jsv7wp8vjmrd7zcfpbrddz3wc9kx705";
|
|
|
|
};
|
|
|
|
|
2020-09-02 16:04:41 +01:00
|
|
|
nativeBuildInputs = [
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2020-09-02 16:04:41 +01:00
|
|
|
autoreconfHook
|
|
|
|
glib # required to satisfy AM_PATH_GLIB_2_0
|
|
|
|
];
|
2019-04-06 05:14:33 +01:00
|
|
|
buildInputs = [ gettext ];
|
|
|
|
propagatedBuildInputs = [ glib ];
|
2011-03-02 17:18:15 +00:00
|
|
|
|
2018-04-25 04:20:18 +01:00
|
|
|
doCheck = false; # fails with "permission denied"
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
preBuild = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
2020-09-02 16:04:41 +01:00
|
|
|
pushd src
|
|
|
|
make CC=${buildPackages.stdenv.cc}/bin/cc predicates_init
|
|
|
|
mv predicates_init predicates_init_build
|
|
|
|
make clean
|
|
|
|
popd
|
|
|
|
|
|
|
|
substituteInPlace src/Makefile --replace "./predicates_init" "./predicates_init_build"
|
|
|
|
'';
|
|
|
|
|
2011-03-02 17:18:15 +00:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://gts.sourceforge.net/";
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.lgpl2Plus;
|
2011-03-02 17:18:15 +00:00
|
|
|
description = "GNU Triangulated Surface Library";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Library intended to provide a set of useful functions to deal with
|
|
|
|
3D surfaces meshed with interconnected triangles.
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
maintainers = [ lib.maintainers.viric ];
|
2021-01-23 17:15:07 +00:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
2011-03-02 17:18:15 +00:00
|
|
|
};
|
|
|
|
}
|