{
 "app_id": "org.ingecad.IngeCAD",
 "source_url": "https://raw.githubusercontent.com/ingelibre/ingecad/main/packaging/flatpak/org.ingecad.IngeCAD.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--socket=wayland",
  "--socket=x11",
  "--share=ipc",
  "--device=dri",
  "--filesystem=home",
  "--share=network"
 ],
 "module_count": 3,
 "fetched_at": "2026-09-20T12:58:42.123500+00:00",
 "manifest": {
  "app-id": "org.ingecad.IngeCAD",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "ingecad",
  "finish-args": [
   "--socket=wayland",
   "--socket=x11",
   "--share=ipc",
   "--device=dri",
   "--filesystem=home",
   "--share=network"
  ],
  "modules": [
   {
    "name": "krb5",
    "subdir": "src",
    "build-options": {
     "cflags": "-std=gnu17 -Wno-implicit-function-declaration -Wno-implicit-int -Wno-int-conversion -Wno-incompatible-pointer-types"
    },
    "config-opts": [
     "--disable-static",
     "--without-ldap",
     "--without-tcl",
     "--without-libedit",
     "--without-readline",
     "--disable-rpath"
    ],
    "cleanup": [
     "/bin",
     "/sbin",
     "/share",
     "/include",
     "/etc",
     "*.la"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://kerberos.org/dist/krb5/1.21/krb5-1.21.3.tar.gz",
      "sha256": "b7a4cd5ead67fb08b980b21abd150ff7217e85ea320c9ed0c6dadd304840ad35",
      "mirror-urls": [
       "https://web.mit.edu/kerberos/dist/krb5/1.21/krb5-1.21.3.tar.gz"
      ]
     }
    ]
   },
   {
    "name": "ingecad",
    "buildsystem": "simple",
    "build-options": {
     "build-args": [
      "--share=network"
     ]
    },
    "build-commands": [
     "grep -vE '^\\s*pytest\\b' requirements.txt > reqs.txt",
     "pip3 install --prefix=${FLATPAK_DEST} --no-warn-script-location -r reqs.txt",
     "mkdir -p ${FLATPAK_DEST}/ingecad",
     "cp -a main.py core views render formats tools plugins resources i18n LICENSE ${FLATPAK_DEST}/ingecad/",
     "find ${FLATPAK_DEST}/ingecad -name '__pycache__' -type d -exec rm -rf {} +",
     "install -Dm755 packaging/flatpak/flatpak-launcher.sh ${FLATPAK_DEST}/bin/ingecad",
     "install -Dm644 packaging/flatpak/${FLATPAK_ID}.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop",
     "install -Dm644 resources/icons/ingecad_256.png ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/${FLATPAK_ID}.png",
     "install -Dm644 resources/ingecad.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg",
     "install -Dm644 packaging/flatpak/${FLATPAK_ID}.metainfo.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml",
     "mkdir -p \"${FLATPAK_DEST}/share/mime/packages\"\nsed -e 's|<icon name=\"\\([^\"]*\\)\"/>|<icon name=\"'\"${FLATPAK_ID}\"'.\\1\"/>|' \\\n  resources/mime/ingecad.xml > \"${FLATPAK_DEST}/share/mime/packages/${FLATPAK_ID}.xml\"\ngrep -q \"${FLATPAK_ID}.image-vnd.dwg\" \"${FLATPAK_DEST}/share/mime/packages/${FLATPAK_ID}.xml\"\nfor d in resources/icons/hicolor/*/mimetypes; do\n  size=$(basename \"$(dirname \"$d\")\")\n  for f in \"$d\"/*.png; do\n    install -Dm644 \"$f\" \"${FLATPAK_DEST}/share/icons/hicolor/${size}/mimetypes/${FLATPAK_ID}.$(basename \"$f\")\"\n  done\ndone\n",
     "set -e\nPYVER=$(python3 -c 'import sys; print(\"%d.%d\" % sys.version_info[:2])')\nPS=${FLATPAK_DEST}/lib/python${PYVER}/site-packages/PySide6\ncd \"$PS\"\nrm -rf Qt/qml Qt/resources Qt/libexec Qt/metatypes examples typesystems glue include\nrm -f  assistant designer linguist lupdate lrelease qmlformat qmllint qmlls qsb balsam* svgtoqml\nfor stem in WebEngine Pdf Quick Qml 3D Quick3D Multimedia SpatialAudio                     Location Positioning Sensors SerialPort SerialBus Bluetooth                     Nfc WebSockets WebChannel WebView RemoteObjects Scxml                     TextToSpeech Charts DataVisualization Graphs Sql Help                     UiTools Designer NetworkAuth HttpServer VirtualKeyboard                     LabsAnimation LabsFolderListModel LabsPlatform LabsQmlModels                     LabsSettings LabsSharedImage LabsWavefrontMesh Test; do\n  case \"$stem\" in Pdf) continue;; esac   # QtPdf stays: PDF underlay\n  rm -f  Qt${stem}*.abi3.so Qt${stem}*.pyi\n  rm -f  Qt/lib/libQt6${stem}*.so*\ndone\n# Quick/Qml family again by lib name (Quick3D matches Quick prefix)\nrm -f Qt/lib/libQt6Quick*.so* Qt/lib/libQt6Qml*.so*\n# PdfQuick needs Quick: gone. Plain Pdf + PdfWidgets stay.\nrm -f Qt/lib/libQt6PdfQuick*.so* QtPdfQuick*\n# ffmpeg came along for Multimedia\nrm -f Qt/lib/libav*.so* Qt/lib/libsw*.so*\nrm -rf Qt/plugins/multimedia Qt/plugins/webview Qt/plugins/qmltooling                Qt/plugins/scenegraph Qt/plugins/designer Qt/plugins/assetimporters                Qt/plugins/sceneparsers Qt/plugins/renderers Qt/plugins/geometryloaders                Qt/plugins/sqldrivers Qt/plugins/position Qt/plugins/sensors                Qt/plugins/canbus Qt/plugins/virtualkeyboard Qt/plugins/texttospeech\ndu -sh \"$PS\"\n"
    ],
    "sources": [
     {
      "type": "dir",
      "path": "../../",
      "skip": [
       "venv",
       "build",
       "dist",
       ".git",
       "web",
       "vendor",
       "capturas",
       "packaging/flatpak/.staging",
       "packaging/flatpak/.flatpak-builder"
      ]
     }
    ]
   },
   {
    "name": "libredwg",
    "buildsystem": "simple",
    "build-commands": [
     "./configure --disable-shared --disable-bindings --disable-python --prefix=$(pwd)/_prefix > /dev/null",
     "make -j $FLATPAK_BUILDER_N_JOBS > /dev/null",
     "make install-strip > /dev/null",
     "install -Dm755 _prefix/bin/dwg2dxf ${FLATPAK_DEST}/ingecad/vendor/libredwg/bin/dwg2dxf",
     "install -Dm755 _prefix/bin/dxf2dwg ${FLATPAK_DEST}/ingecad/vendor/libredwg/bin/dxf2dwg"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/LibreDWG/libredwg/releases/download/0.14.8580/libredwg-0.14.8580.tar.xz",
      "sha256": "2b6e866e58b421c9baa2c64bafb9b1325480a9e102935e149d19f96a7193cd9d"
     },
     {
      "type": "patch",
      "path": "../../tools/libredwg-patches/current/ingecad-vendor-0.14.8580.patch"
     }
    ]
   }
  ]
 }
}