Gentoo Archives: gentoo-commits

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