{
 "app_id": "com.yacreader.YACReader",
 "source_url": "https://raw.githubusercontent.com/flathub/com.yacreader.YACReader/master/com.yacreader.YACReader.yml",
 "runtime": "org.kde.Platform",
 "runtime_version": "6.11",
 "sdk": "org.kde.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=fallback-x11",
  "--socket=wayland",
  "--device=dri",
  "--filesystem=home",
  "--filesystem=/media",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--filesystem=/mnt",
  "--filesystem=/run/media",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.kconfig.notify",
  "--talk-name=org.kde.KGlobalSettings",
  "--talk-name=org.kde.StatusNotifierWatcher"
 ],
 "module_count": 3,
 "fetched_at": "2026-09-17T16:09:11.255622+00:00",
 "manifest": {
  "app-id": "com.yacreader.YACReader",
  "runtime": "org.kde.Platform",
  "runtime-version": "6.11",
  "sdk": "org.kde.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.llvm22"
  ],
  "command": "YACReader",
  "finish-args": [
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=wayland",
   "--share=network",
   "--device=dri",
   "--filesystem=home",
   "--filesystem=/mnt",
   "--filesystem=/media",
   "--filesystem=/run/media",
   "--talk-name=org.kde.StatusNotifierWatcher"
  ],
  "rename-desktop-file": "YACReader.desktop",
  "rename-icon": "YACReader",
  "cleanup": [
   "/bin/gn",
   "/include",
   "/lib/cmake",
   "/lib/pkgconfig",
   "/lib/systemd",
   "/share/doc",
   "/share/man",
   "*.a",
   "*.la"
  ],
  "modules": [
   {
    "name": "yacreader",
    "buildsystem": "simple",
    "build-commands": [
     "cmake -B build -DCMAKE_BUILD_TYPE=Release -DDECOMPRESSION_BACKEND=libarchive -DPDF_BACKEND=pdfium -DCMAKE_INSTALL_PREFIX=/app",
     "cmake --build build --parallel 2",
     "cmake --install build"
    ],
    "post-install": [
     "mv \"$FLATPAK_DEST\"/share/applications/{YACReaderLibrary,com.yacreader.YACReader.YACReaderLibrary}.desktop",
     "mv \"$FLATPAK_DEST\"/share/icons/hicolor/scalable/apps/{YACReaderLibrary,com.yacreader.YACReader.YACReaderLibrary}.svg",
     "desktop-file-edit --set-icon=com.yacreader.YACReader.YACReaderLibrary \"$FLATPAK_DEST\"/share/applications/com.yacreader.YACReader.YACReaderLibrary.desktop",
     "install -D -m644 com.yacreader.YACReader.appdata.xml \"$FLATPAK_DEST\"/share/metainfo/com.yacreader.YACReader.appdata.xml"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/YACReader/yacreader.git",
      "tag": "10.3.0"
     },
     {
      "type": "file",
      "path": "com.yacreader.YACReader.appdata.xml"
     }
    ],
    "modules": [
     {
      "name": "pdfium",
      "buildsystem": "simple",
      "build-commands": [
       "sed -i -e 's/component(/static_library(/' -e 's/is_component_build(/false/' pdfium/third_party/abseil-cpp/BUILD.gn",
       "mkdir -p pdfium/third_party/icu",
       "ln -sf ../../build/linux/unbundle/icu.gn pdfium/third_party/icu/BUILD.gn",
       "mkdir -p pdfium/tools/generate_shim_headers",
       "base64 --decode generate_shim_headers.py > pdfium/tools/generate_shim_headers/generate_shim_headers.py",
       "touch pdfium/build/config/gclient_args.gni",
       "echo \"build_with_chromium = false\" > \"pdfium/build/config/gclient_args.gni\"",
       "sed -i '/\"\\/\\/third_party\\/test_fonts\",/s/^/#/g' pdfium/testing/BUILD.gn",
       "sed -i 's/\"aarch64-linux-gnu-\"/\"\"/g' pdfium/build/toolchain/linux/BUILD.gn",
       "sed -i 's/\"-mno-outline\"/\"-mno-outline-atomics\"/g' pdfium/build/config/compiler/BUILD.gn",
       "gn --root=pdfium gen pdfium/out/Release --args=\"is_clang=false use_sysroot=false is_debug=false symbol_level=0 pdf_enable_v8=false pdf_enable_xfa=false treat_warnings_as_errors=false use_system_libjpeg=true use_system_zlib=true pdf_bundle_freetype=false use_system_freetype=true use_system_lcms2=true use_system_libpng=true use_custom_libcxx=false pdf_is_standalone=true use_system_libopenjpeg2=true is_component_build=true pdf_use_partition_alloc=false use_system_harfbuzz = true\"",
       "ninja -C pdfium/out/Release pdfium",
       "sed -e 's/@VERSION@/6167/g' -e 's#^\\s*prefix\\s*=.*$#prefix='\"$FLATPAK_DEST\"'#' -i libpdfium.pc",
       "install -D -m644 pdfium/LICENSE \"$FLATPAK_DEST/share/licenses/pdfium/LICENSE\"",
       "install -D pdfium/public/*.h --target-directory=\"$FLATPAK_DEST/include/pdfium\"",
       "install -D pdfium/public/cpp/* --target-directory=\"$FLATPAK_DEST/include/pdfium/cpp\"",
       "install -D pdfium/docs/* --target-directory=\"$FLATPAK_DEST/share/doc/pdfium\"",
       "install -Dm755 pdfium/out/Release/libpdfium.so --target-directory=\"$FLATPAK_DEST/lib\"",
       "install -Dm644 libpdfium.pc --target-directory=\"$FLATPAK_DEST/lib/pkgconfig\""
      ],
      "sources": [
       {
        "type": "git",
        "url": "https://pdfium.googlesource.com/pdfium",
        "commit": "c052afb72a08d79a26bcf3103d11f344981b09f1",
        "dest": "pdfium"
       },
       {
        "type": "git",
        "url": "https://chromium.googlesource.com/chromium/src/build.git",
        "commit": "8a46ede8ea86151737d9c284f82d238b3c701fa7",
        "dest": "pdfium/build"
       },
       {
        "type": "git",
        "url": "https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp",
        "commit": "5e42a36a85a252d8cdee6c39661d2bfd9883fd5c",
        "dest": "pdfium/third_party/abseil-cpp"
       },
       {
        "type": "git",
        "url": "https://chromium.googlesource.com/chromium/src/third_party/simdutf",
        "commit": "f7356eed293f8208c40b3c1b344a50bd70971983",
        "dest": "pdfium/third_party/simdutf"
       },
       {
        "type": "file",
        "url": "https://chromium.googlesource.com/chromium/src/+/main/tools/generate_shim_headers/generate_shim_headers.py?format=TEXT",
        "dest-filename": "generate_shim_headers.py",
        "sha256": "c405eb998cc9c27d724c945f3db8a7b9d2be62ac38049301f4f52929f734b5a9"
       },
       {
        "type": "file",
        "url": "https://aur.archlinux.org/cgit/aur.git/plain/libpdfium.pc?h=libpdfium-nojs",
        "dest-filename": "libpdfium.pc",
        "sha256": "4e8cf32c09568ae4c59244f0a221eee8f87ea4a31ddb31f796a1d818c967d477"
       },
       {
        "type": "git",
        "url": "https://github.com/fastfloat/fast_float",
        "tag": "v8.2.10",
        "dest": "pdfium/third_party/fast_float/src"
       }
      ],
      "modules": [
       {
        "name": "gn",
        "buildsystem": "simple",
        "build-options": {
         "append-path": "/usr/lib/sdk/llvm22/bin",
         "prepend-ld-library-path": "/usr/lib/sdk/llvm22/lib"
        },
        "build-commands": [
         "./build/gen.py",
         "ninja -C out gn",
         "install -Dm755 out/gn \"$FLATPAK_DEST/bin/gn\""
        ],
        "sources": [
         {
          "type": "git",
          "url": "https://gn.googlesource.com/gn",
          "commit": "9ece3f5254c273cb46606a6571963f931c3b012d",
          "disable-shallow-clone": true
         }
        ]
       }
      ]
     }
    ]
   }
  ]
 }
}