2015-06-03 08:47:52 +03:00
|
|
|
# Copyright 1999-2015 Gentoo Foundation
|
2011-11-09 11:33:19 +04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2015-08-10 23:59:40 +03:00
|
|
|
# $Id$
|
2011-11-09 11:33:19 +04:00
|
|
|
|
|
|
|
# Remember: we cannot leverage autotools in this ebuild in order
|
|
|
|
# to avoid circular deps with autotools
|
|
|
|
|
2012-09-14 10:30:52 +04:00
|
|
|
EAPI="4"
|
2011-11-09 11:33:19 +04:00
|
|
|
|
2013-08-08 13:33:51 +04:00
|
|
|
inherit eutils multilib toolchain-funcs libtool multilib-minimal
|
2012-12-09 22:34:53 +04:00
|
|
|
|
2011-11-09 11:33:19 +04:00
|
|
|
if [[ ${PV} == "9999" ]] ; then
|
|
|
|
EGIT_REPO_URI="http://git.tukaani.org/xz.git"
|
|
|
|
inherit git-2 autotools
|
|
|
|
SRC_URI=""
|
|
|
|
EXTRA_DEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068
|
|
|
|
else
|
|
|
|
MY_P="${PN/-utils}-${PV/_}"
|
|
|
|
SRC_URI="http://tukaani.org/xz/${MY_P}.tar.gz"
|
2014-01-19 13:14:31 +04:00
|
|
|
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 ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
2011-11-09 11:33:19 +04:00
|
|
|
S=${WORKDIR}/${MY_P}
|
|
|
|
EXTRA_DEPEND=
|
|
|
|
fi
|
|
|
|
|
|
|
|
DESCRIPTION="utils for managing LZMA compressed files"
|
|
|
|
HOMEPAGE="http://tukaani.org/xz/"
|
|
|
|
|
2013-10-20 23:26:06 +04:00
|
|
|
# See top-level COPYING file as it outlines the various pieces and their licenses.
|
|
|
|
LICENSE="public-domain LGPL-2.1+ GPL-2+"
|
2011-11-09 11:33:19 +04:00
|
|
|
SLOT="0"
|
2015-06-03 08:47:52 +03:00
|
|
|
IUSE="elibc_FreeBSD nls static-libs +threads"
|
2011-11-09 11:33:19 +04:00
|
|
|
|
|
|
|
RDEPEND="!<app-arch/lzma-4.63
|
|
|
|
!app-arch/lzma-utils
|
|
|
|
!<app-arch/p7zip-4.57"
|
|
|
|
DEPEND="${RDEPEND}
|
|
|
|
${EXTRA_DEPEND}"
|
|
|
|
|
|
|
|
src_prepare() {
|
2012-12-09 22:34:53 +04:00
|
|
|
if [[ ${PV} == "9999" ]] ; then
|
|
|
|
eautopoint
|
|
|
|
eautoreconf
|
|
|
|
else
|
|
|
|
elibtoolize # to allow building shared libs on Solaris/x64
|
|
|
|
fi
|
2011-11-09 11:33:19 +04:00
|
|
|
}
|
|
|
|
|
2013-08-08 13:33:51 +04:00
|
|
|
multilib_src_configure() {
|
2015-06-03 08:47:52 +03:00
|
|
|
use elibc_FreeBSD && export ac_cv_header_sha256_h=no #545714
|
2013-08-08 13:33:51 +04:00
|
|
|
ECONF_SOURCE="${S}" econf \
|
2011-11-09 11:33:19 +04:00
|
|
|
$(use_enable nls) \
|
|
|
|
$(use_enable threads) \
|
2013-08-08 13:33:51 +04:00
|
|
|
$(use_enable static-libs static) \
|
2014-04-29 15:32:50 +04:00
|
|
|
$(multilib_is_native_abi || echo --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts})
|
2011-11-09 11:33:19 +04:00
|
|
|
}
|
|
|
|
|
2013-08-08 13:33:51 +04:00
|
|
|
multilib_src_install() {
|
2012-09-14 10:30:52 +04:00
|
|
|
default
|
2013-08-08 13:33:51 +04:00
|
|
|
multilib_is_native_abi && gen_usr_ldscript -a lzma
|
|
|
|
}
|
|
|
|
|
|
|
|
multilib_src_install_all() {
|
2012-11-25 23:47:45 +04:00
|
|
|
prune_libtool_files --all
|
2012-09-14 10:30:52 +04:00
|
|
|
rm "${ED}"/usr/share/doc/xz/COPYING* || die
|
|
|
|
mv "${ED}"/usr/share/doc/{xz,${PF}} || die
|
2011-11-09 11:33:19 +04:00
|
|
|
}
|
2012-12-09 22:34:53 +04:00
|
|
|
|
|
|
|
pkg_preinst() {
|
|
|
|
preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0)
|
|
|
|
}
|