Manifest example to include libprotobuf dependency

One of my apps requires libprotobuf-dev to build, but my attempt to build this lib from source with cmake fails with error:

  Failed to clone repository: 'https://github.com/google/googletest.git'


make[2]: *** [CMakeFiles/googletest-populate.dir/build.make:102: googletest-populate-prefix/src/googletest-populate-stamp/googletest-populate-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/googletest-populate.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

CMake Error at /usr/share/cmake-3.31/Modules/FetchContent.cmake:1918 (message):
  Build step for googletest failed: 2
Call Stack (most recent call first):
  /usr/share/cmake-3.31/Modules/FetchContent.cmake:1609 (__FetchContent_populateSubbuild)
  /usr/share/cmake-3.31/Modules/FetchContent.cmake:2145:EVAL:2 (__FetchContent_doPopulation)
  /usr/share/cmake-3.31/Modules/FetchContent.cmake:2145 (cmake_language)
  /usr/share/cmake-3.31/Modules/FetchContent.cmake:2384 (__FetchContent_Populate)
  cmake/gtest.cmake:19 (FetchContent_MakeAvailable)
  CMakeLists.txt:270 (include)


-- Configuring incomplete, errors occurred!

Maybe someone can share an example of a manifest that uses this dependency in the following environment:

    "runtime": "org.kde.Platform",
    "sdk": "org.kde.Sdk",
    "runtime-version": "5.15-24.08",

Not sure, maybe I can also install it somewhere from the runtime as the option…
Thanks!

Finally, built with simple, if anyone is interested:

{
    "name": "libprotobuf",
    "buildsystem": "simple",
    "build-commands": [
        "./autogen.sh",
        "./configure --prefix=/app",
        "make -j $FLATPAK_BUILDER_N_JOBS && make install"
    ],
    "sources": [
        {
            "type": "archive",
            "url": "https://github.com/protocolbuffers/protobuf/releases/download/v2.6.0/protobuf-2.6.0.tar.gz",
            "sha256": "cd087148a8651aaaf49e6e47df9491f3cd4cc58d3add0ac7d7b834ad808f4f13"
        }
    ]
},

You can always search the existing manifests on GitHub: Code search results · GitHub

Your initial build failed because it tries to download the tests at build time. But internet access must be explicitly enabled in the build sandbox (this is disallowed for Flathub builds).

no it should be buildsystem: autotools. There are many project that builds it without problem.