e2fsprogs-libs-1.43.3.ebuild 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. case ${PV} in
  5. *_pre*) UP_PV="${PV%_pre*}-WIP-${PV#*_pre}" ;;
  6. *) UP_PV=${PV} ;;
  7. esac
  8. inherit toolchain-funcs eutils multilib-minimal
  9. DESCRIPTION="e2fsprogs libraries (common error and subsystem)"
  10. HOMEPAGE="http://e2fsprogs.sourceforge.net/"
  11. SRC_URI="mirror://sourceforge/e2fsprogs/${PN}-${UP_PV}.tar.gz
  12. mirror://kernel/linux/kernel/people/tytso/e2fsprogs/v${UP_PV}/${PN}-${UP_PV}.tar.gz"
  13. LICENSE="GPL-2"
  14. SLOT="0"
  15. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~m68k-mint ~x86-solaris"
  16. IUSE="nls static-libs"
  17. RDEPEND="!sys-libs/com_err
  18. !sys-libs/ss
  19. !<sys-fs/e2fsprogs-1.41.8"
  20. DEPEND="nls? ( sys-devel/gettext )
  21. virtual/pkgconfig"
  22. S=${WORKDIR}/${P%_pre*}
  23. PATCHES=(
  24. "${FILESDIR}"/${PN}-1.42.13-fix-build-cflags.patch #516854
  25. )
  26. src_prepare() {
  27. printf 'all:\n%%:;@:\n' > doc/Makefile.in # don't bother with docs #305613
  28. epatch "${PATCHES[@]}"
  29. }
  30. multilib_src_configure() {
  31. local myconf=()
  32. # we use blkid/uuid from util-linux now
  33. if use kernel_linux ; then
  34. export ac_cv_lib_{uuid_uuid_generate,blkid_blkid_get_cache}=yes
  35. myconf+=( --disable-lib{blkid,uuid} )
  36. fi
  37. ac_cv_path_LDCONFIG=: \
  38. ECONF_SOURCE="${S}" \
  39. CC="$(tc-getCC)" \
  40. BUILD_CC="$(tc-getBUILD_CC)" \
  41. BUILD_LD="$(tc-getBUILD_LD)" \
  42. econf \
  43. $(tc-is-static-only || echo --enable-elf-shlibs) \
  44. $(tc-has-tls || echo --disable-tls) \
  45. $(use_enable nls) \
  46. "${myconf[@]}"
  47. }
  48. multilib_src_compile() {
  49. emake V=1
  50. }
  51. multilib_src_install() {
  52. emake V=1 STRIP=: DESTDIR="${D}" install || die
  53. gen_usr_ldscript -a com_err ss $(usex kernel_linux '' 'uuid blkid')
  54. # configure doesn't have an option to disable static libs :/
  55. use static-libs || find "${ED}" -name '*.a' -delete
  56. }