diff options
author | Rob Vermaas <rob.vermaas@gmail.com> | 2010-08-25 14:25:51 +0000 |
---|---|---|
committer | Rob Vermaas <rob.vermaas@gmail.com> | 2010-08-25 14:25:51 +0000 |
commit | 9fa88c5291df8f1970be3118dad17083493218ab (patch) | |
tree | c49a3694b8923acdb8beaca3baa0851a401fb88c /pkgs/development/libraries | |
parent | 907b921c6106ccb71122b13f18cafa276fd0b977 (diff) | |
download | nixpkgs-9fa88c5291df8f1970be3118dad17083493218ab.tar nixpkgs-9fa88c5291df8f1970be3118dad17083493218ab.tar.gz nixpkgs-9fa88c5291df8f1970be3118dad17083493218ab.tar.bz2 nixpkgs-9fa88c5291df8f1970be3118dad17083493218ab.tar.lz nixpkgs-9fa88c5291df8f1970be3118dad17083493218ab.tar.xz nixpkgs-9fa88c5291df8f1970be3118dad17083493218ab.tar.zst nixpkgs-9fa88c5291df8f1970be3118dad17083493218ab.zip |
added libxpdf and pdf2xml
svn path=/nixpkgs/trunk/; revision=23427
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/pdf2xml/default.nix | 30 | ||||
-rw-r--r-- | pkgs/development/libraries/pdf2xml/pdf2xml.patch | 48 |
2 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/development/libraries/pdf2xml/default.nix b/pkgs/development/libraries/pdf2xml/default.nix new file mode 100644 index 00000000000..6179742b42f --- /dev/null +++ b/pkgs/development/libraries/pdf2xml/default.nix @@ -0,0 +1,30 @@ +{stdenv, fetchurl, libxpdf, libxml2}: + +stdenv.mkDerivation { + name = "pdf2xml"; + + src = fetchurl { + url = http://nixos.org/tarballs/pdf2xml.tar.gz; + sha256 = "04rl7ppxqgnvxvvws669cxp478lnrdmiqj0g3m4p69bawfjc4z3w"; + }; + sourceRoot = "pdf2xml/pdf2xml"; + + buildInputs = [libxml2 libxpdf]; + + patches = [./pdf2xml.patch]; + + preBuild = '' + cp Makefile.linux Makefile + + sed -i 's|/usr/include/libxml2|${libxml2}/include/libxml2|' Makefile + sed -i 's|-lxml2|-lxml2 -L${libxml2}/lib|' Makefile + sed -i 's|XPDF = xpdf_3.01|XPDF = ${libxpdf}/lib|' Makefile + + mkdir exe + ''; + + installPhase = '' + ensureDir $out/bin + cp exe/* $out/bin + ''; +} diff --git a/pkgs/development/libraries/pdf2xml/pdf2xml.patch b/pkgs/development/libraries/pdf2xml/pdf2xml.patch new file mode 100644 index 00000000000..596a3aea674 --- /dev/null +++ b/pkgs/development/libraries/pdf2xml/pdf2xml.patch @@ -0,0 +1,48 @@ +diff -rc pdf2xml/pdf2xml/Makefile.linux pdf2xml-new/pdf2xml/Makefile.linux +*** pdf2xml/Makefile.linux 2008-02-07 17:43:10.000000000 +0100 +--- pdf2xml-new/Makefile.linux 2010-08-25 15:41:23.000000000 +0200 +*************** +*** 30,36 **** + + + # Executable name +! PDFTOXMLEXE=pdftoxml.exe + + # Main target + all: pdftoxmlEXE +--- 30,36 ---- + + + # Executable name +! PDFTOXMLEXE=pdftoxml + + # Main target + all: pdftoxmlEXE +diff -rc pdf2xml/pdf2xml/src/pdftoxml.cc pdf2xml-new/pdf2xml/src/pdftoxml.cc +*** pdf2xml/src/pdftoxml.cc 2010-04-26 10:58:01.000000000 +0200 +--- pdf2xml-new/src/pdftoxml.cc 2010-08-25 15:36:15.000000000 +0200 +*************** +*** 11,21 **** + // + //=========================================================================== + + #include <aconf.h> +- #include <stdio.h> + #include <stdlib.h> + #include <stddef.h> +! #include <string.h> + #include "parseargs.h" + #include "GString.h" + #include "gmem.h" +--- 11,21 ---- + // + //=========================================================================== + ++ #include <string.h> + #include <aconf.h> + #include <stdlib.h> + #include <stddef.h> +! #include <cstdio> + #include "parseargs.h" + #include "GString.h" + #include "gmem.h" |