blob: 186991909bde27884f774f58b941d8b0ad5182ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools edo
DESCRIPTION="Interpreter for Psion 5(MX) file formats"
HOMEPAGE="https://frodo.looijaard.name/project/psiconv"
SRC_URI="https://frodo.looijaard.name/system/files/software/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~sparc ~x86"
IUSE="+imagemagick"
# TIFF is the output by default for input image formats
RDEPEND="imagemagick? ( media-gfx/imagemagick:=[cxx,tiff] )"
DEPEND="${RDEPEND}"
BDEPEND="app-alternatives/bc"
PATCHES=(
"${FILESDIR}"/${PN}-0.8.3-gcc10-fno-common.patch
"${FILESDIR}"/${PN}-0.9.9-fix_getopt.patch
"${FILESDIR}"/${PN}-0.9.9-fix_imagemagick.patch
)
src_prepare() {
default
# use patched configure.in, then modernize the build system
eautoreconf
}
src_configure() {
local myeconfargs=(
MAGICKCONFIG="Magick++-config"
$(use_with imagemagick)
)
econf "${myeconfargs[@]}"
}
src_test() {
# test various encodings and output formats
# anyway the html doc is already generated with the freshly compiled binary
for file in Word TextEd; do
for e in UTF8 UCS2 ASCII; do
edo program/psiconv/psiconv examples/${file} -n 3 -e ${e} -T XHTML -o "${T}"/${file}-${e}.out
done
done
if use imagemagick; then
for file in Sketch Clipart MBM; do
edo program/psiconv/psiconv examples/${file} -n 3 -T TIFF -o "${T}"/${file}.out
done
fi
}
src_install() {
default
# no static archives
find "${D}" -name '*.la' -delete || die
# move html in the docdir and remove source files
mv "${ED}"/usr/share/psiconv/xhtml "${ED}"/usr/share/doc/${PF}/html || die
rm -r "${ED}"/usr/share/psiconv || die
}
|