1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="Archlinux's binary package manager"
9 HOMEPAGE="https://archlinux.org/pacman/ https://wiki.archlinux.org/title/Pacman"
11 if [[ "${PV}" == *9999 ]]; then
13 EGIT_REPO_URI="https://gitlab.archlinux.org/pacman/pacman"
15 SRC_URI="https://gitlab.archlinux.org/pacman/pacman/-/archive/v${PV}/${PN}-v${PV}.tar.bz2 -> ${P}.tar.bz2"
16 # Do *not* re-add ~x86!
17 # https://www.archlinux.org/news/phasing-out-i686-support/
21 S="${WORKDIR}/${PN}-v${PV}"
25 IUSE="curl doc +gpg test"
27 app-crypt/archlinux-keyring
28 app-arch/libarchive:=[lzma]
29 gpg? ( >=app-crypt/gpgme-1.13.0:= )
30 curl? ( net-misc/curl )
40 doc? ( app-text/doxygen )
47 # Plenty tests fail because we're actually not on a archlinux system.
53 # fix #3299, see https://bugs.gentoo.org/878913; https://bugs.gentoo.org/878603
54 --localstatedir "${EPREFIX}/var"
55 # Help protect Gentoo users from shooting into their feet.
56 -Droot-dir="${EPREFIX}/var/chroot/archlinux"
57 # full doc with doxygen
58 $(meson_feature doc doxygen)
59 $(meson_feature gpg gpgme)
60 $(meson_feature curl curl)
62 if [[ "${PV}" == *9999 ]]; then
63 emesonargs+=( -Duse-git-version=true )
70 keepdir /var/lib/pacman
74 /usr/bin/pacman-key --init || die
75 /usr/bin/pacman-key --populate archlinux || die
78 einfo "The default root dir was set to ${EPREFIX}/var/chroot/archlinux"
79 einfo "to avoid breaking Gentoo systems due to oscitancy."
80 einfo "If you prefer another directory, take a look at"
81 einfo "pacman's parameter -r|--root."
83 einfo "You will need to setup at least one mirror in"
84 einfo " /etc/pacman.d/mirrorlist."
85 einfo "This list is installed by sys-apps/pacman-mirrorlist but can be"
86 einfo "updated manually by fetching from"
87 einfo "https://wiki.archlinux.org/index.php/Mirror"
89 einfo "With pacman 5.1 contrib packages were moved into a seprate package."