{
  "app-id": "org.ppsspp.PPSSPP",
  "branch": "stable",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "21.08",
  "sdk": "org.freedesktop.Sdk",
  "rename-icon": "ppsspp",
  "command": "PPSSPPSDL",
  "finish-args": [
    "--device=all",
    "--filesystem=host:ro",
    "--socket=pulseaudio",
    "--socket=x11",
    "--share=network"
  ],
  "modules": [
    "shared-modules/glu/glu-9.json",
    "shared-modules/glew/glew.json",
    {
      "name": "ppsspp",
      "buildsystem": "cmake",
      "build-options": {
        "arch": {
          "aarch64": {
            "env": {
              "EXTRA_OPTS":"-DUSING_GLES2=ON"
            }
          }
        }
      },
      "post-install": [
        "mv ${FLATPAK_DEST}/share/applications/{PPSSPPSDL,${FLATPAK_ID}}.desktop",
        "desktop-file-edit --set-name=PPSSPP --set-icon=${FLATPAK_ID} ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop",
        "install -Dm644 appdata.xml ${FLATPAK_DEST}/share/appdata/${FLATPAK_ID}.appdata.xml"
      ],
      "sources": [
        {
          "type": "git",
          "url": "https://github.com/hrydgard/ppsspp.git",
          "tag": "v1.11.3"
        },
        {
          "type": "file",
          "path": "appdata.xml"
        }
      ]
    }
  ]
}