net-misc/netplan: fix for gentoo

This commit is contained in:
Alexander Miroshnichenko 2023-05-25 09:56:07 +03:00
parent e4d28e924e
commit 9538574c73
Signed by: alex
GPG Key ID: E93720C6C73A77F4
4 changed files with 67 additions and 24 deletions

View File

@ -1,3 +1,3 @@
AUX netplan-deps.patch 925 BLAKE2B 618abad9835920c22d77c8c909f762521a28566d421b378df473b2f2255a77a23647b95e89f7c82e954d4c337ad84ae97672f2dd313c8b4ef7a7e5f416af76c3 SHA512 fca0a7b062a2a4f89d3c103253dd9b1f4c71b1a7c8caa6b3c49ac2f2b2fe76d648ac512793467f6bd79aa6d1eb31c3d61c2d9ef77b617545e19650267c9dce6f
AUX 0001-build-add-Gentoo-compat.patch 2155 BLAKE2B cb5ccce48d293ad3a385a61ce1130698c2797d8bbcd32898df3b6217af9291ea10d58870d0d0132f5f12f3ceda13c5d71a44a9e2acb8032e28f9e6c88dd6b965 SHA512 1c4895181b234896889a0bbaf05e6aec33fba68a902aa353c2207a452184050804919e2d57279cfddf597f8b023178c283f49d60a40c2ec6d079390385f4dd16
DIST netplan-0.106.tar.gz 364280 BLAKE2B 7752470df1751faf36349a401bcdc30aa0a5cf27d08bc48a0953dcd950cd3f8386b5c3487bd9a3aeeeb74eca40f7fdb4fc7cb675bb89c9ae67d965d339f21921 SHA512 9f3c28770d5071d3df3664a885b37a0712c8f28240bc354d0b4f1d21afdb280791ceddfc323089287d57143d46a13748e7c09d7ecc098601a988b7a98f11c84f
EBUILD netplan-0.106.ebuild 916 BLAKE2B f5494a5792bbcd8b3030c70d634c1c5a12acb940c575b64917cd6f3d7deedfbd5031d5d3d07980e60ed525b2980cf70ddc96c64d58437969314c0c998d3f2edd SHA512 7626c84ebf1de032e60448e9698c20e9cdcb64f6ce41d9404530873f77302d169f4ede99c172207514c2b2d5aa1054982b8071a8aaf6ddde2e5476ba31c7acf5
EBUILD netplan-0.106.ebuild 1213 BLAKE2B 32f464d4c4fe60e9f7decab427d5b416373ce5734922a0cf3f54c28d35ed65547a0d44d9dfa99cc7e377094046903508f6a7b195614284d6fbb2aff4045a43a6 SHA512 0db4e3650a7757a3911b47dfc03359f4a2850ae310373fd31aba50aea03e02b9d7af0696eeabe21af941436e227d8b8bbec898a000adf19cbb2e4a465c89fbb7

View File

@ -0,0 +1,49 @@
From 49b0ac071ceeef64e460ef2c5ac9bf361e787b7a Mon Sep 17 00:00:00 2001
From: Alexander Miroshnichenko <alex@millerson.name>
Date: Thu, 25 May 2023 09:51:52 +0300
Subject: [PATCH] build: add Gentoo compat
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
---
meson.build | 8 ++++----
src/meson.build | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/meson.build b/meson.build
index 50bd1b5b192e..615893ddaa08 100644
--- a/meson.build
+++ b/meson.build
@@ -20,11 +20,11 @@ completions = dependency('bash-completion')
systemd_generator_dir = systemd.get_variable(pkgconfig: 'systemdsystemgeneratordir')
bash_completions_dir = completions.get_variable(pkgconfig: 'completionsdir', default_value: '/etc/bash_completion.d')
-# Order: Fedora/Mageia/openSUSE || Debian/Ubuntu
-pyflakes = find_program('pyflakes-3', 'pyflakes3', required: false)
+# Order: Fedora/Mageia/openSUSE || Debian/Ubuntu || Gentoo
+pyflakes = find_program('pyflakes-3', 'pyflakes3', 'pyflakes', required: false)
pycodestyle = find_program('pycodestyle-3', 'pycodestyle', 'pep8', required: false)
-pytest = find_program('pytest-3', 'pytest3') # also requires the pytest-cov plugin
-pycoverage = find_program('python3-coverage')
+pytest = find_program('pytest-3', 'pytest3', 'pytest') # also requires the pytest-cov plugin
+pycoverage = find_program('python3-coverage', 'coverage')
pandoc = find_program('pandoc', required: false)
find = find_program('find')
diff --git a/src/meson.build b/src/meson.build
index b44649cf89c2..262c65e18482 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -36,7 +36,7 @@ executable(
install: true)
install_symlink(
'netplan',
- pointing_to: join_paths('..', '..', '..') + join_paths(get_option('prefix'), libexec_netplan, 'generate'),
+ pointing_to: join_paths('..', '..', '..', '..') + join_paths(get_option('prefix'), libexec_netplan, 'generate'),
install_dir: systemd_generator_dir)
# Install this symlink for legacy reasons, see netplan/cli/utils.py: get_generator_path()
install_symlink(
--
2.39.2

View File

@ -1,18 +0,0 @@
diff --git a/meson.build b/meson.build
index 7f48cb4f244a..bebff535460a 100644
--- a/meson.build
+++ b/meson.build
@@ -20,10 +20,10 @@ completions = dependency('bash-completion')
systemd_generator_dir = systemd.get_variable(pkgconfig: 'systemdsystemgeneratordir')
bash_completions_dir = completions.get_variable(pkgconfig: 'completionsdir', default_value: '/etc/bash_completion.d')
-# Order: Fedora/Mageia/openSUSE || Debian/Ubuntu
-pyflakes = find_program('pyflakes-3', 'pyflakes3', required: false)
+# Order: Fedora/Mageia/openSUSE || Debian/Ubuntu || Gentoo
+pyflakes = find_program('pyflakes-3', 'pyflakes3', 'pyflakes', required: false)
pycodestyle = find_program('pycodestyle-3', 'pycodestyle', 'pep8', required: false)
-nose = find_program('nosetests-3', 'nosetests3')
+nose = find_program('nosetests-3', 'nosetests3', 'nosetests')
pandoc = find_program('pandoc', required: false)
find = find_program('find')

View File

@ -14,7 +14,7 @@ SLOT="0"
KEYWORDS="~amd64"
IUSE="doc systemd bash-completion"
IUSE="doc +systemd +bash-completion test"
REQUIRED_USE="systemd bash-completion"
DEPEND=">=dev-libs/glib-2.64.3
@ -27,15 +27,27 @@ DEPEND=">=dev-libs/glib-2.64.3
BDEPEND="${DEPEND}
dev-python/pytest
dev-python/pycodestyle
dev-python/pyflakes
dev-python/coverage
test? ( dev-util/cmocka
dev-python/pycodestyle
)
"
RDEPEND=">=dev-python/netifaces-0.10.9
>=dev-libs/libyaml-0.2.5
>=dev-python/pyyaml-5.3.1[libyaml(+)]
dev-python/rich
"
PATCHES=(
"${FILESDIR}/netplan-deps.patch"
"${FILESDIR}/0001-build-add-Gentoo-compat.patch"
)
src_configure() {
local emesonargs=(
$(meson_use test unit_testing)
$(meson_use test b_coverage)
"${myconf[@]}"
)
meson_src_configure
}