1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 EGIT_REPO_URI="git://anongit.freedesktop.org/harfbuzz"
8 [[ ${PV} == 9999 ]] && inherit git-r3 autotools
10 PYTHON_COMPAT=( python2_7 )
12 inherit eutils libtool multilib-minimal python-any-r1
14 DESCRIPTION="An OpenType text shaping engine"
15 HOMEPAGE="http://www.freedesktop.org/wiki/Software/HarfBuzz"
16 [[ ${PV} == 9999 ]] || SRC_URI="http://www.freedesktop.org/software/${PN}/release/${P}.tar.bz2"
18 LICENSE="Old-MIT ISC icu"
19 SLOT="0/0.9.18" # 0.9.18 introduced the harfbuzz-icu split; bug #472416
20 [[ ${PV} == 9999 ]] || \
21 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"
23 IUSE="+cairo fontconfig +glib +graphite icu +introspection static-libs test +truetype"
24 REQUIRED_USE="introspection? ( glib )"
27 cairo? ( x11-libs/cairo:= )
28 fontconfig? ( media-libs/fontconfig:1.0[${MULTILIB_USEDEP}] )
29 glib? ( >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] )
30 graphite? ( >=media-gfx/graphite2-1.2.1:=[${MULTILIB_USEDEP}] )
31 icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
32 introspection? ( >=dev-libs/gobject-introspection-1.34:= )
33 truetype? ( >=media-libs/freetype-2.5.0.1:2=[${MULTILIB_USEDEP}] )
38 test? ( ${PYTHON_DEPS} )
40 # eautoreconf requires gobject-introspection-common
41 # ragel needed if regenerating *.hh files from *.rl
42 [[ ${PV} = 9999 ]] && DEPEND="${DEPEND}
43 >=dev-libs/gobject-introspection-common-1.34
48 use test && python-any-r1_pkg_setup
52 if [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] ; then
53 # on Darwin/Solaris we need to link with g++, like automake defaults
54 # to, but overridden by upstream because on Linux this is not
55 # necessary, bug #449126
57 -e 's/\<LINK\>/CXXLINK/' \
58 src/Makefile.am || die
60 -e '/libharfbuzz_la_LINK = /s/\<LINK\>/CXXLINK/' \
61 src/Makefile.in || die
63 -e '/AM_V_CCLD/s/\<LINK\>/CXXLINK/' \
64 test/api/Makefile.in || die
67 [[ ${PV} == 9999 ]] && eautoreconf
68 elibtoolize # for Solaris
70 # failing test, https://bugs.freedesktop.org/show_bug.cgi?id=89190
71 sed -e 's#tests/arabic-fallback-shaping.tests##' -i test/shaping/Makefile.in || die "sed failed"
74 multilib_src_configure() {
76 # harfbuzz-gobject only used for instrospection, bug #535852
80 $(use_enable static-libs static) \
81 $(multilib_native_use_with cairo) \
82 $(use_with fontconfig) \
84 $(use_with introspection gobject) \
85 $(use_with graphite graphite2) \
87 $(multilib_native_use_enable introspection) \
88 $(use_with truetype freetype)
90 if multilib_is_native_abi; then
91 ln -s "${S}"/docs/html docs/html || die
95 multilib_src_install_all() {
97 prune_libtool_files --modules