{
 "app_id": "com.kristianduske.TrenchBroom",
 "source_url": "https://raw.githubusercontent.com/flathub/com.kristianduske.TrenchBroom/master/com.kristianduske.TrenchBroom.json",
 "runtime": "org.kde.Platform",
 "runtime_version": "6.9",
 "sdk": "org.kde.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=fallback-x11",
  "--socket=wayland",
  "--device=dri",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--filesystem=host",
  "--filesystem=xdg-run/gvfs",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.kconfig.notify",
  "--talk-name=org.kde.KGlobalSettings",
  "--talk-name=org.kde.kdeconnect"
 ],
 "module_count": 12,
 "fetched_at": "2026-09-17T16:08:12.246871+00:00",
 "manifest": {
  "id": "com.kristianduske.TrenchBroom",
  "runtime": "org.kde.Platform",
  "runtime-version": "6.9",
  "sdk": "org.kde.Sdk",
  "command": "trenchbroom",
  "rename-icon": "trenchbroom",
  "rename-mime-file": "trenchbroom.xml",
  "rename-desktop-file": "trenchbroom.desktop",
  "finish-args": [
   "--device=dri",
   "--env=TMPDIR=/var/tmp",
   "--filesystem=host",
   "--filesystem=xdg-run/gvfs",
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=wayland"
  ],
  "cleanup": [
   "/include",
   "/lib/pkgconfig",
   "/lib/cmake",
   "/share/aclocal",
   "/share/pkgconfig",
   "/share/info",
   "/share/man",
   "/man",
   "/cmake",
   "*.la",
   "*.a",
   "*.cmake"
  ],
  "build-options": {
   "env": {
    "V": "1",
    "VERBOSE": "1",
    "DISPLAY": ":10",
    "QT_QPA_PLATFORM": "offscreen"
   }
  },
  "modules": [
   "shared-modules/glu/glu-9.json",
   {
    "name": "assimp",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DASSIMP_BUILD_ASSIMP_TOOLS=0",
     "-DASSIMP_BUILD_TESTS=0"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/assimp/assimp.git",
      "tag": "v5.3.1"
     }
    ]
   },
   {
    "name": "catch2",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/catchorg/Catch2.git",
      "tag": "v3.10.0"
     }
    ]
   },
   {
    "name": "zstd",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "subdir": "build/cmake",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/facebook/zstd.git",
      "tag": "v1.5.6",
      "commit": "794ea1b0afca0f020f4e57b6732332231fb23c70"
     }
    ]
   },
   {
    "name": "libdwarf",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DPIC_ALWAYS=TRUE",
     "-DBUILD_DWARFDUMP=FALSE",
     "-DENABLE_DECOMPRESSION=NO"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/jeremy-rifkin/libdwarf-lite.git",
      "tag": "v2.1.0",
      "commit": "5dfb2cd2aacf2bf473e5bfea79e41289f88b3a5f"
     }
    ]
   },
   {
    "name": "cpptrace",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release",
     "-DCPPTRACE_USE_EXTERNAL_LIBDWARF=ON",
     "-DCPPTRACE_USE_EXTERNAL_ZSTD=ON"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/jeremy-rifkin/cpptrace.git",
      "tag": "v1.0.4"
     }
    ]
   },
   {
    "name": "freeimage",
    "buildsystem": "autotools",
    "build-options": {
     "cxxflags": "-std=c++14",
     "cflags": "-Wno-implicit-function-declaration"
    },
    "no-autogen": true,
    "sources": [
     {
      "type": "archive",
      "url": "http://downloads.sourceforge.net/freeimage/FreeImage3180.zip",
      "sha256": "f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd"
     },
     {
      "type": "patch",
      "path": "freeimage-fix-install.patch",
      "strip-components": 0
     }
    ]
   },
   {
    "name": "miniz",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/richgel999/miniz",
      "tag": "3.1.1",
      "commit": "d10b03cc73475af673df40f06e5cefd1d5f940d9"
     }
    ]
   },
   {
    "name": "Pandoc",
    "only-arches": [
     "x86_64"
    ],
    "buildsystem": "simple",
    "build-commands": [
     "mkdir -p /app/bin/",
     "cp -v bin/pandoc /app/bin/pandoc",
     "cp -v bin/pandoc-citeproc /app/bin/pandoc-citeproc"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/jgm/pandoc/releases/download/2.2.1/pandoc-2.2.1-linux.tar.gz",
      "sha256": "3b1b573cdf957b4102c42ce6f5a641787267a55a5e88dcca942fd471c25793cb"
     }
    ]
   },
   {
    "name": "stduuid",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DUUID_USING_CXX20_SPAN=ON",
     "-DUUID_SYSTEM_GENERATOR=ON",
     "-DUUID_TIME_GENERATOR=ON"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/mariusbancila/stduuid.git",
      "tag": "v1.2.3"
     },
     {
      "type": "patch",
      "path": "stduuid-fix-install-dir.patch"
     }
    ]
   },
   {
    "name": "tinyxml2",
    "buildsystem": "meson",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/leethomason/tinyxml2",
      "tag": "9.0.0"
     }
    ]
   },
   {
    "name": "trenchbroom",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release",
     "-DCMAKE_PREFIX_PATH=cmake/packages;/app",
     "-DCMAKE_INSTALL_PREFIX=/app",
     "-DCPACK_PACKAGING_INSTALL_PREFIX=${FLATPAK_DEST}"
    ],
    "no-make-install": false,
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/TrenchBroom/TrenchBroom.git",
      "commit": "b8c14a93c6945a389c56ff7bf77e869c16f24895",
      "tag": "v2026.1",
      "disable-submodules": true
     },
     {
      "type": "patch",
      "path": "remove-vcpkg.patch"
     },
     {
      "type": "file",
      "path": "com.kristianduske.TrenchBroom.appdata.xml"
     }
    ],
    "post-install": [
     "install -Dm 755 app/TrenchBroom/trenchbroom ${FLATPAK_DEST}/bin/trenchbroom",
     "install -Dm 644 ../app/TrenchBroom/resources/linux/trenchbroom.desktop ${FLATPAK_DEST}/share/applications/trenchbroom.desktop",
     "install -Dm 644 ../${FLATPAK_ID}.appdata.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml",
     "for size in 16 24 32 48 64 128 256 512; do install -Dm0644 ../app/TrenchBroom/resources/linux/icons/icon_${size}.png ${FLATPAK_DEST}/share/icons/hicolor/${size}x${size}/apps/trenchbroom.png; done"
    ]
   }
  ]
 }
}