Skip to content

Commit

Permalink
Update pdf2htmlEX
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Sep 5, 2024
1 parent 52a74e9 commit a01f28e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 27 deletions.
2 changes: 1 addition & 1 deletion recipes/odrcore/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def requirements(self):
self.requires("uchardet/0.0.8")
self.requires("utfcpp/4.0.4")
if self.options.get_safe("with_pdf2htmlEX"):
self.requires("pdf2htmlex/0.18.8.rc1-20240814-git")
self.requires("pdf2htmlex/0.18.8.rc1-20240905-git")
if self.options.get_safe("with_wvWare"):
self.requires("wvware/1.2.9")

Expand Down
9 changes: 3 additions & 6 deletions recipes/pdf2htmlex/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
sources:
"0.18.8.rc1-20240814-git":
url: "https://github.com/ViliusSutkus89/pdf2htmlEX/archive/cf26cf4b98b25cda56792ce5626ee0563a589c7a.zip"
sha256: "137e544afb0c9dffd3c8e86f9ce95dd7d1775d7ede93445268bf4910d1d0c418"
patches:
"0.18.8.rc1-20240814-git":
- patch_file: "patches/manifest_file_debug.patch"
"0.18.8.rc1-20240905-git":
url: "https://github.com/ViliusSutkus89/pdf2htmlEX/archive/0bbd6686f7214c5ddb230fa3323b75e954f39418.zip"
sha256: "394a5a5555005a18ada6f810ef7ab693f6d916cd9302d874483cbc4956caf557"
13 changes: 12 additions & 1 deletion recipes/pdf2htmlex/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
from conan.tools.env import Environment
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
from conans.errors import ConanInvalidConfiguration

Expand Down Expand Up @@ -92,8 +93,18 @@ def generate(self):
tc = CMakeToolchain(self)
tc.extra_cxxflags = ["-Wno-maybe-uninitialized"]
tc.variables["PDF2HTMLEX_VERSION"] = self.version

# Get runenv info, exported by package_info() of dependencies
# We need to obtain POPPLER_DATA_DIR and FONTCONFIG_PATH
runenv_info = Environment()
deps = self.dependencies.host.topological_sort
deps = [dep for dep in reversed(deps.values())]
for dep in deps:
runenv_info.compose_env(dep.runenv_info)
envvars = runenv_info.vars(self)
for v in ["POPPLER_DATA_DIR", "FONTCONFIG_PATH"]:
tc.variables[v] = envvars.get(v)
# @TODO: figure out how to use POPPLER_DATA_DIR exported by poppler-data. It should JustWork^tm
tc.variables["POPPLER_DATA_DIR"] = self.dependencies['poppler-data'].cpp_info.resdirs[0]
tc.generate()

def build(self):
Expand Down
19 changes: 0 additions & 19 deletions recipes/pdf2htmlex/all/patches/manifest_file_debug.patch

This file was deleted.

0 comments on commit a01f28e

Please sign in to comment.