commit:     c74de518f3b0bbeaf9ca2d7534bf0660fb93ce81
Author:     Matt Jolly <Matt.Jolly <AT> footclan <DOT> ninja>
AuthorDate: Wed Jan 25 12:28:23 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar  7 12:14:52 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c74de518

sys-libs/libmodulemd: new package, add 2.14.0, 9999

Signed-off-by: Matt Jolly <Matt.Jolly <AT> footclan.ninja>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/libmodulemd/Manifest                      |  1 +
 .../files/libmodulemd-2.14.0-meson-version.patch   | 61 +++++++++++++++++++
 sys-libs/libmodulemd/libmodulemd-2.14.0.ebuild     | 69 ++++++++++++++++++++++
 sys-libs/libmodulemd/libmodulemd-9999.ebuild       | 67 +++++++++++++++++++++
 sys-libs/libmodulemd/metadata.xml                  | 15 +++++
 5 files changed, 213 insertions(+)

diff --git a/sys-libs/libmodulemd/Manifest b/sys-libs/libmodulemd/Manifest
new file mode 100644
index 000000000000..4fb43efeb856
--- /dev/null
+++ b/sys-libs/libmodulemd/Manifest
@@ -0,0 +1 @@
+DIST libmodulemd-2.14.0.tar.gz 531166 BLAKE2B 
18c3693ef9f74c57c71c7bd80b16d60d0fc2c8732994acae9b8461af5776bfcf8b856eef65222470d070fd256c6ee1468f961ba20b4425502f946d3368e5708c
 SHA512 
dee8e08ada4e246179f88342cd3d3d6736f430b362e36ab1a3605971033ad306a5bf415141a09180a7ea6e70d1532d63d815ca07f208222447b455b9ff0e6f75

diff --git a/sys-libs/libmodulemd/files/libmodulemd-2.14.0-meson-version.patch 
b/sys-libs/libmodulemd/files/libmodulemd-2.14.0-meson-version.patch
new file mode 100644
index 000000000000..bd006f66310c
--- /dev/null
+++ b/sys-libs/libmodulemd/files/libmodulemd-2.14.0-meson-version.patch
@@ -0,0 +1,61 @@
+https://github.com/fedora-modularity/libmodulemd/pull/604
+From: Matt Jolly <[email protected]>
+Date: Fri, 27 Jan 2023 16:03:09 +1100
+Subject: [PATCH] Meson build tidyup
+
+- Set meson_version to actual required version
+- Update deprecated functions to supported equivalents
+--- a/meson.build
++++ b/meson.build
+@@ -15,7 +15,7 @@ project(
+ version : '2.14.1',
+ default_options : ['buildtype=debugoptimized', 'c_std=c11', 
'warning_level=1', 'b_asneeded=true'],
+ license : 'MIT',
+-meson_version : '>=0.47.0'
++meson_version : '>=0.58.0'
+ )
+ 
+ libmodulemd_version = meson.project_version()
+@@ -58,7 +58,7 @@ rpm = dependency('rpm', required : with_rpmio)
+ magic = cc.find_library('magic', required : with_libmagic)
+ 
+ glib = dependency('glib-2.0')
+-glib_prefix = glib.get_pkgconfig_variable('prefix')
++glib_prefix = glib.get_variable(pkgconfig: 'prefix')
+ 
+ bash = find_program('bash')
+ sed = find_program('sed')
+--- a/modulemd/meson.build
++++ b/modulemd/meson.build
+@@ -286,9 +286,9 @@ endif
+ # Test env with release values
+ test_release_env = environment()
+ test_release_env.set('LC_ALL', 'C')
+-test_release_env.set ('MESON_SOURCE_ROOT', meson.source_root())
+-test_release_env.set ('MESON_BUILD_ROOT', meson.build_root())
+-test_release_env.set ('TEST_DATA_PATH', meson.source_root() + 
'/modulemd/tests/test_data')
++test_release_env.set ('MESON_SOURCE_ROOT', meson.project_source_root())
++test_release_env.set ('MESON_BUILD_ROOT', meson.project_build_root())
++test_release_env.set ('TEST_DATA_PATH', meson.project_source_root() + 
'/modulemd/tests/test_data')
+ 
+ # Test env with fatal warnings and criticals
+ test_env = test_release_env
+@@ -304,9 +304,9 @@ py_test_env = test_env
+ if not test_installed_lib
+     # If we're testing an installed version, we want to use the default
+     # locations for these paths.
+-    py_test_env.set ('GI_TYPELIB_PATH', meson.build_root() + '/modulemd')
+-    py_test_env.set ('LD_LIBRARY_PATH', meson.build_root() + '/modulemd')
+-    py_test_env.set ('PYTHONPATH', meson.source_root())
++    py_test_env.set ('GI_TYPELIB_PATH', meson.project_build_root() + 
'/modulemd')
++    py_test_env.set ('LD_LIBRARY_PATH', meson.project_build_root() + 
'/modulemd')
++    py_test_env.set ('PYTHONPATH', meson.project_source_root())
+ 
+     # This test is just to catch whether we are accidentally not testing
+     # the built version.
+@@ -558,5 +558,3 @@ test('test_import_headers', import_header_script,
+       args : modulemd_hdrs,
+       timeout : 300,
+       suite : ['smoketest', 'ci'])
+-
+-

diff --git a/sys-libs/libmodulemd/libmodulemd-2.14.0.ebuild 
b/sys-libs/libmodulemd/libmodulemd-2.14.0.ebuild
new file mode 100644
index 000000000000..9ba2a98c0624
--- /dev/null
+++ b/sys-libs/libmodulemd/libmodulemd-2.14.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit meson python-single-r1
+
+DESCRIPTION="C Library for manipulating Fedora Modularity metadata files"
+HOMEPAGE="https://github.com/fedora-modularity/libmodulemd";
+if [[ ${PV} = 9999* ]]; then
+               inherit git-r3
+               
EGIT_REPO_URI="https://github.com/fedora-modularity/libmodulemd.git";
+else
+               
SRC_URI="https://github.com/fedora-modularity/libmodulemd/archive/refs/tags/${PV}.tar.gz
 -> ${P}.tar.gz"
+               KEYWORDS="~amd64"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+IUSE="gtk-doc test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="
+       ${PYTHON_DEPS}
+       app-arch/rpm
+       sys-apps/file
+       dev-libs/glib:2
+       dev-libs/libyaml
+       $(python_gen_cond_dep '
+               dev-python/pygobject:3[${PYTHON_USEDEP}]
+               ')
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+       ${PYTHON_DEPS}
+       dev-libs/gobject-introspection
+       gtk-doc? (
+               dev-libs/glib[gtk-doc]
+               dev-util/gtk-doc
+       )
+       test? (
+               sys-libs/libmodulemd
+       )
+"
+
+PATCHES=( "${FILESDIR}"/${P}-meson-version.patch )
+
+src_configure() {
+       local emesonargs=(
+               $(meson_use gtk-doc with_docs)
+       )
+       meson_src_configure
+}
+
+src_test() {
+       meson_src_test --no-suite ci_valgrind
+}
+
+src_install() {
+       meson_src_install
+       # We need to compile the gobject introspection overrides to prevent QA 
warnings
+       local PYTHON_GI_OVERRIDESDIR=$("${EPYTHON}" -c 'import 
gi;print(gi._overridesdir)' || die)
+       python_optimize "${D}${PYTHON_GI_OVERRIDESDIR}/"
+
+}

diff --git a/sys-libs/libmodulemd/libmodulemd-9999.ebuild 
b/sys-libs/libmodulemd/libmodulemd-9999.ebuild
new file mode 100644
index 000000000000..f3aa2e50e43d
--- /dev/null
+++ b/sys-libs/libmodulemd/libmodulemd-9999.ebuild
@@ -0,0 +1,67 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit meson python-single-r1
+
+DESCRIPTION="C Library for manipulating Fedora Modularity metadata files"
+HOMEPAGE="https://github.com/fedora-modularity/libmodulemd";
+if [[ ${PV} = 9999* ]]; then
+               inherit git-r3
+               
EGIT_REPO_URI="https://github.com/fedora-modularity/libmodulemd.git";
+else
+               
SRC_URI="https://github.com/fedora-modularity/libmodulemd/archive/refs/tags/${PV}.tar.gz
 -> ${P}.tar.gz"
+               KEYWORDS="~amd64"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+IUSE="gtk-doc test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="
+       ${PYTHON_DEPS}
+       app-arch/rpm
+       sys-apps/file
+       dev-libs/glib:2
+       dev-libs/libyaml
+       $(python_gen_cond_dep '
+               dev-python/pygobject:3[${PYTHON_USEDEP}]
+               ')
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+       ${PYTHON_DEPS}
+       dev-libs/gobject-introspection
+       gtk-doc? (
+               dev-libs/glib[gtk-doc]
+               dev-util/gtk-doc
+       )
+       test? (
+               sys-libs/libmodulemd
+       )
+"
+
+src_configure() {
+       local emesonargs=(
+               $(meson_use gtk-doc with_docs)
+       )
+       meson_src_configure
+}
+
+src_test() {
+       meson_src_test --no-suite ci_valgrind
+}
+
+src_install() {
+       meson_src_install
+       # We need to compile the gobject introspection overrides to prevent QA 
warnings
+       local PYTHON_GI_OVERRIDESDIR=$("${EPYTHON}" -c 'import 
gi;print(gi._overridesdir)' || die)
+       python_optimize "${D}${PYTHON_GI_OVERRIDESDIR}/"
+
+}

diff --git a/sys-libs/libmodulemd/metadata.xml 
b/sys-libs/libmodulemd/metadata.xml
new file mode 100644
index 000000000000..133909780d76
--- /dev/null
+++ b/sys-libs/libmodulemd/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person" proxied="yes">
+                       <email>[email protected]</email>
+                       <name>Matt Jolly</name>
+       </maintainer>
+       <maintainer type="project" proxied="proxy">
+                       <email>[email protected]</email>
+                       <name>Proxy Maintainers</name>
+       </maintainer>
+       <upstream>
+               <remote-id 
type="github">fedora-modularity/libmodulemd</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to