summary refs log tree commit diff
path: root/pkgs/development/web
diff options
context:
space:
mode:
authorLuca Bruno <lucabru@src.gnome.org>2014-12-17 01:33:42 +0100
committerLuca Bruno <lucabru@src.gnome.org>2014-12-17 01:36:07 +0100
commit8c8750c3c5351bf8c69ae67b00513a258e2a9477 (patch)
treecc4a8829bfd16e51a94cde2de8628a78a6a01ac0 /pkgs/development/web
parent9de5eb6adecaca23a08ba9652862f8f8319b2e08 (diff)
downloadnixlib-8c8750c3c5351bf8c69ae67b00513a258e2a9477.tar
nixlib-8c8750c3c5351bf8c69ae67b00513a258e2a9477.tar.gz
nixlib-8c8750c3c5351bf8c69ae67b00513a258e2a9477.tar.bz2
nixlib-8c8750c3c5351bf8c69ae67b00513a258e2a9477.tar.lz
nixlib-8c8750c3c5351bf8c69ae67b00513a258e2a9477.tar.xz
nixlib-8c8750c3c5351bf8c69ae67b00513a258e2a9477.tar.zst
nixlib-8c8750c3c5351bf8c69ae67b00513a258e2a9477.zip
wml: new package and perl dependency Image::Size
Off-line HTML generation toolkit for Unix

http://thewml.org/
Diffstat (limited to 'pkgs/development/web')
-rw-r--r--pkgs/development/web/wml/default.nix37
-rw-r--r--pkgs/development/web/wml/dynaloader.patch11
-rw-r--r--pkgs/development/web/wml/no_bitvector.patch10
-rw-r--r--pkgs/development/web/wml/redhat-with-thr.patch19
4 files changed, 77 insertions, 0 deletions
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