{
 "app_id": "com.zerobrane.studio",
 "source_url": "https://raw.githubusercontent.com/flathub/com.zerobrane.studio/master/com.zerobrane.studio.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "26.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=x11",
  "--device=dri",
  "--filesystem=home"
 ],
 "module_count": 7,
 "fetched_at": "2026-09-17T16:09:16.288780+00:00",
 "manifest": {
  "app-id": "com.zerobrane.studio",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "26.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "zbstudio",
  "rename-icon": "zbstudio",
  "rename-desktop-file": "zbstudio.desktop",
  "rename-appdata-file": "zbstudio.appdata.xml",
  "finish-args": [
   "--share=ipc",
   "--socket=x11",
   "--share=network",
   "--filesystem=home",
   "--device=dri"
  ],
  "cleanup": [
   "/include",
   "/lib/pkgconfig",
   "/man",
   "/share/bakefile",
   "/share/aclocal",
   "/share/doc",
   "/share/man",
   "*.la",
   "*.a"
  ],
  "modules": [
   "shared-modules/intltool/intltool-0.51.json",
   "shared-modules/glu/glu-9.json",
   {
    "name": "wxWidgets",
    "config-opts": [
     "--with-gtk=3",
     "--enable-unicode"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/wxWidgets/wxWidgets",
      "tag": "v3.1.4",
      "commit": "6cdaedd42ba59331b3dc4ead50e0bac76ae14c19"
     }
    ]
   },
   {
    "name": "lua-5.1",
    "buildsystem": "simple",
    "build-commands": [
     "make -j $FLATPAK_BUILDER_N_JOBS CFLAGS=\"$CFLAGS -fPIC -DLUA_USE_LINUX\" linux",
     "make INSTALL_TOP=$FLATPAK_DEST TO_LIB='liblua.a liblua.so.5.1.5' install",
     "ln -sf liblua.so.5.1.5 $FLATPAK_DEST/lib/liblua.so",
     "ln -sf liblua.so.5.1.5 $FLATPAK_DEST/lib/liblua.so.5.1",
     "install -Dm0644 etc/lua.pc $FLATPAK_DEST/lib/pkgconfig/lua.pc",
     "ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua51.pc",
     "ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua5.1.pc",
     "ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua-5.1.pc"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://www.lua.org/ftp/lua-5.1.5.tar.gz",
      "sha256": "2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333"
     },
     {
      "type": "patch",
      "path": "patches/lua-5.1.5-so.patch"
     },
     {
      "type": "shell",
      "commands": [
       "sed -i \"s|/usr/local|$FLATPAK_DEST|\" etc/lua.pc src/luaconf.h"
      ]
     }
    ]
   },
   {
    "name": "wxLua",
    "buildsystem": "cmake-ninja",
    "subdir": "wxLua",
    "config-opts": [
     "-DwxWidgets_CONFIG_EXECUTABLE=/app/bin/wx-config",
     "-DwxLua_LUA_LIBRARY_USE_BUILTIN=OFF",
     "-DwxLua_LUA_LIBRARY_VERSION=5.1",
     "-DwxLua_LUA_LIBRARY_BUILD_SHARED=ON",
     "-DBUILD_SHARED_LIBS=ON",
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
    ],
    "post-install": [
     "install -d ${FLATPAK_DEST}/lib/lua/5.1",
     "mv ${FLATPAK_DEST}/lib/{lib,lua/5.1/}wx.so"
    ],
    "cleanup": [
     "/share/wxlua/doc",
     "/share/wxlua/samples"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/pkulchenko/wxlua",
      "tag": "v3.0.0.9",
      "commit": "c6b71e91e66775d8397ad995410ecb5176e85b51"
     },
     {
      "type": "patch",
      "path": "patches/wxlua-fix-build-error.patch"
     }
    ]
   },
   {
    "name": "luasocket",
    "buildsystem": "simple",
    "build-commands": [
     "make LUAV=5.1 linux",
     "make install-unix INSTALL_TOP=${FLATPAK_DEST} INSTALL_TOP_CDIR=${FLATPAK_DEST}/lib/lua/5.1/ INSTALL_TOP_LDIR=${FLATPAK_DEST}/share/lua/5.1/"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/lunarmodules/luasocket",
      "tag": "v3.1.0",
      "commit": "95b7efa9da506ef968c1347edf3fc56370f0deed"
     }
    ]
   },
   {
    "name": "ZeroBraneStudio",
    "buildsystem": "cmake-ninja",
    "subdir": "build",
    "config-opts": [
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
    ],
    "post-install": [
     "cp -a ../lualibs ${FLATPAK_DEST}/share/zbstudio/"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/pkulchenko/ZeroBraneStudio",
      "tag": "2.01",
      "commit": "483ef0dcb593f9599ff27715472425e39a0588e8"
     },
     {
      "type": "patch",
      "path": "patches/zbstudio.patch"
     },
     {
      "type": "patch",
      "path": "patches/appstream.patch"
     }
    ]
   }
  ]
 }
}