From 7f004736df522df022d1e38800b8f3e22a7909a9 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 9 Oct 2024 09:18:44 +0100 Subject: [PATCH 1/2] net-libs/libqmi: make introspection optional again, style tweaks * Make introspection optional again as unconditionally depending on it is problematic for embedded use as it drags in Python as well. This was the case before the Meson port in d26c72d36cfa28a035d89a9efdf7182e6351544c. * Style tweaks (just variable order bits which are IMO unobjectionable). Bug: https://bugs.gentoo.org/936949 Signed-off-by: Sam James --- net-libs/libqmi/libqmi-1.32.4-r1.ebuild | 59 +++++++++++++++++++++++++ net-libs/libqmi/libqmi-9999.ebuild | 16 +++---- 2 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 net-libs/libqmi/libqmi-1.32.4-r1.ebuild diff --git a/net-libs/libqmi/libqmi-1.32.4-r1.ebuild b/net-libs/libqmi/libqmi-1.32.4-r1.ebuild new file mode 100644 index 0000000000000..68b118b348344 --- /dev/null +++ b/net-libs/libqmi/libqmi-1.32.4-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mobile-broadband/libqmi.git" +else + SRC_URI="https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/archive/${PV}/${P}.tar.bz2" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86" +fi + +inherit bash-completion-r1 meson udev + +DESCRIPTION="Qualcomm MSM (Mobile Station Modem) Interface (QMI) modem protocol library" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/libqmi/ https://gitlab.freedesktop.org/mobile-broadband/libqmi" + +LICENSE="LGPL-2" +SLOT="0/5.9" # soname of libqmi-glib.so +IUSE="gtk-doc introspection +mbim +qrtr" + +RDEPEND=" + >=dev-libs/glib-2.56 + >=dev-libs/libgudev-232 + introspection? ( dev-libs/gobject-introspection:= ) + mbim? ( >=net-libs/libmbim-1.18.0 ) + qrtr? ( >=net-libs/libqrtr-glib-1.0.0:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-apps/help2man + virtual/pkgconfig + gtk-doc? ( dev-util/gtk-doc ) +" + +src_configure() { + local emesonargs=( + $(meson_use mbim mbim_qmux) + $(meson_use qrtr) + -Drmnet=true + + -Dudev=true + -Dudevdir="$(get_udevdir)" + + $(meson_use introspection) + $(meson_use gtk-doc gtk_doc) + -Dman=true + + # Let's avoid BuildRequiring bash-completion, install it manually + -Dbash_completion=false + ) + meson_src_configure +} + +src_install() { + meson_src_install + dobashcomp src/qmicli/qmicli +} diff --git a/net-libs/libqmi/libqmi-9999.ebuild b/net-libs/libqmi/libqmi-9999.ebuild index 5336e7de9c064..68b118b348344 100644 --- a/net-libs/libqmi/libqmi-9999.ebuild +++ b/net-libs/libqmi/libqmi-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -7,8 +7,8 @@ if [[ ${PV} == "9999" ]] ; then inherit git-r3 EGIT_REPO_URI="https://gitlab.freedesktop.org/mobile-broadband/libqmi.git" else - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86" SRC_URI="https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/archive/${PV}/${P}.tar.bz2" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86" fi inherit bash-completion-r1 meson udev @@ -17,17 +17,15 @@ DESCRIPTION="Qualcomm MSM (Mobile Station Modem) Interface (QMI) modem protocol HOMEPAGE="https://www.freedesktop.org/wiki/Software/libqmi/ https://gitlab.freedesktop.org/mobile-broadband/libqmi" LICENSE="LGPL-2" -IUSE="gtk-doc +mbim +qrtr" - -SLOT="0/5.9" # soname of libqmi-glib.so +SLOT="0/5.9" # soname of libqmi-glib.so +IUSE="gtk-doc introspection +mbim +qrtr" RDEPEND=" >=dev-libs/glib-2.56 >=dev-libs/libgudev-232 + introspection? ( dev-libs/gobject-introspection:= ) mbim? ( >=net-libs/libmbim-1.18.0 ) qrtr? ( >=net-libs/libqrtr-glib-1.0.0:= ) - - dev-libs/gobject-introspection:= " DEPEND="${RDEPEND}" BDEPEND=" @@ -37,7 +35,6 @@ BDEPEND=" " src_configure() { - # Let's avoid BuildRequiring bash-completion, install it manually local emesonargs=( $(meson_use mbim mbim_qmux) $(meson_use qrtr) @@ -46,10 +43,11 @@ src_configure() { -Dudev=true -Dudevdir="$(get_udevdir)" - -Dintrospection=true + $(meson_use introspection) $(meson_use gtk-doc gtk_doc) -Dman=true + # Let's avoid BuildRequiring bash-completion, install it manually -Dbash_completion=false ) meson_src_configure From 37a69f6f9e9e4cb65b26632a1aeee33c2a86ccba Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 9 Oct 2024 09:20:32 +0100 Subject: [PATCH 2/2] net-libs/libmbim: make introspection optional This is useful for embedded environments that want a small image. Closes: https://bugs.gentoo.org/936949 Signed-off-by: Sam James --- net-libs/libmbim/libmbim-1.28.4-r1.ebuild | 44 +++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 net-libs/libmbim/libmbim-1.28.4-r1.ebuild diff --git a/net-libs/libmbim/libmbim-1.28.4-r1.ebuild b/net-libs/libmbim/libmbim-1.28.4-r1.ebuild new file mode 100644 index 0000000000000..d64b685b3b687 --- /dev/null +++ b/net-libs/libmbim/libmbim-1.28.4-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..13} ) +inherit bash-completion-r1 meson python-any-r1 + +DESCRIPTION="Mobile Broadband Interface Model (MBIM) modem protocol helper library" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/libmbim/ https://gitlab.freedesktop.org/mobile-broadband/libmbim" +SRC_URI="https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/archive/${PV}/${P}.tar.bz2" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86" +IUSE="gtk-doc introspection" + +RDEPEND=" + >=dev-libs/glib-2.56:2 + introspection? ( >=dev-libs/gobject-introspection-0.9.6:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + ${PYTHON_DEPS} + gtk-doc? ( dev-util/gtk-doc ) + dev-util/glib-utils + sys-apps/help2man + virtual/pkgconfig +" + +src_configure() { + local emesonargs=( + -Dman=true + # Let's avoid BuildRequiring bash-completion, install it manually + -Dbash_completion=false + $(meson_use gtk-doc gtk_doc) + $(meson_use introspection) + ) + meson_src_configure +} + +src_install() { + meson_src_install + dobashcomp src/mbimcli/mbimcli +}