/[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.9 - (show annotations) (download)
Tue May 1 19:24:25 2012 UTC (6 years, 1 month ago) by jer
Branch: MAIN
Changes since 1.8: +2 -2 lines
Stable for HPPA too.

(Portage version: 2.2.0_alpha101/cvs/Linux x86_64)

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.8 2012/03/06 00:17:38 zmedico 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 # TODO: fix these test cases
38 # ColorTest.cpp:62:Assertion
39 # Test name: ColorTest::testDefaultConstructor
40 # expected exception not thrown
41 # - Expected: PdfError
42 sed -e 's:CPPUNIT_TEST( testDefaultConstructor ://\0:' \
43 -e 's:CPPUNIT_TEST( testGreyConstructor ://\0:' \
44 -e 's:CPPUNIT_TEST( testRGBConstructor ://\0:' \
45 -e 's:CPPUNIT_TEST( testCMYKConstructor ://\0:' \
46 -e 's:CPPUNIT_TEST( testColorSeparationAllConstructor ://\0:' \
47 -e 's:CPPUNIT_TEST( testColorSeparationNoneConstructor ://\0:' \
48 -e 's:CPPUNIT_TEST( testColorSeparationConstructor ://\0:' \
49 -e 's:CPPUNIT_TEST( testColorCieLabConstructor ://\0:' \
50 -i test/unit/ColorTest.h || die
51
52 # ColorTest.cpp:42:Assertion
53 # Test name: ColorTest::testHexNames
54 # assertion failed
55 # - Expression: static_cast<int>(rgb.GetGreen() * 255.0) == 0x0A
56 sed -e 's:CPPUNIT_TEST( testHexNames ://\0:' \
57 -i test/unit/ColorTest.h || die
58
59 # Bug #352125: test failure, depending on installed fonts
60 # ##Failure Location unknown## : Error
61 # Test name: FontTest::testFonts
62 # uncaught exception of type PoDoFo::PdfError
63 # - ePdfError_UnsupportedFontFormat
64 sed -e 's:CPPUNIT_TEST( testFonts ://\0:' \
65 -i test/unit/FontTest.h || die
66
67 # Bug #407015: fix to compile with Lua 5.2
68 if has_version '>=dev-lang/lua-5.2' ; then
69 sed -e 's: lua_open(: luaL_newstate(:' \
70 -e 's: luaL_getn(: lua_rawlen(:' -i \
71 tools/podofocolor/luaconverter.cpp \
72 tools/podofoimpose/planreader_lua.cpp || die
73 fi
74 }
75
76 src_configure() {
77
78 # Bug #381359: undefined reference to `PoDoFo::PdfVariant::DelayedLoadImpl()'
79 filter-flags -fvisibility-inlines-hidden
80
81 mycmakeargs+=(
82 "-DPODOFO_BUILD_SHARED=1"
83 "-DPODOFO_HAVE_JPEG_LIB=1"
84 "-DPODOFO_HAVE_PNG_LIB=1"
85 "-DPODOFO_HAVE_TIFF_LIB=1"
86 "-DWANT_FONTCONFIG=1"
87 "-DUSE_STLPORT=0"
88 $(cmake-utils_use_want boost)
89 $(cmake-utils_use_has test CPPUNIT)
90 )
91
92 cmake-utils_src_configure
93 }
94
95 src_test() {
96 cd "${CMAKE_BUILD_DIR}"/test/unit
97 ./podofo-test --selftest || die "self test failed"
98 }

  ViewVC Help
Powered by ViewVC 1.1.20