{
 "app_id": "org.wesnoth.Wesnoth",
 "source_url": "https://raw.githubusercontent.com/flathub/org.wesnoth.Wesnoth/master/org.wesnoth.Wesnoth.json",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "24.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=pulseaudio",
  "--socket=x11",
  "--device=dri"
 ],
 "module_count": 3,
 "fetched_at": "2026-09-17T16:16:57.237296+00:00",
 "manifest": {
  "app-id": "org.wesnoth.Wesnoth",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "24.08",
  "sdk": "org.freedesktop.Sdk",
  "finish-args": [
   "--device=dri",
   "--share=ipc",
   "--share=network",
   "--socket=x11",
   "--socket=pulseaudio",
   "--require-version=0.10.2"
  ],
  "command": "wesnoth",
  "rename-icon": "wesnoth-icon",
  "cleanup": [
   "/include",
   "/lib/pkgconfig",
   "/share/aclocal",
   "/share/man",
   "/lib/cmake",
   "*.la",
   "*.a"
  ],
  "modules": [
   {
    "name": "boost",
    "buildsystem": "simple",
    "sources": [
     {
      "type": "archive",
      "url": "https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.bz2",
      "sha256": "1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0"
     }
    ],
    "build-commands": [
     "./bootstrap.sh --prefix=${FLATPAK_DEST} --with-libraries=filesystem,system,locale,iostreams,program_options,regex,random,thread,coroutine,context,graph",
     "./b2 -j $FLATPAK_BUILDER_N_JOBS install link=static variant=release cxxflags='-fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=2' --layout=system"
    ]
   },
   {
    "name": "scons",
    "buildsystem": "simple",
    "cleanup": [
     "*"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/b8/a7/823091100c88d7d992c8c608d82a88ed59e227d13f8ccb33ea7a96d43d51/SCons-4.8.1-py3-none-any.whl",
      "sha256": "a4c3b434330e2d7d975002fd6783284ba348bf394db94c8f83fdc5bf69cdb8d7"
     }
    ],
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=\"${FLATPAK_DEST}\" \"scons\" --no-build-isolation"
    ]
   },
   {
    "name": "wesnoth",
    "buildsystem": "simple",
    "cleanup": [
     "/bin/python",
     "/share/applications/wesnoth_editor.desktop"
    ],
    "build-commands": [
     "scons -j $FLATPAK_BUILDER_N_JOBS prefix=${FLATPAK_DEST} ccache=true install wesnoth wesnothd"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://downloads.sourceforge.net/project/wesnoth/wesnoth-1.18/wesnoth-1.18.8/wesnoth-1.18.8.tar.bz2",
      "sha256": "fce3bd71d4ed32c9d11c0f707d19743cec6adf5c34761fab94ab72754aaedd89"
     },
     {
      "type": "patch",
      "paths": [
       "appdata_release.patch",
       "data-dist.patch"
      ]
     },
     {
      "type": "shell",
      "commands": [
       "ln -sf /usr/bin/python3 /app/bin/python"
      ]
     }
    ]
   }
  ]
 }
}