{
 "app_id": "net.sourceforge.Hugin",
 "source_url": "https://raw.githubusercontent.com/flathub/net.sourceforge.Hugin/master/net.sourceforge.Hugin.json",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "26.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=x11",
  "--device=dri",
  "--filesystem=home"
 ],
 "module_count": 14,
 "fetched_at": "2026-09-17T16:13:46.577702+00:00",
 "manifest": {
  "app-id": "net.sourceforge.Hugin",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "26.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "hugin",
  "rename-desktop-file": "hugin.desktop",
  "rename-icon": "hugin",
  "rename-appdata-file": "hugin.appdata.xml",
  "rename-mime-file": "hugin.xml",
  "rename-mime-icons": [
   "application-x-ptoptimizer-script"
  ],
  "finish-args": [
   "--share=ipc",
   "--socket=x11",
   "--device=dri",
   "--filesystem=home",
   "--env=PERL5LIB=/app/lib/perl5/site_perl/5.44/"
  ],
  "cleanup": [
   "/share/bakefile",
   "/share/man",
   "/include",
   "/bin/xmp*",
   "*.a"
  ],
  "modules": [
   "shared-modules/glu/glu-9.json",
   {
    "name": "wxwidgets",
    "rm-configure": true,
    "config-opts": [
     "--with-libpng",
     "--with-zlib",
     "--disable-sdltest",
     "--disable-webview",
     "--disable-webviewwebkit",
     "--disable-ribbon",
     "--disable-richtext",
     "--disable-glcanvasegl",
     "--with-expat=builtin",
     "--with-libiconv=/usr"
    ],
    "cleanup": [
     "/bin",
     "/include",
     "/lib/wx",
     "/share/aclocal",
     "/share/bakefile"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.4/wxWidgets-3.2.4.tar.bz2",
      "sha256": "0640e1ab716db5af2ecb7389dbef6138d7679261fbff730d23845ba838ca133e"
     }
    ]
   },
   {
    "name": "boost",
    "buildsystem": "simple",
    "cleanup": [
     "/include",
     "/lib/libboost_*.a"
    ],
    "build-commands": [
     "./bootstrap.sh --with-libraries=filesystem",
     "./b2 install variant=release link=shared runtime-link=shared --prefix=/app -j $FLATPAK_BUILDER_N_JOBS"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://downloads.sourceforge.net/project/boost/boost/1.68.0/boost_1_68_0.tar.bz2",
      "sha256": "7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7"
     }
    ]
   },
   {
    "name": "libpano13",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
    ],
    "build-options": {
     "cxxflags": "-fpermissive"
    },
    "cleanup": [
     "/include",
     "/lib/pkgconfig",
     "/share/man",
     "/share/pano13/doc"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://download.sourceforge.net/project/panotools/libpano13/libpano13-2.9.23/libpano13-2.9.23_rc1.tar.gz",
      "sha256": "e7c076d37a14c39434962115e47ddbe18452ca3de5ce40e2aaefa7cf5815ea28"
     }
    ]
   },
   {
    "name": "openexr",
    "config-opts": [
     "--enable-shared",
     "--disable-static"
    ],
    "cleanup": [
     "/bin",
     "/include",
     "/lib/pkgconfig",
     "/share/aclocal",
     "*.la"
    ],
    "build-options": {
     "cxxflags": "-std=c++14"
    },
    "modules": [
     {
      "name": "ilmbase",
      "config-opts": [
       "--enable-shared",
       "--disable-static"
      ],
      "build-options": {
       "cxxflags": "-std=c++14",
       "ldflags": "-lpthread"
      },
      "sources": [
       {
        "type": "archive",
        "url": "https://github.com/openexr/openexr/releases/download/v2.3.0/ilmbase-2.3.0.tar.gz",
        "sha256": "456978d1a978a5f823c7c675f3f36b0ae14dba36638aeaa3c4b0e784f12a3862"
       },
       {
        "type": "shell",
        "commands": [
         "rm config.guess configure"
        ]
       }
      ],
      "cleanup": [
       "/include/OpenEXR",
       "/lib/libHalf.la",
       "/lib/libIex*.la",
       "/lib/libIlm*.la",
       "/lib/libImath*.la",
       "/lib/pkgconfig/IlmBase.pc"
      ]
     }
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/openexr/openexr/releases/download/v2.3.0/openexr-2.3.0.tar.gz",
      "sha256": "fd6cb3a87f8c1a233be17b94c74799e6241d50fc5efd4df75c7a4b9cf4e25ea6"
     },
     {
      "type": "patch",
      "path": "patches/openexr-no-docs.patch"
     },
     {
      "type": "shell",
      "commands": [
       "rm config.guess configure"
      ]
     }
    ]
   },
   {
    "name": "vigra",
    "buildsystem": "cmake-ninja",
    "cleanup": [
     "/doc",
     "/include",
     "/lib/vigra/*.cmake",
     "/share/man"
    ],
    "config-opts": [
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
     "-DWITH_OPENEXR=1"
    ],
    "post-install": [
     "install -Dm644 -t ${FLATPAK_DEST}/share/licenses/vigra LICENSE.txt"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/ukoethe/vigra/archive/refs/tags/Version-1-11-2.tar.gz",
      "sha256": "4841936f5c3c137611ec782e293d961df29d3b5b70ade8cb711374de0f4cb5d3"
     }
    ]
   },
   {
    "name": "exiv2",
    "buildsystem": "cmake-ninja",
    "cleanup": [
     "/bin",
     "/include",
     "/lib/cmake",
     "/lib/pkgconfig",
     "/share/man"
    ],
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
    ],
    "post-install": [
     "install -Dm644 -t ${FLATPAK_DEST}/share/licenses/exiv2 COPYING"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/Exiv2/exiv2/releases/download/v0.27.7/exiv2-0.27.7-Source.tar.gz",
      "sha256": "70629dc27e3d4dd5c3fa91afbea93166d338b1de284e6a4c44bbf9dcfe7bbc6d"
     }
    ]
   },
   "shared-modules/glew/glew.json",
   {
    "name": "enblend",
    "buildsystem": "cmake-ninja",
    "cleanup": [
     "/share/man"
    ],
    "config-opts": [
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
     "-DENABLE_OPENMP=on"
    ],
    "modules": [
     {
      "name": "gsl",
      "config-opts": [
       "--enable-shared",
       "--disable-static"
      ],
      "sources": [
       {
        "type": "archive",
        "url": "https://mirror.cs.odu.edu/gnu/gsl/gsl-2.5.tar.gz",
        "sha256": "0460ad7c2542caaddc6729762952d345374784100223995eb14d614861f2258d"
       }
      ],
      "cleanup": [
       "/bin",
       "/include",
       "/lib/pkgconfig",
       "/share/aclocal",
       "/share/info",
       "/share/man",
       "*.a",
       "*.la"
      ]
     }
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://download.sourceforge.net/project/enblend/enblend-enfuse/enblend-enfuse-4.2/enblend-enfuse-4.2.tar.gz",
      "sha256": "8703e324939ebd70d76afd350e56800f5ea2c053a040a5f5218b2a1a4300bd48"
     },
     {
      "type": "patch",
      "paths": [
       "patches/enblend-cmake.patch",
       "patches/enblend-dl.patch",
       "patches/enblend-cxx.patch"
      ]
     }
    ]
   },
   {
    "name": "perl",
    "no-autogen": true,
    "config-opts": [
     "-des",
     "-Duseshrplib"
    ],
    "build-options": {
     "cflags": "-fPIC",
     "ldflags": "-fpic"
    },
    "cleanup": [
     "/man",
     "*.h"
    ],
    "post-install": [
     "find ${FLATPAK_DEST}/lib/perl5/ -name \\*.so -exec chmod u+w {} \\;"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://www.cpan.org/src/5.0/perl-5.44.0.tar.gz",
      "sha256": "3b855066b92491cb40e86affb1ca57d1a388aa43e51b91c7806a32c2f65f96c3"
     },
     {
      "type": "script",
      "dest-filename": "configure",
      "commands": [
       "exec ./configure.gnu $@"
      ]
     }
    ]
   },
   {
    "name": "exiftool",
    "buildsystem": "simple",
    "build-commands": [
     "perl-libs/install.sh"
    ],
    "post-install": [
     "chmod -Rf u+w ${FLATPAK_DEST}/lib/perl5/site_perl"
    ],
    "sources": [
     "exiftool-sources.json"
    ],
    "cleanup": [
     "/man"
    ]
   },
   {
    "name": "hugin",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "post-install": [
     "for s in 16 32 48 128 256; do mv ${FLATPAK_DEST}/share/icons/hicolor/${s}x${s}/apps/ptbatcher.png ${FLATPAK_DEST}/share/icons/hicolor/${s}x${s}/apps/${FLATPAK_ID}.PTBatcherGUI.png  ; done",
     "mv ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/ptbatcher.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.PTBatcherGUI.svg",
     "mv ${FLATPAK_DEST}/share/applications/PTBatcherGUI.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.PTBatcherGUI.desktop",
     "desktop-file-edit --set-icon=${FLATPAK_ID}.PTBatcherGUI ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.PTBatcherGUI.desktop",
     "mv ${FLATPAK_DEST}/share/applications/calibrate_lens_gui.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.CalibrateLensGUI.desktop",
     "desktop-file-edit --set-icon=${FLATPAK_ID} ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.CalibrateLensGUI.desktop",
     "mv ${FLATPAK_DEST}/share/applications/pto_gen.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.PTOGen.desktop",
     "desktop-file-edit --set-icon=${FLATPAK_ID} ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.PTOGen.desktop",
     "mv ${FLATPAK_DEST}/share/applications/hugin_toolbox_gui.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.Toolbox.desktop",
     "desktop-file-edit --set-icon=${FLATPAK_ID} ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.Toolbox.desktop"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://download.sourceforge.net/project/hugin/hugin/hugin-2025.0/hugin-2025.0.1.tar.bz2",
      "sha256": "7cf8eb33a6a8848cc7f816faf4bc88389228883d5513136dccb5cb243912ab79",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 1341,
       "stable-only": true,
       "url-template": "https://download.sourceforge.net/project/hugin/hugin/hugin-$major.$minor/hugin-$version.tar.bz2"
      }
     },
     {
      "type": "patch",
      "path": "patches/hugin-appdata.patch"
     }
    ]
   }
  ]
 }
}