You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.1 KiB

  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Id$
  4. # Remember: we cannot leverage autotools in this ebuild in order
  5. # to avoid circular deps with autotools
  6. EAPI="4"
  7. inherit eutils multilib toolchain-funcs libtool multilib-minimal
  8. if [[ ${PV} == "9999" ]] ; then
  9. EGIT_REPO_URI="http://git.tukaani.org/xz.git"
  10. inherit git-2 autotools
  11. SRC_URI=""
  12. EXTRA_DEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068
  13. else
  14. MY_P="${PN/-utils}-${PV/_}"
  15. SRC_URI="http://tukaani.org/xz/${MY_P}.tar.gz"
  16. KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  17. S=${WORKDIR}/${MY_P}
  18. EXTRA_DEPEND=
  19. fi
  20. DESCRIPTION="utils for managing LZMA compressed files"
  21. HOMEPAGE="http://tukaani.org/xz/"
  22. # See top-level COPYING file as it outlines the various pieces and their licenses.
  23. LICENSE="public-domain LGPL-2.1+ GPL-2+"
  24. SLOT="0"
  25. IUSE="elibc_FreeBSD nls static-libs +threads"
  26. RDEPEND="!<app-arch/lzma-4.63
  27. !app-arch/lzma-utils
  28. !<app-arch/p7zip-4.57"
  29. DEPEND="${RDEPEND}
  30. ${EXTRA_DEPEND}"
  31. src_prepare() {
  32. if [[ ${PV} == "9999" ]] ; then
  33. eautopoint
  34. eautoreconf
  35. else
  36. elibtoolize # to allow building shared libs on Solaris/x64
  37. fi
  38. }
  39. multilib_src_configure() {
  40. use elibc_FreeBSD && export ac_cv_header_sha256_h=no #545714
  41. ECONF_SOURCE="${S}" econf \
  42. $(use_enable nls) \
  43. $(use_enable threads) \
  44. $(use_enable static-libs static) \
  45. $(multilib_is_native_abi || echo --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts})
  46. }
  47. multilib_src_install() {
  48. default
  49. multilib_is_native_abi && gen_usr_ldscript -a lzma
  50. }
  51. multilib_src_install_all() {
  52. prune_libtool_files --all
  53. rm "${ED}"/usr/share/doc/xz/COPYING* || die
  54. mv "${ED}"/usr/share/doc/{xz,${PF}} || die
  55. }
  56. pkg_preinst() {
  57. preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0)
  58. }
  59. pkg_postinst() {
  60. preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0)
  61. }