Revert "pdf2htmlex: init at 0.18.8.rc1" (#442351)

authored by Emily and committed by GitHub cbfb432e 7f027734

-342
-16
pkgs/by-name/pd/pdf2htmlex/0001-fix-apple-sdk-iconv.patch
··· 1 - diff --git a/pdf2htmlEX/CMakeLists.txt b/pdf2htmlEX/CMakeLists.txt 2 - index b5cb520..dad760e 100644 3 - --- a/pdf2htmlEX/CMakeLists.txt 4 - +++ b/pdf2htmlEX/CMakeLists.txt 5 - @@ -227,6 +227,11 @@ set(PDF2HTMLEX_SRC ${PDF2HTMLEX_SRC} 6 - add_executable(pdf2htmlEX ${PDF2HTMLEX_SRC}) 7 - target_link_libraries(pdf2htmlEX ${PDF2HTMLEX_LIBS}) 8 - 9 - +if(APPLE) 10 - + target_link_libraries(pdf2htmlEX PRIVATE iconv) 11 - + target_link_libraries(pdf2htmlEX PRIVATE "-framework CoreServices" "-framework CoreFoundation") 12 - +endif() 13 - + 14 - add_custom_target(pdf2htmlEX_resources ALL DEPENDS 15 - ${CMAKE_SOURCE_DIR}/share/base.min.css 16 - ${CMAKE_SOURCE_DIR}/share/fancy.min.css
···
-16
pkgs/by-name/pd/pdf2htmlex/0002-include-glib.patch
··· 1 - diff --git a/pdf2htmlEX/CMakeLists.txt b/pdf2htmlEX/CMakeLists.txt 2 - index dad760e..767992e 100644 3 - --- a/pdf2htmlEX/CMakeLists.txt 4 - +++ b/pdf2htmlEX/CMakeLists.txt 5 - @@ -232,6 +232,11 @@ if(APPLE) 6 - target_link_libraries(pdf2htmlEX PRIVATE "-framework CoreServices" "-framework CoreFoundation") 7 - endif() 8 - 9 - +pkg_check_modules(GLIB REQUIRED glib-2.0 gio-2.0 gobject-2.0) 10 - +target_include_directories(pdf2htmlEX PRIVATE ${GLIB_INCLUDE_DIRS}) 11 - +link_directories(${GLIB_LIBRARY_DIRS}) 12 - +target_link_libraries(pdf2htmlEX PRIVATE ${GLIB_LIBRARIES}) 13 - + 14 - add_custom_target(pdf2htmlEX_resources ALL DEPENDS 15 - ${CMAKE_SOURCE_DIR}/share/base.min.css 16 - ${CMAKE_SOURCE_DIR}/share/fancy.min.css
···
-107
pkgs/by-name/pd/pdf2htmlex/fontforge.nix
··· 1 - { 2 - lib, 3 - stdenv, 4 - fetchFromGitHub, 5 - fetchpatch, 6 - cmake, 7 - pkg-config, 8 - freetype, 9 - glib, 10 - libjpeg, 11 - libpng, 12 - libxml2, 13 - uthash, 14 - zeromq, 15 - zlib, 16 - fontforge, 17 - }: 18 - 19 - stdenv.mkDerivation (finalAttrs: { 20 - pname = "fontforge"; 21 - # Follow https://github.com/pdf2htmlEX/pdf2htmlEX/blob/v0.18.8.rc1/buildScripts/versionEnvs 22 - version = "20200314"; 23 - 24 - src = fetchFromGitHub { 25 - owner = "fontforge"; 26 - repo = "fontforge"; 27 - tag = finalAttrs.version; 28 - hash = "sha256-QygbZVJLel+QKTdJSO2hIzA1JgcUDsOOF67O35t4uxw="; 29 - }; 30 - 31 - patches = [ 32 - # Unreleased fix for https://github.com/fontforge/fontforge/issues/4229 33 - # which is required to fix an uninterposated `${CMAKE_INSTALL_PREFIX}/lib`, see 34 - # see https://github.com/nh2/static-haskell-nix/pull/98#issuecomment-665395399 35 - # TODO: Remove https://github.com/fontforge/fontforge/pull/4232 is in a release. 36 - (fetchpatch { 37 - name = "fontforge-cmake-set-rpath-to-the-configure-time-CMAKE_INSTALL_PREFIX"; 38 - url = "https://github.com/fontforge/fontforge/commit/297ee9b5d6db5970ca17ebe5305189e79a1520a1.patch"; 39 - hash = "sha256-E8/SsYytYLE4pmDpQBULjCILu2FWYEhW/H8DyC+6DpM="; 40 - }) 41 - ]; 42 - 43 - # https://github.com/fontforge/fontforge/issues/5251 44 - postPatch = '' 45 - rm -fv po/{fr,it}.po 46 - substituteInPlace po/LINGUAS \ 47 - --replace-fail "fr" "" \ 48 - --replace-fail "it" "" 49 - ''; 50 - 51 - nativeBuildInputs = [ 52 - cmake 53 - pkg-config 54 - ]; 55 - 56 - buildInputs = [ 57 - freetype 58 - glib 59 - libjpeg 60 - libpng 61 - libxml2 62 - uthash 63 - zeromq 64 - zlib 65 - ]; 66 - 67 - # Follow https://github.com/pdf2htmlEX/pdf2htmlEX/blob/v0.18.8.rc1/buildScripts/buildFontforge 68 - cmakeFlags = with lib; [ 69 - (cmakeBool "BUILD_SHARED_LIBS" false) 70 - (cmakeBool "ENABLE_GUI" false) 71 - (cmakeBool "ENABLE_X11" false) 72 - (cmakeBool "ENABLE_NATIVE_SCRIPTING" true) 73 - (cmakeBool "ENABLE_PYTHON_SCRIPTING" false) 74 - (cmakeBool "ENABLE_PYTHON_EXTENSION" false) 75 - (cmakeBool "ENABLE_LIBSPIRO" false) 76 - (cmakeBool "ENABLE_LIBUNINAMESLIST" false) 77 - (cmakeBool "ENABLE_LIBGIF" false) 78 - (cmakeBool "ENABLE_LIBJPEG" true) 79 - (cmakeBool "ENABLE_LIBPNG" true) 80 - (cmakeBool "ENABLE_LIBREADLINE" false) 81 - (cmakeBool "ENABLE_LIBTIFF" false) 82 - (cmakeBool "ENABLE_WOFF2" false) 83 - (cmakeBool "ENABLE_DOCS" false) 84 - (cmakeBool "ENABLE_CODE_COVERAGE" false) 85 - (cmakeBool "ENABLE_DEBUG_RAW_POINTS" false) 86 - (cmakeBool "ENABLE_FONTFORGE_EXTRAS" false) 87 - (cmakeBool "ENABLE_MAINTAINER_TOOLS" false) 88 - (cmakeBool "ENABLE_TILE_PATH" false) 89 - (cmakeBool "ENABLE_WRITE_PFM" false) 90 - (cmakeFeature "ENABLE_SANITIZER" "none") 91 - (cmakeFeature "ENABLE_FREETYPE_DEBUGGER" "") 92 - (cmakeBool "SPHINX_USE_VENV" false) 93 - (cmakeFeature "REAL_TYPE" "double") 94 - (cmakeFeature "THEME" "tango") 95 - ]; 96 - 97 - postInstall = '' 98 - install -Dvm644 -t $out/lib/ ./lib/libfontforge.a 99 - install -Dvm644 -t $out/include/ ./inc/*.h 100 - ''; 101 - 102 - meta = fontforge.meta // { 103 - maintainers = with lib.maintainers; [ 104 - Cryolitia 105 - ]; 106 - }; 107 - })
···
-104
pkgs/by-name/pd/pdf2htmlex/package.nix
··· 1 - { 2 - lib, 3 - stdenv, 4 - callPackage, 5 - fetchFromGitLab, 6 - fetchgit, 7 - cmake, 8 - jdk17, 9 - pkg-config, 10 - cairo, 11 - expat, 12 - fontconfig, 13 - freetype, 14 - glib, 15 - libjpeg, 16 - libpng, 17 - libxml2, 18 - xorg, 19 - }: 20 - let 21 - poppler = callPackage ./poppler.nix { }; 22 - poppler-data = fetchFromGitLab { 23 - domain = "gitlab.freedesktop.org"; 24 - owner = "poppler"; 25 - repo = "poppler-data"; 26 - tag = "POPPLER_DATA_0_4_9"; 27 - hash = "sha256-sNvIgxXXLuTe7JWs67Z+fv4r4smLPKpDu83fvRYoasQ="; 28 - }; 29 - fontforge = callPackage ./fontforge.nix { }; 30 - in 31 - stdenv.mkDerivation (finalAttrs: { 32 - pname = "pdf2htmlex"; 33 - version = "0.18.8.rc1"; 34 - 35 - src = fetchgit { 36 - url = "https://github.com/pdf2htmlEX/pdf2htmlex.git"; 37 - rev = "v${finalAttrs.version}"; 38 - hash = "sha256-ylLDLheRUy1hAxVneF1HQwDnGTWko0SE3G1M9SFCr9w="; 39 - }; 40 - 41 - patches = [ 42 - ./0001-fix-apple-sdk-iconv.patch 43 - ./0002-include-glib.patch 44 - ]; 45 - 46 - # The pdf2htmlEX needs lots of private headers from poppler and fontforge, 47 - # it also needs the static libraries. 48 - postUnpack = '' 49 - pushd pdf2htmlex 50 - 51 - install -Dvm644 -t ./poppler/build/poppler/glib ${poppler}/include/poppler/glib/*.h 52 - install -Dvm644 -t ./poppler/poppler/ ${poppler}/include/poppler/*.h 53 - install -Dvm644 -t ./poppler/poppler/ ${poppler.src}/poppler/*.h 54 - install -Dvm644 -t ./poppler/fofi/ ${poppler.src}/fofi/*.h 55 - install -Dvm644 -t ./poppler/goo/ ${poppler.src}/goo/*.h 56 - install -Dvm644 -t ./poppler/splash/ ${poppler.src}/splash/*.h 57 - install -Dvm644 -t ./poppler/build/ ${poppler}/lib/libpoppler.a 58 - install -Dvm644 -t ./poppler/build/glib/ ${poppler}/lib/libpoppler-glib.a 59 - 60 - cp -rv ${poppler-data} poppler-data 61 - 62 - install -Dvm644 -t ./fontforge/inc/ ${fontforge}/include/*.h 63 - install -Dvm644 -t ./fontforge/inc/ ${fontforge.src}/inc/*.h 64 - install -Dvm644 -t ./fontforge/fontforge/ ${fontforge.src}/fontforge/*.h 65 - install -Dvm644 -t ./fontforge/build/lib/ ${fontforge}/lib/libfontforge.a 66 - 67 - popd 68 - ''; 69 - 70 - preConfigure = '' 71 - cd pdf2htmlEX 72 - ''; 73 - 74 - buildInputs = [ 75 - cairo 76 - expat 77 - fontconfig 78 - freetype 79 - glib 80 - libjpeg 81 - libpng 82 - libxml2 83 - xorg.libXdmcp 84 - ]; 85 - 86 - nativeBuildInputs = [ 87 - cmake 88 - jdk17 89 - pkg-config 90 - ]; 91 - 92 - cmakeFlags = [ 93 - (lib.cmakeFeature "CMAKE_INSTALL_RPATH" (lib.makeLibraryPath [ freetype ])) 94 - ]; 95 - 96 - meta = { 97 - description = "Convert PDF to HTML"; 98 - homepage = "https://github.com/pdf2htmlEX/pdf2htmlEX"; 99 - license = lib.licenses.gpl3Plus; 100 - platforms = with lib.platforms; (linux ++ darwin); 101 - maintainers = with lib.maintainers; [ Cryolitia ]; 102 - mainProgram = "pdf2htmlEX"; 103 - }; 104 - })
···
-12
pkgs/by-name/pd/pdf2htmlex/poppler-private.patch
··· 1 - From: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=pdf2htmlex 2 - --- a/glib/poppler-private.h 2020-05-28 05:23:59.000000000 +0800 3 - +++ b/glib/poppler-private.h 2022-06-07 21:57:01.848597082 +0800 4 - @@ -154,7 +154,7 @@ 5 - GType \ 6 - type_name##_get_type (void) \ 7 - { \ 8 - - static volatile gsize g_define_type_id__volatile = 0; \ 9 - + static gsize g_define_type_id__volatile = 0; \ 10 - if (g_once_init_enter (&g_define_type_id__volatile)) { \ 11 - GType g_define_type_id = \ 12 - g_boxed_type_register_static (g_intern_static_string (#TypeName), \
···
-87
pkgs/by-name/pd/pdf2htmlex/poppler.nix
··· 1 - { 2 - lib, 3 - stdenv, 4 - fetchFromGitLab, 5 - poppler, 6 - cmake, 7 - pkg-config, 8 - cairo, 9 - curl, 10 - fontconfig, 11 - freetype, 12 - lcms, 13 - libjpeg, 14 - openjpeg, 15 - zlib, 16 - }: 17 - 18 - stdenv.mkDerivation (finalAttrs: { 19 - pname = "poppler-${finalAttrs.version}-static"; 20 - # Follow https://github.com/pdf2htmlEX/pdf2htmlEX/blob/v0.18.8.rc1/buildScripts/versionEnvs#L11 21 - version = "0.89.0"; 22 - 23 - src = fetchFromGitLab { 24 - domain = "gitlab.freedesktop.org"; 25 - owner = "poppler"; 26 - repo = "poppler"; 27 - tag = "poppler-${finalAttrs.version}"; 28 - hash = "sha256-I6hapmimQSueU+mcaH/RBtWENPqNeM9cMSZ139Q4j70="; 29 - }; 30 - 31 - patches = [ 32 - ./poppler-private.patch 33 - ]; 34 - 35 - buildInputs = [ 36 - cairo 37 - curl 38 - fontconfig 39 - freetype 40 - lcms 41 - libjpeg 42 - openjpeg 43 - zlib 44 - ]; 45 - 46 - nativeBuildInputs = [ 47 - cmake 48 - pkg-config 49 - ]; 50 - 51 - # Follow https://github.com/pdf2htmlEX/pdf2htmlEX/blob/v0.18.8.rc1/buildScripts/buildPoppler 52 - cmakeFlags = with lib; [ 53 - (cmakeBool "ENABLE_UNSTABLE_API_ABI_HEADERS" false) 54 - (cmakeBool "ENABLE_SPLASH" true) 55 - (cmakeBool "ENABLE_UTILS" false) 56 - (cmakeBool "ENABLE_CPP" false) 57 - (cmakeBool "ENABLE_GLIB" true) 58 - (cmakeBool "ENABLE_GOBJECT_INTROSPECTION" false) 59 - (cmakeBool "ENABLE_GTK_DOC" false) 60 - (cmakeBool "ENABLE_QT5" false) 61 - (cmakeFeature "ENABLE_LIBOPENJPEG" "none") 62 - (cmakeFeature "ENABLE_CMS" "none") 63 - (cmakeFeature "ENABLE_DCTDECODER" "libjpeg") 64 - (cmakeBool "ENABLE_LIBCURL" false) 65 - (cmakeBool "ENABLE_ZLIB" true) 66 - (cmakeBool "ENABLE_ZLIB_UNCOMPRESS" false) 67 - (cmakeBool "USE_FLOAT" false) 68 - (cmakeBool "BUILD_SHARED_LIBS" false) 69 - (cmakeBool "RUN_GPERF_IF_PRESENT" false) 70 - (cmakeBool "EXTRA_WARN" false) 71 - (cmakeBool "WITH_JPEG" true) 72 - (cmakeBool "WITH_PNG" true) 73 - (cmakeBool "WITH_TIFF" false) 74 - (cmakeBool "WITH_NSS3" false) 75 - (cmakeBool "WITH_Cairo" true) 76 - ]; 77 - 78 - postInstall = '' 79 - cp -rv poppler/* $out/include/poppler/ 80 - ''; 81 - 82 - meta = poppler.meta // { 83 - maintainers = with lib.maintainers; [ 84 - Cryolitia 85 - ]; 86 - }; 87 - })
···