From e412580e9ebbc70ad4a51a90ef7a0667ae036978 Mon Sep 17 00:00:00 2001 From: Christopher Brannon Date: Wed, 5 Jul 2017 10:19:44 -0700 Subject: [PATCH] brltty: misc fixes, remove deps, split Python bindings. * The brltty API was failing to work without polkit due to a bug. Patched, and patch was accepted upstream. Polkit is a recent optional dependency. Better to patch brltty's bug than forcibly require it. * Split out Python 3 bindings into python3-brlapi. This is the package name used by Debian. * Removed the a2 screen driver. It isn't needed, since people using brltty with a GUI are going to be using Orca anyway. --- srcpkgs/brltty/patches/authmethods.patch | 23 +++++++++++++++++++++++ srcpkgs/brltty/template | 17 ++++++++++++----- srcpkgs/python3-brlapi | 1 + 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/brltty/patches/authmethods.patch create mode 120000 srcpkgs/python3-brlapi diff --git a/srcpkgs/brltty/patches/authmethods.patch b/srcpkgs/brltty/patches/authmethods.patch new file mode 100644 index 00000000000..cedabd893cf --- /dev/null +++ b/srcpkgs/brltty/patches/authmethods.patch @@ -0,0 +1,23 @@ +commit 7b688681f5868416d0b6b9899fbd0d2ba213477d from upstream git +diff Programs/brlapi.h.in Programs/brlapi.h.in +--- Programs/brlapi.h.in ++++ Programs/brlapi.h.in +@@ -137,8 +137,16 @@ size_t BRLAPI_STDCALL brlapi_getHandleSize(void); + #ifdef BRLAPI_WIN32 + /* No authentication by default on Windows */ + #define BRLAPI_DEFAUTH "none" +-#else +-#define BRLAPI_DEFAUTH "polkit+keyfile:" BRLAPI_ETCDIR "/" BRLAPI_AUTHKEYFILE ++#else /* BRLAPI_WIN32 */ ++#define BRLAPI_DEFAUTH_KEYFILE "keyfile:" BRLAPI_ETCDIR "/" BRLAPI_AUTHKEYFILE ++ ++#ifdef USE_POLKIT ++#define BRLAPI_DEFAUTH_POLKIT "+polkit" ++#else /* USE_POLKIT */ ++#define BRLAPI_DEFAUTH_POLKIT "" ++#endif /* USE_POLKIT */ ++ ++#define BRLAPI_DEFAUTH BRLAPI_DEFAUTH_KEYFILE BRLAPI_DEFAUTH_POLKIT + #endif /* BRLAPI_WIN32 */ + + #ifdef __MINGW32__ diff --git a/srcpkgs/brltty/template b/srcpkgs/brltty/template index 659beea292a..fababd6aa19 100644 --- a/srcpkgs/brltty/template +++ b/srcpkgs/brltty/template @@ -1,12 +1,11 @@ # Template file for 'brltty' pkgname=brltty version=5.5 -revision=2 +revision=3 build_style=gnu-configure -hostmakedepends="pkg-config python3-Cython python3 xproto" -makedepends="ncurses-devel alsa-lib-devel gpm-devel at-spi2-core-devel dbus-devel glib-devel xproto icu-devel python3-devel libbluetooth-devel" -depends="python3" -configure_args="--enable-gpm --with-screen-driver=lx,a2,sc --with-tables-directory=/usr/share/brltty PYTHON=/usr/bin/python3" +hostmakedepends="pkg-config python3-Cython python3" +makedepends="ncurses-devel alsa-lib-devel gpm-devel icu-devel python3-devel libbluetooth-devel" +configure_args="--enable-gpm --with-screen-driver=lx,sc --with-tables-directory=/usr/share/brltty PYTHON=/usr/bin/python3" short_desc="Braille display driver for Linux/Unix" maintainer="Juan RP " license="GPL-2, LGPL-2.1" @@ -54,3 +53,11 @@ brltty-devel_package() { vmove usr/share/man/man3 } } + +python3-brlapi_package() { + short_desc+=" - Python 3 bindings" + depends="${sourcepkg}-${version}_${revision} python3" + pkg_install() { + vmove usr/lib/python3.5/site-packages + } +} diff --git a/srcpkgs/python3-brlapi b/srcpkgs/python3-brlapi new file mode 120000 index 00000000000..a32c7c356db --- /dev/null +++ b/srcpkgs/python3-brlapi @@ -0,0 +1 @@ +brltty \ No newline at end of file