Skip to content

Commit

Permalink
Merge pull request #14 from stephengaito/update-poppler
Browse files Browse the repository at this point in the history
Update poppler to 0.83.0

Updated poppler dependency to poppler-0.83.0 as well as some minor build script refactoring (alas we can still not build on homebrew)
  • Loading branch information
stephengaito committed Dec 18, 2019
2 parents 7b6f22f + 8d6e963 commit ae62ce9
Show file tree
Hide file tree
Showing 44 changed files with 284 additions and 129 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://travis-ci.org/pdf2htmlEX/pdf2htmlEX.svg?branch=master)](https://travis-ci.org/pdf2htmlEX/pdf2htmlEX)

# Differences from upstream pdf2htmlEX:
# Differences from upstream pdf2htmlEX:

This is my branch of pdf2htmlEX which aims to allow an open collaboration to help keep the project active. A number of changes and improvements have been incorperated from other forks:

Expand Down
11 changes: 3 additions & 8 deletions buildScripts/buildFontforge
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,18 @@ echo ""
#
# see: https://github.com/travis-ci/travis-ci/issues/5301 (unfixed)
#
if [ -n "$PYTHON_CFLAGS" ] ; then
export PYTHON_CFLAGS="$(python3-config --cflags) $PYTHON_CFLAGS"
fi

if [ -n "$PYTHON_LIBS" ] ; then
export PYTHON_LIBS="$(python3-config --ldflags) $PYTHON_LIBS"
fi

echo ""
echo "PYTHON_CFLAGS:"
echo "-------------------------------"
export PYTHON_CFLAGS="$(python3-config --cflags) $PYTHON_CFLAGS"
echo $PYTHON_CFLAGS
echo "-------------------------------"
echo ""
echo ""
echo "PYTHON_LIBS:"
echo "-------------------------------"
export PYTHON_LIBS="$(python3-config --ldflags) $PYTHON_LIBS"
echo $PYTHON_LIBS
echo "-------------------------------"
echo ""
Expand All @@ -45,7 +40,7 @@ cd fontforge
./bootstrap

./configure \
--prefix=/usr/local \
--prefix=$PDF2HTMLEX_PREFIX \
--enable-python-scripting=3 \
--disable-dependency-tracking \
--disable-silent-rules \
Expand Down
41 changes: 0 additions & 41 deletions buildScripts/buildInstallLocally

This file was deleted.

47 changes: 47 additions & 0 deletions buildScripts/buildInstallLocallyApt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

# This bash script builds the complete pdf2htmlEX application LOCALLY
# (It does not create the AppImage or Docker images)

# Adjust the following two environment variables to suit your needs
#
export UNATTENDED="--assume-yes"
export MAKE_PARALLEL="-j $(nproc)"

# choose one of the following...
#
export PDF2HTMLEX_BRANCH=update-poppler
# export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)"

# The following environment variable determines where the poppler,
# poppler-data, fontforge and pdf2htmlEX packages are installed.
# CHANGE IT TO SUIT YOUR NEEDS:
#
export PDF2HTMLEX_PREFIX=/usr/local

################
# do the build

./buildScripts/versionEnvs || { echo 'versionEnvs FAILED' ; exit 1 ; }

./buildScripts/reportEnvs || { echo 'reportEnvs FAILED' ; exit 1 ; }

./buildScripts/getBuildToolsApt || { echo 'getBuildToolsApt FAILED' ; exit 1 ; }

./buildScripts/getDevLibrariesApt || { echo 'getDevLibrariesApt FAILED' ; exit 1 ; }

./buildScripts/getPoppler || { echo 'getPoppler FAILED' ; exit 1 ; }

./buildScripts/buildPoppler || { echo 'buildPoppler FAILED' ; exit 1 ; }

./buildScripts/installPoppler || { echo 'installPoppler FAILED' ; exit 1 ; }

./buildScripts/getFontforge || { echo 'getFontforge FAILED' ; exit 1 ; }

./buildScripts/buildFontforge || { echo 'buildFontforge FAILED' ; exit 1 ; }

./buildScripts/installFontforge || { echo 'installFontforge FAILED' ; exit 1 ; }

./buildScripts/buildPdf2htmlEX || { echo 'buildPdf2htmlEX FAILED' ; exit 1 ; }

./buildScripts/installPdf2htmlEX || { echo 'installPdf2htmlEX FAILED' ; exit 1 ; }
43 changes: 43 additions & 0 deletions buildScripts/buildInstallLocallyBrew
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

# This bash script builds the complete pdf2htmlEX application LOCALLY
# (It does not create the AppImage or Docker images)

# Adjust the following two environment variables to suit your needs
#
export UNATTENDED="--assume-yes"
export MAKE_PARALLEL="-j $(nproc)"

# choose one of the following...
#
export PDF2HTMLEX_BRANCH=update-poppler
# export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)"

export PDF2HTMLEX_PREFIX=toBeDetermined

################
# do the build

./buildScripts/versionEnvs || { echo 'versionEnvs FAILED' ; exit 1 ; }

./buildScripts/reportEnvs || { echo 'reportEnvs FAILED' ; exit 1 ; }

./buildScripts/getBuildToolsBrew || { echo 'getBuildToolsBrew FAILED' ; exit 1 ; }

./buildScripts/getDevLibrariesBrew || { echo 'getDevLibrariesBrew FAILED' ; exit 1 ; }

./buildScripts/getPoppler || { echo 'getPoppler FAILED' ; exit 1 ; }

./buildScripts/buildPoppler || { echo 'buildPoppler FAILED' ; exit 1 ; }

./buildScripts/installPoppler || { echo 'installPoppler FAILED' ; exit 1 ; }

./buildScripts/getFontforge || { echo 'getFontforge FAILED' ; exit 1 ; }

./buildScripts/buildFontforge || { echo 'buildFontforge FAILED' ; exit 1 ; }

./buildScripts/installFontforge || { echo 'installFontforge FAILED' ; exit 1 ; }

./buildScripts/buildPdf2htmlEX || { echo 'buildPdf2htmlEX FAILED' ; exit 1 ; }

./buildScripts/installPdf2htmlEX || { echo 'installPdf2htmlEX FAILED' ; exit 1 ; }
2 changes: 1 addition & 1 deletion buildScripts/buildPdf2htmlEX
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ echo ""
cd pdf2htmlEX
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PDF2HTMLEX_PREFIX ..
make $MAKE_PARALLEL
2 changes: 1 addition & 1 deletion buildScripts/buildPdf2htmlEXClang
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ echo ""
cd pdf2htmlEX
mkdir build
cd build
CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=$PDF2HTMLEX_PREFIX ..
make $MAKE_PARALLEL
2 changes: 1 addition & 1 deletion buildScripts/buildPoppler
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ echo ""
cd poppler
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PDF2HTMLEX_PREFIX \
-DENABLE_LIBOPENJPEG=none ..
make $MAKE_PARALLEL
16 changes: 10 additions & 6 deletions buildScripts/createAppImage
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ sudo rm -rf install_manifest.txt

make install DESTDIR=../../imageBuild/appDir

cd ../../imageBuild
cd ../../poppler-data

make install prefix=$PDF2HTMLEX_PREFIX DESTDIR=../imageBuild/appDir

cd ../imageBuild

# force libfontconfig into AppImage (linuxdeploy blacklists libfontconfig)
#
Expand All @@ -37,11 +41,11 @@ wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/$LI

chmod a+x $LINUX_DEPLOY_APP_IMAGE

./$LINUX_DEPLOY_APP_IMAGE \
-e appDir/usr/local/bin/pdf2htmlEX \
--create-desktop-file \
-i ../pdf2htmlEX/logo/pdf2htmlEX.svg \
--appdir=appDir \
./$LINUX_DEPLOY_APP_IMAGE \
-e appDir/$PDF2HTMLEX_PREFIX/bin/pdf2htmlEX \
--create-desktop-file \
-i ../pdf2htmlEX/logo/pdf2htmlEX.svg \
--appdir=appDir \
--output appimage


8 changes: 6 additions & 2 deletions buildScripts/createDockerImage
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> buildScripts/reSourceVersi

make install DESTDIR=../../imageBuild/dockerDir

cd ../../imageBuild/dockerDir
cd ../../poppler-data

make install prefix=$PDF2HTMLEX_PREFIX DESTDIR=../imageBuild/dockerDir

cd ../imageBuild/dockerDir

copy_deps

Expand All @@ -58,7 +62,7 @@ echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> buildScripts/reSourceVersi
FROM $DOCKER_FROM
COPY ./ /
RUN ldconfig
ENTRYPOINT ["/usr/local/bin/pdf2htmlEX"]
ENTRYPOINT ["$PDF2HTMLEX_PREFIX/bin/pdf2htmlEX"]
DOCKERFILE_HERE_DOC

cd ..
Expand Down
File renamed without changes.
24 changes: 24 additions & 0 deletions buildScripts/getBuildToolsBrew
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# This bash script automates getting the required build tools (brew install)

echo ""
echo "-------------------------------------------------------------------"
echo "INSTALLING Build Tools (using Home/Linux Brew)"
echo "-------------------------------------------------------------------"
echo ""

brew update
brew install \
git \
pkg-config \
ruby \
autoconf \
libtool \
cmake \
make \
gcc \
gettext \
openjdk \
jq \
tree
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ sudo apt-get $UNATTENDED install \
libspiro-dev \
libpng-dev \
libjpeg-dev \
poppler-data \
libpango1.0-dev \
liblcms2-dev \
libxml2-dev \
Expand Down
21 changes: 21 additions & 0 deletions buildScripts/getDevLibrariesBrew
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# This bash script automates getting the development libraries required to
# build poppler and fontforge (using Home/Linux Brew)

echo ""
echo "-------------------------------------------------------------------"
echo "INSTALLING development libraries (using Home/Linux Brew)"
echo "-------------------------------------------------------------------"
echo ""

brew update
brew install \
cairo \
libspiro \
libpng \
jpeg \
pango \
little-cms2 \
libxml2 \
libuninameslist \
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This bash script automates the process of getting the original pdf2htmlEX
# source

PDF2HTMLEX_BRANCH=fontforge-update
PDF2HTMLEX_BRANCH=update-poppler

echo ""
echo "-------------------------------------------------------------------"
Expand Down
24 changes: 24 additions & 0 deletions buildScripts/getPdf2htmlEXBrew
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# This bash script automates the process of getting the original pdf2htmlEX
# source

PDF2HTMLEX_BRANCH=update-poppler

echo ""
echo "-------------------------------------------------------------------"
echo "GETTING pdf2htmlEX sources (using wget)"
echo " (PDF2HTMLEX_BRANCH: [$PDF2HTMLEX_BRANCH])"
echo "-------------------------------------------------------------------"
echo ""


wget https://codeload.github.com/stephengaito/pdf2htmlEX/zip/$PDF2HTMLEX_BRANCH

mv $PDF2HTMLEX_BRANCH $PDF2HTMLEX_BRANCH.zip

brew install unzip

unzip $PDF2HTMLEX_BRANCH.zip

mv pdf2htmlEX-$PDF2HTMLEX_BRANCH pdf2htmlEX
8 changes: 8 additions & 0 deletions buildScripts/getPoppler
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,12 @@ wget https://poppler.freedesktop.org/$POPPLER_VERSION.tar.xz

tar xvf $POPPLER_VERSION.tar.xz

echo "Getting poppler-data version: 0.4.9"

mv $POPPLER_VERSION poppler

wget https://poppler.freedesktop.org/poppler-data-0.4.9.tar.gz

tar xvf poppler-data-0.4.9.tar.gz

mv poppler-data-0.4.9 poppler-data
23 changes: 14 additions & 9 deletions buildScripts/installPoppler
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,22 @@ sudo make install

cd ..

sudo mkdir -p /usr/local/include/poppler
sudo cp poppler/*.h /usr/local/include/poppler
sudo mkdir -p $PDF2HTMLEX_PREFIX/include/poppler
sudo cp poppler/*.h $PDF2HTMLEX_PREFIX/include/poppler

sudo mkdir -p /usr/local/include/poppler/goo
sudo cp goo/*.h /usr/local/include/poppler/goo
sudo mkdir -p $PDF2HTMLEX_PREFIX/include/poppler/goo
sudo cp goo/*.h $PDF2HTMLEX_PREFIX/include/poppler/goo

sudo mkdir -p /usr/local/include/poppler/fofi
sudo cp fofi/*.h /usr/local/include/poppler/fofi
sudo mkdir -p $PDF2HTMLEX_PREFIX/include/poppler/fofi
sudo cp fofi/*.h $PDF2HTMLEX_PREFIX/include/poppler/fofi

sudo mkdir -p /usr/local/include/poppler/splash
sudo cp splash/*.h /usr/local/include/poppler/splash
sudo mkdir -p $PDF2HTMLEX_PREFIX/include/poppler/splash
sudo cp splash/*.h $PDF2HTMLEX_PREFIX/include/poppler/splash

sudo cp build/poppler/poppler-config.h \
/usr/local/include/poppler
$PDF2HTMLEX_PREFIX/include/poppler

cd ../poppler-data

sudo make install prefix=$PDF2HTMLEX_PREFIX

9 changes: 9 additions & 0 deletions buildScripts/listFilesByChangeTime
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# see:https://stackoverflow.com/a/7448828

find . -type f -print0 | \
xargs -0 stat --format '%Y :%y %n' | \
sort -nr | \
grep -v build | \
cut -d: -f2-
Loading

0 comments on commit ae62ce9

Please sign in to comment.