harfbuzz-9999.ebuild 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. EGIT_REPO_URI="git://anongit.freedesktop.org/harfbuzz"
  5. [[ ${PV} == 9999 ]] && inherit git-r3 autotools
  6. PYTHON_COMPAT=( python2_7 )
  7. inherit eutils libtool multilib-minimal python-any-r1 xdg-utils
  8. DESCRIPTION="An OpenType text shaping engine"
  9. HOMEPAGE="https://www.freedesktop.org/wiki/Software/HarfBuzz"
  10. [[ ${PV} == 9999 ]] || SRC_URI="https://www.freedesktop.org/software/${PN}/release/${P}.tar.bz2"
  11. LICENSE="Old-MIT ISC icu"
  12. SLOT="0/0.9.18" # 0.9.18 introduced the harfbuzz-icu split; bug #472416
  13. [[ ${PV} == 9999 ]] || \
  14. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris"
  15. IUSE="+cairo fontconfig +glib +graphite icu +introspection static-libs test +truetype"
  16. REQUIRED_USE="introspection? ( glib )"
  17. RDEPEND="
  18. cairo? ( x11-libs/cairo:= )
  19. fontconfig? ( media-libs/fontconfig:1.0[${MULTILIB_USEDEP}] )
  20. glib? ( >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] )
  21. graphite? ( >=media-gfx/graphite2-1.2.1:=[${MULTILIB_USEDEP}] )
  22. icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
  23. introspection? ( >=dev-libs/gobject-introspection-1.34:= )
  24. truetype? ( >=media-libs/freetype-2.5.0.1:2=[${MULTILIB_USEDEP}] )
  25. "
  26. DEPEND="${RDEPEND}
  27. dev-util/gtk-doc-am
  28. virtual/pkgconfig
  29. test? ( ${PYTHON_DEPS} )
  30. "
  31. # eautoreconf requires gobject-introspection-common
  32. # ragel needed if regenerating *.hh files from *.rl
  33. [[ ${PV} = 9999 ]] && DEPEND="${DEPEND}
  34. >=dev-libs/gobject-introspection-common-1.34
  35. dev-util/ragel
  36. "
  37. pkg_setup() {
  38. use test && python-any-r1_pkg_setup
  39. }
  40. src_prepare() {
  41. default
  42. xdg_environment_reset
  43. if [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] ; then
  44. # on Darwin/Solaris we need to link with g++, like automake defaults
  45. # to, but overridden by upstream because on Linux this is not
  46. # necessary, bug #449126
  47. sed -i \
  48. -e 's/\<LINK\>/CXXLINK/' \
  49. src/Makefile.am || die
  50. sed -i \
  51. -e '/libharfbuzz_la_LINK = /s/\<LINK\>/CXXLINK/' \
  52. src/Makefile.in || die
  53. sed -i \
  54. -e '/AM_V_CCLD/s/\<LINK\>/CXXLINK/' \
  55. test/api/Makefile.in || die
  56. fi
  57. [[ ${PV} == 9999 ]] && eautoreconf
  58. elibtoolize # for Solaris
  59. # failing test, https://bugs.freedesktop.org/show_bug.cgi?id=89190
  60. sed -e 's#tests/arabic-fallback-shaping.tests##' -i test/shaping/Makefile.in || die "sed failed"
  61. }
  62. multilib_src_configure() {
  63. ECONF_SOURCE="${S}" \
  64. # harfbuzz-gobject only used for instrospection, bug #535852
  65. econf \
  66. --without-coretext \
  67. --without-uniscribe \
  68. $(use_enable static-libs static) \
  69. $(multilib_native_use_with cairo) \
  70. $(use_with fontconfig) \
  71. $(use_with glib) \
  72. $(use_with introspection gobject) \
  73. $(use_with graphite graphite2) \
  74. $(use_with icu) \
  75. $(multilib_native_use_enable introspection) \
  76. $(use_with truetype freetype)
  77. if multilib_is_native_abi; then
  78. ln -s "${S}"/docs/html docs/html || die
  79. fi
  80. }
  81. multilib_src_install_all() {
  82. einstalldocs
  83. prune_libtool_files --modules
  84. }