Skip to content

Commit

Permalink
update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand committed Sep 18, 2024
1 parent 7cd4f37 commit 4722ce2
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 8 deletions.
3 changes: 2 additions & 1 deletion recipes/pdf2htmlex/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ 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: "0003-Update-missing-font-workaround.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"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 5e5a947bd1320e19c1271f5dfaeef098baae4452 Mon Sep 17 00:00:00 2001
From: Vilius Sutkus '89 <[email protected]>
Date: Thu, 13 Jun 2024 14:18:06 +0300
Subject: [PATCH 1/3] Upgrade Poppler to 24.06.1
Subject: [PATCH 1/4] Upgrade Poppler to 24.06.1

Poppler-24.02.0 OutlineItem changed Title from Unicode pointer and length counter into Unicode vector. ( https://gitlab.freedesktop.org/poppler/poppler/-/commit/fc1c711cb5f769546c6b31cc688bf0ee7f0c1dbc )

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From b66edbc20b4063d45aaa75191be536c27d137584 Mon Sep 17 00:00:00 2001
From: Vilius Sutkus '89 <[email protected]>
Date: Thu, 13 Jun 2024 14:19:32 +0300
Subject: [PATCH 2/3] [CI] Use Ubuntu 22.04, upgrade actions/checkout and
Subject: [PATCH 2/4] [CI] Use Ubuntu 22.04, upgrade actions/checkout and
actions/upload-artifact

Ubuntu 20.04 comes with Freetype 2.10.1, Poppler requires at least 2.11
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 4753c1e17c815de7773be7ffd99cfbe947e8754a 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/3] Update missing font workaround
Subject: [PATCH 3/4] Update missing font workaround

---
pdf2htmlEX/src/HTMLRenderer/font.cc | 5 ++++-
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
From 94215ff2eea295fa228c93eb0f1ff7b9165d8dbd 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`

---
pdf2htmlEX/CMakeLists.txt | 75 +++++++++++----------------------------
1 file changed, 20 insertions(+), 55 deletions(-)

diff --git a/pdf2htmlEX/CMakeLists.txt b/pdf2htmlEX/CMakeLists.txt
index 84b4a98..73a7eeb 100644
--- a/pdf2htmlEX/CMakeLists.txt
+++ b/pdf2htmlEX/CMakeLists.txt
@@ -21,66 +21,31 @@ add_custom_target(dist
| bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})

-find_package(PkgConfig)
-
-
-# SINCE we have a very intimate relationship with a particular version of
-# poppler... we explicitly describe the poppler include and library
-# paths.
-#
-include_directories(
- ../poppler/build/poppler
- ../poppler/build
- ../poppler/poppler
- ../poppler
-)
-#
-# The following order is critical as the glib functions use functions
-# located in the main poppler library
-#
-set(POPPLER_LIBRARIES ${POPPLER_LIBRARIES}
- ${CMAKE_SOURCE_DIR}/../poppler/build/glib/libpoppler-glib.a
- ${CMAKE_SOURCE_DIR}/../poppler/build/libpoppler.a
+find_package(poppler REQUIRED)
+set(PDF2HTMLEX_LIBS
+ ${PDF2HTMLEX_LIBS}
+ poppler::libpoppler
+ poppler::libpoppler-cpp
+ poppler::libpoppler-splash
+ poppler::libpoppler-cairo
+ poppler::libpoppler-glib
)

-
if(ENABLE_SVG)
- pkg_check_modules(CAIRO REQUIRED cairo>=1.10.0)
- message("-- Trying to locate cairo-svg...")
- find_path(CAIRO_SVG_INCLUDE_PATH cairo-svg.h PATHS ${CAIRO_INCLUDE_DIRS} NO_DEFAULT_PATH)
- if(CAIRO_SVG_INCLUDE_PATH)
- message("-- found cairo-svg...")
- include_directories(${CAIRO_INCLUDE_DIRS})
- if(NOT DEFINED ENV{USING_BREW})
- link_directories(${CAIRO_LIBRARY_DIRS})
- set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${CAIRO_LIBRARIES})
- endif()
- set(ENABLE_SVG 1)
- else()
- message(FATAL_ERROR "Error: no SVG support found in Cairo")
- endif()
-
- find_package(Freetype REQUIRED)
- include_directories(${FREETYPE_INCLUDE_DIRS})
- link_directories(${FREETYPE_LIBRARY_DIRS})
-# set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${FREETYPE_LIBRARIES})
+ find_package(cairo REQUIRED)
+ find_package(freetype REQUIRED)
+ set(PDF2HTMLEX_LIBS
+ ${PDF2HTMLEX_LIBS}
+ cairo::cairo-svg
+ Freetype::Freetype
+ )
+ set(ENABLE_SVG 1)
endif()

-# SINCE we have a very intimate relationship with a particular version of
-# fontforge... we explicitly describe the fontforge include and library
-# paths.
-#
-include_directories(
- ../fontforge/fontforge
- ../fontforge
- ../fontforge/build/inc
- ../fontforge/inc
-)
-#
-include_directories(${FONTFORGE_INCLUDE_DIRS})
-link_directories(${FONTFORGE_LIBRARY_DIRS})
-set(FONTFORGE_LIBRARIES ${FONTFORGE_LIBRARIES}
- ${CMAKE_SOURCE_DIR}/../fontforge/build/lib/libfontforge.a
+find_package(fontforge REQUIRED)
+set(PDF2HTMLEX_LIBS
+ ${PDF2HTMLEX_LIBS}
+ fontforge::fontforge
)

# If we are using Alpine Linux then we need to add -lintl
--
2.39.3 (Apple Git-146)

8 changes: 4 additions & 4 deletions recipes/wvware/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ sources:
sha256: "4c730d3b325c0785450dd3a043eeb53e1518598c4f41f155558385dd2635c19d"
patches:
"1.2.9":
- patch_file: "patches/1.2.9/gsf-meta-names.patch"
- patch_file: "patches/1.2.9/0001-gsf-meta-names.patch"
# https://gitweb.gentoo.org/repo/gentoo.git/tree/app-text/wv/files
- patch_file: "patches/1.2.9/C99-decls.patch"
- patch_file: "patches/1.2.9/format-security.patch"
- patch_file: "patches/1.2.9/gcc14-build-fix.patch"
- patch_file: "patches/1.2.9/0002-C99-decls.patch"
- patch_file: "patches/1.2.9/0003-format-security.patch"
- patch_file: "patches/1.2.9/0004-gcc14-build-fix.patch"

0 comments on commit 4722ce2

Please sign in to comment.