Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 450080 | Differences between
and this patch

Collapse All | Expand All

(-)a/files/pdftk-1.45-InputError.patch (+25 lines)
Line 0 Link Here
1
commit 963ed828156fc7cd29366289638bb1b820b12210
2
Author: Robin Houston <robin.houston@gmail.com>
3
Date:   Mon Jan 7 15:11:51 2013 +0000
4
5
    Do not fail if an ObjStm ends with a number
6
    
7
    This is the cause of the problem described in http://bugs.debian.org/687669
8
9
diff --git a/java/com/lowagie/text/pdf/PRTokeniser.java b/java/com/lowagie/text/pdf/PRTokeniser.java
10
index 6c048c0..bd0876e 100644
11
--- a/java/com/lowagie/text/pdf/PRTokeniser.java
12
+++ b/java/com/lowagie/text/pdf/PRTokeniser.java
13
@@ -288,6 +288,12 @@ public class PRTokeniser {
14
                 }
15
             }
16
         }
17
+        if (level > 0) {
18
+            type = TK_NUMBER;
19
+            file.seek(ptr);
20
+            stringValue = n1;
21
+            return;
22
+        }
23
         throwError("Unexpected end of file");
24
     }
25
     
(-)a/files/pdftk-1.45-LDFLAGS.patch (+11 lines)
Line 0 Link Here
1
--- pdftk-1.44-dist/pdftk/Makefile.Base
2
+++ pdftk-1.44-dist/pdftk/Makefile.Base
3
@@ -44,7 +44,7 @@
4
 	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(JAVALIBPATH) pdftk.cc -c
5
 
6
 pdftk : pdftk.o attachments.o report.o $(JAVALIB) $(GCJ_LOCAL_LIB_FULL)
7
-	$(CXX) $(CXXFLAGS) attachments.o report.o pdftk.o $(JAVALIB) $(GCJ_LOCAL_LIB_FULL) $(LDLIBS) -o pdftk
8
+	$(CXX) $(CXXFLAGS) attachments.o report.o pdftk.o $(JAVALIB) $(GCJ_LOCAL_LIB_FULL) $(LDLIBS) $(LDFLAGS) -o pdftk
9
 
10
 install:
11
 	/usr/bin/install pdftk /usr/local/bin 
(-)a/files/pdftk-1.45-Makefile.patch (+17 lines)
Line 0 Link Here
1
--- pdftk-1.45-dist/pdftk/Makefile.Debian
2
+++ pdftk-1.45-dist/pdftk/Makefile.Debian
3
@@ -29,11 +29,12 @@
4
 # tools
5
 # need direct path to libgcj for gcjh (starting in gcj 4.1.2 per Aurélien GÉRÔME)
6
 TOOLPATH=
7
-export VERSUFF=-4.6
8
+GCJVERSION=$(shell gcj -dumpversion)
9
+export VERSUFF=-$(GCJVERSION)
10
 export CXX= $(TOOLPATH)g++$(VERSUFF)
11
 export GCJ= $(TOOLPATH)gcj$(VERSUFF)
12
 export GCJH= $(TOOLPATH)gcjh$(VERSUFF)
13
-export GJAR= $(TOOLPATH)gjar$(VERSUFF)
14
+export GJAR= $(TOOLPATH)gjar
15
 export LIBGCJ= /usr/share/java/libgcj$(VERSUFF).jar
16
 export AR= ar
17
 export RM= rm
(-)a/files/pdftk-1.45-nodrm.patch (+11 lines)
Line 0 Link Here
1
--- pdftk-1.45-dist/pdftk/pdftk.cc
2
+++ pdftk-1.45-dist/pdftk/pdftk.cc
3
@@ -193,7 +193,7 @@
4
 		// store in this java object so the gc can trace it
5
 		g_dont_collect_p->addElement( reader );
6
 
7
-		input_pdf_p->m_authorized_b= ( !reader->encrypted || reader->passwordIsOwner );
8
+		input_pdf_p->m_authorized_b= true;
9
 		if( !input_pdf_p->m_authorized_b ) {
10
 			open_success_b= false;
11
 		}
(-)a/pdftk-1.45.ebuild (+46 lines)
Line 0 Link Here
1
# Copyright 1999-2013 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: $
4
5
EAPI=4
6
7
inherit eutils
8
9
DESCRIPTION="A tool for manipulating PDF documents"
10
HOMEPAGE="http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/"
11
SRC_URI="http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/${P}-src.zip"
12
13
LICENSE="GPL-2"
14
SLOT="0"
15
KEYWORDS="~x86"
16
IUSE="nodrm"
17
18
DEPEND=">=sys-devel/gcc-4.3.1[gcj]"
19
RDEPEND="${DEPEND}"
20
21
S=${WORKDIR}/${P}-dist/
22
23
src_prepare() {
24
	epatch "${FILESDIR}/${P}-Makefile.patch"
25
	epatch "${FILESDIR}/${P}-LDFLAGS.patch"
26
	epatch "${FILESDIR}/${P}-InputError.patch"
27
	if use nodrm ; then
28
		epatch "${FILESDIR}/${P}-nodrm.patch"
29
	fi
30
}
31
32
src_compile() {
33
	# java-config settings break compilation by gcj.
34
	unset CLASSPATH
35
	unset JAVA_HOME
36
	# parallel make fails
37
	cd pdftk
38
	emake -j1 -f "${S}"/pdftk/Makefile.Debian || die "Compilation failed."
39
	cd ..
40
}
41
42
src_install() {
43
	dobin pdftk/pdftk || die
44
	doman pdftk.1 || die
45
	dohtml pdftk.1.html || die
46
}

Return to bug 450080