{
 "app_id": "org.megaglest.MegaGlest",
 "source_url": "https://raw.githubusercontent.com/flathub/org.megaglest.MegaGlest/master/org.megaglest.MegaGlest.json",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "24.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=pulseaudio",
  "--device=dri"
 ],
 "module_count": 9,
 "fetched_at": "2026-09-17T16:15:59.436499+00:00",
 "manifest": {
  "app-id": "org.megaglest.MegaGlest",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "24.08",
  "sdk": "org.freedesktop.Sdk",
  "rename-appdata-file": "megaglest.appdata.xml",
  "rename-desktop-file": "megaglest.desktop",
  "rename-icon": "megaglest",
  "command": "megaglest",
  "finish-args": [
   "--device=dri",
   "--persist=.megaglest",
   "--share=ipc",
   "--share=network",
   "--socket=x11",
   "--socket=pulseaudio"
  ],
  "cleanup": [
   "/include",
   "/lib/pkgconfig",
   "/share/aclocal",
   "/share/man",
   "*.la",
   "*.a"
  ],
  "modules": [
   "shared-modules/lua5.3/lua-5.3.5.json",
   "shared-modules/glu/glu-9.json",
   "shared-modules/glew/glew.json",
   {
    "name": "ftgl",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DOpenGL_GL_PREFERENCE=GLVND"
    ],
    "build-options": {
     "cflags": "-fpermissive",
     "cxxflags": "-fpermissive"
    },
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/frankheckenbach/ftgl.git",
      "tag": "v2.4.0",
      "commit": "483639219095ad080538e07ceb5996de901d4e74"
     },
     {
      "type": "patch",
      "path": "ftgl-CMakeLists.txt.patch"
     }
    ]
   },
   {
    "name": "libircclient",
    "config-opts": [
     "--disable-static"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://downloads.sourceforge.net/project/libircclient/libircclient/1.9/libircclient-1.9.tar.gz",
      "sha256": "81c397eee618667bccfe8960352ba5f829c8c2e9badc270594b91128cd89c064"
     },
     {
      "type": "patch",
      "path": "libircclient-proper-lib-building.patch"
     },
     {
      "type": "script",
      "dest-filename": "autogen.sh",
      "commands": [
       "autoreconf -vfi"
      ]
     }
    ]
   },
   {
    "name": "miniupnpc",
    "buildsystem": "cmake",
    "sources": [
     {
      "type": "archive",
      "url": "http://miniupnp.free.fr/files/miniupnpc-1.9.20140610.tar.gz",
      "sha256": "31beffe44a5d7b7bbad3729cdd6f9f85844b9e5771aebb56550f87cbedcf5d3b"
     }
    ]
   },
   {
    "name": "p7zip",
    "no-autogen": true,
    "make-args": [
     "7z"
    ],
    "make-install-args": [
     "DEST_HOME=/app"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/p7zip-project/p7zip/archive/refs/tags/v17.05.tar.gz",
      "sha256": "d2788f892571058c08d27095c22154579dfefb807ebe357d145ab2ddddefb1a6"
     }
    ]
   },
   {
    "name": "megaglest",
    "buildsystem": "cmake",
    "config-opts": [
     "-DBUILD_MEGAGLEST_MAP_EDITOR=OFF",
     "-DBUILD_MEGAGLEST_MODEL_VIEWER=OFF"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/MegaGlest/megaglest-source/releases/download/3.13.0/megaglest-source-3.13.0.tar.xz",
      "sha256": "09fef67bc6878b1afbb0b403fec9fcf7dc270d500fdc62ed98e5f210e398ccb9"
     },
     {
      "type": "patch",
      "path": "feathery-build.patch"
     }
    ]
   },
   {
    "name": "megaglest-data",
    "buildsystem": "cmake",
    "config-opts": [
     "-DMEGAGLEST_ICON_INSTALL_PATH=/app/share/icons/hicolor/48x48/apps"
    ],
    "post-install": [
     "install -Dm0644 org.megaglest.MegaGlest.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg",
     "rm /app/share/icons/hicolor/48x48/apps/megaglest.xpm"
    ],
    "cleanup": [
     "/share/appdata/megaglest_editor.appdata.xml",
     "/share/applications/megaglest_editor.desktop",
     "/share/applications/megaglest_g3dviewer.desktop",
     "/share/menu"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/MegaGlest/megaglest-data/releases/download/3.13.0/megaglest-data-3.13.0.tar.xz",
      "sha256": "43de3ca668f0419e84ec6b37fa41dd6eb88052752a8a11f5e02ea13f86faef46"
     },
     {
      "type": "patch",
      "path": "megaglest.appdata.xml.patch"
     },
     {
      "type": "file",
      "path": "org.megaglest.MegaGlest.svg"
     }
    ]
   }
  ]
 }
}