alsa-lib-1.1.2.ebuild 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. # no support for python3_2 or above yet wrt #471326
  5. PYTHON_COMPAT=( python2_7 )
  6. inherit autotools eutils multilib multilib-minimal python-single-r1
  7. DESCRIPTION="Advanced Linux Sound Architecture Library"
  8. HOMEPAGE="http://www.alsa-project.org/"
  9. SRC_URI="mirror://alsaproject/lib/${P}.tar.bz2"
  10. LICENSE="LGPL-2.1"
  11. SLOT="0"
  12. KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-linux ~x86-linux"
  13. IUSE="alisp debug doc elibc_uclibc python"
  14. RDEPEND="python? ( ${PYTHON_DEPS} )
  15. abi_x86_32? (
  16. !<=app-emulation/emul-linux-x86-soundlibs-20130224-r1
  17. !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
  18. )"
  19. DEPEND="${RDEPEND}
  20. doc? ( >=app-doc/doxygen-1.2.6 )"
  21. REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
  22. pkg_setup() {
  23. use python && python-single-r1_pkg_setup
  24. }
  25. src_prepare() {
  26. find . -name Makefile.am -exec sed -i -e '/CFLAGS/s:-g -O2::' {} + || die
  27. # https://bugs.gentoo.org/509886
  28. use elibc_uclibc && { sed -i -e 's:oldapi queue_timer:queue_timer:' test/Makefile.am || die; }
  29. # https://bugs.gentoo.org/545950
  30. sed -i -e '5s:^$:\nAM_CPPFLAGS = -I$(top_srcdir)/include:' test/lsb/Makefile.am || die
  31. default
  32. eautoreconf
  33. }
  34. multilib_src_configure() {
  35. local myconf
  36. # enable Python only on final ABI
  37. if multilib_is_native_abi; then
  38. myconf="$(use_enable python)"
  39. else
  40. myconf="--disable-python"
  41. fi
  42. use elibc_uclibc && myconf+=" --without-versioned"
  43. ECONF_SOURCE=${S} \
  44. econf \
  45. --disable-maintainer-mode \
  46. --enable-shared \
  47. --disable-resmgr \
  48. --enable-rawmidi \
  49. --enable-seq \
  50. --enable-aload \
  51. $(use_with debug) \
  52. $(use_enable alisp) \
  53. ${myconf}
  54. }
  55. multilib_src_compile() {
  56. emake
  57. if multilib_is_native_abi && use doc; then
  58. emake doc
  59. fgrep -Zrl "${S}" doc/doxygen/html | \
  60. xargs -0 sed -i -e "s:${S}::"
  61. fi
  62. }
  63. multilib_src_install() {
  64. emake DESTDIR="${D}" install
  65. if multilib_is_native_abi && use doc; then
  66. docinto html
  67. dodoc -r doc/doxygen/html/.
  68. fi
  69. }
  70. multilib_src_install_all() {
  71. prune_libtool_files --all
  72. find "${ED}"/usr/$(get_libdir)/alsa-lib -name '*.a' -exec rm -f {} +
  73. docinto ""
  74. dodoc ChangeLog doc/asoundrc.txt NOTES TODO
  75. }