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: Sat, 26 Feb 2022 19:52:11
Message-Id: 1645905123.26e2dd31d3a351fd51f1ca8902e7a7f6f8c11916.zmedico@gentoo
1 commit: 26e2dd31d3a351fd51f1ca8902e7a7f6f8c11916
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 26 19:26:54 2022 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 26 19:52:03 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26e2dd31
7
8 app-text/podofo: Bump to version 0.9.7
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
12
13 app-text/podofo/Manifest | 1 +
14 app-text/podofo/podofo-0.9.7.ebuild | 112 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 113 insertions(+)
16
17 diff --git a/app-text/podofo/Manifest b/app-text/podofo/Manifest
18 index f5d3e309a7d7..58833fa8fc0b 100644
19 --- a/app-text/podofo/Manifest
20 +++ b/app-text/podofo/Manifest
21 @@ -1 +1,2 @@
22 DIST podofo-0.9.6_p20190928.tar.xz 747532 BLAKE2B 39d051e6adca85bf0f124e5d48e1ff88dc951d7c1b38bc76dc7e3640ea9c3f8a59c6ba9a9105a263234e94932e450bec12dde455850dbf96cd7eec3e69a1a28d SHA512 b9d46fb02eeba61190a0efd17b507bba62d7246af6fff3c3514c9970e99e085f9aad92baa05cc6cf0a8c3c2843554099c904bff10be54dbb4d4cb7de460fc3cc
23 +DIST podofo-0.9.7.tar.gz 1005247 BLAKE2B d8f123008d272c1c39f60438d7cd6112cdd851488775e7e0fcb3fd9c4669fd64867fa293ef18b3189eac01f84a8a6b3c536171528f2b6097a5fe181c98501a71 SHA512 0e699739c2fb7d4d02ffca371504bb19f3a8a97ddcbfc06f8d9636db9e73064b4f633f7f09bce92140bb2174610ad68c1e5f8460d474d176ab803ed28295251b
24
25 diff --git a/app-text/podofo/podofo-0.9.7.ebuild b/app-text/podofo/podofo-0.9.7.ebuild
26 new file mode 100644
27 index 000000000000..a4054a7a6ec6
28 --- /dev/null
29 +++ b/app-text/podofo/podofo-0.9.7.ebuild
30 @@ -0,0 +1,112 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +LUA_COMPAT=( lua5-{1..4} )
37 +
38 +inherit cmake flag-o-matic lua-single toolchain-funcs
39 +
40 +DESCRIPTION="PoDoFo is a C++ library to work with the PDF file format"
41 +HOMEPAGE="https://sourceforge.net/projects/podofo/"
42 +SRC_URI="https://cfhcable.dl.sourceforge.net/project/podofo/podofo/${PV}/${P}.tar.gz"
43 +
44 +LICENSE="GPL-2 LGPL-2.1"
45 +SLOT="0/${PV}"
46 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
47 +IUSE="+boost idn debug test +tools"
48 +RESTRICT="test"
49 +REQUIRED_USE="${LUA_REQUIRED_USE}
50 + test? ( tools )"
51 +
52 +RDEPEND="${LUA_DEPS}
53 + idn? ( net-dns/libidn:= )
54 + dev-libs/openssl:0=
55 + media-libs/fontconfig:=
56 + media-libs/freetype:2=
57 + virtual/jpeg:0=
58 + media-libs/libpng:0=
59 + media-libs/tiff:0=
60 + sys-libs/zlib:="
61 +DEPEND="${RDEPEND}"
62 +
63 +BDEPEND="virtual/pkgconfig
64 + boost? ( dev-util/boost-build )"
65 +
66 +PATCHES=(
67 + "${FILESDIR}"/${PN}-0.9.6_p20190928-cmake_lua_version.patch
68 +)
69 +
70 +DOCS="AUTHORS ChangeLog TODO"
71 +
72 +src_prepare() {
73 + cmake_src_prepare
74 + local x sed_args
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 #407015: fix to compile with Lua 5.2+
104 + case "${ELUA}" in
105 + lua5-1|luajit)
106 + ;;
107 + *)
108 + sed -e 's: lua_open(: luaL_newstate(:' \
109 + -e 's: luaL_getn(: lua_rawlen(:' -i \
110 + tools/podofocolor/luaconverter.cpp \
111 + tools/podofoimpose/planreader_lua.cpp || die
112 + ;;
113 + esac
114 +}
115 +
116 +src_configure() {
117 +
118 + # Bug #381359: undefined reference to `PoDoFo::PdfVariant::DelayedLoadImpl()'
119 + filter-flags -fvisibility-inlines-hidden
120 +
121 + mycmakeargs+=(
122 + "-DPODOFO_BUILD_SHARED=1"
123 + "-DPODOFO_HAVE_JPEG_LIB=1"
124 + "-DPODOFO_HAVE_PNG_LIB=1"
125 + "-DPODOFO_HAVE_TIFF_LIB=1"
126 + "-DWANT_FONTCONFIG=1"
127 + "-DUSE_STLPORT=0"
128 + -DLUA_VERSION="$(lua_get_version)"
129 + -DWANT_BOOST=$(usex boost ON OFF)
130 + -DHAVE_LIBIDN=$(usex idn ON OFF)
131 + -DPODOFO_HAVE_CPPUNIT=$(usex test ON OFF)
132 + -DPODOFO_BUILD_LIB_ONLY=$(usex tools OFF ON)
133 + )
134 +
135 + cmake_src_configure
136 + mkdir -p "${S}/test/TokenizerTest/objects" || die
137 +}
138 +
139 +src_test() {
140 + cd "${BUILD_DIR}"/test/unit || die
141 + ./podofo-test --selftest || die "self test failed"
142 +}