From 8c8750c3c5351bf8c69ae67b00513a258e2a9477 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Wed, 17 Dec 2014 01:33:42 +0100 Subject: [PATCH] wml: new package and perl dependency Image::Size Off-line HTML generation toolkit for Unix http://thewml.org/ --- pkgs/development/web/wml/default.nix | 37 +++++++++++++++++++ pkgs/development/web/wml/dynaloader.patch | 11 ++++++ pkgs/development/web/wml/no_bitvector.patch | 10 +++++ .../development/web/wml/redhat-with-thr.patch | 19 ++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/perl-packages.nix | 14 +++++++ 6 files changed, 93 insertions(+) create mode 100644 pkgs/development/web/wml/default.nix create mode 100644 pkgs/development/web/wml/dynaloader.patch create mode 100644 pkgs/development/web/wml/no_bitvector.patch create mode 100644 pkgs/development/web/wml/redhat-with-thr.patch diff --git a/pkgs/development/web/wml/default.nix b/pkgs/development/web/wml/default.nix new file mode 100644 index 000000000000..0834ce8bd278 --- /dev/null +++ b/pkgs/development/web/wml/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, perlPackages, ncurses, lynx, makeWrapper }: + +perlPackages.buildPerlPackage rec { + name = "wml-2.0.11"; + + src = fetchurl { + url = "http://thewml.org/distrib/${name}.tar.gz"; + sha256 = "0jjxpq91x7y2mgixz7ghqp01m24qa37wl3zz515rrzv7x8cyy4cf"; + }; + + preConfigure = "touch Makefile.PL"; + + buildInputs = [ perlPackages.perl ncurses lynx makeWrapper ]; + + patches = [ ./redhat-with-thr.patch ./dynaloader.patch ./no_bitvector.patch ]; + + preFixup = '' + substituteInPlace $out/bin/wml \ + --replace "File::PathConvert::realpath" "Cwd::realpath" \ + --replace "File::PathConvert::abs2rel" "File::Spec->abs2rel" \ + --replace "File::PathConvert" "File::Spec" + + wrapProgram $out/bin/wml \ + --set PERL5LIB ${with perlPackages; stdenv.lib.makePerlPath [ + BitVector TermReadKey ImageSize + ]} + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + homepage = http://thewml.org/; + description = "Off-line HTML generation toolkit for Unix"; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} \ No newline at end of file diff --git a/pkgs/development/web/wml/dynaloader.patch b/pkgs/development/web/wml/dynaloader.patch new file mode 100644 index 000000000000..89b9f0427f9b --- /dev/null +++ b/pkgs/development/web/wml/dynaloader.patch @@ -0,0 +1,11 @@ +--- a/wml_backend/p3_eperl/configure 2009-10-03 19:12:29.000000000 -0500 ++++ b/wml_backend/p3_eperl/configure 2009-10-03 19:12:45.000000000 -0500 +@@ -678,7 +678,7 @@ + #define HAVE_PERL_DYNALOADER 1 + EOF + +- perl_dla=$perl_archlib/auto/DynaLoader/DynaLoader.a ++ perl_dla=$perl_archlib/CORE/libperl.so + ;; + * ) + rc=no \ No newline at end of file diff --git a/pkgs/development/web/wml/no_bitvector.patch b/pkgs/development/web/wml/no_bitvector.patch new file mode 100644 index 000000000000..d5fe926c4c7d --- /dev/null +++ b/pkgs/development/web/wml/no_bitvector.patch @@ -0,0 +1,10 @@ +--- a/wml_common/Makefile.in 2014-12-17 00:28:25.156736048 +0100 ++++ b/wml_common/Makefile.in 2014-12-17 00:28:30.501817958 +0100 +@@ -45,7 +45,6 @@ + have_gd=0 + + SUBDIRS = \ +- bitvector \ + filepathconvert \ + gd \ + getoptlong \ diff --git a/pkgs/development/web/wml/redhat-with-thr.patch b/pkgs/development/web/wml/redhat-with-thr.patch new file mode 100644 index 000000000000..4b06ccb3f56a --- /dev/null +++ b/pkgs/development/web/wml/redhat-with-thr.patch @@ -0,0 +1,19 @@ +Description: Fix FTBFS with Perl 5.16 + Patch taken from Fedora +Debian-Bug: 676263 +Fedora-Bug: 839609 +Author: Jitka Plesnikova +Origin: https://bugzilla.redhat.com/show_bug.cgi?id=839609 + +--- a/wml_backend/p3_eperl/eperl_perl5.h 2012-07-27 10:49:27.048508799 +0200 ++++ b/wml_backend/p3_eperl/eperl_perl5.h 2012-07-27 10:50:16.288714291 +0200 +@@ -72,9 +72,6 @@ + # define PL_curstash curstash + #endif + +-#ifndef WITH_THR +-# define PL_defoutgv defoutgv +-#endif + + /* + Initialization of locales when building a new Perl interpreter. \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b0b9eaae66f7..bf5777cd0c9b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2806,6 +2806,8 @@ let inherit (xlibs) libX11 libXext libXrender; }; + wml = callPackage ../development/web/wml { }; + wv = callPackage ../tools/misc/wv { }; wv2 = callPackage ../tools/misc/wv2 { }; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index a34d8c54c739..062f5af4e311 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -4496,6 +4496,20 @@ let self = _self // overrides; _self = with self; { }; }; + ImageSize = buildPerlPackage rec { + name = "Image-Size-3.232"; + src = fetchurl { + url = "mirror://cpan/authors/id/R/RJ/RJRAY/${name}.tar.gz"; + sha256 = "1mx065134gy75pgdldh65118bpcs6yfbqmr7bf9clwq44zslxhxc"; + }; + buildInputs = [ TestMore ]; + propagatedBuildInputs = [ ModuleRuntime ]; + meta = { + description = "Read the dimensions of an image in several popular formats"; + license = with stdenv.lib.licenses; [ artistic1 lgpl21Plus ]; + }; + }; + ImportInto = buildPerlPackage { name = "Import-Into-1.002004"; src = fetchurl {