Skip to content

Commit

Permalink
Fix line numbers and whitespace in pdf2htmlEX patches
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Dec 27, 2023
1 parent e04b5c5 commit 2908dbe
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions pdf2htmlEX/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ fun File.patch(patch: String): File {

fun File.patch(patch: File): File {
val pb = ProcessBuilder(
if (isFile) listOf("patch", "--ignore-whitespace", "-p0", absolutePath)
else listOf("patch", "--ignore-whitespace", "-p0")
if (isFile) listOf("patch", "-p0", absolutePath)
else listOf("patch", "-p0")
)

if (isDirectory)
Expand Down
6 changes: 3 additions & 3 deletions pdf2htmlEX/patches/0.18.8.rc1/cflags.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
--- pdf2htmlEX/CMakeLists.txt 2023-11-15 02:31:51.534000000 +0200
+++ pdf2htmlEX/CMakeLists.txt 2023-11-15 02:31:58.159000000 +0200
@@ -39,15 +39,6 @@
pkg_search_module(FONTFORGE REQUIRED IMPORTED_TARGET libfontforge=20200314)
@@ -41,15 +41,6 @@
set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} PkgConfig::FONTFORGE)

include_directories(${FONTFORGE_INCLUDEDIR}/private)

-# debug build flags (overwrite default cmake debug flags)
-set(CMAKE_C_FLAGS_DEBUG "-ggdb -pg")
-set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -pg")
Expand Down
26 changes: 13 additions & 13 deletions pdf2htmlEX/patches/0.18.8.rc1/find-libraries.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
--- pdf2htmlEX/CMakeLists.txt 2023-11-14 03:32:25.260000000 +0200
+++ pdf2htmlEX/CMakeLists.txt 2023-11-15 02:28:10.440000000 +0200
@@ -23,90 +23,23 @@

find_package(PkgConfig)

-
-# SINCE we have a very intimate relationship with a particular version of
-# poppler... we explicitly describe the poppler include and library
-# SINCE we have a very intimate relationship with a particular version of
-# poppler... we explicitly describe the poppler include and library
-# paths.
-#
-include_directories(
Expand All @@ -16,8 +16,8 @@
- ../poppler
-)
-#
-# The following order is critical as the glib functions use functions
-# located in the main poppler library
-# 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
Expand All @@ -27,7 +27,7 @@
+pkg_search_module(POPPLER-GLIB REQUIRED IMPORTED_TARGET poppler-glib=0.89.0)
+pkg_search_module(POPPLER REQUIRED IMPORTED_TARGET poppler=0.89.0)
+set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} PkgConfig::POPPLER-GLIB PkgConfig::POPPLER)

if(ENABLE_SVG)
- pkg_check_modules(CAIRO REQUIRED cairo>=1.10.0)
- message("-- Trying to locate cairo-svg...")
Expand All @@ -53,9 +53,9 @@
+ set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} PkgConfig::CAIRO_SVG)
+
+ set(ENABLE_SVG 1)

-# SINCE we have a very intimate relationship with a particular version of
-# fontforge... we explicitly describe the fontforge include and library
-# SINCE we have a very intimate relationship with a particular version of
-# fontforge... we explicitly describe the fontforge include and library
-# paths.
-#
-include_directories(
Expand All @@ -73,14 +73,14 @@
-
-# If we are using Alpine Linux then we need to add -lintl
-#
-if (EXISTS /usr/lib/libintl.so )
-if (EXISTS /usr/lib/libintl.so )
- set(LIB_INTL_LIBRARIES -lintl )
-else ()
- set(LIB_INTL_LIBRARIES "" )
+ pkg_search_module(FREETYPE REQUIRED IMPORTED_TARGET freetype2)
+ set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} PkgConfig::FREETYPE)
endif()

-set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS}
- ${POPPLER_LIBRARIES}
- ${FONTFORGE_LIBRARIES}
Expand All @@ -100,6 +100,6 @@
+pkg_search_module(FONTFORGE REQUIRED IMPORTED_TARGET libfontforge=20200314)
+set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} PkgConfig::FONTFORGE)
+include_directories(${FONTFORGE_INCLUDEDIR}/private)

# debug build flags (overwrite default cmake debug flags)
set(CMAKE_C_FLAGS_DEBUG "-ggdb -pg")
8 changes: 4 additions & 4 deletions pdf2htmlEX/patches/0.18.8.rc1/make-a-library.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- pdf2htmlEX/CMakeLists.txt 2023-11-15 02:31:58.159000000 +0200
+++ pdf2htmlEX/CMakeLists.txt 2023-11-04 11:02:15.884000000 +0200
@@ -50,37 +50,16 @@
@@ -45,37 +45,16 @@
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Woverloaded-virtual")

Expand Down Expand Up @@ -46,15 +46,15 @@
configure_file (${CMAKE_SOURCE_DIR}/src/pdf2htmlEX-config.h.in ${CMAKE_SOURCE_DIR}/src/pdf2htmlEX-config.h)
configure_file (${CMAKE_SOURCE_DIR}/pdf2htmlEX.1.in ${CMAKE_SOURCE_DIR}/pdf2htmlEX.1)

@@ -90,7 +71,6 @@
@@ -87,7 +66,6 @@

set(PDF2HTMLEX_SRC ${PDF2HTMLEX_SRC}
src/Param.h
- src/pdf2htmlEX.cc
src/pdf2htmlEX-config.h
src/HTMLRenderer/HTMLRenderer.h
src/HTMLRenderer/draw.cc
@@ -149,8 +129,11 @@
@@ -148,8 +126,11 @@
src/TmpFiles.cc
)

Expand All @@ -68,7 +68,7 @@

add_custom_target(pdf2htmlEX_resources ALL DEPENDS
${CMAKE_SOURCE_DIR}/share/base.min.css
@@ -175,7 +158,14 @@
@@ -174,7 +155,14 @@
${CMAKE_SOURCE_DIR}/share/fancy.css
)

Expand Down
2 changes: 1 addition & 1 deletion pdf2htmlEX/patches/0.18.8.rc1/missing-tests.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- pdf2htmlEX/CMakeLists.txt 2020-08-19 23:43:25.000000000 +0300
+++ pdf2htmlEX/CMakeLists.txt 2023-11-14 03:29:50.860000000 +0200
@@ -280,8 +280,9 @@
@@ -204,8 +204,9 @@
file(MAKE_DIRECTORY ${PDF2HTMLEX_DATDIR})
file(MAKE_DIRECTORY ${PDF2HTMLEX_PNGDIR})
file(MAKE_DIRECTORY ${PDF2HTMLEX_OUTDIR})
Expand Down
2 changes: 1 addition & 1 deletion pdf2htmlEX/patches/0.18.8.rc2/cflags.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- pdf2htmlEX/CMakeLists.txt 2023-11-15 02:31:51.534000000 +0200
+++ pdf2htmlEX/CMakeLists.txt 2023-11-15 02:31:58.159000000 +0200
@@ -36,15 +36,6 @@
@@ -37,15 +37,6 @@
set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} PkgConfig::FONTFORGE)
include_directories(${FONTFORGE_INCLUDEDIR}/private)

Expand Down
6 changes: 3 additions & 3 deletions pdf2htmlEX/patches/0.18.8.rc2/make-a-library.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
--- pdf2htmlEX/CMakeLists.txt 2023-11-15 02:31:58.159000000 +0200
+++ pdf2htmlEX/CMakeLists.txt 2023-12-17 08:09:48.771000000 +0200
@@ -62,7 +62,6 @@
@@ -63,7 +63,6 @@

set(PDF2HTMLEX_SRC ${PDF2HTMLEX_SRC}
src/Param.h
- src/pdf2htmlEX.cc
src/pdf2htmlEX-config.h
src/HTMLRenderer/HTMLRenderer.h
src/HTMLRenderer/draw.cc
@@ -123,8 +122,11 @@
@@ -124,8 +123,11 @@
src/TmpFiles.cc
)

Expand All @@ -22,7 +22,7 @@

add_custom_target(pdf2htmlEX_resources ALL DEPENDS
${CMAKE_SOURCE_DIR}/share/base.min.css
@@ -149,7 +151,14 @@
@@ -150,7 +152,14 @@
${CMAKE_SOURCE_DIR}/share/fancy.css
)

Expand Down
2 changes: 1 addition & 1 deletion pdf2htmlEX/patches/0.18.8.rc2/missing-tests.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- pdf2htmlEX/CMakeLists.txt 2020-08-19 23:43:25.000000000 +0300
+++ pdf2htmlEX/CMakeLists.txt 2023-11-14 03:29:50.860000000 +0200
@@ -179,8 +179,9 @@
@@ -180,8 +180,9 @@
file(MAKE_DIRECTORY ${PDF2HTMLEX_DATDIR})
file(MAKE_DIRECTORY ${PDF2HTMLEX_PNGDIR})
file(MAKE_DIRECTORY ${PDF2HTMLEX_OUTDIR})
Expand Down

0 comments on commit 2908dbe

Please sign in to comment.