pacman-4.0.3.ebuild 2.2 KB

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