/[gentoo-x86]/app-text/podofo/podofo-0.9.1.ebuild
Gentoo

Contents of /app-text/podofo/podofo-0.9.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Sun Oct 28 02:45:53 2012 UTC (2 years ago) by zmedico
Branch: MAIN
Changes since 1.9: +5 -1 lines
Add missing unistd include in test/unit/TestUtils.cpp for bug #439784.

(Portage version: 2.2.0_alpha142/cvs/Linux i686, signed Manifest commit with key 0xFDE8EF85AE5719A3)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-text/podofo/podofo-0.9.1.ebuild,v 1.9 2012/05/01 19:24:25 jer Exp $
4
5 EAPI=2
6 inherit cmake-utils flag-o-matic multilib
7
8 DESCRIPTION="PoDoFo is a C++ library to work with the PDF file format."
9 HOMEPAGE="http://sourceforge.net/projects/podofo/"
10 SRC_URI="mirror://sourceforge/podofo/${P}.tar.gz"
11
12 LICENSE="GPL-2 LGPL-2.1"
13 SLOT="0"
14 KEYWORDS="amd64 hppa ppc ppc64 ~sparc x86"
15 IUSE="+boost debug test"
16
17 RDEPEND="dev-lang/lua
18 dev-libs/openssl
19 media-libs/fontconfig
20 media-libs/freetype:2
21 virtual/jpeg
22 >=media-libs/libpng-1.4:0
23 media-libs/tiff:0
24 sys-libs/zlib"
25 DEPEND="${RDEPEND}
26 boost? ( dev-util/boost-build )
27 test? ( dev-util/cppunit )"
28
29 DOCS="AUTHORS ChangeLog TODO"
30
31 src_prepare() {
32
33 sed -i \
34 -e "s:LIBDIRNAME \"lib\":LIBDIRNAME \"$(get_libdir)\":" \
35 CMakeLists.txt || die
36
37 # Bug #439784: Add missing unistd include for close() and unlink().
38 sed -i 's:^#include <stdio.h>$:#include <unistd.h>\n\0:' -i \
39 test/unit/TestUtils.cpp || die
40
41 # TODO: fix these test cases
42 # ColorTest.cpp:62:Assertion
43 # Test name: ColorTest::testDefaultConstructor
44 # expected exception not thrown
45 # - Expected: PdfError
46 sed -e 's:CPPUNIT_TEST( testDefaultConstructor ://\0:' \
47 -e 's:CPPUNIT_TEST( testGreyConstructor ://\0:' \
48 -e 's:CPPUNIT_TEST( testRGBConstructor ://\0:' \
49 -e 's:CPPUNIT_TEST( testCMYKConstructor ://\0:' \
50 -e 's:CPPUNIT_TEST( testColorSeparationAllConstructor ://\0:' \
51 -e 's:CPPUNIT_TEST( testColorSeparationNoneConstructor ://\0:' \
52 -e 's:CPPUNIT_TEST( testColorSeparationConstructor ://\0:' \
53 -e 's:CPPUNIT_TEST( testColorCieLabConstructor ://\0:' \
54 -i test/unit/ColorTest.h || die
55
56 # ColorTest.cpp:42:Assertion
57 # Test name: ColorTest::testHexNames
58 # assertion failed
59 # - Expression: static_cast<int>(rgb.GetGreen() * 255.0) == 0x0A
60 sed -e 's:CPPUNIT_TEST( testHexNames ://\0:' \
61 -i test/unit/ColorTest.h || die
62
63 # Bug #352125: test failure, depending on installed fonts
64 # ##Failure Location unknown## : Error
65 # Test name: FontTest::testFonts
66 # uncaught exception of type PoDoFo::PdfError
67 # - ePdfError_UnsupportedFontFormat
68 sed -e 's:CPPUNIT_TEST( testFonts ://\0:' \
69 -i test/unit/FontTest.h || die
70
71 # Bug #407015: fix to compile with Lua 5.2
72 if has_version '>=dev-lang/lua-5.2' ; then
73 sed -e 's: lua_open(: luaL_newstate(:' \
74 -e 's: luaL_getn(: lua_rawlen(:' -i \
75 tools/podofocolor/luaconverter.cpp \
76 tools/podofoimpose/planreader_lua.cpp || die
77 fi
78 }
79
80 src_configure() {
81
82 # Bug #381359: undefined reference to `PoDoFo::PdfVariant::DelayedLoadImpl()'
83 filter-flags -fvisibility-inlines-hidden
84
85 mycmakeargs+=(
86 "-DPODOFO_BUILD_SHARED=1"
87 "-DPODOFO_HAVE_JPEG_LIB=1"
88 "-DPODOFO_HAVE_PNG_LIB=1"
89 "-DPODOFO_HAVE_TIFF_LIB=1"
90 "-DWANT_FONTCONFIG=1"
91 "-DUSE_STLPORT=0"
92 $(cmake-utils_use_want boost)
93 $(cmake-utils_use_has test CPPUNIT)
94 )
95
96 cmake-utils_src_configure
97 }
98
99 src_test() {
100 cd "${CMAKE_BUILD_DIR}"/test/unit
101 ./podofo-test --selftest || die "self test failed"
102 }

  ViewVC Help
Powered by ViewVC 1.1.20