2014-12-17 01:33:42 +01:00
|
|
|
{ stdenv, fetchurl, perlPackages, ncurses, lynx, makeWrapper }:
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
perlPackages.buildPerlPackage {
|
2019-06-20 15:07:56 +02:00
|
|
|
pname = "wml";
|
|
|
|
version = "2.0.11";
|
2014-12-17 01:33:42 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-06-20 15:07:56 +02:00
|
|
|
url = "http://thewml.org/distrib/wml-2.0.11.tar.gz";
|
2014-12-17 01:33:42 +01:00
|
|
|
sha256 = "0jjxpq91x7y2mgixz7ghqp01m24qa37wl3zz515rrzv7x8cyy4cf";
|
|
|
|
};
|
|
|
|
|
2016-04-25 16:16:21 +02:00
|
|
|
setOutputFlags = false;
|
|
|
|
|
2014-12-18 00:42:38 +01:00
|
|
|
# Getting lots of Non-ASCII character errors from pod2man.
|
|
|
|
# Inserting =encoding utf8 before the first =head occurrence.
|
|
|
|
# Wasn't able to fix mp4h.
|
|
|
|
preConfigure = ''
|
|
|
|
touch Makefile.PL
|
|
|
|
for i in wml_backend/p6_asubst/asubst.src wml_aux/freetable/freetable.src wml_docs/*.pod wml_include/des/*.src wml_include/fmt/*.src; do
|
|
|
|
sed -i '0,/^=head/{s/^=head/=encoding utf8\n=head/}' $i
|
|
|
|
done
|
|
|
|
sed -i 's/ doc / /g' wml_backend/p2_mp4h/Makefile.in
|
|
|
|
sed -i '/p2_mp4h\/doc/d' Makefile.in
|
|
|
|
'';
|
2016-04-06 11:15:19 +02:00
|
|
|
|
2018-12-15 04:50:31 +01:00
|
|
|
buildInputs = with perlPackages;
|
2015-09-03 10:16:29 +02:00
|
|
|
[ perl TermReadKey GD BitVector ncurses lynx makeWrapper ImageSize ];
|
2014-12-17 01:33:42 +01:00
|
|
|
|
|
|
|
patches = [ ./redhat-with-thr.patch ./dynaloader.patch ./no_bitvector.patch ];
|
2016-04-06 11:15:19 +02:00
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2015-09-03 10:16:29 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace wml_frontend/wml.src \
|
2014-12-17 01:33:42 +01:00
|
|
|
--replace "File::PathConvert::realpath" "Cwd::realpath" \
|
|
|
|
--replace "File::PathConvert::abs2rel" "File::Spec->abs2rel" \
|
|
|
|
--replace "File::PathConvert" "File::Spec"
|
|
|
|
|
2015-09-03 10:16:29 +02:00
|
|
|
for i in wml_include/des/imgbg.src wml_include/des/imgdot.src; do
|
|
|
|
substituteInPlace $i \
|
|
|
|
--replace "WML::GD" "GD"
|
|
|
|
done
|
|
|
|
|
|
|
|
rm wml_test/t/11-wmk.t
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
2014-12-17 01:33:42 +01:00
|
|
|
wrapProgram $out/bin/wml \
|
2018-12-15 04:50:31 +01:00
|
|
|
--set PERL5LIB ${with perlPackages; makePerlPath [
|
2014-12-17 01:33:42 +01:00
|
|
|
BitVector TermReadKey ImageSize
|
|
|
|
]}
|
|
|
|
'';
|
|
|
|
|
2015-09-03 10:16:29 +02:00
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2019-11-04 13:33:53 +01:00
|
|
|
installTargets = [ "install" ];
|
2014-12-17 01:33:42 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2019-12-08 17:50:31 +01:00
|
|
|
homepage = "https://www.shlomifish.org/open-source/projects/website-meta-language/";
|
2014-12-17 01:33:42 +01:00
|
|
|
description = "Off-line HTML generation toolkit for Unix";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2015-02-20 14:05:11 +01:00
|
|
|
}
|