2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=7
|
5 |
|
inherit desktop toolchain-funcs
|
|
5 |
inherit desktop git-r3 meson toolchain-funcs
|
6 |
6 |
|
7 |
7 |
DESCRIPTION="Image viewers for the framebuffer console (fbi) and X11 (ida)"
|
8 |
8 |
HOMEPAGE="https://www.kraxel.org/blog/linux/fbida/"
|
|
9 |
EGIT_REPO_URI="https://git.kraxel.org/git/fbida"
|
9 |
10 |
SRC_URI="
|
10 |
|
https://www.kraxel.org/releases/${PN}/${P}.tar.gz
|
11 |
11 |
mirror://gentoo/ida.png.bz2
|
12 |
12 |
"
|
13 |
13 |
LICENSE="GPL-2 IJG"
|
14 |
14 |
SLOT="0"
|
15 |
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
|
16 |
|
IUSE="curl fbcon ghostscript +gif lirc +png scanner +tiff X +webp"
|
17 |
|
REQUIRED_USE="
|
18 |
|
ghostscript? ( tiff )
|
19 |
|
"
|
|
15 |
KEYWORDS=""
|
20 |
16 |
|
21 |
17 |
CDEPEND="
|
22 |
18 |
!media-gfx/fbi
|
23 |
19 |
>=media-libs/fontconfig-2.2
|
24 |
20 |
>=media-libs/freetype-2.0
|
25 |
|
app-text/poppler
|
|
21 |
>=x11-libs/motif-2.3:0[xft]
|
|
22 |
app-text/poppler[cairo]
|
|
23 |
media-libs/giflib:=
|
26 |
24 |
media-libs/libepoxy
|
27 |
25 |
media-libs/libexif
|
28 |
26 |
media-libs/libjpeg-turbo:=
|
|
27 |
media-libs/libpng:=
|
|
28 |
media-libs/libwebp:=
|
|
29 |
media-libs/mesa[X(+)]
|
|
30 |
media-libs/tiff:=
|
|
31 |
net-misc/curl
|
29 |
32 |
virtual/ttf-fonts
|
30 |
33 |
x11-libs/cairo
|
31 |
|
curl? ( net-misc/curl )
|
32 |
|
fbcon? (
|
33 |
|
app-text/poppler[cairo]
|
34 |
|
media-libs/mesa[X(+),gbm(+)]
|
35 |
|
x11-libs/libdrm
|
36 |
|
x11-libs/pixman
|
37 |
|
)
|
38 |
|
gif? ( media-libs/giflib:= )
|
39 |
|
lirc? ( app-misc/lirc )
|
40 |
|
png? ( media-libs/libpng:= )
|
41 |
|
scanner? ( media-gfx/sane-backends )
|
42 |
|
tiff? ( media-libs/tiff:= )
|
43 |
|
webp? ( media-libs/libwebp:= )
|
44 |
|
X? (
|
45 |
|
>=x11-libs/motif-2.3:0[xft]
|
46 |
|
x11-libs/libX11
|
47 |
|
x11-libs/libXpm
|
48 |
|
x11-libs/libXt
|
49 |
|
)
|
|
34 |
x11-libs/libX11
|
|
35 |
x11-libs/libXpm
|
|
36 |
x11-libs/libXt
|
|
37 |
x11-libs/libdrm
|
|
38 |
x11-libs/libxkbcommon
|
|
39 |
x11-libs/pixman
|
50 |
40 |
"
|
51 |
|
|
52 |
41 |
DEPEND="
|
53 |
42 |
${CDEPEND}
|
54 |
|
X? ( x11-base/xorg-proto )
|
|
43 |
x11-base/xorg-proto
|
55 |
44 |
"
|
56 |
|
|
57 |
45 |
RDEPEND="
|
58 |
46 |
${CDEPEND}
|
59 |
|
ghostscript? (
|
60 |
|
app-text/ghostscript-gpl
|
61 |
|
)
|
62 |
47 |
"
|
63 |
48 |
PATCHES=(
|
64 |
49 |
"${FILESDIR}"/ida-desktop.patch
|
65 |
50 |
"${FILESDIR}"/${PN}-2.10-giflib-4.2.patch
|
66 |
|
"${FILESDIR}"/${PN}-2.14-Autoconf.patch
|
67 |
|
"${FILESDIR}"/${PN}-2.14-fno-common.patch
|
68 |
51 |
"${FILESDIR}"/${PN}-2.14-cpp.patch
|
69 |
52 |
)
|
70 |
53 |
|
71 |
|
src_configure() {
|
72 |
|
tc-export CC CPP
|
73 |
|
|
74 |
|
# Let autoconf do its job and then fix things to build fbida
|
75 |
|
# according to our specifications
|
76 |
|
emake Make.config
|
77 |
|
|
78 |
|
gentoo_fbida() {
|
79 |
|
local useflag=${1}
|
80 |
|
local config=${2}
|
81 |
|
|
82 |
|
local option="no"
|
83 |
|
use ${useflag} && option="yes"
|
84 |
|
|
85 |
|
sed -i \
|
86 |
|
-e "s|HAVE_${config}.*|HAVE_${config} := ${option}|" \
|
87 |
|
"${S}/Make.config" || die
|
88 |
|
}
|
89 |
|
|
90 |
|
gentoo_fbida X MOTIF
|
91 |
|
gentoo_fbida curl LIBCURL
|
92 |
|
gentoo_fbida fbcon LINUX_FB_H
|
93 |
|
gentoo_fbida gif LIBUNGIF
|
94 |
|
gentoo_fbida lirc LIBLIRC
|
95 |
|
gentoo_fbida ghostscript LIBTIFF
|
96 |
|
gentoo_fbida png LIBPNG
|
97 |
|
gentoo_fbida scanner LIBSANE
|
98 |
|
gentoo_fbida tiff LIBTIFF
|
99 |
|
gentoo_fbida webp LIBWEBP
|
|
54 |
src_unpack() {
|
|
55 |
unpack ${A}
|
|
56 |
git-r3_src_unpack
|
100 |
57 |
}
|
101 |
58 |
|
102 |
|
src_compile() {
|
103 |
|
emake verbose=yes
|
|
59 |
src_prepare() {
|
|
60 |
default
|
|
61 |
|
|
62 |
# upstream omission?
|
|
63 |
echo ${PV} > VERSION
|
|
64 |
|
|
65 |
tc-export CC CPP
|
104 |
66 |
}
|
105 |
67 |
|
106 |
68 |
src_install() {
|
107 |
|
emake \
|
108 |
|
DESTDIR="${ED}" \
|
109 |
|
STRIP="" \
|
110 |
|
prefix=/usr \
|
111 |
|
install
|
112 |
|
|
113 |
|
dodoc README
|
114 |
|
|
115 |
|
if use fbcon && ! use ghostscript; then
|
116 |
|
rm \
|
117 |
|
"${ED}"/usr/bin/fbgs \
|
118 |
|
"${ED}"/usr/share/man/man1/fbgs.1 \
|
119 |
|
|| die
|
120 |
|
fi
|
121 |
|
|
122 |
|
if use X ; then
|
123 |
|
doicon "${WORKDIR}"/ida.png
|
124 |
|
domenu desktop/ida.desktop
|
125 |
|
fi
|
|
69 |
meson_src_install
|
|
70 |
|
|
71 |
dodoc Changes README.{ida,md} TODO
|
|
72 |
|
|
73 |
doicon "${WORKDIR}"/ida.png
|
|
74 |
domenu desktop/ida.desktop
|
126 |
75 |
}
|