Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-accessibility/brltty/
Date: Sun, 31 Oct 2021 03:06:18
Message-Id: 1635649419.d9baf47276aef3726a1b65b8589d112f2093a87d.sam@gentoo
1 commit: d9baf47276aef3726a1b65b8589d112f2093a87d
2 Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
3 AuthorDate: Fri Oct 29 16:28:39 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 31 03:03:39 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9baf472
7
8 app-accessibility/brltty: min java 1.8:*
9
10 Closes: https://bugs.gentoo.org/787320
11 Package-Manager: Portage-3.0.28, Repoman-3.0.3
12 Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
13 Closes: https://github.com/gentoo/gentoo/pull/22753
14 Signed-off-by: Sam James <sam <AT> gentoo.org>
15
16 app-accessibility/brltty/brltty-6.1-r1.ebuild | 218 ++++++++++++++++++++++++++
17 1 file changed, 218 insertions(+)
18
19 diff --git a/app-accessibility/brltty/brltty-6.1-r1.ebuild b/app-accessibility/brltty/brltty-6.1-r1.ebuild
20 new file mode 100644
21 index 00000000000..14ae62a8ce0
22 --- /dev/null
23 +++ b/app-accessibility/brltty/brltty-6.1-r1.ebuild
24 @@ -0,0 +1,218 @@
25 +# Copyright 1999-2021 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +PYTHON_COMPAT=( python3_{7..9} )
31 +FINDLIB_USE="ocaml"
32 +JAVA_PKG_WANT_SOURCE="1.8"
33 +JAVA_PKG_WANT_TARGET="1.8"
34 +
35 +inherit findlib multilib toolchain-funcs java-pkg-opt-2 flag-o-matic usr-ldscript \
36 + autotools udev systemd python-r1 tmpfiles
37 +
38 +DESCRIPTION="Daemon that provides access to the Linux/Unix console for a blind person"
39 +HOMEPAGE="https://brltty.app/"
40 +SRC_URI="https://brltty.app/archive/${P}.tar.xz"
41 +
42 +LICENSE="GPL-2 LGPL-2.1"
43 +SLOT="0"
44 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
45 +IUSE="+api +beeper bluetooth +contracted-braille doc +fm gpm iconv icu
46 + java louis +midi ncurses nls ocaml +pcm policykit python
47 + usb systemd +speech tcl xml X"
48 +REQUIRED_USE="doc? ( api )
49 + java? ( api )
50 + ocaml? ( api )
51 + python? ( api ${PYTHON_REQUIRED_USE} )
52 + tcl? ( api )"
53 +
54 +DEPEND="
55 + app-accessibility/at-spi2-core:2
56 + dev-libs/libpcre2[pcre32]
57 + sys-apps/dbus
58 + bluetooth? ( net-wireless/bluez )
59 + gpm? ( >=sys-libs/gpm-1.20 )
60 + iconv? ( virtual/libiconv )
61 + icu? ( dev-libs/icu:= )
62 + louis? ( dev-libs/liblouis:= )
63 + midi? ( media-libs/alsa-lib )
64 + ncurses? ( sys-libs/ncurses:0= )
65 + pcm? ( media-libs/alsa-lib )
66 + policykit? ( sys-auth/polkit )
67 + python? ( ${PYTHON_DEPS} )
68 + speech? (
69 + app-accessibility/espeak
70 + app-accessibility/flite
71 + app-accessibility/speech-dispatcher
72 + )
73 + systemd? ( sys-apps/systemd )
74 + tcl? ( >=dev-lang/tcl-8.4.15:0= )
75 + usb? ( virtual/libusb:0 )
76 + xml? ( dev-libs/expat )
77 + X? (
78 + x11-libs/libX11
79 + x11-libs/libXaw
80 + x11-libs/libXfixes
81 + x11-libs/libXt
82 + x11-libs/libXtst
83 + )"
84 +RDEPEND="${DEPEND}
85 + java? ( >=virtual/jre-1.8:* )
86 +"
87 +BDEPEND="
88 + virtual/pkgconfig
89 + java? ( >=virtual/jdk-1.8:* )
90 + nls? ( virtual/libintl )
91 + python? ( >=dev-python/cython-0.16[${PYTHON_USEDEP}] )
92 +"
93 +
94 +HTML_DOCS=( "${S}"/Documents/Manual-BrlAPI/. )
95 +
96 +PATCHES=(
97 + "${FILESDIR}"/${PN}-6.0-udev.patch
98 + "${FILESDIR}"/${PN}-5.2-respect-AR.patch
99 +)
100 +
101 +src_prepare() {
102 + default
103 +
104 + java-pkg-opt-2_src_prepare
105 +
106 + # We run eautoconf instead of using eautoreconf because brltty uses
107 + # a custom build system that uses autoconf without the rest of the
108 + # autotools.
109 + eautoconf
110 + use python && python_copy_sources
111 +}
112 +
113 +src_configure() {
114 + tc-export AR LD PKG_CONFIG
115 +
116 + export JAVAC=""
117 + export JAVA_JNI_FLAGS=""
118 + if use java; then
119 + export JAVA_HOME="$(java-config -g JAVA_HOME)"
120 + export JAVAC_HOME="${JAVA_HOME}/bin"
121 + export JAVA_JNI_FLAGS="$(java-pkg_get-jni-cflags)"
122 + export JAVAC="$(java-pkg_get-javac) -encoding UTF-8 $(java-pkg_javac-args)"
123 + fi
124 +
125 + # override prefix in order to install into /
126 + # braille terminal needs to be available as soon in the boot process as
127 + # possible
128 + # Also override localstatedir so that the lib/brltty directory is installed
129 + # correctly.
130 + # Disable stripping since we do that ourselves.
131 + local myconf=(
132 + --prefix="${EPREFIX}"/
133 + --localedir="${EPREFIX}"/usr/share/locale
134 + --includedir="${EPREFIX}"/usr/include
135 + --localstatedir="${EPREFIX}"/var
136 + --disable-stripping
137 + --with-writable-directory="${EPREFIX}"/run/brltty
138 + $(use_enable api)
139 + $(use_with beeper beep-package)
140 + $(use_enable contracted-braille)
141 + $(use_with fm fm-package)
142 + $(use_enable gpm)
143 + $(use_enable iconv)
144 + $(use_enable icu)
145 + $(use_enable java java-bindings)
146 + $(use_enable louis liblouis)
147 + $(use_with midi midi-package)
148 + $(use_enable nls i18n)
149 + $(use_enable ocaml ocaml-bindings)
150 + $(use_with pcm pcm-package)
151 + $(use_enable policykit polkit)
152 + $(use_enable python python-bindings)
153 + $(use_enable speech speech-support)
154 + $(use_with systemd service-package)
155 + $(use_enable tcl tcl-bindings)
156 + $(use_enable xml expat)
157 + $(use_enable X x)
158 + $(use_with bluetooth bluetooth-package)
159 + $(use_with ncurses curses)
160 + $(use_with usb usb-package) )
161 +
162 + econf "${myconf[@]}"
163 +
164 + if use python; then
165 + python_configure() {
166 + econf "${myconf[@]}"
167 + }
168 + python_foreach_impl run_in_build_dir python_configure
169 + fi
170 +}
171 +
172 +src_compile() {
173 + emake JAVA_JNI_FLAGS="${JAVA_JNI_FLAGS}" JAVAC="${JAVAC}"
174 +
175 + if use python; then
176 + python_build() {
177 + cd "Bindings/Python" || die
178 + emake
179 + }
180 + python_foreach_impl run_in_build_dir python_build
181 + fi
182 +}
183 +
184 +src_install() {
185 + if use ocaml; then
186 + findlib_src_preinst
187 + fi
188 +
189 + emake INSTALL_ROOT="${D}" OCAML_LDCONF= install
190 +
191 + if use python; then
192 + python_install() {
193 + cd "Bindings/Python" || die
194 + emake INSTALL_ROOT="${D}" install
195 + }
196 + python_foreach_impl run_in_build_dir python_install
197 + fi
198 +
199 + if use java; then
200 + java-pkg_doso Bindings/Java/libbrlapi_java.so
201 + java-pkg_dojar Bindings/Java/brlapi.jar
202 + fi
203 +
204 + insinto /etc
205 + doins Documents/brltty.conf
206 + udev_newrules Autostart/Udev/rules 70-brltty.rules
207 + newinitd "${FILESDIR}"/brltty.rc brltty
208 + systemd_dounit Autostart/Systemd/brltty@.service
209 + dotmpfiles "${FILESDIR}/${PN}.tmpfiles.conf"
210 +
211 + if use api ; then
212 + local libdir="$(get_libdir)"
213 + mkdir -p "${ED}"/usr/${libdir}/ || die
214 + mv "${ED}"/${libdir}/*.a "${ED}"/usr/${libdir}/ || die
215 + gen_usr_ldscript libbrlapi.so
216 + fi
217 +
218 + cd Documents || die
219 + mv Manual-BRLTTY/English/BRLTTY.txt BRLTTY-en.txt || die
220 + mv Manual-BRLTTY/French/BRLTTY.txt BRLTTY-fr.txt || die
221 + mv Manual-BrlAPI/English/BrlAPI.txt BrlAPI-en.txt || die
222 + dodoc CONTRIBUTORS ChangeLog HISTORY README* TODO BRLTTY-*.txt
223 + if use doc; then
224 + dodoc BrlAPI-*.txt
225 + HTML_DOCS="Manual-BRLTTY" einstalldocs
226 + fi
227 +
228 + keepdir /var/lib/BrlAPI
229 + rmdir "${ED}/run/brltty" || die
230 + rmdir "${ED}/run" || die
231 +}
232 +
233 +pkg_postinst() {
234 + tmpfiles_process ${PN}.tmpfiles.conf
235 +
236 + elog
237 + elog "please be sure ${EROOT}/etc/brltty.conf is correct for your system."
238 + elog
239 + elog "To make brltty start on boot, type this command as root:"
240 + elog
241 + elog "rc-update add brltty boot"
242 +}