added libxpdf and pdf2xml
svn path=/nixpkgs/trunk/; revision=23427
This commit is contained in:
parent
907b921c61
commit
9fa88c5291
49
pkgs/applications/misc/xpdf/libxpdf.nix
Normal file
49
pkgs/applications/misc/xpdf/libxpdf.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{ stdenv, fetchurl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "libxpdf-3.02pl4";
|
||||
|
||||
src = fetchurl {
|
||||
url = ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02.tar.gz;
|
||||
sha256 = "000zq4ddbwyxiki4vdwpmxbnw5n9hsg9hvwra2p33hslyib7sfmk";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchurl {
|
||||
url = ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl1.patch;
|
||||
sha256 = "1wxv9l0d2kkwi961ihpdwi75whdvk7cgqxkbfym8cjj11fq17xjq";
|
||||
})
|
||||
(fetchurl {
|
||||
url = ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl2.patch;
|
||||
sha256 = "1nfrgsh9xj0vryd8h65myzd94bjz117y89gq0hzji9dqn23xihfi";
|
||||
})
|
||||
(fetchurl {
|
||||
url = ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl3.patch;
|
||||
sha256 = "0jskkv8x6dqr9zj4azaglas8cziwqqrkbbnzrpm2kzrvsbxyhk2r";
|
||||
})
|
||||
(fetchurl {
|
||||
url = ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl4.patch;
|
||||
sha256 = "1c48h7aizx0ngmzlzw0mpja1w8vqyy3pg62hyxp7c60k86al715h";
|
||||
})
|
||||
./xpdf-3.02-protection.patch
|
||||
./libxpdf.patch
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/lib/goo
|
||||
ensureDir $out/lib/fofi
|
||||
ensureDir $out/lib/xpdf
|
||||
ensureDir $out/include
|
||||
|
||||
cp -v goo/libGoo.a $out/lib/goo
|
||||
cp -v fofi/libfofi.a $out/lib/fofi
|
||||
cp -v xpdf/libxpdf.a $out/lib/xpdf
|
||||
|
||||
cp -v *.h $out/include
|
||||
cp -v goo/*.h $out/include
|
||||
cp -v fofi/*.h $out/include
|
||||
cp -v xpdf/*.h $out/include
|
||||
'';
|
||||
|
||||
}
|
45
pkgs/applications/misc/xpdf/libxpdf.patch
Normal file
45
pkgs/applications/misc/xpdf/libxpdf.patch
Normal file
@ -0,0 +1,45 @@
|
||||
diff -rc xpdf-3.02/xpdf/Makefile.in xpdf-3.02-new/xpdf/Makefile.in
|
||||
*** xpdf-3.02/xpdf/Makefile.in 2007-02-27 23:05:52.000000000 +0100
|
||||
--- xpdf-3.02-new/xpdf/Makefile.in 2010-08-25 14:54:14.000000000 +0200
|
||||
***************
|
||||
*** 110,116 ****
|
||||
pdffonts$(EXE) pdftoppm$(EXE) pdfimages$(EXE)
|
||||
|
||||
all-no-x: pdftops$(EXE) pdftotext$(EXE) pdfinfo$(EXE) pdffonts$(EXE) \
|
||||
! pdfimages$(EXE)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
--- 110,116 ----
|
||||
pdffonts$(EXE) pdftoppm$(EXE) pdfimages$(EXE)
|
||||
|
||||
all-no-x: pdftops$(EXE) pdftotext$(EXE) pdfinfo$(EXE) pdffonts$(EXE) \
|
||||
! pdfimages$(EXE) libxpdf.a
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
***************
|
||||
*** 248,253 ****
|
||||
--- 248,269 ----
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
+ PDFTOEPDF_OBJS = \
|
||||
+ Array.o BuiltinFont.o BuiltinFontTables.o CMap.o \
|
||||
+ Catalog.o CharCodeToUnicode.o Decrypt.o Dict.o Error.o \
|
||||
+ FontEncodingTables.o Gfx.o GfxFont.o GfxState.o \
|
||||
+ GlobalParams.o JArithmeticDecoder.o JBIG2Stream.o JPXStream.o Lexer.o Link.o \
|
||||
+ NameToCharCode.o Object.o OutputDev.o Outline.o PDFDoc.o Page.o \
|
||||
+ Parser.o PDFDocEncoding.o Stream.o UnicodeMap.o XRef.o Function.o \
|
||||
+ PSTokenizer.o UnicodeTypeTable.o
|
||||
+
|
||||
+ libxpdf.a: $(PDFTOEPDF_OBJS)
|
||||
+ rm -f $@
|
||||
+ $(AR) $(ARFLAGS) $@ *.o
|
||||
+ ranlib $@
|
||||
+
|
||||
+ #------------------------------------------------------------------------
|
||||
+
|
||||
depend:
|
||||
$(CXX) $(CXXFLAGS) -MM $(CXX_SRC) >Makefile.dep
|
||||
|
30
pkgs/development/libraries/pdf2xml/default.nix
Normal file
30
pkgs/development/libraries/pdf2xml/default.nix
Normal file
@ -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
|
||||
'';
|
||||
}
|
48
pkgs/development/libraries/pdf2xml/pdf2xml.patch
Normal file
48
pkgs/development/libraries/pdf2xml/pdf2xml.patch
Normal file
@ -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"
|
@ -3616,6 +3616,8 @@ let
|
||||
cplusplusSupport = !stdenv ? isDietLibC;
|
||||
};
|
||||
|
||||
pdf2xml = callPackage ../development/libraries/pdf2xml {} ;
|
||||
|
||||
phonon_backend_vlc = newScope pkgs.kde4 ../development/libraries/phonon-backend-vlc { };
|
||||
|
||||
physfs = callPackage ../development/libraries/physfs { };
|
||||
@ -6354,6 +6356,9 @@ let
|
||||
base14Fonts = "${ghostscript}/share/ghostscript/fonts";
|
||||
};
|
||||
|
||||
libxpdf = callPackage ../applications/misc/xpdf/libxpdf.nix {
|
||||
};
|
||||
|
||||
xpra = callPackage ../tools/X11/xpra {
|
||||
inherit (gtkLibs) gtk;
|
||||
pyrex = pyrex095;
|
||||
|
@ -232,6 +232,7 @@ with (import ./release-lib.nix);
|
||||
par2cmdline = all;
|
||||
pavucontrol = linux;
|
||||
pciutils = linux;
|
||||
pdf2xml = all;
|
||||
perl = all;
|
||||
php = linux;
|
||||
pidgin = linux;
|
||||
|
Loading…
Reference in New Issue
Block a user