{
 "app_id": "re.rizin.cutter",
 "source_url": "https://raw.githubusercontent.com/flathub/re.rizin.cutter/master/re.rizin.cutter.yml",
 "runtime": "org.kde.Platform",
 "runtime_version": "6.9",
 "sdk": "org.kde.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=fallback-x11",
  "--device=dri",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.kconfig.notify",
  "--talk-name=org.kde.KGlobalSettings",
  "--talk-name=org.kde.kdeconnect"
 ],
 "module_count": 5,
 "fetched_at": "2026-09-21T13:35:58.585806+00:00",
 "manifest": {
  "app-id": "re.rizin.cutter",
  "command": "cutter",
  "runtime": "org.kde.Platform",
  "runtime-version": "6.9",
  "separate-locales": false,
  "sdk": "org.kde.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.llvm20"
  ],
  "build-options": {
   "prepend-path": "/usr/lib/sdk/llvm20/bin",
   "prepend-ld-library-path": "/usr/lib/sdk/llvm20/lib"
  },
  "finish-args": [
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=wayland",
   "--device=dri",
   "--allow=devel"
  ],
  "add-extensions": {
   "re.rizin.cutter.plugin": {
    "version": "stable",
    "directory": "extensions",
    "add-ld-path": "lib",
    "merge-dirs": "plugins;bin;lib",
    "subdirectories": true,
    "no-autodownload": true
   }
  },
  "modules": [
   {
    "name": "pyside",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "build-options": {
     "cxxflags": "-I/run/build/pyside/sources/shiboken6/libshiboken/signature -I/usr/include/python3.12",
     "cflags": "-I/usr/include/python3.12"
    },
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release",
     "-DBUILD_TESTS=OFF",
     "-DCMAKE_SKIP_RPATH:BOOL=YES",
     "-DFORCE_LIMITED_API=OFF"
    ],
    "cleanup": [
     "/bin"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-6.9.0-src/pyside-setup-everywhere-src-6.9.0.tar.xz",
      "sha256": "315b73bb7570d5b9e6793a8d3fafd1d2dd7f43d35eebb01d2b554ea206aad88e"
     },
     {
      "type": "shell",
      "commands": [
       "cp -R /usr/include/Qt* sources/pyside6/PySide6/"
      ]
     }
    ],
    "modules": [
     {
      "name": "shiboken",
      "buildsystem": "cmake-ninja",
      "builddir": true,
      "subdir": "sources/shiboken6",
      "config-opts": [
       "-DBUILD_TESTS=OFF",
       "-DFORCE_LIMITED_API=OFF"
      ],
      "sources": [
       {
        "type": "archive",
        "url": "https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-6.9.0-src/pyside-setup-everywhere-src-6.9.0.tar.xz",
        "sha256": "315b73bb7570d5b9e6793a8d3fafd1d2dd7f43d35eebb01d2b554ea206aad88e"
       }
      ]
     }
    ]
   },
   {
    "name": "rizin",
    "buildsystem": "meson",
    "config-opts": [
     "--buildtype=release",
     "-Drizin_plugins=extensions/lib/rizin/plugins",
     "-Dinstall_sigdb=true",
     "-Dsubprojects_check=false"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/rizinorg/rizin/releases/download/v0.8.1/rizin-src-v0.8.1.tar.xz",
      "sha256": "ef2b1e6525d7dc36ac43525b956749c1cca07bf17c1fed8b66402d82010a4ec2"
     },
     {
      "type": "git",
      "url": "https://github.com/rizinorg/sigdb",
      "commit": "4addbed50cd3b50eeef5a41d72533d079ebbfbf8",
      "dest": "subprojects/sigdb"
     }
    ]
   },
   {
    "name": "graphviz",
    "buildsystem": "autotools",
    "sources": [
     {
      "type": "archive",
      "url": "https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/10.0.1/graphviz-10.0.1.tar.xz",
      "sha256": "7bd8064a94bc178862aa0fbb0ed2236f49c188b2fd656487247c58db3019fe21"
     }
    ]
   },
   {
    "name": "cutter",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DCUTTER_USE_BUNDLED_RIZIN=off",
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DCUTTER_ENABLE_KSYNTAXHIGHLIGHTING=off",
     "-DCUTTER_ENABLE_PYTHON=on",
     "-DCUTTER_ENABLE_PYTHON_BINDINGS=on",
     "-DCUTTER_EXTRA_PLUGIN_DIRS=/app/extensions/plugins",
     "-DSHIBOKEN_EXTRA_OPTIONS=\"-I/app/qtincludes\""
    ],
    "sources": [
     {
      "type": "shell",
      "commands": [
       "mkdir -p /app/qtincludes && ln -s /usr/include/Qt* /app/qtincludes"
      ]
     },
     {
      "type": "archive",
      "url": "https://github.com/rizinorg/cutter/releases/download/v2.4.1/Cutter-v2.4.1-src.tar.gz",
      "sha256": "7cafc3cac74aa3e69b14d9d790e7ea88ab856e37573000f7403289ec410867ef"
     },
     {
      "type": "patch",
      "path": "0001-fix-Handle-python-3.11-and-higher.patch"
     },
     {
      "type": "patch",
      "path": "0002-patch-add-missing-informations-for-flathub-build-pip.patch"
     }
    ],
    "post-install": [
     "rm -rf /app/qtincludes",
     "mkdir -p /app/extensions",
     "desktop-file-edit --set-icon=${FLATPAK_ID} ${FLATPAK_DEST}/share/applications/re.rizin.cutter.desktop",
     "install -Dm644 --target=${FLATPAK_DEST}/share/metainfo/ ../src/re.rizin.cutter.appdata.xml",
     "install -Dm644 ../src/img/cutter.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg"
    ]
   }
  ]
 }
}