From 344a03983e0afd52897bbb046c31d47af211052c Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 13 Aug 2024 23:18:06 +0200 Subject: [PATCH 1/2] Fix libgdal-pdf that fails to work due to -DHAVE_POPPLER not being found when building libgdal-core which causes the plugin to emit the following and not being functional: ``` Warning 1: Driver PDF declares DMD_OPENOPTIONLIST whereas its proxy doesn't declare it or with a different value Warning 1: Driver PDF declares DCAP_OPEN whereas its proxy doesn't declare it or with a different value Warning 1: Driver PDF declares DMD_SUBDATASETS whereas its proxy doesn't declare it or with a different value Warning 1: Proxy driver PDF declares a pfnIdentify callback whereas the real driver does not. Warning 1: Driver PDF declares a pfnOpen callback whereas its proxy doest not declare DCAP_OPEN ``` --- recipe/bld.bat | 1 + recipe/build.sh | 2 +- recipe/meta.yaml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) 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..12397265 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: From 3fb9bba827860a61027be791d0ab9f177170faed Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 13 Aug 2024 23:39:56 +0200 Subject: [PATCH 2/2] Test PDF driver --- recipe/meta.yaml | 6 ++++++ recipe/test_data/test_iso32000.pdf | Bin 0 -> 1625 bytes recipe/test_pdf.bat | 4 ++++ recipe/test_pdf.sh | 12 ++++++++++++ 4 files changed, 22 insertions(+) create mode 100644 recipe/test_data/test_iso32000.pdf create mode 100644 recipe/test_pdf.bat create mode 100755 recipe/test_pdf.sh diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 12397265..ada6b76e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -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 0000000000000000000000000000000000000000..9c70d5dfa2d63e080da8239cbc252f2b0c652461 GIT binary patch literal 1625 zcmZuyU1%It6c!4BP76Nhg9I$st&2@rGjr!>cgL1!va{JN&1NV2(^$7lne5(fChX3v zcV?4~)FAkW`e3URTH1<;6snX)6pRnWf>3GGP{fD&Lo8LQ=u7pf2x>idW+&Mson2bA`nNmpWg7W%EGM7zjrO;YfREov16zdlv zq8jfPm6#|>N>nPBBYG~KNdiNP5@OAom8nof=oiY7;#j%>yrc%W2jQ5kNTMn#SXE^S zQv14emAZb$pk>*vgQ5U|F$vppi3MxfUuQ_wH16Z4ZcqsG1ca;{aqJeY5CxZZ1(t3V%6L!gqhLM=c>u+hS!?k=Cj$!X;N{) zII{}DkO!SPE+s~TYo87ueT-^&d*aTGov-xva&L0Iy|4B3%r7pu7d~A${$o`<`APNf zaC&fe`uFpX&wMrU%lq$a|K_>+cZmt^gBPC(l|DSR^^W#LWIFrE1JMVMpIg3hab@c6 z;GVO$&)od{ip_l0YIy?FHiJtDj(y#43vBfAftx>6j!bxeFY`78S2)`|MIR{7_9 zeLE*_XD*za*)#mckrlU4`00e;aaAAPI6^3j&_ zm+11=|4#pV;?igTh|R{MTW(&zUOH=@`Bu4h<+txI-kq199@uv5%XaqiLu|Koer{*q zd3rHF5JI9D54IzliNK{mSKY?9!z`zS$^i{CKA=g!3F1xRKGQo$*e+mm*g1dLv^rgEL0hb< z|E@Dd{?sH4*QndIu7oxvhdDS@Bu-epP*hPQ1sz5m3}Y2o*oCZBOjJOr^_U>bpul>$pihFK@n`$x#x gHta`FZa#0mKtLm=o8ubP^;E;6s&e6QGCR!u4+5~(y8r+H literal 0 HcmV?d00001 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