{
 "app_id": "org.opencpn.OpenCPN",
 "source_url": "https://raw.githubusercontent.com/flathub/org.opencpn.OpenCPN/master/org.opencpn.OpenCPN.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=pulseaudio",
  "--device=all",
  "--filesystem=home",
  "--filesystem=host-etc:ro",
  "--allow=canbus",
  "--system-talk-name=org.freedesktop.login1",
  "--system-talk-name=org.freedesktop.systemd1"
 ],
 "module_count": 14,
 "fetched_at": "2026-09-17T16:16:16.067820+00:00",
 "manifest": {
  "app-id": "org.opencpn.OpenCPN",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "opencpn.sh",
  "rename-desktop-file": "opencpn.desktop",
  "rename-icon": "opencpn",
  "rename-appdata-file": "opencpn.appdata.xml",
  "finish-args": [
   "--socket=x11",
   "--socket=pulseaudio",
   "--filesystem=home",
   "--share=ipc",
   "--share=network",
   "--device=all",
   "--allow=canbus",
   "--system-talk-name=org.freedesktop.systemd1",
   "--system-talk-name=org.freedesktop.login1",
   "--filesystem=host-etc:ro"
  ],
  "add-extensions": {
   "org.opencpn.OpenCPN.Plugin": {
    "directory": "extensions",
    "merge-dirs": "lib/opencpn;share/opencpn/plugins;share/locale",
    "subdirectories": true,
    "no-autodownload": true,
    "autodelete": false
   }
  },
  "modules": [
   {
    "name": "glu",
    "buildsystem": "meson",
    "sources": [
     {
      "type": "archive",
      "url": "https://archive.mesa3d.org/glu/glu-9.0.3.tar.xz",
      "sha256": "bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f"
     }
    ],
    "cleanup": [
     "/lib/*.a",
     "/lib/*.la",
     "/lib/pkgconfig"
    ]
   },
   {
    "name": "pycairo",
    "buildsystem": "meson",
    "sources": [
     {
      "type": "archive",
      "url": "https://files.pythonhosted.org/packages/07/4a/42b26390181a7517718600fa7d98b951da20be982a50cd4afb3d46c2e603/pycairo-1.27.0.tar.gz",
      "sha256": "5cb21e7a00a2afcafea7f14390235be33497a2cce53a98a19389492a60628430"
     }
    ]
   },
   {
    "name": "PyGobject",
    "buildsystem": "meson",
    "sources": [
     {
      "type": "archive",
      "url": "https://files.pythonhosted.org/packages/4a/36/fec530a313d3d48f12e112ac0a65ee3ccc87f385123a0493715609e8e99c/pygobject-3.52.3.tar.gz",
      "sha256": "00e427d291e957462a8fad659a9f9c8be776ff82a8b76bdf402f1eaeec086d82"
     }
    ]
   },
   {
    "name": "python-dbus",
    "sources": [
     {
      "type": "archive",
      "url": "https://files.pythonhosted.org/packages/ff/24/63118050c7dd7be04b1ccd60eab53fef00abe844442e1b6dec92dae505d6/dbus-python-1.4.0.tar.gz",
      "sha256": "991666e498f60dbf3e49b8b7678f5559b8a65034fdf61aae62cdecdb7d89c770"
     }
    ]
   },
   {
    "name": "rapidjson",
    "buildsystem": "cmake",
    "builddir": true,
    "config-opts": [
     "-DRAPIDJSON_BUILD_DOC=OFF",
     "-DRAPIDJSON_BUILD_EXAMPLES=OFF",
     "-DRAPIDJSON_BUILD_TESTS=OFF",
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/Tencent/rapidjson/archive/refs/tags/v1.1.0.tar.gz",
      "sha256": "bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e"
     },
     {
      "type": "patch",
      "paths": [
       "patches/0010-rapidjson-1.1.0-c++20.patch",
       "patches/0011-rapidjson-1.1.0-do_not_include_gtest_src_dir.patch",
       "patches/0012-Fix-Wclass-memaccess-warnings-errors.patch",
       "patches/0013-gcc7.patch",
       "patches/0014-libs-rapidjson-Add-FTBFS-fix-patch.patch"
      ]
     }
    ]
   },
   {
    "name": "portaudio",
    "sources": [
     {
      "type": "archive",
      "url": "http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz",
      "sha256": "f5a21d7dcd6ee84397446fa1fa1a0675bb2e8a4a6dceb4305a8404698d8d1513"
     }
    ],
    "config-opts": [
     "--disable-static",
     "--disable-udev",
     "--prefix=/app"
    ]
   },
   {
    "name": "wxGTK3",
    "buildsystem": "cmake",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.9/wxWidgets-3.2.9.tar.bz2",
      "sha256": "fb90f9538bffd6a02edbf80037a0c14c2baf9f509feac8f76ab2a5e4321f112b"
     }
    ],
    "cleanup": [
     "/include/"
    ]
   },
   {
    "name": "portaudio",
    "config-opts": [
     "--disable-static",
     "--without-oss",
     "--without-jack"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz",
      "sha256": "f5a21d7dcd6ee84397446fa1fa1a0675bb2e8a4a6dceb4305a8404698d8d1513"
     }
    ],
    "cleanup": [
     "/lib/pkgconfig",
     "/include",
     "*.la"
    ]
   },
   {
    "name": "gtest",
    "buildsystem": "cmake",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/google/googletest.git",
      "tag": "release-1.12.1",
      "commit": "58d77fa8070e8cec2dc1ed015d66b454c8d78850"
     }
    ]
   },
   {
    "name": "shapefile",
    "buildsystem": "cmake",
    "sources": [
     {
      "type": "archive",
      "url": "https://download.osgeo.org/shapelib/shapelib-1.6.1.tar.gz",
      "sha256": "5da90a60e25440f108f4e8e95732bfa83ede13c8e0c2bcf80ae41006cc8ebc20"
     },
     {
      "type": "patch",
      "paths": [
       "patches/0021-cmake-Add-guard-for-multiple-inclusions.patch",
       "patches/0022-cmake-Make-BUILD_TESTING-an-option.patch"
      ]
     }
    ]
   },
   {
    "name": "iproute2",
    "buildsystem": "simple",
    "build-commands": [
     "make",
     "make DESTDIR=/app install"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://kernel.org/pub/linux/utils/net/iproute2/iproute2-6.6.0.tar.gz",
      "sha256": "1e6871720d85461d9f175843fdeb659448cd4f74de180ccc95a6f3b0b7e39f0a"
     }
    ],
    "cleanup": [
     "/lib/pkgconfig",
     "/include",
     "/share/man",
     "/sbin/*stat",
     "/sbin/bridge",
     "/sbin/genl",
     "/sbin/routel",
     "/sbin/rt*",
     "/sbin/ss",
     "/sbin/tc"
    ]
   },
   {
    "name": "libusb-0.1",
    "config-opts": [
     "--disable-static",
     "--disable-udev",
     "--prefix=/app"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/libusb/libusb-compat-0.1/archive/refs/tags/v0.1.8.tar.gz",
      "sha256": "73f8023b91a4359781c6f1046ae84156e06816aa5c2916ebd76f353d41e0c685"
     }
    ]
   },
   {
    "name": "glew2",
    "no-autogen": true,
    "sources": [
     {
      "type": "archive",
      "url": "https://downloads.sourceforge.net/project/glew/glew/2.2.0/glew-2.2.0.tgz",
      "sha256": "d4fc82893cfb00109578d0a1a2337fb8ca335b3ceccf97b97e5cc7f08e4353e1"
     }
    ],
    "make-args": [
     "GLEW_PREFIX=${FLATPAK_DEST}",
     "GLEW_DEST=${FLATPAK_DEST}",
     "LIBDIR=${FLATPAK_DEST}/lib",
     "CFLAGS.EXTRA:=${CFLAGS} -fPIC",
     "LDFLAGS.EXTRA=${LDFLAGS}",
     "glew.lib.static"
    ],
    "make-install-args": [
     "GLEW_PREFIX=${FLATPAK_DEST}",
     "GLEW_DEST=${FLATPAK_DEST}",
     "LIBDIR=${FLATPAK_DEST}/lib",
     "CFLAGS.EXTRA:=${CFLAGS} -fPIC",
     "LDFLAGS.EXTRA=${LDFLAGS}"
    ],
    "cleanup": [
     "/lib/pkgconfig"
    ]
   },
   {
    "name": "opencpn",
    "buildsystem": "cmake",
    "builddir": true,
    "config-opts": [
     "-DOCPN_RELEASE=1",
     "-DOCPN_BUNDLE_DOCS=ON",
     "-DOCPN_BUNDLE_TCDATA=ON",
     "-DOCPN_CI_BUILD=ON",
     "-DOCPN_FLATPAK=ON",
     "-DOCPN_ENABLE_SYSTEM_CMD_SOUND=OFF",
     "-DOCPN_USE_SYSFS_PORTS=ON",
     "-DBUILD_SHARED_LIBS=OFF",
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DCMAKE_FIND_ROOT_PATH=/app",
     "-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER",
     "-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH",
     "-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH"
    ],
    "build-options": {
     "env": {
      "BUILD_NUMBER": "1",
      "CXXFLAGS": "-DFLATPAK",
      "CFLAGS": "-DFLATPAK -Werror -Wno-array-parameter -Wno-stringop-overflow"
     }
    },
    "post-install": [
     "install -d /app/extensions",
     "sed -i '/^Exec=/s/=.*/=opencpn.sh/' /app/share/applications/opencpn.desktop",
     "install -Dm 755 ../data/opencpn.sh /app/bin/opencpn.sh"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/OpenCPN/OpenCPN.git",
      "tag": "Release_5.14.0",
      "commit": "91f3b674366068a6ecd61a5e9aba204bba85f57e",
      "disable-fsckobjects": true
     },
     {
      "type": "patch",
      "paths": [
       "patches/0002-flatpak-Add-a-shell-wrapper.patch"
      ]
     }
    ]
   }
  ]
 }
}