1 |
commit: 5b7979e4bfc53096ce7e9cf8c04081a26830d2a4 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 31 07:12:31 2022 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 31 07:15:29 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b7979e4 |
7 |
|
8 |
app-accessibility/brltty: 6.4-r1 bump for several build fixes |
9 |
|
10 |
- use the upstream unpriveleged user support |
11 |
- use newdoc instead of moving documentation around |
12 |
- use upstream systemd and udev configuration |
13 |
- install most of brltty in /usr, but put the binaries in /bin |
14 |
- fix the dependencies |
15 |
|
16 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
17 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
18 |
|
19 |
app-accessibility/brltty/brltty-6.4-r1.ebuild | 217 ++++++++++++++++++++++++++ |
20 |
app-accessibility/brltty/files/brltty.initd | 11 ++ |
21 |
2 files changed, 228 insertions(+) |
22 |
|
23 |
diff --git a/app-accessibility/brltty/brltty-6.4-r1.ebuild b/app-accessibility/brltty/brltty-6.4-r1.ebuild |
24 |
new file mode 100644 |
25 |
index 000000000000..a6dc3d8e15d6 |
26 |
--- /dev/null |
27 |
+++ b/app-accessibility/brltty/brltty-6.4-r1.ebuild |
28 |
@@ -0,0 +1,217 @@ |
29 |
+# Copyright 1999-2022 Gentoo Authors |
30 |
+# Distributed under the terms of the GNU General Public License v2 |
31 |
+ |
32 |
+EAPI=7 |
33 |
+ |
34 |
+PYTHON_COMPAT=( python3_{7..10} ) |
35 |
+FINDLIB_USE="ocaml" |
36 |
+JAVA_PKG_WANT_SOURCE="1.8" |
37 |
+JAVA_PKG_WANT_TARGET="1.8" |
38 |
+ |
39 |
+inherit findlib toolchain-funcs java-pkg-opt-2 autotools systemd \ |
40 |
+ python-r1 tmpfiles |
41 |
+ |
42 |
+DESCRIPTION="Daemon that provides access to the Linux/Unix console for a blind person" |
43 |
+HOMEPAGE="https://brltty.app/" |
44 |
+SRC_URI="https://brltty.app/archive/${P}.tar.xz" |
45 |
+ |
46 |
+LICENSE="GPL-2 LGPL-2.1" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86" |
49 |
+IUSE="+api +beeper bluetooth doc +fm gpm iconv icu |
50 |
+ java louis +midi ncurses nls ocaml +pcm policykit python |
51 |
+ usb systemd +speech tcl xml X" |
52 |
+REQUIRED_USE="doc? ( api ) |
53 |
+ java? ( api ) |
54 |
+ ocaml? ( api ) |
55 |
+ python? ( api ${PYTHON_REQUIRED_USE} ) |
56 |
+ tcl? ( api )" |
57 |
+ |
58 |
+DEPEND=" |
59 |
+ acct-group/brltty |
60 |
+ acct-user/brltty |
61 |
+ dev-libs/libpcre2[pcre32] |
62 |
+ bluetooth? ( |
63 |
+ sys-apps/dbus |
64 |
+ net-wireless/bluez |
65 |
+ ) |
66 |
+ gpm? ( >=sys-libs/gpm-1.20 ) |
67 |
+ iconv? ( virtual/libiconv ) |
68 |
+ icu? ( dev-libs/icu:= ) |
69 |
+ louis? ( dev-libs/liblouis:= ) |
70 |
+ midi? ( media-libs/alsa-lib ) |
71 |
+ ncurses? ( sys-libs/ncurses:0= ) |
72 |
+ pcm? ( media-libs/alsa-lib ) |
73 |
+ policykit? ( sys-auth/polkit ) |
74 |
+ python? ( ${PYTHON_DEPS} ) |
75 |
+ speech? ( |
76 |
+ app-accessibility/espeak-ng |
77 |
+ app-accessibility/flite |
78 |
+ app-accessibility/speech-dispatcher |
79 |
+ ) |
80 |
+ systemd? ( sys-apps/systemd ) |
81 |
+ tcl? ( >=dev-lang/tcl-8.4.15:0= ) |
82 |
+ usb? ( virtual/libusb:0 ) |
83 |
+ xml? ( dev-libs/expat ) |
84 |
+ X? ( |
85 |
+ app-accessibility/at-spi2-core:2 |
86 |
+ sys-apps/dbus |
87 |
+ x11-libs/libX11 |
88 |
+ x11-libs/libXaw |
89 |
+ x11-libs/libXfixes |
90 |
+ x11-libs/libXt |
91 |
+ x11-libs/libXtst |
92 |
+ )" |
93 |
+RDEPEND="${DEPEND} |
94 |
+ java? ( >=virtual/jre-1.8:* ) |
95 |
+" |
96 |
+BDEPEND=" |
97 |
+ virtual/pkgconfig |
98 |
+ java? ( >=virtual/jdk-1.8:* ) |
99 |
+ nls? ( virtual/libintl ) |
100 |
+ python? ( >=dev-python/cython-0.16[${PYTHON_USEDEP}] ) |
101 |
+" |
102 |
+ |
103 |
+HTML_DOCS=( "${S}"/Documents/Manual-BrlAPI/. ) |
104 |
+ |
105 |
+src_prepare() { |
106 |
+ default |
107 |
+ |
108 |
+ java-pkg-opt-2_src_prepare |
109 |
+ |
110 |
+ # We run eautoconf instead of using eautoreconf because brltty uses |
111 |
+ # a custom build system that uses autoconf without the rest of the |
112 |
+ # autotools. |
113 |
+ eautoconf |
114 |
+ use python && python_copy_sources |
115 |
+} |
116 |
+ |
117 |
+src_configure() { |
118 |
+ tc-export AR LD PKG_CONFIG |
119 |
+ |
120 |
+ export JAVAC="" |
121 |
+ export JAVA_JNI_FLAGS="" |
122 |
+ if use java; then |
123 |
+ export JAVA_HOME="$(java-config -g JAVA_HOME)" |
124 |
+ export JAVAC_HOME="${JAVA_HOME}/bin" |
125 |
+ export JAVA_JNI_FLAGS="$(java-pkg_get-jni-cflags)" |
126 |
+ export JAVAC="$(java-pkg_get-javac) -encoding UTF-8 $(java-pkg_javac-args)" |
127 |
+ fi |
128 |
+ |
129 |
+ # Override bindir for backward compatibility. |
130 |
+ # Also override localstatedir so that the lib/brltty directory is installed |
131 |
+ # correctly. |
132 |
+ # Disable stripping since we do that ourselves. |
133 |
+ local myconf=( |
134 |
+ --bindir="${EPREFIX}"/bin |
135 |
+ --htmldir="${EPREFIX}"/usr/share/doc/"${P}"/html |
136 |
+ --localstatedir="${EPREFIX}"/var |
137 |
+ --disable-stripping |
138 |
+ --with-updatable-directory="${EPREFIX}"/var/lib/brltty |
139 |
+ --with-writable-directory="${EPREFIX}"/run/brltty |
140 |
+ --with-privilege-parameters=lx:user=brltty |
141 |
+ $(use_enable api) |
142 |
+ $(use_with beeper beep-package) |
143 |
+ $(use_with fm fm-package) |
144 |
+ $(use_enable gpm) |
145 |
+ $(use_enable iconv) |
146 |
+ $(use_enable icu) |
147 |
+ $(use_enable java java-bindings) |
148 |
+ $(use_enable louis liblouis) |
149 |
+ $(use_with midi midi-package) |
150 |
+ $(use_enable nls i18n) |
151 |
+ $(use_enable ocaml ocaml-bindings) |
152 |
+ $(use_with pcm pcm-package) |
153 |
+ $(use_enable policykit polkit) |
154 |
+ $(use_enable python python-bindings) |
155 |
+ $(use_enable speech speech-support) |
156 |
+ $(use_with systemd service-package) |
157 |
+ $(use_enable tcl tcl-bindings) |
158 |
+ $(use_enable xml expat) |
159 |
+ $(use_enable X x) |
160 |
+ $(use_with bluetooth bluetooth-package) |
161 |
+ $(use_with ncurses curses) |
162 |
+ $(use_with usb usb-package) |
163 |
+ ) |
164 |
+ # disable espeak since we use espeak-ng |
165 |
+ use speech && myconf+=( --with-speech-driver=-es ) |
166 |
+ |
167 |
+ econf "${myconf[@]}" |
168 |
+ |
169 |
+ if use python; then |
170 |
+ python_configure() { |
171 |
+ econf "${myconf[@]}" |
172 |
+ } |
173 |
+ python_foreach_impl run_in_build_dir python_configure |
174 |
+ fi |
175 |
+} |
176 |
+ |
177 |
+src_compile() { |
178 |
+ emake -j1 JAVA_JNI_FLAGS="${JAVA_JNI_FLAGS}" JAVAC="${JAVAC}" |
179 |
+ |
180 |
+ if use python; then |
181 |
+ python_build() { |
182 |
+ cd "Bindings/Python" || die |
183 |
+ emake -j1 |
184 |
+ } |
185 |
+ python_foreach_impl run_in_build_dir python_build |
186 |
+ fi |
187 |
+} |
188 |
+ |
189 |
+src_install() { |
190 |
+ if use ocaml; then |
191 |
+ findlib_src_preinst |
192 |
+ fi |
193 |
+ |
194 |
+ emake -j1 INSTALL_ROOT="${D}" OCAML_LDCONF= install |
195 |
+ |
196 |
+ if use python; then |
197 |
+ python_install() { |
198 |
+ cd "Bindings/Python" || die |
199 |
+ emake -j1 INSTALL_ROOT="${D}" install |
200 |
+ } |
201 |
+ python_foreach_impl run_in_build_dir python_install |
202 |
+ fi |
203 |
+ |
204 |
+ if use java; then |
205 |
+ java-pkg_doso Bindings/Java/libbrlapi_java.so |
206 |
+ java-pkg_dojar Bindings/Java/brlapi.jar |
207 |
+ fi |
208 |
+ |
209 |
+ insinto /etc |
210 |
+ doins Documents/brltty.conf |
211 |
+ newinitd "${FILESDIR}"/brltty.initd brltty |
212 |
+ pushd Autostart/Systemd 1> /dev/null || die |
213 |
+ emake -j1 INSTALL_ROOT="${ED}" install |
214 |
+ popd |
215 |
+ pushd Autostart/Udev 1> /dev/null || die |
216 |
+ emake -j1 INSTALL_ROOT="${ED}" install |
217 |
+ popd |
218 |
+ |
219 |
+ newdoc doc/Manual-BRLTTY/English/BRLTTY.txt BRLTTY-en.txt |
220 |
+ newdoc doc/Manual-BRLTTY/French/BRLTTY.txt BRLTTY-fr.txt |
221 |
+ newdoc doc/Manual-BrlAPI/English/BrlAPI.txt BrlAPI-en.txt |
222 |
+ dodoc Documents/{CONTRIBUTORS,ChangeLog,HISTORY,README*,TODO} |
223 |
+ if use doc; then |
224 |
+ HTML_DOCS="doc/Manual-BRLTTY" einstalldocs |
225 |
+ fi |
226 |
+ |
227 |
+ keepdir /var/lib/BrlAPI |
228 |
+ rm -fr "${ED}/run" || die |
229 |
+ find "${ED}" -name '*.a' -delete || die |
230 |
+} |
231 |
+ |
232 |
+pkg_postinst() { |
233 |
+ tmpfiles_process ${PN}.conf |
234 |
+ |
235 |
+ elog "please be sure ${EROOT}/etc/brltty.conf is correct for your system." |
236 |
+ elog |
237 |
+ elog "To make brltty start on boot on an OpenRC system, type this command:" |
238 |
+ elog "# rc-update add brltty boot" |
239 |
+ elog |
240 |
+ elog "If you are using systemd, type this command:" |
241 |
+ elog "# systemctl daemon-reload" |
242 |
+ elog |
243 |
+ elog "Please reload udev by typing:" |
244 |
+ elog "# udevadm control --reload" |
245 |
+} |
246 |
|
247 |
diff --git a/app-accessibility/brltty/files/brltty.initd b/app-accessibility/brltty/files/brltty.initd |
248 |
new file mode 100644 |
249 |
index 000000000000..1d93e1e533c6 |
250 |
--- /dev/null |
251 |
+++ b/app-accessibility/brltty/files/brltty.initd |
252 |
@@ -0,0 +1,11 @@ |
253 |
+#!/sbin/openrc-run |
254 |
+# Copyright 1999-2022 Gentoo Authors |
255 |
+# Distributed under the terms of the GNU General Public License v2 |
256 |
+ |
257 |
+command=/bin/brltty |
258 |
+pidfile=/var/run/brltty.pid |
259 |
+command_args="-P ${pidfile} -q" |
260 |
+ |
261 |
+depend() { |
262 |
+ after dbus localmount |
263 |
+} |