1 |
commit: 289e000c530215f2c921ea3e21d195b37b390c9c |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 26 17:03:44 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 26 17:21:08 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=289e000c |
7 |
|
8 |
app-text/podofo: version bump to 0.9.6_p20180715 |
9 |
|
10 |
Package-Manager: Portage-2.3.43, Repoman-2.3.10 |
11 |
|
12 |
app-text/podofo/Manifest | 1 + |
13 |
app-text/podofo/podofo-0.9.6_p20180715.ebuild | 140 ++++++++++++++++++++++++++ |
14 |
2 files changed, 141 insertions(+) |
15 |
|
16 |
diff --git a/app-text/podofo/Manifest b/app-text/podofo/Manifest |
17 |
index 40ed338f19f..8ba7817a349 100644 |
18 |
--- a/app-text/podofo/Manifest |
19 |
+++ b/app-text/podofo/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
+DIST podofo-0.9.6_p20180715.tar.xz 747444 BLAKE2B 96d90add6d290d6722cd7412fd75433f87303bac385964f0967b4f119db4962f6ddbd93b49af8454051f421d77de70ad7ea0f5b01a66eeb690a75dbeec256eff SHA512 4c9b09c716128110b47d6a02f118eb80b6009e9e79dbc83ff804a57f0abc011b789de9287b68a6c1d6704ef386f8062a3a495408af8a832782f0bf0128190a1f |
22 |
DIST podofo-0.9.6_pre20170508.tar.xz 919876 BLAKE2B 39be46db0e36755c828373659f681aa6334ec6be01cdcc62616d8ce4e59a2ab916cbfc4aa58d4bf8ab95843a40b7b536cb1b2ccfa14beacf629ff1fbcb699613 SHA512 37d8e844ba5763d06d467e316871436e1a63795d66675677d9775cd1bd311f43b241d58e82213a0342ab69a0f5cd80261aad48c4af29c82f7bcc0c14bd242f10 |
23 |
DIST podofo-0.9.6_pre20171027.tar.xz 919504 BLAKE2B d03852a25e50085ed2108e90c293600e0515c06918276888e63917ca00a9fe3b392cd9ec9aeb6f651fd7e0b45a5e3c08e3f4d6df6f4a04d8fb224fbdd0599342 SHA512 db1ac836abd7be0d2cc3c27114c7134de9de8ba931a6a8265514fedefe3c6f06a24371f7a5425c8b7251fe7166bc27f07733cba878ad24c12651c8c051cac8be |
24 |
|
25 |
diff --git a/app-text/podofo/podofo-0.9.6_p20180715.ebuild b/app-text/podofo/podofo-0.9.6_p20180715.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..7f963976107 |
28 |
--- /dev/null |
29 |
+++ b/app-text/podofo/podofo-0.9.6_p20180715.ebuild |
30 |
@@ -0,0 +1,140 @@ |
31 |
+# Copyright 1999-2018 Gentoo Foundation |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=6 |
35 |
+inherit cmake-utils flag-o-matic multilib toolchain-funcs |
36 |
+ |
37 |
+DESCRIPTION="PoDoFo is a C++ library to work with the PDF file format" |
38 |
+HOMEPAGE="https://sourceforge.net/projects/podofo/" |
39 |
+SRC_URI="mirror://gentoo/${P}.tar.xz" |
40 |
+ |
41 |
+LICENSE="GPL-2 LGPL-2.1" |
42 |
+SLOT="0/${PV%_*}" |
43 |
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86" |
44 |
+IUSE="+boost idn libressl debug test +tools" |
45 |
+REQUIRED_USE="test? ( tools )" |
46 |
+ |
47 |
+RDEPEND="dev-lang/lua:= |
48 |
+ idn? ( net-dns/libidn:= ) |
49 |
+ !libressl? ( dev-libs/openssl:0= ) |
50 |
+ libressl? ( dev-libs/libressl:0= ) |
51 |
+ media-libs/fontconfig:= |
52 |
+ media-libs/freetype:2= |
53 |
+ virtual/jpeg:0= |
54 |
+ media-libs/libpng:0= |
55 |
+ media-libs/tiff:0= |
56 |
+ sys-libs/zlib:=" |
57 |
+DEPEND="${RDEPEND} |
58 |
+ virtual/pkgconfig |
59 |
+ boost? ( dev-util/boost-build ) |
60 |
+ test? ( dev-util/cppunit )" |
61 |
+ |
62 |
+DOCS="AUTHORS ChangeLog TODO" |
63 |
+ |
64 |
+src_prepare() { |
65 |
+ cmake-utils_src_prepare |
66 |
+ local x sed_args |
67 |
+ |
68 |
+ # bug 620934 - Disable linking with cppunit when possible, since it |
69 |
+ # triggers errors with some older compilers. |
70 |
+ use test || sed -e 's:^FIND_PACKAGE(CppUnit):#\0:' -i CMakeLists.txt || die |
71 |
+ |
72 |
+ # bug 556962 |
73 |
+ sed -i -e 's|Decrypt( pEncryptedBuffer, nOutputLen, pDecryptedBuffer, m_lLen );|Decrypt( pEncryptedBuffer, (pdf_long)nOutputLen, pDecryptedBuffer, (pdf_long\&)m_lLen );|' \ |
74 |
+ test/unit/EncryptTest.cpp || die |
75 |
+ |
76 |
+ sed -i \ |
77 |
+ -e "s:LIBDIRNAME \"lib\":LIBDIRNAME \"$(get_libdir)\":" \ |
78 |
+ -e "s:LIBIDN_FOUND:HAVE_LIBIDN:g" \ |
79 |
+ CMakeLists.txt || die |
80 |
+ |
81 |
+ # Use pkg-config to find headers for bug #459404. |
82 |
+ sed_args= |
83 |
+ for x in $($(tc-getPKG_CONFIG) --cflags freetype2) ; do |
84 |
+ [[ ${x} == -I* ]] || continue |
85 |
+ x=${x#-I} |
86 |
+ if [[ -f ${x}/ft2build.h ]] ; then |
87 |
+ sed_args+=" -e s:/usr/include/\\r\$:${x}:" |
88 |
+ elif [[ -f ${x}/freetype/config/ftheader.h ]] ; then |
89 |
+ sed_args+=" -e s:/usr/include/freetype2\\r\$:${x}:" |
90 |
+ fi |
91 |
+ done |
92 |
+ [[ -n ${sed_args} ]] && \ |
93 |
+ { sed -i ${sed_args} cmake/modules/FindFREETYPE.cmake || die; } |
94 |
+ |
95 |
+ # Bug #439784: Add missing unistd include for close() and unlink(). |
96 |
+ sed -i 's:^#include <stdio.h>$:#include <unistd.h>\n\0:' -i \ |
97 |
+ test/unit/TestUtils.cpp || die |
98 |
+ |
99 |
+ # TODO: fix these test cases |
100 |
+ # ColorTest.cpp:62:Assertion |
101 |
+ # Test name: ColorTest::testDefaultConstructor |
102 |
+ # expected exception not thrown |
103 |
+ # - Expected: PdfError |
104 |
+ sed -e 's:CPPUNIT_TEST( testDefaultConstructor ://\0:' \ |
105 |
+ -e 's:CPPUNIT_TEST( testGreyConstructor ://\0:' \ |
106 |
+ -e 's:CPPUNIT_TEST( testRGBConstructor ://\0:' \ |
107 |
+ -e 's:CPPUNIT_TEST( testCMYKConstructor ://\0:' \ |
108 |
+ -e 's:CPPUNIT_TEST( testColorSeparationAllConstructor ://\0:' \ |
109 |
+ -e 's:CPPUNIT_TEST( testColorSeparationNoneConstructor ://\0:' \ |
110 |
+ -e 's:CPPUNIT_TEST( testColorSeparationConstructor ://\0:' \ |
111 |
+ -e 's:CPPUNIT_TEST( testColorCieLabConstructor ://\0:' \ |
112 |
+ -i test/unit/ColorTest.h || die |
113 |
+ |
114 |
+ # ColorTest.cpp:42:Assertion |
115 |
+ # Test name: ColorTest::testHexNames |
116 |
+ # assertion failed |
117 |
+ # - Expression: static_cast<int>(rgb.GetGreen() * 255.0) == 0x0A |
118 |
+ sed -e 's:CPPUNIT_TEST( testHexNames ://\0:' \ |
119 |
+ -i test/unit/ColorTest.h || die |
120 |
+ |
121 |
+ # Bug #352125: test failure, depending on installed fonts |
122 |
+ # ##Failure Location unknown## : Error |
123 |
+ # Test name: FontTest::testFonts |
124 |
+ # uncaught exception of type PoDoFo::PdfError |
125 |
+ # - ePdfError_UnsupportedFontFormat |
126 |
+ sed -e 's:CPPUNIT_TEST( testFonts ://\0:' \ |
127 |
+ -i test/unit/FontTest.h || die |
128 |
+ |
129 |
+ # Test name: EncodingTest::testDifferencesEncoding |
130 |
+ # equality assertion failed |
131 |
+ # - Expected: 1 |
132 |
+ # - Actual : 0 |
133 |
+ sed -e 's:CPPUNIT_TEST( testDifferencesEncoding ://\0:' \ |
134 |
+ -i test/unit/EncodingTest.h || die |
135 |
+ |
136 |
+ # Bug #407015: fix to compile with Lua 5.2 |
137 |
+ if has_version '>=dev-lang/lua-5.2' ; then |
138 |
+ sed -e 's: lua_open(: luaL_newstate(:' \ |
139 |
+ -e 's: luaL_getn(: lua_rawlen(:' -i \ |
140 |
+ tools/podofocolor/luaconverter.cpp \ |
141 |
+ tools/podofoimpose/planreader_lua.cpp || die |
142 |
+ fi |
143 |
+} |
144 |
+ |
145 |
+src_configure() { |
146 |
+ |
147 |
+ # Bug #381359: undefined reference to `PoDoFo::PdfVariant::DelayedLoadImpl()' |
148 |
+ filter-flags -fvisibility-inlines-hidden |
149 |
+ |
150 |
+ mycmakeargs+=( |
151 |
+ "-DPODOFO_BUILD_SHARED=1" |
152 |
+ "-DPODOFO_HAVE_JPEG_LIB=1" |
153 |
+ "-DPODOFO_HAVE_PNG_LIB=1" |
154 |
+ "-DPODOFO_HAVE_TIFF_LIB=1" |
155 |
+ "-DWANT_FONTCONFIG=1" |
156 |
+ "-DUSE_STLPORT=0" |
157 |
+ -DWANT_BOOST=$(usex boost ON OFF) |
158 |
+ -DHAVE_LIBIDN=$(usex idn ON OFF) |
159 |
+ -DPODOFO_HAVE_CPPUNIT=$(usex test ON OFF) |
160 |
+ -DPODOFO_BUILD_LIB_ONLY=$(usex tools OFF ON) |
161 |
+ ) |
162 |
+ |
163 |
+ cmake-utils_src_configure |
164 |
+ mkdir -p "${S}/test/TokenizerTest/objects" || die |
165 |
+} |
166 |
+ |
167 |
+src_test() { |
168 |
+ cd "${CMAKE_BUILD_DIR}"/test/unit |
169 |
+ ./podofo-test --selftest || die "self test failed" |
170 |
+} |