diff --git a/recipes-extended/gmobile/gmobile/0001-meson.build-create-a-pkgconfig-.pc-file.patch b/recipes-extended/gmobile/gmobile/0001-meson.build-create-a-pkgconfig-.pc-file.patch new file mode 100644 index 0000000..0be1746 --- /dev/null +++ b/recipes-extended/gmobile/gmobile/0001-meson.build-create-a-pkgconfig-.pc-file.patch @@ -0,0 +1,59 @@ +From a9c5d3add6550e27636de3ef86d6eb8bad41874d Mon Sep 17 00:00:00 2001 +From: Markus Volk +Date: Tue, 15 Aug 2023 07:36:31 +0200 +Subject: [PATCH] meson.build: add a pkgconfig .pc file + + - fix version + - build shared lib and install + - install headers + +Upstream-Status: Inappropriate + +Signed-off-by: Markus Volk +--- + meson.build | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index e9f6c62..7e94496 100644 +--- a/meson.build ++++ b/meson.build +@@ -1,5 +1,5 @@ + project('gmobile', 'c', +- version: '0.0.1', ++ version: '0.0.3', + license: 'LGPLv2.1+', + meson_version: '>= 0.56.1', + default_options: [ 'warning_level=1', 'buildtype=debugoptimized', 'c_std=gnu11' ], +@@ -99,3 +99,7 @@ summary({ + bool_yn: true, + section: 'Build', + ) ++ ++install_headers('src/gmobile.h' , 'src/gm-cutout.h', 'src/gm-device-info.h', 'src/gm-device-tree.h', 'src/gm-display-panel.h', 'src/gm-error.h', 'src/gm-main.h', 'src/gm-timeout.h', 'src/gm-rect.h') ++pkg = import('pkgconfig') ++pkg.generate(gm_lib) +diff --git a/src/meson.build b/src/meson.build +index ee98a39..55a1bfe 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -37,12 +37,14 @@ gm_c_args = [ + '-DG_LOG_DOMAIN="gmobile"', + ] + +-gm_lib = static_library( ++gm_lib = shared_library( + 'gmobile', + gm_sources, + include_directories: root_inc, + c_args: gm_c_args, +- dependencies: gm_deps) ++ dependencies: gm_deps, ++ install: true, ++) + + gmobile_dep = declare_dependency( + include_directories: [root_inc, include_directories('.')], +-- +2.41.0 + diff --git a/recipes-extended/gmobile/gmobile_git.bb b/recipes-extended/gmobile/gmobile_git.bb index 0efea35..5a6b452 100644 --- a/recipes-extended/gmobile/gmobile_git.bb +++ b/recipes-extended/gmobile/gmobile_git.bb @@ -6,7 +6,14 @@ inherit meson pkgconfig DEPENDS = "glib-2.0 json-glib" -SRC_URI = "git://gitlab.gnome.org/guidog/gmobile.git;protocol=https;nobranch=1" +SRC_URI = " \ + git://gitlab.gnome.org/guidog/gmobile.git;protocol=https;nobranch=1 \ + file://0001-meson.build-create-a-pkgconfig-.pc-file.patch \ +" S = "${WORKDIR}/git" -SRCREV = "52f8c0f7970bb997ecc960b61bef4aa07eeaa92c" -PV = "0.0.1" +SRCREV = "f1b50f0f90604e0f125412932dae9b1e08d57ddc" +PV = "0.0.3" + +do_install:append() { + install -m 0644 ${B}/gm-config.h ${D}${includedir} +}