diff --git a/backport-support-3.10.patch b/backport-support-3.10.patch deleted file mode 100644 index a01edba..0000000 --- a/backport-support-3.10.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 09b9701a17618939fa0746ff532449f933213a68 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Thu, 15 Apr 2021 11:32:15 +0200 -Subject: [PATCH] Python modules check: Assert exit code, not empty output - -Distutils is deprecated in Python 3.10+: -https://www.python.org/dev/peps/pep-0632/ - -When importing it, there is a warning: - - DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives - -The configure script falsely assumed this is an error. -Instead, we now check for the exit code, which is more explicit. - -In the long term, we need to migrate away from distutils, this is a stopgap measure only. ---- - Bindings/Python/bindings.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Bindings/Python/bindings.m4 b/Bindings/Python/bindings.m4 -index 784418f0c..ee28525fc 100644 ---- a/Bindings/Python/bindings.m4 -+++ b/Bindings/Python/bindings.m4 -@@ -40,7 +40,7 @@ else - for python_module in sys distutils.sysconfig - do - python_error="`"${PYTHON}" -c "import ${python_module};" 2>&1`" -- if test -n "${python_error}" -+ if test $? -ne 0 - then - AC_MSG_WARN([Python module not found: ${python_module}: ${python_error}]) - PYTHON_OK=false diff --git a/brltty-6.1.tar.xz b/brltty-6.1.tar.xz deleted file mode 100644 index f0eee68..0000000 Binary files a/brltty-6.1.tar.xz and /dev/null differ diff --git a/brltty-5.0-libspeechd.patch b/brltty-6.3-libspeechd.patch similarity index 100% rename from brltty-5.0-libspeechd.patch rename to brltty-6.3-libspeechd.patch diff --git a/brltty-6.1-loadLibrary.patch b/brltty-6.3-loadLibrary.patch similarity index 53% rename from brltty-6.1-loadLibrary.patch rename to brltty-6.3-loadLibrary.patch index a43c19e..8b64481 100644 --- a/brltty-6.1-loadLibrary.patch +++ b/brltty-6.3-loadLibrary.patch @@ -1,9 +1,9 @@ -diff --git a/Bindings/Java/NativeLibrary.java b/Bindings/Java/NativeLibrary.java -index 8a3b003..c404bf2 100644 ---- a/Bindings/Java/NativeLibrary.java -+++ b/Bindings/Java/NativeLibrary.java -@@ -21,7 +21,15 @@ public class NativeLibrary { - } +diff --git a/Bindings/Java/NativeComponent.java b/Bindings/Java/NativeComponent.java +index 2e6304a..cf6c9b0 100644 +--- a/Bindings/Java/NativeComponent.java ++++ b/Bindings/Java/NativeComponent.java +@@ -23,7 +23,15 @@ public class NativeComponent extends Component { + private native static void initializeNativeData (); static { - System.loadLibrary("brlapi_java"); @@ -16,6 +16,6 @@ index 8a3b003..c404bf2 100644 + throw new UnsatisfiedLinkError("brlapi_java library load failed"); + } + } - new NativeLibrary().initializeNativeData(); + initializeNativeData(); } - } + diff --git a/brltty-6.6-cython3.patch b/brltty-6.6-cython3.patch new file mode 100644 index 0000000..9696e2b --- /dev/null +++ b/brltty-6.6-cython3.patch @@ -0,0 +1,20 @@ +--- python2/Bindings/Python/brlapi.pyx 2023-07-17 07:55:47.000000000 -0700 ++++ python2/Bindings/Python/brlapi.pyx.new 2023-08-15 09:06:23.675136077 -0700 +@@ -453,6 +453,7 @@ + c_brlapi.brlapi_protocolExceptionInit(self.h) + if self.fd == -1: + c_brlapi.free(self.h) ++ self.h = NULL + raise ConnectionError(self.settings.host, self.settings.auth) + + def closeConnection(self): +@@ -465,7 +466,8 @@ + """Release resources used by the connection""" + if self.fd != -1: + c_brlapi.brlapi__closeConnection(self.h) +- c_brlapi.free(self.h) ++ if self.h != NULL: ++ c_brlapi.free(self.h) + + property host: + """To get authorized to connect, libbrlapi has to tell the BrlAPI server a secret key, for security reasons. This is the path to the file which holds it; it will hence have to be readable by the application.""" diff --git a/brltty-6.6.tar.xz b/brltty-6.6.tar.xz new file mode 100644 index 0000000..77de9c6 Binary files /dev/null and b/brltty-6.6.tar.xz differ diff --git a/brltty.spec b/brltty.spec index ff55607..a7bfddc 100644 --- a/brltty.spec +++ b/brltty.spec @@ -1,4 +1,4 @@ -%define api_ver 0.8.0 +%define api_ver 0.8.5 %define tcl_version tcl8.6 %{!?tcl_sitearch: %global tcl_sitearch %{_prefix}/%{_lib}/%{tcl_version}} @@ -6,8 +6,8 @@ %bcond_with speech Name: brltty -Version: 6.1 -Release: 5 +Version: 6.6 +Release: 1 Summary: Braille display driver for Linux/Unix License: LGPLv2+ URL: http://brltty.app/ @@ -15,17 +15,17 @@ Source0: http://brltty.app/archive/%{name}-%{version}.tar.xz Source1: brltty.service -Patch0: brltty-6.1-loadLibrary.patch +Patch0: brltty-6.3-loadLibrary.patch %if %{with speech} -Patch1: brltty-5.0-libspeechd.patch +Patch1: brltty-6.3-libspeechd.patch %endif -Patch2: backport-support-3.10.patch +Patch2: brltty-6.6-cython3.patch BuildRequires: byacc glibc-kernheaders bluez-libs-devel systemd gettext BuildRequires: python3-devel autoconf at-spi2-core-devel alsa-lib-devel -BuildRequires: automake +BuildRequires: automake polkit-devel doxygen python3-docutils %if %{with espeak} BuildRequires: espeak-ng-devel @@ -157,17 +157,19 @@ done %install mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs %make_install JAVA_JAR_DIR=%{_jnidir} JAVA_JNI_DIR=%{_libdir}/brltty JAVA_JNI=yes + +pushd Authorization/Polkit +make install +popd + install -m 0644 Documents/brltty.conf ${RPM_BUILD_ROOT}%{_sysconfdir} install -D -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/brltty.service -chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/brltty-config +chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/brltty-config.sh rm -rf $RPM_BUILD_ROOT/%{_libdir}/libbrlapi.a %find_lang %{name} cp -p %{name}.lang ../ - -/usr/bin/2to3 -wn ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb -sed -i 's|/usr/bin/python|/usr/bin/python3|g' ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb %check @@ -218,6 +220,7 @@ fi %{_sysconfdir}/X11/Xsession.d/90xbrlapi %{_datadir}/polkit-1/actions/org.a11y.brlapi.policy +%{_datadir}/polkit-1/rules.d/org.a11y.brlapi.rules %exclude %{_datadir}/gdm/greeter/autostart/xbrlapi.desktop %{_unitdir}/brltty.service @@ -225,15 +228,15 @@ fi %files devel %{_libdir}/libbrlapi.so +%{_libdir}/pkgconfig/brltty.pc %{_includedir}/brltty %{_includedir}/brlapi*.h %files docs %defattr(644,root,root) -%doc doc/* -#%doc Drivers/Speech/SpeechDispatcher/README -#%doc Drivers/Braille/XWindow/README +%doc Drivers/Speech/SpeechDispatcher/README +%doc Drivers/Braille/XWindow/README %doc Documents/* %doc %{_mandir}/man[15]/brltty.* %doc %{_mandir}/man1/xbrlapi.* @@ -268,6 +271,9 @@ fi %changelog +* Tue Sep 05 2023 yaoxin - 6.6-1 +- Update to 6.6 + * Fri Apr 15 2022 gaihuiying - 6.1-5 - Type:bugfix - Id:NA