From 2908dbe95667682ab0b342728b7bf95edda0b19b Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Wed, 27 Dec 2023 06:36:46 +0200 Subject: [PATCH] Fix line numbers and whitespace in pdf2htmlEX patches --- pdf2htmlEX/build.gradle.kts | 4 +-- pdf2htmlEX/patches/0.18.8.rc1/cflags.patch | 6 ++--- .../patches/0.18.8.rc1/find-libraries.patch | 26 +++++++++---------- .../patches/0.18.8.rc1/make-a-library.patch | 8 +++--- .../patches/0.18.8.rc1/missing-tests.patch | 2 +- pdf2htmlEX/patches/0.18.8.rc2/cflags.patch | 2 +- .../patches/0.18.8.rc2/make-a-library.patch | 6 ++--- .../patches/0.18.8.rc2/missing-tests.patch | 2 +- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pdf2htmlEX/build.gradle.kts b/pdf2htmlEX/build.gradle.kts index 426704e..4b1efde 100644 --- a/pdf2htmlEX/build.gradle.kts +++ b/pdf2htmlEX/build.gradle.kts @@ -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) diff --git a/pdf2htmlEX/patches/0.18.8.rc1/cflags.patch b/pdf2htmlEX/patches/0.18.8.rc1/cflags.patch index b451dfc..8640ff8 100644 --- a/pdf2htmlEX/patches/0.18.8.rc1/cflags.patch +++ b/pdf2htmlEX/patches/0.18.8.rc1/cflags.patch @@ -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") diff --git a/pdf2htmlEX/patches/0.18.8.rc1/find-libraries.patch b/pdf2htmlEX/patches/0.18.8.rc1/find-libraries.patch index 41ae4a7..cf9e73b 100644 --- a/pdf2htmlEX/patches/0.18.8.rc1/find-libraries.patch +++ b/pdf2htmlEX/patches/0.18.8.rc1/find-libraries.patch @@ -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( @@ -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 @@ -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...") @@ -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( @@ -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} @@ -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") diff --git a/pdf2htmlEX/patches/0.18.8.rc1/make-a-library.patch b/pdf2htmlEX/patches/0.18.8.rc1/make-a-library.patch index 165420a..09c3549 100644 --- a/pdf2htmlEX/patches/0.18.8.rc1/make-a-library.patch +++ b/pdf2htmlEX/patches/0.18.8.rc1/make-a-library.patch @@ -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") @@ -46,7 +46,7 @@ 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 @@ -54,7 +54,7 @@ src/pdf2htmlEX-config.h src/HTMLRenderer/HTMLRenderer.h src/HTMLRenderer/draw.cc -@@ -149,8 +129,11 @@ +@@ -148,8 +126,11 @@ src/TmpFiles.cc ) @@ -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 ) diff --git a/pdf2htmlEX/patches/0.18.8.rc1/missing-tests.patch b/pdf2htmlEX/patches/0.18.8.rc1/missing-tests.patch index 0eaab19..0d2b719 100644 --- a/pdf2htmlEX/patches/0.18.8.rc1/missing-tests.patch +++ b/pdf2htmlEX/patches/0.18.8.rc1/missing-tests.patch @@ -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}) diff --git a/pdf2htmlEX/patches/0.18.8.rc2/cflags.patch b/pdf2htmlEX/patches/0.18.8.rc2/cflags.patch index 43480fa..e8c9428 100644 --- a/pdf2htmlEX/patches/0.18.8.rc2/cflags.patch +++ b/pdf2htmlEX/patches/0.18.8.rc2/cflags.patch @@ -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) diff --git a/pdf2htmlEX/patches/0.18.8.rc2/make-a-library.patch b/pdf2htmlEX/patches/0.18.8.rc2/make-a-library.patch index 5f7333b..f500909 100644 --- a/pdf2htmlEX/patches/0.18.8.rc2/make-a-library.patch +++ b/pdf2htmlEX/patches/0.18.8.rc2/make-a-library.patch @@ -1,6 +1,6 @@ --- 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 @@ -8,7 +8,7 @@ src/pdf2htmlEX-config.h src/HTMLRenderer/HTMLRenderer.h src/HTMLRenderer/draw.cc -@@ -123,8 +122,11 @@ +@@ -124,8 +123,11 @@ src/TmpFiles.cc ) @@ -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 ) diff --git a/pdf2htmlEX/patches/0.18.8.rc2/missing-tests.patch b/pdf2htmlEX/patches/0.18.8.rc2/missing-tests.patch index c7df9b5..48c7882 100644 --- a/pdf2htmlEX/patches/0.18.8.rc2/missing-tests.patch +++ b/pdf2htmlEX/patches/0.18.8.rc2/missing-tests.patch @@ -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})