1 |
commit: 6f348cb1f463b8ef951fdc0a4f06102e616334b6 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 24 21:44:53 2020 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 25 19:11:49 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f348cb1 |
7 |
|
8 |
media-gfx/iscan-plugin-gt-x770: port to EAPI 7 |
9 |
|
10 |
Package-Manager: Portage-3.0.8, Repoman-3.0.2 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../iscan-plugin-gt-f720-0.0.1.2.ebuild | 2 +- |
14 |
.../iscan-plugin-gt-x770-2.1.2.1-r3.ebuild | 47 +++++++--------------- |
15 |
2 files changed, 16 insertions(+), 33 deletions(-) |
16 |
|
17 |
diff --git a/media-gfx/iscan-plugin-gt-f720/iscan-plugin-gt-f720-0.0.1.2.ebuild b/media-gfx/iscan-plugin-gt-f720/iscan-plugin-gt-f720-0.0.1.2.ebuild |
18 |
index 89786f1de27..d107dd8ad8e 100644 |
19 |
--- a/media-gfx/iscan-plugin-gt-f720/iscan-plugin-gt-f720-0.0.1.2.ebuild |
20 |
+++ b/media-gfx/iscan-plugin-gt-f720/iscan-plugin-gt-f720-0.0.1.2.ebuild |
21 |
@@ -44,7 +44,7 @@ pkg_postinst() { |
22 |
iscan-registry --add interpreter usb 0x04b8 0x0131 "${MY_LIB}/esci/libesci-interpreter-gt-f720 /usr/share/esci/esfw8b.bin" || die |
23 |
elog |
24 |
elog "Firmware file esfw8b.bin for Epson Perfection V300 PHOTO" |
25 |
- elog "has been installed in /usr/share/esci and registered for use." |
26 |
+ elog "has been installed in ${EROOT}/usr/share/esci and registered for use." |
27 |
elog |
28 |
} |
29 |
|
30 |
|
31 |
diff --git a/media-gfx/iscan-plugin-gt-x770/iscan-plugin-gt-x770-2.1.2.1-r3.ebuild b/media-gfx/iscan-plugin-gt-x770/iscan-plugin-gt-x770-2.1.2.1-r3.ebuild |
32 |
index 380f3d1e59e..e876f953688 100644 |
33 |
--- a/media-gfx/iscan-plugin-gt-x770/iscan-plugin-gt-x770-2.1.2.1-r3.ebuild |
34 |
+++ b/media-gfx/iscan-plugin-gt-x770/iscan-plugin-gt-x770-2.1.2.1-r3.ebuild |
35 |
@@ -1,12 +1,12 @@ |
36 |
-# Copyright 1999-2014 Gentoo Foundation |
37 |
+# Copyright 1999-2020 Gentoo Authors |
38 |
# Distributed under the terms of the GNU General Public License v2 |
39 |
|
40 |
-EAPI="4" |
41 |
+EAPI=7 |
42 |
|
43 |
-inherit rpm versionator multilib |
44 |
+inherit rpm |
45 |
|
46 |
-MY_PV="$(get_version_component_range 1-3)" |
47 |
-MY_PVR="$(replace_version_separator 3 -)" |
48 |
+MY_PV="$(ver_cut 1-3)" |
49 |
+MY_PVR="$(ver_rs 3 -)" |
50 |
|
51 |
DESCRIPTION="Epson Perfection V500 scanner plugin for SANE 'epkowa' backend" |
52 |
HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX" |
53 |
@@ -14,19 +14,16 @@ SRC_URI=" |
54 |
x86? ( https://dev.gentoo.org/~flameeyes/avasys/${PN}/${MY_PV}/${PN}-${MY_PVR}.i386.rpm ) |
55 |
amd64? ( https://dev.gentoo.org/~flameeyes/avasys/${PN}/${MY_PV}/${PN}-${MY_PVR}.x86_64.rpm ) |
56 |
" |
57 |
+S="${WORKDIR}" |
58 |
|
59 |
LICENSE="AVASYS" |
60 |
SLOT="0" |
61 |
KEYWORDS="-* ~amd64 ~x86" |
62 |
|
63 |
-IUSE="" |
64 |
- |
65 |
DEPEND=">=media-gfx/iscan-2.21.0 |
66 |
!!<media-gfx/iscan-plugin-gt-x770-2.1.2.1-r2" |
67 |
RDEPEND="${DEPEND}" |
68 |
|
69 |
-S="${WORKDIR}" |
70 |
- |
71 |
QA_PREBUILT="/opt/iscan/esci/libesint7C.so*" |
72 |
|
73 |
src_configure() { :; } |
74 |
@@ -44,46 +41,32 @@ src_install() { |
75 |
doexe "${WORKDIR}/usr/$(get_libdir)/iscan/"* |
76 |
} |
77 |
|
78 |
-pkg_setup() { |
79 |
- basecmds=( |
80 |
- "iscan-registry --COMMAND interpreter usb 0x04b8 0x0130 /opt/iscan/esci/libesint7C /usr/share/iscan/esfw7C.bin" |
81 |
- ) |
82 |
-} |
83 |
- |
84 |
pkg_postinst() { |
85 |
elog |
86 |
elog "Firmware file esfw41.bin for Epson Perfection V500" |
87 |
- elog "has been installed in /usr/share/iscan." |
88 |
+ elog "has been installed in ${EROOT}/usr/share/iscan." |
89 |
elog |
90 |
|
91 |
- [[ -n ${REPLACING_VERSIONS} ]] && return |
92 |
+ [[ -n "${REPLACING_VERSIONS}" ]] && return |
93 |
|
94 |
# Needed for scanner to work properly. |
95 |
- if [[ ${ROOT} == "/" ]]; then |
96 |
- for basecmd in "${basecmds[@]}"; do |
97 |
- eval ${basecmd/COMMAND/add} |
98 |
- done |
99 |
+ if [[ -z "${EROOT}" ]]; then |
100 |
+ iscan-registry --add interpreter usb 0x04b8 0x0130 /opt/iscan/esci/libesint7C /usr/share/iscan/esfw7C.bin || die |
101 |
else |
102 |
ewarn "Unable to register the plugin and firmware when installing outside of /." |
103 |
ewarn "execute the following command yourself:" |
104 |
- for basecmd in "${basecmds[@]}"; do |
105 |
- ewarn "${basecmd/COMMAND/add}" |
106 |
- done |
107 |
+ ewarn "iscan-registry --add interpreter usb 0x04b8 0x0130 /opt/iscan/esci/libesint7C /usr/share/iscan/esfw7C.bin" |
108 |
fi |
109 |
} |
110 |
|
111 |
pkg_prerm() { |
112 |
- [[ -n ${REPLACED_BY_VERSION} ]] && return |
113 |
+ [[ -n "${REPLACED_BY_VERSION}" ]] && return |
114 |
|
115 |
- if [[ ${ROOT} == "/" ]]; then |
116 |
- for basecmd in "${basecmds[@]}"; do |
117 |
- eval ${basecmd/COMMAND/remove} |
118 |
- done |
119 |
+ if [[ -z "${EROOT}" ]]; then |
120 |
+ iscan-registry --remove interpreter usb 0x04b8 0x0130 /opt/iscan/esci/libesint7C /usr/share/iscan/esfw7C.bin || die |
121 |
else |
122 |
ewarn "Unable to de-register the plugin and firmware when installing outside of /." |
123 |
ewarn "execute the following command yourself:" |
124 |
- for basecmd in "${basecmds[@]}"; do |
125 |
- ewarn "${basecmd/COMMAND/remove}" |
126 |
- done |
127 |
+ ewarn "iscan-registry --remove interpreter usb 0x04b8 0x0130 /opt/iscan/esci/libesint7C /usr/share/iscan/esfw7C.bin" |
128 |
fi |
129 |
} |