diff --git a/recipes/odrcore/all/conanfile.py b/recipes/odrcore/all/conanfile.py index ad99db0..fbb6373 100644 --- a/recipes/odrcore/all/conanfile.py +++ b/recipes/odrcore/all/conanfile.py @@ -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") diff --git a/recipes/pdf2htmlex/all/conandata.yml b/recipes/pdf2htmlex/all/conandata.yml index e6b592d..f5a7436 100644 --- a/recipes/pdf2htmlex/all/conandata.yml +++ b/recipes/pdf2htmlex/all/conandata.yml @@ -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" \ No newline at end of file + "0.18.8.rc1-20240905-git": + url: "https://github.com/ViliusSutkus89/pdf2htmlEX/archive/0bbd6686f7214c5ddb230fa3323b75e954f39418.zip" + sha256: "394a5a5555005a18ada6f810ef7ab693f6d916cd9302d874483cbc4956caf557" diff --git a/recipes/pdf2htmlex/all/conanfile.py b/recipes/pdf2htmlex/all/conanfile.py index c4b2e30..7542aca 100644 --- a/recipes/pdf2htmlex/all/conanfile.py +++ b/recipes/pdf2htmlex/all/conanfile.py @@ -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 @@ -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): diff --git a/recipes/pdf2htmlex/all/patches/manifest_file_debug.patch b/recipes/pdf2htmlex/all/patches/manifest_file_debug.patch deleted file mode 100644 index 76e8b27..0000000 --- a/recipes/pdf2htmlex/all/patches/manifest_file_debug.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/pdf2htmlEX/src/HTMLRenderer/general.cc b/pdf2htmlEX/src/HTMLRenderer/general.cc -index 7d43d13..1b04e0a 100644 ---- a/pdf2htmlEX/src/HTMLRenderer/general.cc -+++ b/pdf2htmlEX/src/HTMLRenderer/general.cc -@@ -424,9 +424,12 @@ void HTMLRenderer::post_process(void) - } - - // apply manifest -- ifstream manifest_fin((char*)str_fmt("%s/%s", param.data_dir.c_str(), MANIFEST_FILENAME.c_str()), ifstream::binary); -+ const char* manifest_file = str_fmt("%s/%s", param.data_dir.c_str(), MANIFEST_FILENAME.c_str()); -+ if (param.debug) -+ std::cout << "Trying to open manifest file: " << manifest_file << std::endl; -+ ifstream manifest_fin = ifstream(manifest_file, ifstream::binary); - if(!manifest_fin) -- throw "Cannot open the manifest file"; -+ throw std::runtime_error(std::string("Cannot open the manifest file: ") + manifest_file); - - bool embed_string = false; - string line;