summaryrefslogtreecommitdiff
path: root/debian/patches/allow-old-libfontforge
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/allow-old-libfontforge')
-rw-r--r--debian/patches/allow-old-libfontforge88
1 files changed, 0 insertions, 88 deletions
diff --git a/debian/patches/allow-old-libfontforge b/debian/patches/allow-old-libfontforge
deleted file mode 100644
index 5b50707..0000000
--- a/debian/patches/allow-old-libfontforge
+++ /dev/null
@@ -1,88 +0,0 @@
-From: 王璐 Lu Wang <coolwanglu@gmail.com>
-Subject: reverting commit: remove support for old versions of fontforge
-Origin: upstream, https://github.com/coolwanglu/pdf2htmlEX/commit/15ac5271a72ad2fff36f4b91697e0335a00bd9b1
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -54,10 +54,66 @@ if(ENABLE_SVG)
- endif()
-
- # fontforge starts using pkg-config 'correctly' since 2.0.0
--pkg_check_modules(FONTFORGE REQUIRED libfontforge>=2.0.0)
--include_directories(${FONTFORGE_INCLUDE_DIRS})
--link_directories(${FONTFORGE_LIBRARY_DIRS})
--set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${FONTFORGE_LIBRARIES})
-+pkg_check_modules(FONTFORGE libfontforge>=2.0.0)
-+if(FONTFORGE_FOUND)
-+ include_directories(${FONTFORGE_INCLUDE_DIRS})
-+ link_directories(${FONTFORGE_LIBRARY_DIRS})
-+ set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${FONTFORGE_LIBRARIES})
-+else()
-+ message("Trying to locate old versions of fontforge...")
-+ find_path(FF_INCLUDE_PATH fontforge/fontforge.h)
-+ if(FF_INCLUDE_PATH)
-+ message("Found fontforge.h: ${FF_INCLUDE_PATH}/fontforge/fontforge.h")
-+ set(FONTFORGE_INCLUDE_DIRS ${FF_INCLUDE_PATH}/fontforge)
-+ include_directories(${FONTFORGE_INCLUDE_DIRS})
-+ # MacOSX gettext is in /opt/local/include - strange
-+ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-+ find_path(GETTEXT_INCLUDE_PATH libintl.h HINTS "/usr/local/opt/gettext/include") # homebrew
-+ if(GETTEXT_INCLUDE_PATH)
-+ include_directories(${GETTEXT_INCLUDE_PATH})
-+ else()
-+ message("Cannot found libintl.h, if you see errors about libintl.h, add the path to gettext header files into your include paths")
-+ endif()
-+ endif()
-+ else()
-+ message(FATAL_ERROR "Error: cannot locate fontforge.h")
-+ endif()
-+ find_path(FF_CONFIG_INCLUDE_PATH config.h PATHS ${FONTFORGE_INCLUDE_DIRS} NO_DEFAULT_PATH)
-+ if(FF_CONFIG_INCLUDE_PATH)
-+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${FF_CONFIG_INCLUDE_PATH}/config.h")
-+ message("Found config.h: ${FF_CONFIG_INCLUDE_PATH}/config.h")
-+ else()
-+ message("Cannot locate config.h for fontforge")
-+ endif()
-+
-+ macro(wl_find_library LIB_NAME RESULT)
-+ unset(${RESULT})
-+ unset(${RESULT} CACHE)
-+ foreach(FULL_LIB_NAME
-+ ${CMAKE_IMPORT_LIBRARY_PREFIX}${LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}
-+ ${CMAKE_SHARED_LIBRARY_PREFIX}${LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
-+ ${CMAKE_STATIC_LIBRARY_PREFIX}${LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
-+ )
-+ find_library(FULL_LIB ${FULL_LIB_NAME})
-+ if(FULL_LIB)
-+ message("Found ${LIB_NAME}: ${FULL_LIB}")
-+ set(${RESULT} ${FULL_LIB})
-+ break()
-+ endif()
-+ endforeach()
-+ unset(FULL_LIB_NAME)
-+ unset(FULL_LIB_NAME CACHE)
-+ unset(FULL_LIB)
-+ unset(FULL_LIB CACHE)
-+ endmacro()
-+
-+ wl_find_library(fontforge FONTFORGE_LIBRARIES)
-+ if(NOT DEFINED FONTFORGE_LIBRARIES)
-+ set(FONTFORGE_LIBRARIES fontforge)
-+ message("Error: cannot locate fontforge")
-+ endif()
-+ set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${FONTFORGE_LIBRARIES})
-+endif()
-
- # debug build flags (overwrite default cmake debug flags)
- set(CMAKE_C_FLAGS_DEBUG "-ggdb -pg")
---- a/src/util/ffw.c
-+++ b/src/util/ffw.c
-@@ -99,7 +99,7 @@ void ffw_finalize(void)
-
- long ffw_get_version(void)
- {
-- return FONTFORGE_VERSIONDATE_RAW;
-+ return library_version_configuration.library_source_versiondate;
- }
-
- void ffw_new_font()