Сравнение shared-mime-info-2.1 с shared-mime-info-2.2

/usr/portage/x11-misc/shared-mime-info/shared-mime-info-2.2.ebuild 2023-10-09 14:52:35.944368513 +0300
1
# Copyright 1999-2021 Gentoo Authors
1
# Copyright 1999-2022 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=7
5 5

  
6
HASH=0ee50652091363ab0d17e335e5e74fbe # don't forget to update on version bumps
7
inherit meson xdg-utils
6
inherit meson toolchain-funcs xdg-utils
8 7

  
8
# Keep an eye on https://gitlab.freedesktop.org/xdg/xdgmime/-/merge_requests/25!
9
# xdgmime is used for tests but doesn't make releases nowadays; do what
10
# Fedora does and use a snapshot so we can run the test suite.
11
MY_XDGMIME_COMMIT="92f6a09fda2b23c2ab95cede8eb0612ca96bd0f7"
9 12
DESCRIPTION="The Shared MIME-info Database specification"
10 13
HOMEPAGE="https://gitlab.freedesktop.org/xdg/shared-mime-info"
11
SRC_URI="https://gitlab.freedesktop.org/xdg/${PN}/uploads/${HASH}/${P}.tar.xz"
14
SRC_URI="https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/${PV}/${P}.tar.gz"
15
SRC_URI+=" test? ( https://gitlab.freedesktop.org/xdg/xdgmime/-/archive/${MY_XDGMIME_COMMIT}/xdgmime-${MY_XDGMIME_COMMIT}.tar.gz )"
12 16

  
13 17
LICENSE="GPL-2"
14 18
SLOT="0"
15
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
16

  
17
# requires installed xdgmime binary
18
RESTRICT="test"
19
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
20
IUSE="test"
21
RESTRICT="!test? ( test )"
19 22

  
20 23
BDEPEND="
21 24
	app-text/docbook-xml-dtd:4.1.2
......
31 34

  
32 35
DOCS=( HACKING.md NEWS README.md )
33 36

  
34
PATCHES=(
35
	"${FILESDIR}/shared-mime-info-2.1-itstool.patch"
36
)
37
src_prepare() {
38
	default
39

  
40
	if use test ; then
41
		# Drop empty dir (it's a submodule in upstream git repo)
42
		rm -r "${S}"/xdgmime || die
43
		# Lead Meson to our snapshot
44
		ln -s "${WORKDIR}"/xdgmime-${MY_XDGMIME_COMMIT} xdgmime || die
45
		# Don't break parallel make
46
		sed -i -e 's:make:$(MAKE):' xdgmime/Makefile || die
47
	fi
48
}
49

  
50
src_configure() {
51
	# We have to trick Meson into thinking it's there now so that
52
	# we can run meson then emake to build xdgmime later, rather than
53
	# building before running meson which would mean doing something
54
	# unexpected in src_configure.
55
	if use test ; then
56
		# Paths from https://gitlab.freedesktop.org/xdg/shared-mime-info/-/blob/master/meson.build#L29
57
		touch xdgmime/src/{print,test}-mime{,-data} || die
58
		chmod +x xdgmime/src/{print,test}-mime{,-data} || die
59
	fi
60

  
61
	local emesonargs=(
62
		-Dbuild-tools=true
63
		-Dupdate-mimedb=false
64
	)
65

  
66
	meson_src_configure
67
}
68

  
69
src_compile() {
70
	if use test ; then
71
		tc-export CC
72

  
73
		# xdgmime only has a homebrew Makefile
74
		emake -C xdgmime
75
	fi
76

  
77
	meson_src_compile
78
}
37 79

  
38 80
src_install() {
39 81
	meson_src_install
Спасибо!