{
 "app_id": "io.github.punesemu.puNES",
 "source_url": "https://raw.githubusercontent.com/flathub/io.github.punesemu.puNES/master/io.github.punesemu.puNES.yml",
 "runtime": "org.kde.Platform",
 "runtime_version": "5.15-25.08",
 "sdk": "org.kde.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=pulseaudio",
  "--socket=fallback-x11",
  "--device=all",
  "--filesystem=home:ro",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--filesystem=/run/udev:ro",
  "--filesystem=xdg-run/gvfs:ro",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.kconfig.notify",
  "--talk-name=org.kde.KGlobalSettings"
 ],
 "module_count": 4,
 "fetched_at": "2026-09-17T16:12:01.771644+00:00",
 "manifest": {
  "app-id": "io.github.punesemu.puNES",
  "runtime": "org.kde.Platform",
  "runtime-version": "5.15-25.08",
  "sdk": "org.kde.Sdk",
  "command": "punes",
  "finish-args": [
   "--socket=fallback-x11",
   "--socket=wayland",
   "--share=ipc",
   "--device=all",
   "--socket=pulseaudio",
   "--filesystem=home:ro",
   "--filesystem=xdg-run/gvfs:ro",
   "--filesystem=/run/udev:ro"
  ],
  "cleanup": [
   "*.a",
   "*.la",
   "/include",
   "/lib/pkgconfig",
   "/man"
  ],
  "modules": [
   {
    "name": "glu",
    "buildsystem": "meson",
    "sources": [
     {
      "type": "archive",
      "url": "https://archive.mesa3d.org/glu/glu-9.0.3.tar.xz",
      "sha256": "bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 13518,
       "url-template": "https://archive.mesa3d.org/glu/glu-$version.tar.xz"
      }
     }
    ]
   },
   {
    "name": "p7zip",
    "no-autogen": true,
    "make-args": [
     "7z"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/p7zip-project/p7zip/archive/v17.04/p7zip-v17.04.tar.gz",
      "sha256": "ea029a2e21d2d6ad0a156f6679bd66836204aa78148a4c5e498fe682e77127ef"
     },
     {
      "type": "shell",
      "commands": [
       "sed -i 's|/usr/local|/app|g' makefile.common"
      ]
     },
     {
      "type": "patch",
      "paths": [
       "patches/p7zip-17.04-CVE-2018-11498.patch",
       "patches/p7zip-17.04-CVE-2021-0184.patch",
       "patches/p7zip-17.04-CVE-2021-3520.patch",
       "patches/p7zip-norar.patch"
      ]
     }
    ]
   },
   {
    "name": "nvidia-cg-toolkit",
    "only-arches": [
     "x86_64"
    ],
    "buildsystem": "simple",
    "build-commands": [
     "mkdir -p ${FLATPAK_DEST}/lib/pkgconfig",
     "install -m 0644 usr/lib64/libCg.so ${FLATPAK_DEST}/lib",
     "install -m 0644 usr/lib64/libCgGL.so ${FLATPAK_DEST}/lib",
     "install -m 0644 nvidia-cg-toolkit-gl.pc ${FLATPAK_DEST}/lib/pkgconfig",
     "mkdir -p ${FLATPAK_DEST}/include/Cg",
     "install -m 0644 usr/include/Cg/cgGL.h ${FLATPAK_DEST}/include/Cg",
     "install -m 0644 usr/include/Cg/cg.h ${FLATPAK_DEST}/include/Cg"
    ],
    "sources": [
     {
      "type": "file",
      "path": "nvidia-cg-toolkit-gl.pc"
     },
     {
      "type": "archive",
      "url": "http://developer.download.nvidia.com/cg/Cg_3.1/Cg-3.1_April2012_x86_64.tgz",
      "sha256": "e8ff01e6cc38d1b3fd56a083f5860737dbd2f319a39037528fb1a74a89ae9878"
     }
    ]
   },
   {
    "name": "puNES",
    "buildsystem": "cmake-ninja",
    "build-options": {
     "config-opts": [
      "-DENABLE_RELEASE=ON",
      "-DENABLE_FFMPEG=ON",
      "-DENABLE_OPENGL=ON",
      "-DENABLE_OPENGL_CG=OFF",
      "-DENABLE_FULLSCREEN_RESFREQ=ON",
      "-DDISABLE_PORTABLE_MODE=ON"
     ],
     "arch": {
      "x86_64": {
       "config-opts": [
        "-DENABLE_OPENGL_CG=ON"
       ]
      }
     }
    },
    "sources": [
     {
      "type": "archive",
      "archive-type": "tar-gzip",
      "url": "https://api.github.com/repos/punesemu/puNES/tarball/v0.111",
      "sha256": "438c23a7b69e303b36a13e82505b66e2bd376177c29aa2b13f6a64ccf03772cb",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/punesemu/puNES/releases/latest",
       "version-query": ".tag_name",
       "url-query": ".tarball_url"
      }
     },
     {
      "type": "patch",
      "path": "patches/punes-0.111-metainfo.patch"
     }
    ]
   }
  ]
 }
}