pacman-4.0.3-r1.ebuild 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit autotools autotools-utils bash-completion-r1 eutils python-any-r1
  6. DESCRIPTION="Archlinux's binary package manager"
  7. HOMEPAGE="http://archlinux.org/pacman/"
  8. SRC_URI="ftp://ftp.archlinux.org/other/${PN}/${P}.tar.gz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE="curl debug doc gpg test"
  13. COMMON_DEPEND="app-arch/libarchive
  14. dev-libs/openssl
  15. virtual/libiconv
  16. virtual/libintl
  17. sys-devel/gettext
  18. curl? ( net-misc/curl )
  19. gpg? ( app-crypt/gpgme )"
  20. RDEPEND="${COMMON_DEPEND}
  21. app-arch/xz-utils"
  22. # autoconf macros from gpgme requied unconditionally
  23. # makepkg collision with old bash-completion
  24. DEPEND="${COMMON_DEPEND}
  25. app-crypt/gpgme
  26. doc? ( app-doc/doxygen
  27. app-text/asciidoc )
  28. test? ( ${PYTHON_DEPS} )
  29. !<=app-shells/bash-completion-2.1-r90"
  30. RESTRICT="test"
  31. src_prepare() {
  32. # Adds AM_GPGME_PATH call which requires app-crypt/gpgme to be
  33. # DEPENDed on unconditionally:
  34. epatch "${FILESDIR}"/${PN}-4.0.0-gpgme.patch
  35. # Remove a line that adds -Werror in ./configure when --enable-debug
  36. # is passed:
  37. sed -i -e '/-Werror/d' configure.ac || die "-Werror"
  38. # autopoint is unwilling to replace m4/gettext.m4 with the correct
  39. # version even though it'll gladly replace */po/Makefile.in.in,
  40. # creating an inconsistency between gettext m4 macros and
  41. # Makefile.in.in. Also, AM_MKINSTALLDIRS apparently doesn't exist
  42. # anymore, so we need newer gettext macros. #420469
  43. rm m4/gettext.m4 || die
  44. sed -i -e '/AM_GNU_GETTEXT_VERSION/s/0\.13\.1/0.18.1/' configure.ac || die
  45. eautoreconf
  46. }
  47. src_configure() {
  48. local myeconfargs=(
  49. --localstatedir=/var
  50. --disable-git-version
  51. --with-openssl
  52. # Help protect user from shooting his/her Gentoo installation in
  53. # its foot.
  54. --with-root-dir="${EPREFIX}"/var/chroot/archlinux
  55. $(use_enable debug)
  56. $(use_enable doc)
  57. $(use_enable doc doxygen)
  58. $(use_with curl libcurl)
  59. $(use_with gpg gpgme)
  60. )
  61. autotools-utils_src_configure
  62. }
  63. src_install() {
  64. autotools-utils_src_install
  65. dodir /etc/pacman.d
  66. newbashcomp "${AUTOTOOLS_BUILD_DIR}"/contrib/bash_completion pacman
  67. bashcomp_alias pacman pacman-key makepkg
  68. }
  69. pkg_postinst() {
  70. einfo "Please see http://ohnopub.net/~ohnobinki/gentoo/arch/ for information"
  71. einfo "about setting up an archlinux chroot."
  72. }