brltty: rebuild for python3-3.13

This commit is contained in:
Andrew J. Hesford 2024-11-16 09:27:06 -05:00
parent c498909ecc
commit 083adf038a
2 changed files with 54 additions and 3 deletions

View file

@ -0,0 +1,28 @@
Python bindings will be built directly in the xbps-src template.
--- a/Bindings/Python/Makefile.in
+++ b/Bindings/Python/Makefile.in
@@ -45,10 +45,7 @@
all: $(PYTHON_API)
$(PYTHON_API): brlapi.auto.c $(API_HDRS) brlapi
- set -- $(V_setup) build --build-temp .; \
- [ "@host_os@" != "mingw32" ] || set -- "$${@}" --compiler mingw32; \
- "$(PYTHON)" ./setup.py "$${@}"
- [ "@host_os@" != "mingw32" ] || "$(PYTHON)" ./setup.py $(V_setup) bdist_wininst --skip-build
+ echo "To be built directly..."
brlapi.auto.c: $(SRC_DIR)/brlapi.pyx $(SRC_DIR)/c_brlapi.pxd constants.auto.pyx
"$(CYTHON)" -$(PYTHON_VERSION) -I. -o $@ $(SRC_DIR)/brlapi.pyx
@@ -62,10 +59,7 @@
INSTALLED_FILES = installed-files
install: all
- set -- $(V_setup) install --skip-build --record "$(INSTALLED_FILES)"; \
- [ -z "$(PYTHON_DESTDIR)" ] || set -- "$${@}" --root "$(PYTHON_DESTDIR)"; \
- [ -z "$(PYTHON_PREFIX)" ] || set -- "$${@}" --prefix "$(PYTHON_PREFIX)"; \
- "$(PYTHON)" ./setup.py "$${@}"
+ echo "To be installed directly..."
uninstall:
[ ! -f "$(INSTALLED_FILES)" ] || rm -f -- `$(AWK) '{printf "%s%s ", "$(PYTHON_DESTDIR)", $$0}' "$(INSTALLED_FILES)"`

View file

@ -1,9 +1,8 @@
# Template file for 'brltty'
pkgname=brltty
version=6.4
revision=11
revision=12
build_style=gnu-configure
build_helper=python3
configure_args="--enable-gpm --with-screen-driver=lx,sc
--with-tables-directory=/usr/share/brltty PYTHON=/usr/bin/python3"
hostmakedepends="pkg-config python3-Cython"
@ -29,6 +28,7 @@ pre_configure() {
*-musl) # There is no ldconfig in musl libc
sed -e "s;/sbin/ldconfig -n;echo;" -i configure ;;
esac
export PYTHON_LIBS="-L${XBPS_CROSS_BASE}/usr/lib -lpython${py3_ver}${py3_abiver}"
export PYTHON_CPPFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
}
@ -40,8 +40,31 @@ post_configure() {
esac
}
post_build() {
# brltty has two problems with the xbps-src cross environment:
#
# - brltty has a lock.h that will be overshadowed by Python's lock.h
# when the build helper overrides CFLAGS to prefer the cross root
#
# - The brltty build process drops critical environment variables for
# cross compilation of Python exctensions
#
# To work around this, just manually build the Python package.
cd Bindings/Python
. "${XBPS_BUILDHELPERDIR}/python3.sh"
python3 setup.py build --build-temp .
}
do_install() {
make INSTALL_ROOT=${DESTDIR} install
make INSTALL_ROOT="${DESTDIR}" install
local _inst_args=(
--skip-build --record=installed-files --root="${DESTDIR}" --prefix=/usr
)
( cd Bindings/Python && python3 ./setup.py install "${_inst_args[@]}" )
vsv brltty
vsconf Documents/brltty.conf
vdoc Documents/ChangeLog