{
 "app_id": "org.tug.texworks",
 "source_url": "https://raw.githubusercontent.com/flathub/org.tug.texworks/master/org.tug.texworks.yaml",
 "runtime": "org.kde.Platform",
 "runtime_version": "6.11",
 "sdk": "org.kde.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=fallback-x11",
  "--socket=wayland",
  "--device=dri",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--filesystem=host",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.kconfig.notify",
  "--talk-name=org.kde.KGlobalSettings"
 ],
 "module_count": 9,
 "fetched_at": "2026-09-17T16:16:52.152062+00:00",
 "manifest": {
  "app-id": "org.tug.texworks",
  "runtime": "org.kde.Platform",
  "runtime-version": "6.11",
  "sdk": "org.kde.Sdk",
  "command": "texworks",
  "rename-icon": "TeXworks",
  "finish-args": [
   "--socket=wayland",
   "--socket=fallback-x11",
   "--share=ipc",
   "--device=dri",
   "--filesystem=host",
   "--env=TEXMFVAR=$XDG_CACHE_HOME",
   "--env=PATH=/app/texlive/bin/x86_64-linux:/app/texlive/bin/aarch64-linux:/app/bin:/usr/bin",
   "--env=LD_LIBRARY_PATH=/app/texlive/lib:/app/texlive/lib/perl5/5.40.1/x86_64-linux/CORE",
   "--env=PERL5LIB=/app/texlive/lib/perl5/5.40.1:/app/texlive/lib/perl5/site_perl/5.40.1"
  ],
  "add-extensions": {
   "org.freedesktop.Sdk.Extension.texlive": {
    "version": "25.08",
    "directory": "texlive",
    "no-autodownload": true
   }
  },
  "cleanup": [
   "/include",
   "/lib/cmake",
   "/lib/pkgconfig",
   "/share/man",
   "*.la",
   "*.a"
  ],
  "modules": [
   "shared-modules/lua5.4/lua-5.4.json",
   {
    "name": "boost",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/boostorg/boost/releases/download/boost-1.92.0/boost-1.92.0-b2-nodocs.tar.xz",
      "sha256": "ea7b982002cc9dfbe59b0b217b206f470dc75f3de0bb2973d844118934d82411",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 6845,
       "stable-only": true,
       "url-template": "https://github.com/boostorg/boost/releases/download/boost-$version/boost-$version-b2-nodocs.tar.xz"
      }
     }
    ],
    "buildsystem": "simple",
    "build-commands": [
     "./bootstrap.sh --prefix=/app --with-libraries=system",
     "./b2 install"
    ]
   },
   {
    "name": "poppler",
    "sources": [
     {
      "type": "archive",
      "url": "https://poppler.freedesktop.org/poppler-26.08.0.tar.xz",
      "sha256": "dc906e68cea698109706ac6aa3d2c9d4512fcfcac42d90b8afcda486d1b9abd0",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 3686,
       "stable-only": true,
       "url-template": "https://poppler.freedesktop.org/poppler-$version.tar.xz"
      }
     }
    ],
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DENABLE_UTILS=OFF",
     "-DENABLE_CPP=OFF",
     "-DENABLE_GLIB=OFF",
     "-DENABLE_GOBJECT_INTROSPECTION=OFF",
     "-DENABLE_QT5=OFF"
    ],
    "cleanup": [
     "/bin"
    ]
   },
   {
    "name": "poppler-data",
    "sources": [
     {
      "type": "archive",
      "url": "https://poppler.freedesktop.org/poppler-data-0.4.12.tar.gz",
      "sha256": "c835b640a40ce357e1b83666aabd95edffa24ddddd49b8daff63adb851cdab74",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 3687,
       "stable-only": true,
       "url-template": "https://poppler.freedesktop.org/poppler-data-$version.tar.gz"
      }
     }
    ],
    "buildsystem": "simple",
    "build-commands": [
     "make prefix=/app install"
    ],
    "cleanup": [
     "/share/pkgconfig"
    ]
   },
   {
    "name": "hunspell",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/hunspell/hunspell/archive/v1.7.3.tar.gz",
      "sha256": "933be3dac6fd55f6e752331a170efb7e33800e40fae1156d8434cc8c85379a1b",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 1343,
       "stable-only": true,
       "url-template": "https://github.com/hunspell/hunspell/archive/v$version.tar.gz"
      }
     }
    ],
    "buildsystem": "simple",
    "build-commands": [
     "autoreconf -vfi",
     "./configure --prefix=/app",
     "make -j $FLATPAK_BUILDER_N_JOBS",
     "make install"
    ],
    "cleanup": [
     "/bin"
    ]
   },
   {
    "name": "libreoffice-dictionaries",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/LibreOffice/dictionaries/archive/refs/tags/libreoffice-26.8.0.2.tar.gz",
      "sha256": "e10e2f30c52ef57e3b1ee573c18f2327d2c670a7efcb540a9289591468f559bb"
     }
    ],
    "buildsystem": "simple",
    "build-commands": [
     "for LANG in af ar ca cs de en es fr it nl pl pt ru sl tr; do for DIC in $(find . -iname \"${LANG}*.dic\"); do AFF=\"$(dirname \"${DIC}\")/$(basename \"${DIC}\" \".dic\").aff\"; if [ ! -f \"${AFF}\" ]; then continue; fi; echo \"Installing $(basename ${DIC} .dic)\"; install -D -t /app/share/hunspell \"${DIC}\"; install -D -t /app/share/hunspell \"${AFF}\"; done; done"
    ]
   },
   {
    "name": "texlive-mountpoint",
    "buildsystem": "simple",
    "build-commands": [
     "mkdir -p /app/texlive"
    ]
   },
   {
    "name": "manual",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/TeXworks/manual/releases/download/2024-02-09/TeXworks-manual-html-20240209214359-496ef4a.zip",
      "sha256": "4eb722d214068b38972d1da176db4496d27ca1ca8dd995619d5833cae4b83e9e"
     }
    ],
    "buildsystem": "simple",
    "build-commands": [
     "install -d /app/share/doc/texworks-help",
     "cp -ra * /app/share/doc/texworks-help"
    ]
   },
   {
    "name": "texworks",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/TeXworks/texworks.git",
      "tag": "release-0.6.11",
      "commit": "7951fd8b942b083d937f8d6019826eca94461dc5"
     },
     {
      "type": "patch",
      "path": "appdata.patch"
     }
    ],
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DTW_BUILD_ID=flatpak",
     "-DTeXworks_DIC_DIR=/app/share/hunspell",
     "-DQT_DEFAULT_MAJOR_VERSION=6"
    ]
   }
  ]
 }
}