Skip to content

Commit

Permalink
fix fontforge include dir; fix pdf2htmlex patches; builds locally
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand committed Sep 18, 2024
1 parent 59036e3 commit fded75e
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 53 deletions.
4 changes: 3 additions & 1 deletion recipes/fontforge/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def source(self):
apply_conandata_patches(self)

def layout(self):
cmake_layout(self)
cmake_layout(self, src_folder="src")

def generate(self):
deps = CMakeDeps(self)
Expand All @@ -94,6 +94,7 @@ def generate(self):
tc.variables["ENABLE_LIBTIFF"] = self.options.with_tiff
tc.variables["ENABLE_LIBREADLINE"] = "OFF"
tc.variables["INSTALL_PRIVATE_HEADERS"] = self.options.install_private_headers
tc.variables["CMAKE_INSTALL_INCLUDEDIR"] = "include/fontforge"
tc.generate()

def build(self):
Expand Down Expand Up @@ -149,3 +150,4 @@ def package(self):

def package_info(self):
self.cpp_info.libs = ["fontforge"]
self.cpp_info.includedirs = ["include", "include/fontforge"]
4 changes: 2 additions & 2 deletions recipes/fontforge/all/test_package/link_test.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <fontforge.h>
#include "start.h"
#include <fontforge/fontforge.h>
#include "fontforge/start.h"

int main()
{
Expand Down
8 changes: 4 additions & 4 deletions recipes/pdf2htmlex/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
sources:
"0.18.8.rc1-git-6f85c88":
url: "https://github.com/opendocument-app/pdf2htmlEX/archive/refs/tags/v0.18.8.rc1-git-6f85c88.tar.gz"
sha256: "cc19848576f84469d290e6e271e07dd17ffcc15f40357b8d7456e4f6d1b3ebcf"
sha256: "b88c0897c26caaba62c84069a22043be703a495852af3d9af9d63e18fde2296e"
patches:
"0.18.8.rc1-git-6f85c88":
- patch_file: "patches/0.18.8.rc1-git-6f85c88/0001-Upgrade-Poppler-to-24.06.1.patch"
- patch_file: "patches/0.18.8.rc1-git-6f85c88/0002-CI-Use-Ubuntu-22.04-upgrade-actions-checkout-and-act.patch"
- patch_file: "patches/0.18.8.rc1-git-6f85c88/0003-Update-missing-font-workaround.patch"
- patch_file: "patches/0.18.8.rc1-git-6f85c88/0004-use-find_package.patch"
- patch_file: "patches/0.18.8.rc1-git-6f85c88/0002-Update-missing-font-workaround.patch"
- patch_file: "patches/0.18.8.rc1-git-6f85c88/0003-use-find_package.patch"
- patch_file: "patches/0.18.8.rc1-git-6f85c88/0004-build-and-install-library.patch"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 4753c1e17c815de7773be7ffd99cfbe947e8754a Mon Sep 17 00:00:00 2001
From 2110b5eaa45decf7ee222953642af5c7967e0424 Mon Sep 17 00:00:00 2001
From: Vilius Sutkus '89 <[email protected]>
Date: Mon, 5 Aug 2024 21:35:29 +0300
Subject: [PATCH 3/4] Update missing font workaround
Subject: [PATCH 2/4] Update missing font workaround

---
pdf2htmlEX/src/HTMLRenderer/font.cc | 5 ++++-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 94215ff2eea295fa228c93eb0f1ff7b9165d8dbd Mon Sep 17 00:00:00 2001
From 90261925551ebd76032324728b2ad52eb741902c Mon Sep 17 00:00:00 2001
From: Andreas Stefl <[email protected]>
Date: Wed, 18 Sep 2024 19:49:39 +0200
Subject: [PATCH 4/4] use `find_package`
Subject: [PATCH 3/4] use `find_package`

---
pdf2htmlEX/CMakeLists.txt | 75 +++++++++++----------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
From 44f9ac6babee478b3481ee6e9657c12d27a39950 Mon Sep 17 00:00:00 2001
From: Andreas Stefl <[email protected]>
Date: Wed, 18 Sep 2024 20:16:55 +0200
Subject: [PATCH 4/4] build and install library

---
pdf2htmlEX/CMakeLists.txt | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/pdf2htmlEX/CMakeLists.txt b/pdf2htmlEX/CMakeLists.txt
index 73a7eeb..1e05155 100644
--- a/pdf2htmlEX/CMakeLists.txt
+++ b/pdf2htmlEX/CMakeLists.txt
@@ -108,7 +108,6 @@ configure_file (${CMAKE_SOURCE_DIR}/share/pdf2htmlEX.js.in ${CMAKE_SOURCE_DIR}/s

set(PDF2HTMLEX_SRC ${PDF2HTMLEX_SRC}
src/Param.h
- src/pdf2htmlEX.cc
src/pdf2htmlEX-config.h
src/HTMLRenderer/HTMLRenderer.h
src/HTMLRenderer/draw.cc
@@ -169,8 +168,12 @@ set(PDF2HTMLEX_SRC ${PDF2HTMLEX_SRC}
src/TmpFiles.cc
)

-add_executable(pdf2htmlEX ${PDF2HTMLEX_SRC})
-target_link_libraries(pdf2htmlEX ${PDF2HTMLEX_LIBS})
+add_library(libpdf2htmlEX ${PDF2HTMLEX_SRC})
+target_link_libraries(libpdf2htmlEX ${PDF2HTMLEX_LIBS})
+set_target_properties(libpdf2htmlEX PROPERTIES OUTPUT_NAME pdf2htmlEX)
+
+add_executable(pdf2htmlEX src/pdf2htmlEX.cc)
+target_link_libraries(pdf2htmlEX libpdf2htmlEX)

add_custom_target(pdf2htmlEX_resources ALL DEPENDS
${CMAKE_SOURCE_DIR}/share/base.min.css
@@ -195,6 +198,16 @@ add_custom_command(OUTPUT
${CMAKE_SOURCE_DIR}/share/fancy.css
)

+install (TARGETS libpdf2htmlEX
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+install (
+ DIRECTORY pdf2htmlEX/src/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ FILES_MATCHING PATTERN "*.h"
+)
+
install (TARGETS pdf2htmlEX DESTINATION bin)

set(PDF2HTMLEX_RESOURCE
--
2.39.3 (Apple Git-146)

6 changes: 2 additions & 4 deletions recipes/pdf2htmlex/all/test_package/link_test.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include <iostream>
#include "pdf2htmlEX.h"
#include "pdf2htmlEX/pdf2htmlEX-config.h"
#include "pdf2htmlEX/HTMLRenderer/HTMLRenderer.h"

int main()
{
pdf2htmlEX::pdf2htmlEX converter;
std::cout << "pdf2htmlEX object created successfully" << std::endl;
return 0;
}

0 comments on commit fded75e

Please sign in to comment.