app-id: net.kuribo64.melonDS
runtime: org.kde.Platform
runtime-version: '6.7'
sdk: org.kde.Sdk
command: melonDS
cleanup:
  - "/include"
  - "/lib/pkgconfig"
finish-args:
  - "--share=ipc"
  - "--socket=wayland"
  - "--socket=fallback-x11"
  - "--socket=pulseaudio"
  - "--share=network"
  - "--device=all"
  - "--filesystem=home"
modules:
  - name: libslirp
    buildsystem: meson
    sources:
      - type: git
        url: https://gitlab.freedesktop.org/slirp/libslirp.git
        tag: v4.7.0
  - name: melonds
    buildsystem: cmake-ninja
    builddir: true
    build-options:
      config-opts:
        - -DUSE_QT6=ON
    build-commands:
      - install -D -m644 -t /app/share/appdata/ ../${FLATPAK_ID}.appdata.xml
    sources:
      - type: git
        url: https://github.com/melonDS-emu/melonDS.git
        commit: 430de6b2702bb93faa8c2004aff3fbd084db4a1e
      - type: file
        path: net.kuribo64.melonDS.appdata.xml