{
 "app_id": "io.github.ktgw0316.LightZone",
 "source_url": "https://raw.githubusercontent.com/flathub/io.github.ktgw0316.LightZone/master/io.github.ktgw0316.LightZone.json",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "26.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=x11",
  "--device=dri",
  "--filesystem=xdg-pictures"
 ],
 "module_count": 5,
 "fetched_at": "2026-09-17T16:11:24.966459+00:00",
 "manifest": {
  "id": "io.github.ktgw0316.LightZone",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "26.08",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.openjdk21"
  ],
  "rename-desktop-file": "lightzone.desktop",
  "rename-icon": "lightzone",
  "finish-args": [
   "--share=ipc",
   "--socket=x11",
   "--device=dri",
   "--filesystem=xdg-pictures",
   "--persist=.java",
   "--persist=.lzncache",
   "--env=PATH=/app/jre/bin:/app/bin:/usr/bin"
  ],
  "command": "lightzone",
  "cleanup": [
   "/include",
   "/lib/pkgconfig",
   "*.la"
  ],
  "modules": [
   {
    "name": "openjdk",
    "buildsystem": "simple",
    "build-commands": [
     "/usr/lib/sdk/openjdk21/install.sh"
    ]
   },
   {
    "name": "lensfun",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DBUILD_FOR_SSE=0",
     "-DBUILD_FOR_SSE2=0"
    ],
    "build-options": {
     "arch": {
      "x86_64": {
       "config-opts": [
        "-DBUILD_FOR_SSE=1",
        "-DBUILD_FOR_SSE2=1"
       ]
      }
     }
    },
    "cleanup": [
     "/lib/python3.*"
    ],
    "post-install": [
     "pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} lxml --ignore-installed --no-build-isolation",
     "python3 lensfun_convert_db.py $PWD lensfun-git/data/db",
     "rm -rf /app/share/lensfun/version_1/*",
     "tar xvf db/version_1.tar -C /app/share/lensfun/version_1"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/lensfun/lensfun/archive/refs/tags/v0.3.4.tar.gz",
      "sha256": "dafb39c08ef24a0e2abd00d05d7341b1bf1f0c38bfcd5a4c69cf5f0ecb6db112"
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/23/ad/28ecd7cb894d172f3c9c80a075eeeb2017ac62e3632cee05a5f9493547eb/lxml-6.1.3.tar.gz",
      "sha256": "45222d94ddd511536f3b2f7d9deae3b2339b4ce0f075f1ca25703b07cad9dd21"
     },
     {
      "type": "file",
      "path": "lensfun_convert_db.py"
     },
     {
      "type": "git",
      "//": "used only for database",
      "dest": "lensfun-git",
      "url": "https://github.com/lensfun/lensfun.git",
      "commit": "fcbfbf38e5c297fc5595705c2e61ff5b3eaeb9d9"
     }
    ]
   },
   {
    "name": "gdk-scale",
    "buildsystem": "simple",
    "build-commands": [
     "make",
     "install -Dm755 gdk-scale -t /app/bin"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://gitlab.com/hfiguiere/gdk-scale.git",
      "commit": "e6f7226cc8c0de09c8a101f3a2cacc0e9a5d77c0"
     }
    ]
   },
   {
    "name": "libraw",
    "config-opts": [
     "--disable-static"
    ],
    "cleanup": [
     "/bin",
     "/share/doc"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://www.libraw.org/data/LibRaw-0.22.2.tar.gz",
      "sha256": "de86b035655accff8d4010f1a221fdf50d353cb7b1422ba26f14a0db92612cfa"
     }
    ]
   },
   {
    "name": "lightzone",
    "buildsystem": "simple",
    "build-options": {
     "prepend-path": "/usr/lib/sdk/openjdk21/bin",
     "env": {
      "JAVA_HOME": "/usr/lib/sdk/openjdk21/jvm/openjdk-21"
     }
    },
    "build-commands": [
     "./gradlew jpackageImage -x test --offline",
     "install -Dt /app/bin linux/products/lightzone",
     "install -Dt /app/lib/lightzone lightcrafts/build/resources/main/native/*.so",
     "install -Dt /app/share/applications linux/products/lightzone.desktop -m644",
     "install -Dt /app/share/java/lightzone lightcrafts/build/resources/main/native/dcraw_lz",
     "install -t  /app/share/java/lightzone linux/build/jpackage/lightzone/lib/app/*.jar -m644",
     "install -Dt /app/share/metainfo linux/products/${FLATPAK_ID}.metainfo.xml -m644",
     "cp -a linux/icons /app/share/"
    ],
    "sources": [
     "flatpak-sources.json",
     "flatpak-plugin-sources.json",
     {
      "type": "git",
      "url": "https://github.com/ktgw0316/LightZone.git",
      "tag": "v5.0.2",
      "commit": "9def5f9d3b0ed3443faaf5ad85e5720420e80b8a"
     },
     {
      "type": "patch",
      "paths": [
       "patches/lz-build.patch",
       "patches/gradle.patch"
      ]
     }
    ]
   }
  ]
 }
}