remove ia64 keywords
[gentoo-zh.git] / sys-apps / pacman / pacman-7.0.0.ebuild
blobc0fa5b29e8308574db19abad348d8faa8f9327d7
1 # Copyright 1999-2024 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://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/
18 KEYWORDS="-* ~amd64"
21 S="${WORKDIR}/${PN}-v${PV}"
22 LICENSE="GPL-2"
23 SLOT="0/10"
25 IUSE="curl doc +gpg test"
26 DEPEND="
27 app-crypt/archlinux-keyring
28 app-arch/libarchive:=[lzma]
29 gpg? ( >=app-crypt/gpgme-1.13.0:= )
30 curl? ( net-misc/curl )
31 dev-libs/openssl:0=
32 virtual/libiconv
33 virtual/libintl
35 RDEPEND="
36 ${DEPEND}
38 BDEPEND="
39 app-text/asciidoc
40 doc? ( app-text/doxygen )
41 test? (
42 sys-apps/fakeroot
43 sys-apps/fakechroot
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 # 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 )
65 meson_src_configure
68 src_install() {
69 meson_src_install
70 keepdir /var/lib/pacman
73 pkg_postinst() {
74 /usr/bin/pacman-key --init || die
75 /usr/bin/pacman-key --populate archlinux || die
77 einfo
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."
82 einfo
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"
88 einfo
89 einfo "With pacman 5.1 contrib packages were moved into a seprate package."
90 einfo