summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-gfx/graphite2/Manifest1
-rw-r--r--media-gfx/graphite2/files/graphite2-1.3.5-includes-libs-perl.patch14
-rw-r--r--media-gfx/graphite2/graphite2-1.3.5.ebuild103
3 files changed, 118 insertions, 0 deletions
diff --git a/media-gfx/graphite2/Manifest b/media-gfx/graphite2/Manifest
index e952aaad4772..1605d31b442c 100644
--- a/media-gfx/graphite2/Manifest
+++ b/media-gfx/graphite2/Manifest
@@ -1,2 +1,3 @@
DIST graphite2-1.2.1.tgz 4665169 SHA256 7b15b749ae65c1ce3cfb4b98b8d4125e91b695ca31fa83aa51d6542109ab449d SHA512 834de9185c861f1fe54cffc2b6d12117cdd956e64167b0021ea5cb1b83deacff91a2e9d78df9a1a1c038016bf2aad252c88836c49315ca027a0fd0386d8392d9 WHIRLPOOL ec13995a19f9251bf66eeb3d66b7c8ff504ae8993868aa716cb475a69db8f675012445cd2dcb1ac594121c657aafcc1276abfa5ee38620dc6d428c1c8f51e755
DIST graphite2-1.2.4.tgz 6938866 SHA256 4bc3d5168029bcc0aa00eb2c973269d29407be2796ff56f9c80e10736bd8b003 SHA512 fb4a7bfd5656233975ce339e4e155ccb4fd401b87e30440edab98739355596e41abf5dccf6487d53f6353840a7c87b8270ee33e79c6630cf13a25ac2cb2114de WHIRLPOOL a869dcf293ba1f1d547f86ad88c6bb27879c8ad793135ba29ea12daf19d4fb84f9660fb43bd524934970d163e8bb779a050ec37a734784e25de99bd6463f3d57
+DIST graphite2-1.3.5.tgz 3880214 SHA256 f4712626eda0a1804367133460770560b545bbe75b1c4aab480c9b8e4e1c64bd SHA512 70e85ff44d63dcca6beb55aa68966888453610c4ec1fca0d0986910a8f396ad64fd0b9f393270fd403c93e7e5d45cdc134c3965f47761cd40cd659b92b8abcec WHIRLPOOL 90f5e9858c63f9c452b8457dc5dac9cb78d319dd2bfd13207bbe7e73b60dbfa701be5c17cabe4e11ce2d1be8e0054c23186834425f40d614a1002c3eff2bdcc5
diff --git a/media-gfx/graphite2/files/graphite2-1.3.5-includes-libs-perl.patch b/media-gfx/graphite2/files/graphite2-1.3.5-includes-libs-perl.patch
new file mode 100644
index 000000000000..b6168828dc26
--- /dev/null
+++ b/media-gfx/graphite2/files/graphite2-1.3.5-includes-libs-perl.patch
@@ -0,0 +1,14 @@
+diff -ruN graphite2-1.3.5.orig/contrib/perl/Build.PL graphite2-1.3.5/contrib/perl/Build.PL
+--- graphite2-1.3.5.orig/contrib/perl/Build.PL 2016-01-15 05:17:18.000000000 +0100
++++ graphite2-1.3.5/contrib/perl/Build.PL 2016-02-16 11:11:23.922397562 +0100
+@@ -8,8 +8,8 @@
+ dist_author => 'Simon Cozens <simon@cpan.org>',
+ dist_version_from => 'lib/Text/Gr2.pm',
+ extra_compiler_flags => $^O ne 'MSWin32' ? '-Wall -Wno-unused-variable' : '',
+- extra_linker_flags => $^O eq 'MSWin32' ? '../../build/src/graphite2.lib' : '-lgraphite2',
+- include_dirs => ['.', '../include'],
++ extra_linker_flags => $^O eq 'MSWin32' ? '../../build/src/graphite2.lib' : '-L @BUILD_DIR@ -lgraphite2',
++ include_dirs => ['.', '../include', '../../include'],
+ requires => {
+ 'Test::More' => 0,
+ },
diff --git a/media-gfx/graphite2/graphite2-1.3.5.ebuild b/media-gfx/graphite2/graphite2-1.3.5.ebuild
new file mode 100644
index 000000000000..6faa6fcabae2
--- /dev/null
+++ b/media-gfx/graphite2/graphite2-1.3.5.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+GENTOO_DEPEND_ON_PERL="no"
+inherit eutils perl-module python-any-r1 cmake-multilib
+
+DESCRIPTION="Library providing rendering capabilities for complex non-Roman writing systems"
+HOMEPAGE="http://graphite.sil.org/"
+SRC_URI="mirror://sourceforge/silgraphite/${PN}/${P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="perl test"
+
+RDEPEND="
+ perl? ( dev-lang/perl:= )
+"
+DEPEND="${RDEPEND}
+ perl? (
+ dev-perl/Module-Build
+ dev-perl/Locale-Maketext-Lexicon
+ )
+ test? (
+ dev-libs/glib:2
+ media-libs/fontconfig
+ media-libs/silgraphite
+ ${PYTHON_DEPS}
+ perl? ( virtual/perl-Test-Simple )
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.3.5-includes-libs-perl.patch"
+)
+
+pkg_setup() {
+ use perl && perl_set_version
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # make tests optional
+ if ! use test; then
+ sed -i \
+ -e '/tests/d' \
+ CMakeLists.txt || die
+ fi
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ "-DVM_MACHINE_TYPE=direct"
+ # http://sourceforge.net/p/silgraphite/bugs/49/
+ $([[ ${CHOST} == powerpc*-apple* ]] && \
+ echo "-DGRAPHITE2_NSEGCACHE:BOOL=ON")
+ )
+
+ cmake-utils_src_configure
+
+ # fix perl linking
+ if multilib_is_native_abi && use perl; then
+ _cmake_check_build_dir init
+ sed -i \
+ -e "s:@BUILD_DIR@:\"${BUILD_DIR}/src\":" \
+ "${S}"/contrib/perl/Build.PL || die
+ fi
+}
+
+src_compile() {
+ cmake-multilib_src_compile
+ if use perl; then
+ cd contrib/perl || die
+ perl-module_src_configure
+ perl-module_src_compile
+ fi
+}
+
+src_test() {
+ cmake-multilib_src_test
+ if use perl; then
+ cd contrib/perl || die
+ perl-module_src_test
+ fi
+}
+
+src_install() {
+ cmake-multilib_src_install
+ if use perl; then
+ cd contrib/perl || die
+ perl-module_src_install
+ perl_delete_localpod
+ fi
+
+ prune_libtool_files --all
+}