Fix poppler version requirement, add loader check

This fixes the poppler-glib version requirement to version 0.16, which
is the lowest version that compiles and works properly with pdfload.

Also added a check for pdfload and enabled testing on Travis CI.
This commit is contained in:
Felix Bünemann 2016-05-08 22:39:08 +02:00
parent 38fe936eee
commit bec6b174c9
5 changed files with 50 additions and 5 deletions

View File

@ -8,7 +8,7 @@ before_install:
- sudo apt-get install libpng12-dev libwebp-dev libtiff4-dev libxml2-dev
- sudo apt-get install swig libmagick++-dev bc
- sudo apt-get install libcfitsio3-dev libgsl0-dev libmatio-dev
- sudo apt-get install liborc-0.4-dev liblcms2-dev
- sudo apt-get install liborc-0.4-dev liblcms2-dev libpoppler-glib-dev
before_script:
- ./bootstrap.sh
- ./configure

View File

@ -563,12 +563,12 @@ AC_ARG_WITH([poppler],
AS_HELP_STRING([--without-poppler], [build without poppler (default: test)]))
if test x"$with_poppler" != x"no"; then
PKG_CHECK_MODULES(POPPLER, [poppler-glib >= 0.30.0 cairo >= 1.2],
[AC_DEFINE(HAVE_POPPLER,1,[define if you have poppler-glib >= 0.30.0 and cairo >= 1.2 installed.])
PKG_CHECK_MODULES(POPPLER, [poppler-glib >= 0.16.0 cairo >= 1.2],
[AC_DEFINE(HAVE_POPPLER,1,[define if you have poppler-glib >= 0.16.0 and cairo >= 1.2 installed.])
with_poppler=yes
PACKAGES_USED="$PACKAGES_USED poppler-glib cairo"
],
[AC_MSG_WARN([poppler-glib >= 0.30.0 or cairo >= 1.2 not found; disabling PDF load via poppler])
[AC_MSG_WARN([poppler-glib >= 0.16.0 or cairo >= 1.2 not found; disabling PDF load via poppler])
with_poppler=no
]
)
@ -961,7 +961,7 @@ file import with OpenSlide: $with_openslide
(requires openslide-3.3.0 or later)
file import with matio: $with_matio
PDF import with poppler-glib: $with_poppler
(requires poppler-glib 0.30.0 or later)
(requires poppler-glib 0.16.0 or later)
SVG import with librsvg-2.0: $with_rsvg
(requires librsvg-2.0 2.40.0 or later)
file import with cfitsio: $with_cfitsio

37
test/images/blankpage.pdf Executable file
View File

@ -0,0 +1,37 @@
%PDF-1.1
%âãÏÓ
1 0 obj
<<
/Pages 2 0 R
/Type /Catalog
>>
endobj
2 0 obj
<<
/MediaBox [0 0 595 842]
/Kids [3 0 R]
/Count 1
/Type /Pages
>>
endobj
3 0 obj
<<
/Parent 2 0 R
/MediaBox [0 0 595 842]
/Type /Page
>>
endobj xref
0 4
0000000000 65535 f
0000000015 00000 n
0000000066 00000 n
0000000149 00000 n
trailer
<<
/Root 1 0 R
/Size 4
>>
startxref
221
%%EOF

BIN
test/images/blankpage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -7,6 +7,10 @@
. ./variables.sh
# poppler / pdfload reference image
poppler=$test_images/blankpage.pdf
poppler_ref=$test_images/blankpage.png
# the matlab image and reference image
matlab=$test_images/sample.mat
matlab_ref=$test_images/sample.png
@ -215,6 +219,10 @@ test_rad $rad
test_raw $mono
test_raw $image
if test_supported pdfload; then
test_loader $poppler_ref $poppler pdfload
fi
if test_supported matload; then
test_loader $matlab_ref $matlab matlab
fi