blob: 4059c52ad01e4ef04db30f91e81e423a746a99c6 (
plain) (
blame)
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
68
69
70
|
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MY_PROG="${P}-1"
DESCRIPTION="Epson scanner management utility"
HOMEPAGE="https://support.epson.net/linux/en/epsonscan2.php"
SRC_URI="https://download3.ebz.epson.net/dsc/f/03/00/15/17/69/0ef02802c476a6564f13cac929859c394f40326a/${MY_PROG}.src.tar.gz"
S="${WORKDIR}/${MY_PROG}"
inherit cmake desktop udev
LICENSE="GPL-3+"
SLOT="0"
IUSE="bundled-libs"
KEYWORDS="~amd64"
DEPEND="
dev-libs/boost
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
media-gfx/sane-backends
media-libs/libjpeg-turbo:=
media-libs/libpng
media-libs/tiff
virtual/libusb:1
!bundled-libs? (
media-libs/libharu
sys-libs/zlib
)
"
RDEPEND="${DEPEND}"
src_prepare() {
sed -i \
-e '/\(execute_process.*\)${EPSON_INSTALL_ROOT}/d' \
-e "s|^\(set(EPSON_VERSION \).*|\1-${PV})|g" \
CMakeLists.txt || die
if ! use bundled-libs; then
# Force usage of system libraries
rm -rf thirdparty/{HaruPDF,zlib}
sed -i \
-e '/thirdparty\/HaruPDF/d' \
-e '/thirdparty\/zlib/d' \
-e 's|^\([[:blank:]]*\)\(usb-1.0\)|\1\2\n\1hpdf\n\1z|' \
src/Controller/CMakeLists.txt || die
fi
cmake_src_prepare
}
src_install() {
cmake_src_install
# Sane symlinks
dosym ../epsonscan2/libsane-epsonscan2.so /usr/$(get_libdir)/sane/libsane-epsonscan2.so.1
dosym ../epsonscan2/libsane-epsonscan2.so /usr/$(get_libdir)/sane/libsane-epsonscan2.so.1.0.0
# Desktop icon
domenu desktop/rpm/x86_64/epsonscan2.desktop
}
pkg_postinst() {
udev_reload
}
pkg_postrm() {
udev_reload
}
|