libsndfile-1.0.28.ebuild 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 pypy )
  5. inherit autotools python-any-r1 multilib-minimal
  6. MY_P=${P/_pre/pre}
  7. DESCRIPTION="A C library for reading and writing files containing sampled sound"
  8. HOMEPAGE="http://www.mega-nerd.com/libsndfile"
  9. if [[ ${MY_P} == ${P} ]]; then
  10. SRC_URI="http://www.mega-nerd.com/libsndfile/files/${P}.tar.gz"
  11. else
  12. SRC_URI="http://www.mega-nerd.com/tmp/${MY_P}b.tar.gz"
  13. fi
  14. LICENSE="LGPL-2.1"
  15. SLOT="0"
  16. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
  17. IUSE="alsa minimal sqlite static-libs test"
  18. RDEPEND="
  19. !minimal? ( >=media-libs/flac-1.2.1-r5[${MULTILIB_USEDEP}]
  20. >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
  21. >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] )
  22. alsa? ( media-libs/alsa-lib )
  23. sqlite? ( >=dev-db/sqlite-3.2 )"
  24. DEPEND="${RDEPEND}
  25. virtual/pkgconfig
  26. test? ( ${PYTHON_DEPS} )"
  27. S=${WORKDIR}/${MY_P}
  28. pkg_setup() {
  29. use test && python-any-r1_pkg_setup
  30. }
  31. src_prepare() {
  32. default
  33. eautoreconf
  34. }
  35. multilib_src_configure() {
  36. ECONF_SOURCE="${S}" econf \
  37. --disable-octave \
  38. --disable-gcc-pipe \
  39. $(use_enable static-libs static) \
  40. $(use_enable !minimal external-libs) \
  41. $(multilib_native_use_enable alsa) \
  42. $(multilib_native_use_enable sqlite)
  43. if ! multilib_is_native_abi; then
  44. # Do not build useless stuff
  45. local i
  46. for i in man doc examples regtest programs; do
  47. sed -i -e "s/ ${i}//" Makefile || die
  48. done
  49. fi
  50. }
  51. multilib_src_install_all() {
  52. einstalldocs
  53. # package provides .pc files
  54. find "${D}" -name '*.la' -delete || die
  55. }