Skip to content

Commit

Permalink
Fix libgdal-pdf that fails to work (alternative to #975) (#976)
Browse files Browse the repository at this point in the history
automerged PR by conda-forge/automerge-action
  • Loading branch information
github-actions[bot] committed Aug 14, 2024
2 parents 6e094e3 + 3fb9bba commit 131d0d0
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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 ^
Expand Down
2 changes: 1 addition & 1 deletion recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source:
sha256: aff3086fee75f5773e33a5598df98d8a4d10be411f777d3ce23584b21d8171ca

build:
number: 12
number: 13
skip_compile_pyc:
- share/bash-completion/completions/*.py
ignore_run_exports_from:
Expand Down Expand Up @@ -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
Expand Down
Binary file added recipe/test_data/test_iso32000.pdf
Binary file not shown.
4 changes: 4 additions & 0 deletions recipe/test_pdf.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cd %~dp0\test_data

gdalinfo test_iso32000.pdf
if errorlevel 1 exit 1
12 changes: 12 additions & 0 deletions recipe/test_pdf.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 131d0d0

Please sign in to comment.