app-crypt/etoken-sac: fix eutils EAPI 7
[gentoo-zh.git] / sys-apps / pacman / pacman-6.0.1.ebuild
blob44b8d95ae76ba8734474a50ad3ad28fac56956b9
1 # Copyright 1999-2022 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI="8"
6 inherit meson
8 DESCRIPTION="Archlinux's binary package manager"
9 HOMEPAGE="https://archlinux.org/pacman/ https://wiki.archlinux.org/title/Pacman"
11 if [[ "${PV}" == *9999 ]]; then
12         inherit git-r3
13         EGIT_REPO_URI="https://gitlab.archlinux.org/pacman/pacman"
14 else
15         SRC_URI="https://sources.archlinux.org/other/pacman/${P}.tar.xz"
16         # Do *not* re-add ~x86!
17         # https://www.archlinux.org/news/phasing-out-i686-support/
18         KEYWORDS="-* ~amd64"
21 LICENSE="GPL-2"
22 SLOT="0/10"
24 IUSE="curl doc +gpg test"
25 DEPEND="
26         app-crypt/archlinux-keyring
27         app-arch/libarchive:=[lzma]
28         gpg? ( >=app-crypt/gpgme-1.13.0:= )
29         curl? ( net-misc/curl )
30         dev-libs/openssl:0=
31         virtual/libiconv
32         virtual/libintl
34 RDEPEND="
35         ${DEPEND}
36         sys-apps/pacman-mirrorlist
38 BDEPEND="
39         app-text/asciidoc
40         doc? ( app-doc/doxygen )
41         test? (
42                 sys-apps/fakeroot
43                 sys-apps/fakechroot
44         )
47 # Plenty tests fail because we're actually not on a archlinux system.
48 RESTRICT="test"
50 src_configure() {
51         local emesonargs=(
52                 -Dbuildstatic=false
53                 # Help protect Gentoo users from shooting into their feet.
54                 -Droot-dir="${EPREFIX}/var/chroot/archlinux"
55                 # full doc with doxygen
56                 $(meson_feature doc doxygen)
57                 $(meson_feature gpg gpgme)
58                 $(meson_feature curl curl)
59         )
60         if [[ "${PV}" == *9999 ]]; then
61                 emesonargs+=( -Duse-git-version=true )
62         fi
63         meson_src_configure
66 pkg_postinst() {
67         /usr/bin/pacman-key --init || die
68         /usr/bin/pacman-key --populate archlinux || die
70         einfo
71         einfo "The default root dir was set to ${EPREFIX}/var/chroot/archlinux"
72         einfo "to avoid breaking Gentoo systems due to oscitancy."
73         einfo "If you prefer another directory, take a look at"
74         einfo "pacman's parameter -r|--root."
75         einfo
76         einfo "You will need to setup at least one mirror in"
77         einfo "   /etc/pacman.d/mirrorlist."
78         einfo "This list is installed by sys-apps/pacman-mirrorlist but can be"
79         einfo "updated manually by fetching from"
80         einfo "https://wiki.archlinux.org/index.php/Mirror"
81         einfo
82         einfo "With pacman 5.1 contrib packages were moved into a seprate package."
83         einfo