nixpkgs/pkgs/tools/text/sgml/opensp/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

63 lines
1.9 KiB
Nix
Raw Normal View History

2021-01-15 09:19:50 +00:00
{ lib, stdenv, fetchurl, fetchpatch, xmlto, docbook_xml_dtd_412
, docbook_xsl, autoconf, automake, libtool
, autoreconfHook
2021-11-05 18:56:26 +00:00
}:
stdenv.mkDerivation rec {
pname = "opensp";
version = "1.5.2";
src = fetchurl {
url = "mirror://sourceforge/openjade/OpenSP-${version}.tar.gz";
sha256 = "1khpasr6l0a8nfz6kcf3s81vgdab8fm2dj291n5r2s53k228kx2p";
};
2019-03-06 00:22:19 +00:00
postPatch = ''
sed -i s,/usr/share/sgml/docbook/xml-dtd-4.1.2/,${docbook_xml_dtd_412}/xml/dtd/docbook/, \
docsrc/*.xml
'';
2019-03-06 00:22:19 +00:00
patches = [
(fetchpatch {
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/app-text/opensp/files/opensp-1.5.2-c11-using.patch?id=688d9675782dfc162d4e6cff04c668f7516118d0";
sha256 = "04q14s8qsad0bkjmj067dn831i0r6v7742rafdlnbfm5y249m2q6";
})
# Clang 16 defaults to C++17, which does not allow `register` as a storage class specifier.
./fix-register-storage-class.patch
2014-08-21 02:30:50 +00:00
];
2021-01-15 09:19:50 +00:00
setupHook = ./setup-hook.sh;
2014-04-09 13:09:06 +00:00
postFixup = ''
# Remove random ids in the release notes
sed -i -e 's/href="#idm.*"//g' $out/share/doc/OpenSP/releasenotes.html
sed -i -e 's/name="idm.*"//g' $out/share/doc/OpenSP/releasenotes.html
'';
2021-11-05 18:56:26 +00:00
preConfigure = lib.optionalString stdenv.isCygwin ''
autoreconf -fi
'';
2014-10-23 22:50:44 +00:00
strictDeps = true;
2019-03-06 00:22:19 +00:00
nativeBuildInputs = [
xmlto
docbook_xml_dtd_412
docbook_xsl
]
# Clang 16 fails to build due to inappropriate definitions in the `config.h` generated by the
# existing configure scripts. Regenerate them to make sure they detect its features correctly.
++ lib.optional stdenv.cc.isClang autoreconfHook
++ lib.optionals stdenv.isCygwin [ autoconf automake libtool ];
doCheck = false; # fails
2021-11-05 18:56:26 +00:00
meta = with lib; {
description = "A suite of SGML/XML processing tools";
2021-11-05 18:56:26 +00:00
license = licenses.mit;
homepage = "https://openjade.sourceforge.net/";
2021-11-05 18:56:26 +00:00
platforms = platforms.unix;
maintainers = with maintainers; [ ];
};
}