Disable some tests and build perl bindings.
authorTomas Chvatal <scarabeus@gentoo.org>
Wed, 27 Jul 2011 09:59:58 +0000 (09:59 +0000)
committerTomas Chvatal <scarabeus@gentoo.org>
Wed, 27 Jul 2011 09:59:58 +0000 (09:59 +0000)
Package-Manager: portage-2.2.0_alpha47/cvs/Linux x86_64

media-gfx/graphite2/ChangeLog
media-gfx/graphite2/Manifest
media-gfx/graphite2/files/graphite2-disablefonttest.patch [new file with mode: 0644]
media-gfx/graphite2/files/graphite2-includes-libs-perl.patch [new file with mode: 0644]
media-gfx/graphite2/graphite2-0.9.4.ebuild

index 750382f1743ee5f0a4b1e924c7837b88e03f2984..ccc7e219ca0774b44700d4465c926c3b0933fbce 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for media-gfx/graphite2
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/graphite2/ChangeLog,v 1.1 2011/07/26 19:02:19 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/graphite2/ChangeLog,v 1.2 2011/07/27 09:59:58 scarabeus Exp $
+
+  27 Jul 2011; Tomáš Chvátal <scarabeus@gentoo.org>
+  +files/graphite2-disablefonttest.patch,
+  +files/graphite2-includes-libs-perl.patch, graphite2-0.9.4.ebuild:
+  Disable some tests and build perl bindings.
 
 *graphite2-0.9.4 (26 Jul 2011)
 
index 45390a61f3f7a571e1706bb91dffe42e9399dac8..ef73a3ed592bb71a8db201547383a19a4dc0a075 100644 (file)
@@ -1,14 +1,16 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
+AUX graphite2-disablefonttest.patch 3239 RMD160 05de65868555648df40abd219f18855d24440ffe SHA1 4ae5238eaf376ac362e0e70c6f5ba5eded404b3f SHA256 4f216133001c45c0748f870fdfb2afce03be3369409ff63717edecec7b5f2e9d
+AUX graphite2-includes-libs-perl.patch 536 RMD160 ae964c2aacd8a8d6383b25c1f045fe4771558b09 SHA1 9209a91a11f3e9feb6fd3a449b85d8d1b185788f SHA256 84a1bff6793b9fd49268b9e5927ac249e960d34cac119fe17b8cf35032c9f11b
 DIST graphite2-0.9.4.tgz 3548861 RMD160 6181dd3ecc9741f36255cc431a630243fc7c90cb SHA1 bf7c359c5338b8e0ea54a72985c6c9adb16f6fb8 SHA256 75ea41360ddf0d84364a790c0494708a4e14643915ad517309d330ceb34b60ee
-EBUILD graphite2-0.9.4.ebuild 1021 RMD160 b0b89fb45a17a1ec16366f16311d4aa5b4e32cba SHA1 362c0454ffc2e498af4a7b3b88509f8a4e6888f2 SHA256 08bdd6c7c8a0e19ea0776f807640c7b05c10f2d2459f1aab214a53e3db776d5c
-MISC ChangeLog 405 RMD160 6e6c33d5e2526e561a77c84c76673802e5813992 SHA1 8a47f265acb23c8d4cf8c48c636cb691a7d7c6f5 SHA256 00fc6c2be353d621574f8aa1af0b9afd231721e612bdba3c05b80273ca09fe6e
+EBUILD graphite2-0.9.4.ebuild 1700 RMD160 f96eebba29e8dd5f647310364ec94b030e92f557 SHA1 979fc580598376afd4765c0184ea24abb4b6b7c4 SHA256 5a2e5425909304c78eb68bd4deb024ae9bb2044e7fce415bef85967bbd8da61d
+MISC ChangeLog 618 RMD160 cfbd9a26647aa033978cd82670d4e1354b6d80d2 SHA1 b2b51bec82dea9a3b8515623fb6a7ccaf4171848 SHA256 32d041d7fcd4414bbd264fc681a39df591eb6196dcab40a6c42f4b6e73eec54c
 MISC metadata.xml 163 RMD160 68888b3756b2cf14b88ff5aa31e4fd07c9cc9713 SHA1 bd3e6fae69f40f453bc382ae8f1a7644a590a9cc SHA256 4539da09a369d01dcec488c471eeaaef71b60686482101eba357344538e994e2
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (GNU/Linux)
 
-iEYEARECAAYFAk4vDugACgkQHB6c3gNBRYdRTQCfSYdVMQ+u+YSyM6s75WiNeI4C
-1iQAoLnEnQtr0L/NWjFHhoUYqmUewyv1
-=2740
+iEYEARECAAYFAk4v4Z8ACgkQHB6c3gNBRYeJOwCgw/YXJDA5SasqIhy0RSltOEjI
+y5wAn2V41kWFpXZfPl5/dRjCphFmJQWw
+=tenK
 -----END PGP SIGNATURE-----
diff --git a/media-gfx/graphite2/files/graphite2-disablefonttest.patch b/media-gfx/graphite2/files/graphite2-disablefonttest.patch
new file mode 100644 (file)
index 0000000..7fafea1
--- /dev/null
@@ -0,0 +1,59 @@
+--- graphite2-0.9.4.orig/tests/CMakeLists.txt
++++ graphite2-0.9.4/tests/CMakeLists.txt
+@@ -31,28 +31,6 @@ macro(fonttest TESTNAME FONTFILE)
+ #    add_custom_target(${TESTNAME} DEPENDS ${TESTNAME}.xml)
+ endmacro(fonttest)
+ 
+-fonttest(padauk1 Padauk.ttf 1015 102F 100F 1039 100F 1031 1038)
+-fonttest(padauk2 Padauk.ttf 1000 103C 102D 102F)
+-fonttest(padauk3 Padauk.ttf 101e 1004 103a 1039 1001 103b 102d 102f 1004 103a 1038)
+-fonttest(padauk4 Padauk.ttf 1005 1000 1039 1000 1030)
+-fonttest(padauk5 Padauk.ttf 1000 103c 1031 102c 1004 1037 103a)
+-fonttest(padauk6 Padauk.ttf 1000 102D 1005 1039 1006 102C)
+-# padauk7 can cause an infinite loop, though the text is miss-spelt
+-fonttest(padauk7 Padauk.ttf 1017 1014 103c 103d 102f)
+-fonttest(padauk8 Padauk.ttf 1004 103A 1039 1005)
+-fonttest(padauk9 Padauk.ttf 1004 103A 1039)
+-fonttest(padauk10 Padauk.ttf 1004 103D 1000 103A -feat kdot=1,wtri=1)
+-fonttest(padauk11 Padauk.ttf 100B 1039 100C 1031 102C)
+-fonttest(charis1 charis_r_gr.ttf 0069 02E6 02E8 02E5)
+-fonttest(scher1 Scheherazadegr.ttf 0628 0628 064E 0644 064E 0654 0627 064E -rtl)
+-fonttest(scher2 Scheherazadegr.ttf 0627 0644 0625 0639 0644 0627 0646 -rtl)
+-fonttest(charis2 charis_r_gr.ttf 1D510 0041 1D513)
+-fonttest(charis3 charis_r_gr.ttf 0054 0069 1ec3 0075 -feat 'lang=vie')
+-fonttest(charis4 charis_r_gr.ttf 006b 0361 070)
+-fonttest(magyar1 MagyarLinLibertineG.ttf 0031 0035 -feat 210=36)
+-fonttest(magyar2 MagyarLinLibertineG.ttf 0031 0030 -feat 210=200)
+-fonttest(magyar3 MagyarLinLibertineG.ttf 0066 0069 0066 0074 0079 002d 0066 0069 0076 0065 -feat 209=3)
+-
+ macro(feattest TESTNAME FONTFILE)
+     if (EXISTS ${PROJECT_SOURCE_DIR}/standards/${TESTNAME}${CMAKE_SYSTEM_NAME}.log)
+         set(PLATFORM_TEST_SUFFIX ${CMAKE_SYSTEM_NAME})
+@@ -65,6 +43,3 @@ macro(feattest TESTNAME FONTFILE)
+ #    add_custom_target(${TESTNAME} DEPENDS ${TESTNAME}.xml)
+ endmacro(feattest)
+ 
+-feattest(padauk_feat Padauk.ttf)
+-feattest(charis_feat charis_r_gr.ttf)
+-feattest(scher_feat Scheherazadegr.ttf)
+--- graphite2-0.9.4.orig/tests/comparerenderer/CMakeLists.txt
++++ graphite2-0.9.4/tests/comparerenderer/CMakeLists.txt
+@@ -123,11 +123,8 @@ macro(comparetest TESTNAME FONTFILE TEXT
+     endif (${GR_FOUND})
+ endmacro(comparetest)
+ 
+-comparetest(charis charis_r_gr.ttf udhr_eng.txt)
+ comparetest(padauk Padauk.ttf my_HeadwordSyllables.txt)
+ comparetest(padauk_ulon Padauk.ttf my_HeadwordSyllables.txt --features ulon=1)
+-comparetest(charis_yor charis_r_gr.ttf udhr_yor.txt)
+-comparetest(piglatin PigLatinBenchmark_v3.ttf udhr_eng.txt)
+ # comparerenderer needs a bidi algorithm before it can run this test
+ # comparetest(scheherazade_arb Scheherazadegr.ttf udhr_arb.txt --rtl)
+ 
+--- graphite2-0.9.4.orig/tests/examples/CMakeLists.txt
++++ graphite2-0.9.4/tests/examples/CMakeLists.txt
+@@ -29,4 +29,3 @@ endmacro(test_example)
+ test_example(simple simple.c ${PROJECT_SOURCE_DIR}/../fonts/Padauk.ttf "Hello World!")
+ test_example(features features.c ${PROJECT_SOURCE_DIR}/../fonts/Padauk.ttf)
+ test_example(clusters cluster.c ${PROJECT_SOURCE_DIR}/../fonts/Padauk.ttf "စက္ခုန္ဒြေ")
+-test_example(linebreak linebreak.c ${PROJECT_SOURCE_DIR}/../fonts/charis_r_gr.ttf 120 "This is a long test line that goes on and on and on")
diff --git a/media-gfx/graphite2/files/graphite2-includes-libs-perl.patch b/media-gfx/graphite2/files/graphite2-includes-libs-perl.patch
new file mode 100644 (file)
index 0000000..f549f5b
--- /dev/null
@@ -0,0 +1,13 @@
+--- graphite2-0.9.3.orig/perl/Build.PL
++++ graphite2-0.9.3/perl/Build.PL
+@@ -8,8 +8,8 @@ my $builder = Module::Build->new(
+     dist_author         => 'Simon Cozens <simon@cpan.org>',
+     dist_version_from   => 'lib/Text/Graphite2.pm',
+     extra_compiler_flags => '-Wall -Wno-unused-variable',
+-    extra_linker_flags  => '-lgraphite2',
+-    include_dirs        => ['.'],
++    extra_linker_flags  => '-L @BUILD_DIR@ -lgraphite2',
++    include_dirs        => ['.', '../include'],
+     requires => {
+         'Test::More' => 0,
+     },
index baca9061282653acc960b8d42c659a13666503da..ce13097a9fa0542c2b3590f7cdb304e26c43eedb 100644 (file)
@@ -1,10 +1,10 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/graphite2/graphite2-0.9.4.ebuild,v 1.1 2011/07/26 19:02:19 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/graphite2/graphite2-0.9.4.ebuild,v 1.2 2011/07/27 09:59:58 scarabeus Exp $
 
 EAPI=4
 
-inherit cmake-utils
+inherit base cmake-utils perl-module
 
 DESCRIPTION="Library providing rendering capabilities for complex non-Roman writing systems"
 HOMEPAGE="http://graphite.sil.org/"
@@ -13,19 +13,42 @@ SRC_URI="mirror://sourceforge/silgraphite/${PN}/${P}.tgz"
 LICENSE="LGPL-2.1"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc"
+IUSE="doc perl"
 
 RDEPEND="
        dev-libs/glib:2
        media-libs/fontconfig
+       perl? ( dev-lang/perl )
 "
 DEPEND="${RDEPEND}
        doc? (
                app-doc/doxygen
                dev-texlive/texlive-latex
        )
+       perl? ( virtual/perl-Module-Build )
 "
 
+PATCHES=(
+       "${FILESDIR}/${PN}-includes-libs-perl.patch"
+       "${FILESDIR}/${PN}-disablefonttest.patch"
+)
+
+pkg_setup() {
+       use perl && perl-module_pkg_setup
+}
+
+src_prepare() {
+       base_src_prepare
+
+       # fix perl linking
+       if use perl; then
+               _check_build_dir init
+               sed -i \
+                       -e "s:@BUILD_DIR@:\"${CMAKE_BUILD_DIR}/src\":" \
+                       perl/Build.PL || die
+       fi
+}
+
 src_configure() {
        local mycmakeargs=(
                "-DVM_MACHINE_TYPE=direct"
@@ -37,10 +60,28 @@ src_configure() {
 src_compile() {
        cmake-utils_src_compile
        use doc && Icmake-utils_src_compile docs
+       if use perl; then
+               cd perl
+               perl-module_src_prep
+               perl-module_src_compile
+       fi
+}
+
+src_test() {
+       cmake-utils_src_test
+       if use perl; then
+               cd perl
+               perl-module_src_test
+       fi
 }
 
 src_install() {
        cmake-utils_src_install
+       if use perl; then
+               cd perl
+               perl-module_src_install
+               fixlocalpod
+       fi
 
        find "${ED}" -name '*.la' -exec rm -f {} +