diff --git a/recipe/bld.bat b/recipe/bld.bat index 0cc86e66..644be915 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -17,6 +17,7 @@ cmake -G "Ninja" ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^ -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ + -DCMAKE_CXX_FLAGS="-DHAVE_POPPLER" ^ -DBUILD_SHARED_LIBS=ON ^ -DBUILD_TESTING=OFF ^ -DBUILD_PYTHON_BINDINGS:BOOL=OFF ^ diff --git a/recipe/build.sh b/recipe/build.sh index a5ce2563..b5329fda 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -5,7 +5,7 @@ set -ex # Abort on error. # also allow newer symbols (https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk) -export CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY" +export CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY -DHAVE_POPPLER" mkdir build cd build diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b82617a3..ada6b76e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -9,7 +9,7 @@ source: sha256: aff3086fee75f5773e33a5598df98d8a4d10be411f777d3ce23584b21d8171ca build: - number: 12 + number: 13 skip_compile_pyc: - share/bash-completion/completions/*.py ignore_run_exports_from: @@ -181,11 +181,17 @@ outputs: - libgdal-core >={{ ".".join(version.split(".")[:2]) }} - poppler test: + files: + - test_data + - test_pdf.bat + - test_pdf.sh commands: - test -f ${PREFIX}/lib/gdalplugins/${GDAL_PLUGIN_TYPE}_${GDAL_PLUGIN_NAME}${SHLIB_EXT} # [unix] - if not exist %LIBRARY_LIB%\gdalplugins\%GDAL_PLUGIN_TYPE%_%GDAL_PLUGIN_NAME%.dll exit 1 # [win] - gdalinfo --format ${GDAL_PLUGIN_NAME} # [unix] - gdalinfo --format %GDAL_PLUGIN_NAME% # [win] + - ./test_pdf.sh # [unix] + - test_pdf.bat # [win] about: summary: Raster driver PDF for the Geospatial Data Abstraction Library (GDAL) license: MIT diff --git a/recipe/test_data/test_iso32000.pdf b/recipe/test_data/test_iso32000.pdf new file mode 100644 index 00000000..9c70d5df Binary files /dev/null and b/recipe/test_data/test_iso32000.pdf differ diff --git a/recipe/test_pdf.bat b/recipe/test_pdf.bat new file mode 100644 index 00000000..c7d64c69 --- /dev/null +++ b/recipe/test_pdf.bat @@ -0,0 +1,4 @@ +cd %~dp0\test_data + +gdalinfo test_iso32000.pdf +if errorlevel 1 exit 1 diff --git a/recipe/test_pdf.sh b/recipe/test_pdf.sh new file mode 100755 index 00000000..2e2e0a46 --- /dev/null +++ b/recipe/test_pdf.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# exit when any command fails +set -e +# print all commands +set -x + +pushd $( dirname "${BASH_SOURCE[0]}" )/test_data/ + +gdalinfo test_iso32000.pdf + +popd