Codebase list freedict-tools / aa3943c
Remove outdated teiaddphonetics patches; update other patches Sebastian Humenda 3 years ago
5 changed file(s) with 1 addition(s) and 162 deletion(s). Raw diff Collapse all Expand all
+0
-28
debian/patches/10-backport-install_addphonetics less more
0 Description: Install teiaddphonetics
1 This patch adds the teiaddphonetics script to the list of files to be installed
2 under /usr/share/freedict.
3 Author: Sebastian Humenda <shumenda@gmx.de>
4 Last-Update: 2018-09-23
5
6 Index: freedict-tools/Makefile
7 ===================================================================
8 --- freedict-tools.orig/Makefile
9 +++ freedict-tools/Makefile
10 @@ -137,7 +137,8 @@ mk_venv: #! initialise a new (Python) vi
11 # NOTE: the directories below HAVE to be on one line
12 DIRS := mk xquery xsl/inc
13 PATHS := $(wildcard freedict-database.rng \
14 - mk/* xsl/inc/* \
15 + mk/*.mk xsl/inc/* \
16 + teiaddphonetics \
17 xquery/* xsl/tei2c5.xsl)
18 install: #! install the tools to $$DESTDIR/$PREFIX/share/freedict (default /usr/local/share/freedict)
19 install:
20 @@ -151,6 +152,7 @@ install:
21 install -m 644 $$f $(INSTALLDIR)/$$f; \
22 fi \
23 done
24 + chmod 755 $(INSTALLDIR)/teiaddphonetics
25
26
27
+0
-109
debian/patches/dontrequirepython less more
0 Description: Don't require python for build
1 The features requiring Python are not packaged for Debian, therefore this patch
2 removes the build system's check for it.
3 Author: Sebastian Humenda <shumenda@gmx.de>
4 Last-Update: 2018-08-04
5
6
7 Index: freedict-tools/mk/config.mk
8 ===================================================================
9 --- freedict-tools.orig/mk/config.mk
10 +++ freedict-tools/mk/config.mk
11 @@ -68,52 +68,52 @@ FREEDICTRC = $(wildcard $(HOME)/.config/
12
13
14 ################################################################################
15 -# Python special handling
16 -# First, the interpreter is queried for the correct version (and name). Then the
17 -# setup for a virtual environment is done. For the "end-user", all that matters
18 -# should be the exc_pyscript function, e.g.:
19 +## Python special handling
20 +## First, the interpreter is queried for the correct version (and name). Then the
21 +## setup for a virtual environment is done. For the "end-user", all that matters
22 +## should be the exc_pyscript function, e.g.:
23 +##
24 +## foo:
25 +## $(exc_pyscript) fd_api --what-ever
26 #
27 -# foo:
28 -# $(exc_pyscript) fd_api --what-ever
29 -
30 -# find interpreter with matching name, python3 or python?
31 -PYTHON := $(shell command -v python3 2> /dev/null)
32 -ifeq ($(PYTHON),)
33 - PYTHON := $(shell command -v python 2> /dev/null)
34 -ifeq ("$(PYTHON)","")
35 -$(error No Python executable found, please make sure that a recent Python is in the search path)
36 -endif
37 -endif
38 -
39 -# query version
40 -PYTHON_VERSION_FULL := $(wordlist 2,4,$(subst ., ,$(shell $(PYTHON) --version 2>&1)))
41 -PYTHON_VERSION_MAJOR := $(word 1,${PYTHON_VERSION_FULL})
42 -
43 -ifneq ($(PYTHON_VERSION_MAJOR),3)
44 -$(error a python Version >= 3.4 is required, current python major is $(PYTHON_VERSION_MAJOR))
45 -endif
46 -
47 -# exc_pyscript is meant to either call a system-wide installed version or one
48 -# from a virtual env. The latter needs to be specified in the FD configuration,
49 -# documented in the wiki.
50 -# This is a fallback for system-wide script usage:
51 -exc_pyscript = $(1) $(2) $(3) $(4) $(5) $(6) $(7) $(8) $(9)
52 -
53 -# find a (python) virtual env
54 -# ToDo: look at detection algorithm
55 -FREEDICTRC = $(HOME)/.config/freedict/freedictrc
56 -ifneq ($(wildcard $(FREEDICTRC)),)
57 -VIRTUAL_ENV=$(shell grep -E 'virtual_env.*=.*' < $(FREEDICTRC) | cut -d = -f 2\
58 - |tr -d ' ')
59 -# if virtual env found
60 -ifneq ($(VIRTUAL_ENV),)
61 -ifneq ($(wildcard $(VIRTUAL_ENV)),)
62 -# call python from the virtual environment
63 -exc_pyscript = source $(VIRTUAL_ENV)/bin/activate; \
64 - $(1) $(2) $(3) $(4) $(5) $(6) $(7) $(8) $(9)
65 -endif
66 -endif
67 -endif
68 +## find interpreter with matching name, python3 or python?
69 +#PYTHON := $(shell command -v python3 2> /dev/null)
70 +#ifeq ($(PYTHON),)
71 +# PYTHON := $(shell command -v python 2> /dev/null)
72 +#ifeq ("$(PYTHON)","")
73 +#$(error No Python executable found, please make sure that a recent Python is in the search path)
74 +#endif
75 +#endif
76 +#
77 +## query version
78 +#PYTHON_VERSION_FULL := $(wordlist 2,4,$(subst ., ,$(shell $(PYTHON) --version 2>&1)))
79 +#PYTHON_VERSION_MAJOR := $(word 1,${PYTHON_VERSION_FULL})
80 +#
81 +#ifneq ($(PYTHON_VERSION_MAJOR),3)
82 +#$(error a python Version >= 3.4 is required, current python major is $(PYTHON_VERSION_MAJOR))
83 +#endif
84 +#
85 +## exc_pyscript is meant to either call a system-wide installed version or one
86 +## from a virtual env. The latter needs to be specified in the FD configuration,
87 +## documented in the wiki.
88 +## This is a fallback for system-wide script usage:
89 +#exc_pyscript = $(1) $(2) $(3) $(4) $(5) $(6) $(7) $(8) $(9)
90 +#
91 +## find a (python) virtual env
92 +## ToDo: look at detection algorithm
93 +#FREEDICTRC = $(HOME)/.config/freedict/freedictrc
94 +#ifneq ($(wildcard $(FREEDICTRC)),)
95 +#VIRTUAL_ENV=$(shell grep -E 'virtual_env.*=.*' < $(FREEDICTRC) | cut -d = -f 2\
96 +# |tr -d ' ')
97 +## if virtual env found
98 +#ifneq ($(VIRTUAL_ENV),)
99 +#ifneq ($(wildcard $(VIRTUAL_ENV)),)
100 +## call python from the virtual environment
101 +#exc_pyscript = source $(VIRTUAL_ENV)/bin/activate; \
102 +# $(1) $(2) $(3) $(4) $(5) $(6) $(7) $(8) $(9)
103 +#endif
104 +#endif
105 +#endif
106
107
108 ################################################################################
+0
-21
debian/patches/mitigate_teiaddphonetics_failure less more
0 Description: mask teiaddphonetics failure
1 Teiaddphonetics can fail on a dictionary, aborting the whole package build
2 process. This patch circumvents this issue by copying the unmodified TEI file
3 to the destination so that the build process can continue.
4 Author: Sebastian Humenda <shumenda@gmx.de>
5 Last-Update: 2019-01-29
6
7 Index: freedict-tools/mk/dicts.mk
8 ===================================================================
9 --- freedict-tools.orig/mk/dicts.mk
10 +++ freedict-tools/mk/dicts.mk
11 @@ -95,7 +95,8 @@ $(BUILD_DIR)/tei:
12 mkdir -p $@
13
14 $(call dict_tei_source): $(dictname).tei | $(BUILD_DIR)/tei
15 - $(TEIADDPHONETICS) --infile $< --outfile $@
16 + if ! $(TEIADDPHONETICS) --infile $< --outfile $@; then \
17 + cp $^ $@; fi
18 else ifeq ($(shell echo '$(supported_phonetics_lang)' |tr -d '[:space:]'|tail -c 1),1)
19 dict_tei_source = $(error Espeak or espeak-ng not installed, please install it and proceed.)
20 endif
1717 TARGET_DIRS = $(addprefix $(INSTALLDIR)/tools/, $(dirs))
1818
1919
20 @@ -135,9 +135,8 @@ mk_venv: #! initialise a new (Python) vi
20 @@ -146,9 +146,8 @@ mk_venv: #! initialise a new (Python) vi
2121 fi
2222
2323 # NOTE: the directories below HAVE to be on one line
00 add_debian_management_script
11 remove_slob_support
22 remove_api_from_install
3 dontrequirepython
4 10-backport-install_addphonetics
5 mitigate_teiaddphonetics_failure