Skip to content

Commit 34107d5

Browse files
committed
updated build and packaging system together with additional Readmes
1 parent 6fcbb78 commit 34107d5

11 files changed

Lines changed: 161 additions & 33 deletions

building/awsEC2/files/libpoppler-dev

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Package: libpoppler-dev
2424
# Links: <pair of space-separated paths; First is path symlink points at, second is filename of link>
2525
# Files: <pair of space-separated paths; First is file to include, second is destination>
2626
# <more pairs, if there's more than one file to include. Notice the starting space>
27-
Description: <short description; defaults to some wise words>
28-
long description and info
29-
.
30-
second paragraph
27+
Description: A fake libpoppler-dev
28+
This fake libpoppler-dev is required to satify the
29+
Debian build system's desire to find libpoppler-dev

building/awsEC2/files/libpoppler86

Lines changed: 0 additions & 28 deletions
This file was deleted.

building/ec2-install-pdf2html-develop-stg.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,24 @@
2222
git:
2323
repo: https://gitlab.freedesktop.org/poppler/poppler.git
2424
dest: /home/ubuntu/poppler
25-
version: poppler-0.75.0
25+
version: poppler-0.76.0
2626
- name: Install pdf2htmlEX git repo for compilation
2727
git:
2828
repo: https://github.com/stephengaito/pdf2htmlEX.git
2929
dest: /home/ubuntu/pdf2html
30+
- name: Install pdf2htmlEX packaging tools
31+
git:
32+
repo: https://github.com/pdf2htmlEX/buildAndPackagingTools
33+
dest: /home/ubuntu/pdf2html-buildAndPackagingTools
34+
- name: copy build_dists.py
35+
copy:
36+
src: /home/ubuntu/pdf2html-buildAndPackagingTools/packaging/build_dists.py
37+
remote_src: yes
38+
dest: /home/ubuntu/pdf2html/build_dists.py
39+
mode: preserve
40+
- name: copy debian directory
41+
copy:
42+
src: /home/ubuntu/pdf2html-buildAndPackagingTools/packaging/debian
43+
remote_src: yes
44+
dest: /home/ubuntu/pdf2html
3045

building/getPatchFile0

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# This bash script scp's a patch file from the remote machine
4+
5+
scp -i $ANSIBLE_SSH_KEY ubuntu@$AWS0_IP:pdf2html/patchFile patches
6+
7+
echo "NOW rename the tmp/patchFile to describe"
8+
echo " what date it was created on, and"
9+
echo " which poppler version it is associated with"
10+
echo ""
11+
echo "for example:"
12+
echo " mv patchFile 20190926-poppler-0_76_0.patch"
13+
echo ""

building/getPatchFile1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# This bash script scp's a patch file from the remote machine
4+
5+
scp -i $ANSIBLE_SSH_KEY ubuntu@$AWS1_IP:pdf2html/patchFile patches
6+
7+
echo "NOW rename the tmp/patchFile to describe"
8+
echo " what date it was created on, and"
9+
echo " which poppler version it is associated with"
10+
echo ""
11+
echo "for example:"
12+
echo " mv patchFile 20190926-poppler-0_76_0.patch"
13+
echo ""

building/getPatchFile2

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# This bash script scp's a patch file from the remote machine
4+
5+
scp -i $ANSIBLE_SSH_KEY ubuntu@$AWS2_IP:pdf2html/patchFile patches
6+
7+
echo "NOW rename the tmp/patchFile to describe"
8+
echo " what date it was created on, and"
9+
echo " which poppler version it is associated with"
10+
echo ""
11+
echo "for example:"
12+
echo " mv patchFile 20190926-poppler-0_76_0.patch"
13+
echo ""
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
diff --git a/src/HTMLRenderer/HTMLRenderer.h b/src/HTMLRenderer/HTMLRenderer.h
2+
index 329f868..a1195e8 100644
3+
--- a/src/HTMLRenderer/HTMLRenderer.h
4+
+++ b/src/HTMLRenderer/HTMLRenderer.h
5+
@@ -16,6 +16,7 @@
6+
#include <GfxState.h>
7+
#include <Stream.h>
8+
#include <PDFDoc.h>
9+
+#include <Outline.h>
10+
11+
/************ from goo/gtypes.h ***************/
12+
// #include <goo/gtypes.h>
13+
@@ -197,7 +198,7 @@ protected:
14+
void post_process(void);
15+
16+
void process_outline(void);
17+
- void process_outline_items(const GooList * items);
18+
+ void process_outline_items(const std::vector<OutlineItem*> * items);
19+
20+
void process_form(std::ofstream & out);
21+
22+
diff --git a/src/HTMLRenderer/link.cc b/src/HTMLRenderer/link.cc
23+
index 9f3a62d..842b6de 100644
24+
--- a/src/HTMLRenderer/link.cc
25+
+++ b/src/HTMLRenderer/link.cc
26+
@@ -40,7 +40,7 @@ static string get_linkdest_detail_str(LinkDest * dest, Catalog * catalog, int &
27+
if(dest->isPageRef())
28+
{
29+
auto pageref = dest->getPageRef();
30+
- pageno = catalog->findPage(pageref.num, pageref.gen);
31+
+ pageno = catalog->findPage(pageref);
32+
}
33+
else
34+
{
35+
diff --git a/src/HTMLRenderer/outline.cc b/src/HTMLRenderer/outline.cc
36+
index 205eac7..d5848c5 100644
37+
--- a/src/HTMLRenderer/outline.cc
38+
+++ b/src/HTMLRenderer/outline.cc
39+
@@ -9,8 +9,8 @@
40+
41+
#include <iostream>
42+
43+
-#include <Outline.h>
44+
-#include <goo/GooList.h>
45+
+//#include <Outline.h>
46+
+//#include <goo/GooList.h>
47+
48+
#include "HTMLRenderer.h"
49+
#include "util/namespace.h"
50+
@@ -21,16 +21,16 @@ namespace pdf2htmlEX {
51+
52+
using std::ostream;
53+
54+
-void HTMLRenderer::process_outline_items(const GooList * items)
55+
+void HTMLRenderer::process_outline_items(const std::vector<OutlineItem*> * items)
56+
{
57+
- if((!items) || (items->getLength() == 0))
58+
+ if((!items) || (items->size() == 0))
59+
return;
60+
61+
f_outline.fs << "<ul>";
62+
63+
- for(int i = 0; i < items->getLength(); ++i)
64+
+ for(std::size_t i = 0; i < items->size(); ++i)
65+
{
66+
- OutlineItem * item = (OutlineItem*)(items->get(i));
67+
+ OutlineItem * item = items->at(i);
68+
69+
string detail;
70+
string dest = get_linkaction_str(item->getAction(), detail);

building/patches/Readme.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# pdf2htmlEX patches
2+
3+
This directory contains a dated collection of patches to the pdf2htmlEX
4+
source code.
5+
6+
Each patch was created on a development AWS EC2 machine and represent the
7+
changes required to get pdf2htmlEX to compile with a given version of
8+
poppler.
9+
10+
These patches were created using the `git diff > patchFile` command and
11+
then pulled back to the working server using the `getPatchFile0` command.
12+
13+
They can be applied to the pdf2htmlEX source code using the command:
14+
15+
patch -p1 < <<path to the patch file>>
16+
17+
while in the root of the pdf2htmlEX repository.

building/patches/hacks/Readme.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Poppler and pdf2htmlEX debugging hacks
2+
3+
This directory contains a number of (past) debugging hacks applied to the
4+
poppler and/or pdf2htmlEX source code to *temporarily* increase the amount
5+
of debugging output... to help discover execution paths and variables.
6+
7+
These may or may not work for future code...
8+
9+
They provide examples of how you might want to hack the source code to
10+
increase the debug output while working on a difficult problem.
11+
12+
They are typcially created using the `git diff` command, pulled back from
13+
the AWS EC2 machine, and then reapplied to the code on a new AWS EC2
14+
machine.
15+
16+
**They should NEVER be applied to the working source repositories**
File renamed without changes.

0 commit comments

Comments
 (0)