2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2014-10-07 15:06:32 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-20 14:15:21 +00:00
|
|
|
pname = "libowfat";
|
|
|
|
version = "0.32";
|
2014-10-07 15:06:32 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-20 14:15:21 +00:00
|
|
|
url = "https://www.fefe.de/libowfat/${pname}-${version}.tar.xz";
|
2018-10-22 20:43:11 +00:00
|
|
|
sha256 = "1hcqg7pvy093bxx8wk7i4gvbmgnxz2grxpyy7b4mphidjbcv7fgl";
|
2014-10-07 15:06:32 +00:00
|
|
|
};
|
|
|
|
|
2022-10-23 18:05:50 +00:00
|
|
|
patches = [
|
|
|
|
(fetchurl {
|
|
|
|
name = "first_deferred.patch";
|
|
|
|
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/libowfat/files/libowfat-0.32-gcc10.patch?id=129f4ab9f8571c651937c46ba7bd4c82d6d052a2";
|
|
|
|
sha256 = "zxWb9qq5dkDucOsiPfGG1Gb4BZ6HmhBjgSe3tBnydP4=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-10-16 14:46:39 +00:00
|
|
|
# Fix for glibc 2.34 from Gentoo
|
|
|
|
# https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=914a4aa87415dabfe77181a2365766417a5919a4
|
|
|
|
postPatch = ''
|
|
|
|
# do not define "__pure__", this the gcc builtin (bug #806505)
|
|
|
|
sed 's#__pure__;#__attribute__((__pure__));#' -i fmt.h scan.h byte.h stralloc.h str.h critbit.h || die
|
|
|
|
sed 's#__pure__$#__attrib__pure__#' -i fmt.h scan.h byte.h stralloc.h str.h critbit.h || die
|
|
|
|
# remove unneeded definition of __deprecated__
|
|
|
|
sed '/^#define __deprecated__$/d' -i scan/scan_iso8601.c scan/scan_httpdate.c || die
|
|
|
|
'';
|
|
|
|
|
2019-10-27 13:03:25 +00:00
|
|
|
makeFlags = [ "prefix=$(out)" ];
|
2018-10-22 20:43:11 +00:00
|
|
|
enableParallelBuilding = true;
|
2018-01-28 15:07:41 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-11-17 08:43:55 +00:00
|
|
|
description = "A GPL reimplementation of libdjb";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.fefe.de/libowfat/";
|
2014-10-07 15:06:32 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2018-01-28 15:07:41 +00:00
|
|
|
}
|