mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-21 20:50:07 +00:00
Merge pull request #11 from pdf2htmlEX/master
update development project from master project
This commit is contained in:
commit
e4ba125385
3
.github/FUNDING.yml
vendored
Normal file
3
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: [stephengaito]
|
150
.travis.yml
150
.travis.yml
@ -4,15 +4,17 @@ sudo: true
|
|||||||
|
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
# - osx
|
||||||
|
|
||||||
|
dist: bionic
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- POPPLER_NAME="poppler-0.63.0"
|
|
||||||
- POPPLER_SOURCE="https://gitlab.freedesktop.org/poppler/poppler.git"
|
- POPPLER_SOURCE="https://gitlab.freedesktop.org/poppler/poppler.git"
|
||||||
- FONTFORGE_SOURCE="https://github.com/fontforge/fontforge.git"
|
matrix:
|
||||||
- LIBUNINAMESLIST_SOURCE="https://github.com/fontforge/libuninameslist.git"
|
- PDF2HTMLEX_RELEASE="v0.18.7-poppler-0.81.0" POPPLER_RELEASE="poppler-0.81.0"
|
||||||
|
- PDF2HTMLEX_RELEASE="v0.18.0-poppler-0.74.0-ubuntu-19.04" POPPLER_RELEASE="poppler-0.74.0"
|
||||||
|
- PDF2HTMLEX_RELEASE="v0.16.0-poppler-0.62.0-ubuntu-18.04" POPPLER_RELEASE="poppler-0.62.0"
|
||||||
|
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
|
||||||
@ -22,109 +24,65 @@ addons:
|
|||||||
packages:
|
packages:
|
||||||
- build-essential
|
- build-essential
|
||||||
- autoconf
|
- autoconf
|
||||||
- gcc
|
|
||||||
- pkg-config
|
|
||||||
- git
|
- git
|
||||||
|
- pkg-config
|
||||||
- cmake
|
- cmake
|
||||||
- ca-certificates
|
- make
|
||||||
- libfreetype6-dev
|
- gcc
|
||||||
|
- g++
|
||||||
|
# - ca-certificates
|
||||||
|
# - libfreetype6-dev
|
||||||
# Poppler-specific packages
|
# Poppler-specific packages
|
||||||
- libfontconfig1-dev
|
- libfontforge-dev
|
||||||
|
- libfontconfig-dev
|
||||||
- libjpeg-dev
|
- libjpeg-dev
|
||||||
|
- libpng-dev
|
||||||
- libnss3-dev
|
- libnss3-dev
|
||||||
# libuninameslist-specific packages
|
|
||||||
- automake
|
|
||||||
- libtool
|
|
||||||
# fontforge-specific packages
|
|
||||||
- libltdl-dev
|
|
||||||
- python-dev
|
|
||||||
- libglib2.0-dev
|
|
||||||
- libxml2-dev
|
|
||||||
- libspiro-dev
|
|
||||||
- gettext
|
|
||||||
# pdf2htmlEX-specific packages
|
# pdf2htmlEX-specific packages
|
||||||
- default-jre
|
- default-jre
|
||||||
- libcairo2-dev
|
- libcairo-dev
|
||||||
|
- libspiro-dev
|
||||||
- libpango1.0-dev
|
- libpango1.0-dev
|
||||||
homebrew:
|
- poppler-data
|
||||||
packages:
|
# homebrew:
|
||||||
- autoconf
|
# packages:
|
||||||
- pkg-config
|
# - autoconf
|
||||||
- git
|
# - pkg-config
|
||||||
- cmake
|
# - git
|
||||||
- freetype
|
# - cmake
|
||||||
# Poppler-specific packages
|
# - freetype
|
||||||
- fontconfig
|
# # Poppler-specific packages
|
||||||
- jpeg
|
# - fontconfig
|
||||||
- nss
|
# - jpeg
|
||||||
# libuninameslist-specific packages
|
# - nss
|
||||||
- automake
|
# # libuninameslist-specific packages
|
||||||
- libtool
|
# - automake
|
||||||
# fontforge-specific packages
|
# - libtool
|
||||||
- python
|
# # fontforge-specific packages
|
||||||
- glib
|
# - python
|
||||||
- xml2
|
# - glib
|
||||||
- libspiro
|
# - xml2
|
||||||
- gettext
|
# - libspiro
|
||||||
# pdf2htmlEX-specific packages
|
# - gettext
|
||||||
- cairo
|
# # pdf2htmlEX-specific packages
|
||||||
- pango
|
# - cairo
|
||||||
sauce_connect: true
|
# - pango
|
||||||
|
# sauce_connect: true
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
allow_failures:
|
# allow_failures:
|
||||||
- os: osx # Until the build passes, then re-enable.
|
# - os: osx # Until the build passes, then re-enable.
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
# Clone and build poppler
|
- ./.travisScripts/copyScriptsToBin
|
||||||
- git clone ${POPPLER_SOURCE}
|
- $HOME/bin/buildPoppler.sh
|
||||||
- cd poppler;
|
- $HOME/bin/installPoppler.sh
|
||||||
git checkout tags/${POPPLER_NAME} -b poppler-local;
|
#- $HOME/setupTests.sh
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/usr -DENABLE_XPDF_HEADERS=ON -DENABLE_LIBOPENJPEG=none .;
|
|
||||||
make;
|
|
||||||
make install
|
|
||||||
- cd ${TRAVIS_BUILD_DIR}
|
|
||||||
|
|
||||||
# Install libuninameslist
|
|
||||||
- git clone ${LIBUNINAMESLIST_SOURCE}
|
|
||||||
- cd libuninameslist;
|
|
||||||
git checkout tags/20180701 -b libuninameslist-local;
|
|
||||||
autoreconf -i;
|
|
||||||
automake;
|
|
||||||
./configure --prefix=${TRAVIS_BUILD_DIR}/usr;
|
|
||||||
make;
|
|
||||||
make install
|
|
||||||
- cd ${TRAVIS_BUILD_DIR}
|
|
||||||
|
|
||||||
# Install fontforge
|
|
||||||
- git clone ${FONTFORGE_SOURCE}
|
|
||||||
- cd fontforge;
|
|
||||||
git checkout tags/20170731 -b fontforge-local;
|
|
||||||
./bootstrap;
|
|
||||||
./configure --disable-programs --disable-python-extension --disable-python-scripting --prefix=${TRAVIS_BUILD_DIR}/usr;
|
|
||||||
make;
|
|
||||||
make install;
|
|
||||||
sudo ldconfig
|
|
||||||
- cd ${TRAVIS_BUILD_DIR}
|
|
||||||
|
|
||||||
# Test setup
|
|
||||||
- pip install --user Pillow selenium sauceclient
|
|
||||||
- export DISPLAY=:99.0
|
|
||||||
- test/start_xvfb.sh
|
|
||||||
- pushd /
|
|
||||||
- python -m SimpleHTTPServer 8000 >/dev/null 2>&1 &
|
|
||||||
- popd
|
|
||||||
- sleep 5
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- export LD_LIBRARY_PATH=${TRAVIS_BUILD_DIR}/usr/lib:$LD_LIBRARY_PATH
|
|
||||||
- export PKG_CONFIG_PATH=${TRAVIS_BUILD_DIR}/usr/lib/pkgconfig:$PKG_CONFIG_PATH
|
|
||||||
- patch < CMakeLists.txt.patch
|
|
||||||
- mkdir build && cd build && cmake -DENABLE_SVG=ON -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/usr ..
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- make
|
- git checkout ${PDF2HTMLEX_RELEASE}
|
||||||
- P2H_TEST_REMOTE=1 ctest --output-on-failure --verbose
|
- git branch
|
||||||
- make install
|
- $HOME/bin/dobuild
|
||||||
- ${TRAVIS_BUILD_DIR}/usr/bin/pdf2htmlEX -v
|
- $HOME/bin/doinstall --noWait
|
||||||
|
- /usr/local/bin/pdf2htmlEX -v
|
||||||
|
130
.travis.yml.orig20190930
Normal file
130
.travis.yml.orig20190930
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
language: cpp
|
||||||
|
|
||||||
|
sudo: true
|
||||||
|
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- POPPLER_NAME="poppler-0.63.0"
|
||||||
|
- POPPLER_SOURCE="https://gitlab.freedesktop.org/poppler/poppler.git"
|
||||||
|
- FONTFORGE_SOURCE="https://github.com/fontforge/fontforge.git"
|
||||||
|
- LIBUNINAMESLIST_SOURCE="https://github.com/fontforge/libuninameslist.git"
|
||||||
|
|
||||||
|
|
||||||
|
compiler: gcc
|
||||||
|
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
update: true
|
||||||
|
packages:
|
||||||
|
- build-essential
|
||||||
|
- autoconf
|
||||||
|
- gcc
|
||||||
|
- pkg-config
|
||||||
|
- git
|
||||||
|
- cmake
|
||||||
|
- ca-certificates
|
||||||
|
- libfreetype6-dev
|
||||||
|
# Poppler-specific packages
|
||||||
|
- libfontconfig1-dev
|
||||||
|
- libjpeg-dev
|
||||||
|
- libnss3-dev
|
||||||
|
# libuninameslist-specific packages
|
||||||
|
- automake
|
||||||
|
- libtool
|
||||||
|
# fontforge-specific packages
|
||||||
|
- libltdl-dev
|
||||||
|
- python-dev
|
||||||
|
- libglib2.0-dev
|
||||||
|
- libxml2-dev
|
||||||
|
- libspiro-dev
|
||||||
|
- gettext
|
||||||
|
# pdf2htmlEX-specific packages
|
||||||
|
- default-jre
|
||||||
|
- libcairo2-dev
|
||||||
|
- libpango1.0-dev
|
||||||
|
homebrew:
|
||||||
|
packages:
|
||||||
|
- autoconf
|
||||||
|
- pkg-config
|
||||||
|
- git
|
||||||
|
- cmake
|
||||||
|
- freetype
|
||||||
|
# Poppler-specific packages
|
||||||
|
- fontconfig
|
||||||
|
- jpeg
|
||||||
|
- nss
|
||||||
|
# libuninameslist-specific packages
|
||||||
|
- automake
|
||||||
|
- libtool
|
||||||
|
# fontforge-specific packages
|
||||||
|
- python
|
||||||
|
- glib
|
||||||
|
- xml2
|
||||||
|
- libspiro
|
||||||
|
- gettext
|
||||||
|
# pdf2htmlEX-specific packages
|
||||||
|
- cairo
|
||||||
|
- pango
|
||||||
|
sauce_connect: true
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
|
allow_failures:
|
||||||
|
- os: osx # Until the build passes, then re-enable.
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
# Clone and build poppler
|
||||||
|
- git clone ${POPPLER_SOURCE}
|
||||||
|
- cd poppler;
|
||||||
|
git checkout tags/${POPPLER_NAME} -b poppler-local;
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/usr -DENABLE_XPDF_HEADERS=ON -DENABLE_LIBOPENJPEG=none .;
|
||||||
|
make;
|
||||||
|
make install
|
||||||
|
- cd ${TRAVIS_BUILD_DIR}
|
||||||
|
|
||||||
|
# Install libuninameslist
|
||||||
|
- git clone ${LIBUNINAMESLIST_SOURCE}
|
||||||
|
- cd libuninameslist;
|
||||||
|
git checkout tags/20180701 -b libuninameslist-local;
|
||||||
|
autoreconf -i;
|
||||||
|
automake;
|
||||||
|
./configure --prefix=${TRAVIS_BUILD_DIR}/usr;
|
||||||
|
make;
|
||||||
|
make install
|
||||||
|
- cd ${TRAVIS_BUILD_DIR}
|
||||||
|
|
||||||
|
# Install fontforge
|
||||||
|
- git clone ${FONTFORGE_SOURCE}
|
||||||
|
- cd fontforge;
|
||||||
|
git checkout tags/20170731 -b fontforge-local;
|
||||||
|
./bootstrap;
|
||||||
|
./configure --disable-programs --disable-python-extension --disable-python-scripting --prefix=${TRAVIS_BUILD_DIR}/usr;
|
||||||
|
make;
|
||||||
|
make install;
|
||||||
|
sudo ldconfig
|
||||||
|
- cd ${TRAVIS_BUILD_DIR}
|
||||||
|
|
||||||
|
# Test setup
|
||||||
|
- pip install --user Pillow selenium sauceclient
|
||||||
|
- export DISPLAY=:99.0
|
||||||
|
- test/start_xvfb.sh
|
||||||
|
- pushd /
|
||||||
|
- python -m SimpleHTTPServer 8000 >/dev/null 2>&1 &
|
||||||
|
- popd
|
||||||
|
- sleep 5
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- export LD_LIBRARY_PATH=${TRAVIS_BUILD_DIR}/usr/lib:$LD_LIBRARY_PATH
|
||||||
|
- export PKG_CONFIG_PATH=${TRAVIS_BUILD_DIR}/usr/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||||
|
- patch < CMakeLists.txt.patch
|
||||||
|
- mkdir build && cd build && cmake -DENABLE_SVG=ON -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/usr ..
|
||||||
|
|
||||||
|
script:
|
||||||
|
- make
|
||||||
|
- P2H_TEST_REMOTE=1 ctest --output-on-failure --verbose
|
||||||
|
- make install
|
||||||
|
- ${TRAVIS_BUILD_DIR}/usr/bin/pdf2htmlEX -v
|
25
.travisScripts/buildPoppler.sh
Executable file
25
.travisScripts/buildPoppler.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This bash script clones and builds the specified poppler release
|
||||||
|
|
||||||
|
# See: https://github.com/pdf2htmlEX/buildAndPackagingTools/blob/master/building/awsEC2/scripts/dobuildPoppler
|
||||||
|
|
||||||
|
# Clone and build poppler
|
||||||
|
git clone ${POPPLER_SOURCE}
|
||||||
|
|
||||||
|
cd poppler
|
||||||
|
|
||||||
|
git checkout tags/${POPPLER_RELEASE}
|
||||||
|
|
||||||
|
git branch
|
||||||
|
|
||||||
|
mkdir build
|
||||||
|
|
||||||
|
cd build
|
||||||
|
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
|
-DENABLE_XPDF_HEADERS=ON -DENABLE_LIBOPENJPEG=none ..
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
|
11
.travisScripts/copyScriptsToBin
Executable file
11
.travisScripts/copyScriptsToBin
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This bash script copies the various scripts in the .travisScripts to the
|
||||||
|
# /home/travis/bin directory to ensure the current scripts are not lost
|
||||||
|
# when we checkout different versions of pdf2htmlEX
|
||||||
|
|
||||||
|
cp .travisScripts/* $HOME/bin
|
||||||
|
|
||||||
|
cp dobuild $HOME/bin
|
||||||
|
cp doinstall $HOME/bin
|
||||||
|
|
28
.travisScripts/installPoppler.sh
Executable file
28
.travisScripts/installPoppler.sh
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This bash scripts **installs** poppler
|
||||||
|
|
||||||
|
# See: https://github.com/pdf2htmlEX/buildAndPackagingTools/blob/master/building/awsEC2/scripts/doinstallPoppler
|
||||||
|
|
||||||
|
pushd poppler/build
|
||||||
|
|
||||||
|
sudo make install
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
sudo mkdir -p /usr/include/poppler
|
||||||
|
sudo cp poppler/poppler/*.h /usr/include/poppler
|
||||||
|
|
||||||
|
sudo mkdir -p /usr/include/poppler/goo
|
||||||
|
sudo cp poppler/goo/*.h /usr/include/poppler/goo
|
||||||
|
|
||||||
|
sudo mkdir -p /usr/include/poppler/fofi
|
||||||
|
sudo cp poppler/fofi/*.h /usr/include/poppler/fofi
|
||||||
|
|
||||||
|
sudo mkdir -p /usr/include/poppler/splash
|
||||||
|
sudo cp poppler/splash/*.h /usr/include/poppler/splash
|
||||||
|
|
||||||
|
sudo cp poppler/build/poppler/poppler-config.h \
|
||||||
|
/usr/include/poppler
|
||||||
|
|
||||||
|
|
13
.travisScripts/setupTests.sh
Executable file
13
.travisScripts/setupTests.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This bash script sets up the test environment
|
||||||
|
|
||||||
|
# Test setup
|
||||||
|
pip install --user Pillow selenium sauceclient
|
||||||
|
export DISPLAY=:99.0
|
||||||
|
test/start_xvfb.sh
|
||||||
|
pushd /
|
||||||
|
python -m SimpleHTTPServer 8000 >/dev/null 2>&1 &
|
||||||
|
popd
|
||||||
|
sleep 5
|
||||||
|
|
10
doinstall
10
doinstall
@ -1,8 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "This installation assumes you have 'sudo' privileges"
|
if [[ $# -eq 0 ]] ; then
|
||||||
echo "Type ctrl-c now if DO NOT want to continue"
|
|
||||||
read -p "Type anything else to continue: "
|
echo "This installation assumes you have 'sudo' privileges"
|
||||||
|
echo "Type ctrl-c now if DO NOT want to continue"
|
||||||
|
read -p "Type anything else to continue: "
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
cd build
|
cd build
|
||||||
sudo make install
|
sudo make install
|
||||||
|
Loading…
Reference in New Issue
Block a user