2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-01-13 20:06:32 +00:00
|
|
|
pname = "pth";
|
|
|
|
version = "2.0.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-01-13 20:06:32 +00:00
|
|
|
url = "mirror://gnu/pth/pth-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0ckjqw5kz5m30srqi87idj7xhpw6bpki43mj07bazjm2qmh3cdbj";
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
preConfigure = lib.optionalString stdenv.isAarch32 ''
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlagsArray=("CFLAGS=-DJB_SP=8 -DJB_PC=9")
|
2021-02-05 17:12:51 +00:00
|
|
|
'' + lib.optionalString (stdenv.hostPlatform.libc == "glibc") ''
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlagsArray+=("ac_cv_check_sjlj=ssjlj")
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# Fails parallel build due to missing dependency on autogenrated
|
|
|
|
# 'pth_p.h' file:
|
|
|
|
# ./shtool scpp -o pth_p.h ...
|
|
|
|
# ./libtool --mode=compile --quiet gcc -c -I. -O2 -pipe pth_uctx.c
|
|
|
|
# pth_uctx.c:31:10: fatal error: pth_p.h: No such file
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "The GNU Portable Threads library";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pth-config";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.gnu.org/software/pth";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|