remove former patch for includedir in pkg-config file causing wrong concatenation in Cflags [release 0.11.5-3mamba;Sun Jan 14 2024]

This commit is contained in:
Silvan Calarco 2024-01-15 10:08:21 +01:00
parent 286b37ec1a
commit ae7d836189
6 changed files with 4 additions and 212 deletions

View File

@ -1,45 +0,0 @@
From 5ede80b0713c75b21925203c3ef389c86cb69e6d Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 20 Jul 2018 15:04:48 +0200
Subject: [PATCH] Remove pyxdg dependency
And use the same algorithm as GLib to determine the base user config
directory (XDG_CONFIG_HOME, then ~/.config then /tmp/$USERNAME/.config)
---
src/api/python/speechd_config/config.py.in | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/api/python/speechd_config/config.py.in b/src/api/python/speechd_config/config.py.in
index ccf8803..e8393e5 100644
--- a/src/api/python/speechd_config/config.py.in
+++ b/src/api/python/speechd_config/config.py.in
@@ -30,8 +30,6 @@ import socket
import sys
import time
-from xdg import BaseDirectory
-
# Locale/gettext configuration
locale.setlocale(locale.LC_ALL, '')
@@ -167,7 +165,16 @@ class Tests:
def user_conf_dir(self):
"""Return user configuration directory"""
- return os.path.join(BaseDirectory.xdg_config_home, "speech-dispatcher")
+ config_dir = os.environ['XDG_CONFIG_HOME']
+ if not config_dir:
+ home_dir = os.environ['HOME']
+ if home_dir:
+ config_dir = os.path.join(home_dir, ".config")
+ else:
+ tmpdir = os.environ['TMPDIR'] or "/tmp/"
+ config_dir = os.path.join(tmpdir, os.getlogin(), ".config")
+
+ return os.path.join(config_dir, "speech-dispatcher")
def system_conf_dir(self):
"""Determine system configuration directory"""
--
2.17.1

View File

@ -1,12 +0,0 @@
diff -Nru speech-dispatcher-0.7.1.orig/config/speechd.conf speech-dispatcher-0.7.1/config/speechd.conf
--- speech-dispatcher-0.7.1.orig/config/speechd.conf 2010-09-10 10:23:54.000000000 +0200
+++ speech-dispatcher-0.7.1/config/speechd.conf 2012-07-14 15:40:24.068650861 +0200
@@ -162,7 +162,7 @@
# different sound systems and provides alternative output for Pulse Audio
# and ALSA as well as for other backends.
-# AudioOutputMethod "pulse"
+AudioOutputMethod "alsa"
# -- Pulse Audio parameters --

View File

@ -1,13 +0,0 @@
--- speech-dispatcher-0.8/config/speechd.conf.orig 2013-03-07 10:07:03.564754220 +0100
+++ speech-dispatcher-0.8/config/speechd.conf 2013-03-07 10:07:07.690697567 +0100
@@ -212,8 +212,8 @@
#AddModule "flite" "sd_flite" "flite.conf"
#AddModule "ivona" "sd_ivona" "ivona.conf"
#AddModule "pico" "sd_pico" "pico.conf"
-#AddModule "espeak-generic" "sd_generic" "espeak-generic.conf"
-#AddModule "espeak-mbrola-generic" "sd_generic" "espeak-mbrola-generic.conf"
+AddModule "espeak-generic" "sd_generic" "espeak-generic.conf"
+AddModule "espeak-mbrola-generic" "sd_generic" "espeak-mbrola-generic.conf"
#AddModule "swift-generic" "sd_generic" "swift-generic.conf"
#AddModule "epos-generic" "sd_generic" "epos-generic.conf"
#AddModule "dtk-generic" "sd_generic" "dtk-generic.conf"

View File

@ -1,9 +0,0 @@
diff -Nru speech-dispatcher-0.8.orig/speech-dispatcher.pc.in speech-dispatcher-0.8/speech-dispatcher.pc.in
--- speech-dispatcher-0.8.orig/speech-dispatcher.pc.in 2012-07-11 11:05:05.000000000 +0200
+++ speech-dispatcher-0.8/speech-dispatcher.pc.in 2013-04-01 15:03:59.581768421 +0200
@@ -8,4 +8,4 @@
Version: @VERSION@
Requires: glib-2.0
Libs: -L${libdir} -lspeechd
-Cflags: -I${includedir}
+Cflags: -I${includedir} -I${includedir}/@PACKAGE_NAME@

View File

@ -1,118 +0,0 @@
#!/bin/sh
#
# speech-dispatcher A device independent layer for speech synthesis
#
# chkconfig: 345 99 01
#
# description: A device independent layer for speech synthesis.
#
# $Id: template.init 9117 2007-11-28 20:28:39Z qboosh
# Source function library
. /etc/rc.d/init.d/functions
# $ speech-dispatcher -h
# Usage: speech-dispatcher [-{d|s}] [-l {1|2|3|4|5}] [-p=port] | [-v] | [-h]
# Speech Dispatcher -- Common interface for Speech Synthesis (GNU GPL)
#
# -d, --run-daemon - Run as a daemon
# -s, --run-single - Run as single application
# -l, --log-level - Set log level (1..5)
# -p, --port - Specify a port number
# -P, --pid-file - Set path to pid file
# -C, --config-dir - Set path to configuration
# -v, --version - Report version of this program
# -h, --help - Print this info
LOGLEVEL=""
PORT=""
PIDFILE=""
RUNAS="root"
# Get service config - may override defaults
[ -r /etc/sysconfig/speech-dispatcher ] && . /etc/sysconfig/speech-dispatcher
[ "$PIDFILE" ] || PIDFILE="/var/run/speech-dispatcher/speech-dispatcher.pid"
start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/speech-dispatcher ]; then
echo -n "Starting speech-dispatcher: "
daemon --user ${RUNAS:-speech-dispatcher} \
"$SERVICE_RUN_NICE_LEVEL" \
speech-dispatcher --pid-file $PIDFILE \
${LOGLEVEL:+--log-level $LOGLEVEL}
RETVAL=$?
evaluate_retval
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/speech-dispatcher
else
echo "speech-dispatcher: already running"
fi
}
stop() {
if [ -f /var/lock/subsys/speech-dispatcher ]; then
# Stop daemons.
echo -n "Stopping speech-dispatcher: "
killproc -p $PIDFILE speech-dispatcher -TERM
evaluate_retval
echo
rm -f /var/lock/subsys/speech-dispatcher
else
echo "speech-dispatcher: not running."
fi
}
reload() {
if [ -f /var/lock/subsys/speech-dispatcher ]; then
echo -n "Reloading speech-dispatcher: "
killproc -p $PIDFILE speech-dispatcher -HUP
RETVAL=$?
evaluate_retval
echo
else
echo "speech-dispatcher: not_running"
RETVAL=7
fi
}
condrestart() {
if [ -f /var/lock/subsys/speech-dispatcher ]; then
stop
start
else
echo "speech-dispatcher: not_running"
RETVAL=$1
fi
}
RETVAL=0
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
try-restart)
condrestart 0
;;
reload|force-reload)
reload
;;
status)
status speech-dispatcher
RETVAL=$?
;;
*)
echo "Usage: speech-dispatcher {start|stop|restart|try-restart|reload|force-reload|status}"
exit 3
esac
exit $RETVAL

View File

@ -1,6 +1,6 @@
Name: speech-dispatcher
Version: 0.11.5
Release: 2mamba
Release: 3mamba
Summary: A high-level device independent layer for speech synthesis
Group: System/Multimedia
Vendor: openmamba
@ -8,11 +8,6 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/brailcom/speechd
Source: https://github.com/brailcom/speechd.git/%{version}/speechd-%{version}.tar.bz2
Source1: speech-dispatcher.init
Patch0: %{name}-0.7.1-alsa_set_default.patch
Patch1: %{name}-0.8-enable_espeak_mbrola.patch
Patch2: speech-dispatcher-0.8-pkgconfig-add-includedir.patch
Patch3: speech-dispatcher-0.10.2-remove-python-xdg-dependency.patch
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -113,9 +108,6 @@ This package contains the flite module.
%prep
%setup -q -n speechd-%{version}
%patch 2 -p1
#%patch3 -p1
#sed -i "s|env python3$|env python3.6|" src/api/python/speechd_config/spd-conf
cat > .tarball-version << _EOF
%{version}
@ -154,12 +146,6 @@ sed -i "s|help2man -N|help2man -N --no-discard-stderr|" src/api/python/speechd_c
install -d -m0755 \
%{buildroot}/var/log/speech-dispatcher
#install -D -m0755 %{S:1} %{buildroot}%{_initrddir}/speech-dispatcherd
#cp src/modules/lib*.so %{buildroot}%{_libdir}/speech-dispatcher/
rm -f %{buildroot}%{_libdir}/speech-dispatcher/*.la
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_infodir}/dir
%find_lang %{name}
@ -269,6 +255,9 @@ rm -f %{buildroot}%{_infodir}/dir
%{python3_sitearch}/speechd*
%changelog
* Sun Jan 14 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 0.11.5-3mamba
- remove former patch for includedir in pkg-config file causing wrong concatenation in Cflags
* Sun Oct 15 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 0.11.5-2mamba
- rebuilt with python3 == 3.11