Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/graphite2/
Date: Fri, 26 Feb 2016 22:57:39
Message-Id: 1456527273.635df01c398dad12f0bda0ed3a99615d7381a8d4.dilfridge@gentoo
1 commit: 635df01c398dad12f0bda0ed3a99615d7381a8d4
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 26 22:54:12 2016 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 26 22:54:33 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=635df01c
7
8 media-gfx/graphite2: Fix tests, mostly... bug 575250
9
10 Package-Manager: portage-2.2.27
11
12 media-gfx/graphite2/graphite2-1.3.5-r1.ebuild | 120 ++++++++++++++++++++++++++
13 1 file changed, 120 insertions(+)
14
15 diff --git a/media-gfx/graphite2/graphite2-1.3.5-r1.ebuild b/media-gfx/graphite2/graphite2-1.3.5-r1.ebuild
16 new file mode 100644
17 index 0000000..a9d1fa8
18 --- /dev/null
19 +++ b/media-gfx/graphite2/graphite2-1.3.5-r1.ebuild
20 @@ -0,0 +1,120 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=5
26 +
27 +PYTHON_COMPAT=( python2_7 )
28 +
29 +GENTOO_DEPEND_ON_PERL="no"
30 +inherit eutils perl-module python-any-r1 cmake-multilib
31 +
32 +DESCRIPTION="Library providing rendering capabilities for complex non-Roman writing systems"
33 +HOMEPAGE="http://graphite.sil.org/"
34 +SRC_URI="mirror://sourceforge/silgraphite/${PN}/${P}.tgz"
35 +
36 +LICENSE="LGPL-2.1"
37 +SLOT="0"
38 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~sh ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
39 +IUSE="perl test"
40 +
41 +RDEPEND="
42 + perl? ( dev-lang/perl:= )
43 +"
44 +DEPEND="${RDEPEND}
45 + perl? (
46 + dev-perl/Module-Build
47 + dev-perl/Locale-Maketext-Lexicon
48 + )
49 + test? (
50 + dev-libs/glib:2
51 + media-libs/fontconfig
52 + media-libs/silgraphite
53 + $(python_gen_any_dep '
54 + dev-python/fonttools[${PYTHON_USEDEP}]
55 + ')
56 + ${PYTHON_DEPS}
57 + perl? ( virtual/perl-Test-Simple )
58 + )
59 +"
60 +
61 +PATCHES=(
62 + "${FILESDIR}/${PN}-1.3.5-includes-libs-perl.patch"
63 +)
64 +
65 +pkg_setup() {
66 + use perl && perl_set_version
67 + use test && python-any-r1_pkg_setup
68 +}
69 +
70 +python_check_deps() {
71 + has_version "dev-python/fonttools[${PYTHON_USEDEP}]"
72 +}
73 +
74 +src_prepare() {
75 + cmake-utils_src_prepare
76 +
77 + # make tests optional
78 + if ! use test; then
79 + sed -i \
80 + -e '/tests/d' \
81 + CMakeLists.txt || die
82 + fi
83 +}
84 +
85 +multilib_src_configure() {
86 + local mycmakeargs=(
87 + "-DVM_MACHINE_TYPE=direct"
88 + # http://sourceforge.net/p/silgraphite/bugs/49/
89 + $([[ ${CHOST} == powerpc*-apple* ]] && \
90 + echo "-DGRAPHITE2_NSEGCACHE:BOOL=ON")
91 + )
92 +
93 + cmake-utils_src_configure
94 +
95 + # fix perl linking
96 + if multilib_is_native_abi && use perl; then
97 + _cmake_check_build_dir init
98 + sed -i \
99 + -e "s:@BUILD_DIR@:\"${BUILD_DIR}/src\":" \
100 + "${S}"/contrib/perl/Build.PL || die
101 + fi
102 +}
103 +
104 +src_compile() {
105 + cmake-multilib_src_compile
106 + if use perl; then
107 + cd contrib/perl || die
108 + perl-module_src_configure
109 + perl-module_src_compile
110 + fi
111 +}
112 +
113 +multilib_src_test() {
114 + if multilib_is_native_abi; then
115 + cmake-utils_src_test
116 + else
117 + einfo Cannot test since python is not multilib.
118 + fi
119 +}
120 +
121 +src_test() {
122 + cmake-multilib_src_test
123 + if use perl; then
124 + cd contrib/perl || die
125 + # SRC_TEST=do
126 + # Perl tests fail due to missing POD coverage...
127 + perl-module_src_test
128 + fi
129 +}
130 +
131 +src_install() {
132 + cmake-multilib_src_install
133 + if use perl; then
134 + cd contrib/perl || die
135 + perl-module_src_install
136 + perl_delete_localpod
137 + fi
138 +
139 + prune_libtool_files --all
140 +}