{
 "app_id": "org.widelands.Widelands",
 "source_url": "https://raw.githubusercontent.com/flathub/org.widelands.Widelands/master/org.widelands.Widelands.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=pulseaudio",
  "--socket=fallback-x11",
  "--device=dri"
 ],
 "module_count": 6,
 "fetched_at": "2026-09-17T16:16:57.237300+00:00",
 "manifest": {
  "app-id": "org.widelands.Widelands",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "widelands",
  "finish-args": [
   "--socket=wayland",
   "--env=SDL_VIDEODRIVER=wayland,x11",
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--share=network",
   "--persist=.widelands",
   "--device=dri"
  ],
  "cleanup": [
   "/include",
   "/lib/pkgconfig",
   "/share/man",
   "*.la",
   "*.a"
  ],
  "modules": [
   "shared-modules/SDL2/SDL2_image.json",
   "shared-modules/SDL2/SDL2_ttf.json",
   "shared-modules/glu/glu-9.json",
   "shared-modules/glew/glew.json",
   {
    "name": "asio",
    "sources": [
     {
      "type": "archive",
      "url": "https://downloads.sourceforge.net/project/asio/asio/1.36.0%20%28Stable%29/asio-1.36.0.tar.bz2",
      "sha256": "7bf4dbe3c1ccd9cc4c94e6e6be026dcc2110f9201d286bb9500dc85d69825524"
     }
    ],
    "buildsystem": "simple",
    "build-commands": [
     "# This all could be just a 'cp -a', but let's have the better\n# error handling of GNU 'install'\n./configure --prefix=${FLATPAK_DEST}\nmake install-data\n"
    ]
   },
   {
    "name": "Widelands",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/widelands/widelands/archive/refs/tags/v1.3.1.tar.gz",
      "sha256": "e6f3e8f4fcafd367962dbacde80e26fc63afad38cfe26fadba9c92d4a01bd687"
     },
     {
      "type": "shell",
      "commands": [
       "# Modify xdg/org.widelands.Widelands.metainfo.xml:\n#  * Remove the binary from provides, because flatpak doesn't export it\nsed '/<binary>/d' -i xdg/org.widelands.Widelands.metainfo.xml\n\n# Validate metainfo.xml with the changes\nappstreamcli validate --no-net xdg/org.widelands.Widelands.metainfo.xml\n"
      ]
     }
    ],
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release",
     "-DOPTION_BUILD_WEBSITE_TOOLS=OFF",
     "-DWL_INSTALL_BINDIR=/app/bin",
     "-DWL_INSTALL_BASEDIR=/app/share/widelands",
     "-DWL_INSTALL_DATADIR=/app/share/widelands",
     "-DGLEW_ROOT=/app",
     "-DGLEW_INCLUDE_DIR=/app/include/GL",
     "-DGLEW_LIBRARY:FILEPATH=/app/lib/libGLEW.a",
     "-DCMAKE_INCLUDE_PATH=/app/include",
     "-DOPENGL_glu_LIBRARY=/app/lib/libGLU.a"
    ],
    "build-options": {
     "ldflags": "-lGL"
    }
   }
  ]
 }
}