Сравнение sdbus-c++-0.9.0-r6 с sdbus-c++-1.3.0

/usr/portage/dev-cpp/sdbus-c++/sdbus-c++-1.3.0.ebuild 2023-10-09 14:52:29.308368346 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
PYTHON_COMPAT=( python3_{9..12} )
7
inherit python-any-r1 meson cmake flag-o-matic
8

  
9
SDP="systemd-stable-253.7"
10
MUSL_PATCHSET="systemd-musl-patches-253.3"
6
inherit meson cmake
11 7

  
12 8
DESCRIPTION="High-level C++ D-Bus library"
13 9
HOMEPAGE="https://github.com/Kistler-Group/sdbus-cpp"
14
SRC_URI="https://github.com/Kistler-Group/sdbus-cpp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
15
	!systemd? (
16
		https://github.com/systemd/${SDP%-*}/archive/v${SDP##*-}/${SDP}.tar.gz
17
		elibc_musl? (
18
			https://dev.gentoo.org/~floppym/distfiles/${MUSL_PATCHSET}.tar.gz
19
			https://dev.gentoo.org/~gyakovlev/distfiles/${MUSL_PATCHSET}.tar.gz
20
			https://dev.gentoo.org/~soap/distfiles/${MUSL_PATCHSET}.tar.gz
21
		)
22
	)"
10
SRC_URI="https://github.com/Kistler-Group/sdbus-cpp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
23 11
LICENSE="LGPL-2.1+ Nokia-Qt-LGPL-Exception-1.1" # Nothing to do with Qt but exception text is exactly the same.
24
SLOT="0/0"
12
SLOT="0/1"
25 13
KEYWORDS="~amd64"
26
IUSE="doc systemd test tools"
14
IUSE="doc +elogind systemd test tools"
15
REQUIRED_USE="^^ ( elogind systemd )"
27 16
RESTRICT="!test? ( test )"
28 17

  
29 18
RDEPEND="
30
	!systemd? ( sys-libs/libcap )
19
	elogind? ( >=sys-auth/elogind-236 )
31 20
	systemd? ( >=sys-apps/systemd-236:= )
32 21
	tools? ( dev-libs/expat )
33 22
"
34 23

  
35
# util-linux is needed for libmount when building libsystemd, but sdbus-c++
36
# doesn't need it when subsequently linking libsystemd statically.
37

  
38 24
DEPEND="
39 25
	${RDEPEND}
40
	!systemd? ( sys-apps/util-linux )
41 26
	test? ( >=dev-cpp/gtest-1.10.0 )
42 27
"
43 28

  
44 29
BDEPEND="
45 30
	virtual/pkgconfig
46 31
	doc? ( app-doc/doxygen[dot] )
47
	!systemd? (
48
		${PYTHON_DEPS}
49
		$(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
50
	)
51 32
"
52 33

  
53
python_check_deps() {
54
	python_has_version -b "dev-python/jinja[${PYTHON_USEDEP}]"
55
}
56

  
57 34
S="${WORKDIR}/sdbus-cpp-${PV}"
58
SDS="${WORKDIR}/${SDP}"
59
SDB="${WORKDIR}/systemd-build"
60

  
61
PATCHES=(
62
	"${FILESDIR}"/${PN}-pc-reqs.patch
63
)
64

  
65
pkg_setup() {
66
	use systemd || python-any-r1_pkg_setup
67
}
68

  
69
src_prepare() {
70
	if ! use systemd; then
71
		pushd "${SDS}" || die
72
		use elibc_musl && eapply "${WORKDIR}/${MUSL_PATCHSET}"
73
		eapply "${FILESDIR}"/${PN}-static-libsystemd.patch
74
		popd || die
75
	fi
76

  
77
	cmake_src_prepare
78
}
79 35

  
80 36
src_configure() {
81
	if ! use systemd; then
82
		# Avoid redefinition of struct ethhdr.
83
		use elibc_musl && append-cppflags -D__UAPI_DEF_ETHHDR=0
84

  
85
		EMESON_SOURCE=${SDS} \
86
		BUILD_DIR=${SDB} \
87
		meson_src_configure \
88
			--prefix "${WORKDIR}" \
89
			--includedir "${SDP}/src" \
90
			-Drootlibdir="${SDB}" \
91
			-Dselinux=false \
92
			-Dstatic-libsystemd=pic \
93
			-Dgshadow=false \
94
			-Dsmack=false \
95
			-Dutmp=false
96

  
97
		# systemd doesn't generate the needed pkg-config file during configure.
98
		BUILD_DIR=${SDB} \
99
		meson_src_compile libsystemd.pc
100

  
101
		# Need this present otherwise CMake generates the wrong linker args.
102
		touch "${SDB}"/libsystemd.a || die
103
	fi
104

  
105 37
	local mycmakeargs=(
106 38
		-DBUILD_CODE_GEN=$(usex tools)
107 39
		-DBUILD_DOC=yes
......
109 41
		-DBUILD_LIBSYSTEMD=no
110 42
		-DBUILD_TESTS=$(usex test)
111 43
	)
112

  
113
	PKG_CONFIG_PATH=${SDB}/src/libsystemd:${PKG_CONFIG_PATH} \
114 44
	cmake_src_configure
115 45
}
116 46

  
117 47
src_compile() {
118
	if ! use systemd; then
119
		BUILD_DIR=${SDB} \
120
		meson_src_compile version.h systemd:static_library
121
	fi
122

  
123 48
	cmake_src_compile all $(usev doc)
124 49
}
125 50

  
Спасибо!