pixz-9999.ebuild 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="6"
  4. inherit flag-o-matic
  5. if [[ ${PV} == "9999" ]] ; then
  6. EGIT_REPO_URI="https://github.com/vasi/${PN}.git"
  7. inherit git-r3 autotools
  8. else
  9. SRC_URI="https://github.com/vasi/pixz/releases/download/v${PV}/${P}.tar.xz"
  10. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
  11. fi
  12. DESCRIPTION="Parallel Indexed XZ compressor"
  13. HOMEPAGE="https://github.com/vasi/pixz"
  14. LICENSE="BSD-2"
  15. SLOT="0"
  16. IUSE="static"
  17. LIB_DEPEND=">=app-arch/libarchive-2.8:=[static-libs(+)]
  18. >=app-arch/xz-utils-5[static-libs(+)]"
  19. RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
  20. DEPEND="${RDEPEND}
  21. static? ( ${LIB_DEPEND} )"
  22. [[ ${PV} == "9999" ]] && DEPEND+=" app-text/asciidoc"
  23. src_prepare() {
  24. default
  25. [[ ${PV} == "9999" ]] && eautoreconf
  26. }
  27. src_configure() {
  28. use static && append-ldflags -static
  29. append-flags -std=gnu99
  30. # Workaround silly logic that breaks cross-compiles.
  31. # https://github.com/vasi/pixz/issues/67
  32. export ac_cv_file_src_pixz_1=$([[ -f src/pixz.1 ]] && echo yes || echo no)
  33. econf
  34. }